You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 26, 2022. It is now read-only.
<p>The abstract operation AsyncGeneratorFunctionCreate requires the arguments: _kind_ which is one of (~Normal~, ~Method~), a parameter list production specified by _ParameterList_, a body production specified by _Body_, a Lexical Environment specified by _Scope_, and a Boolean flag _Strict_. AsyncGeneratorFunctionCreate performs the following steps:</p>
<p>The AsyncGeneratorRequest is a Record value used to store information about how an async generator should be resumed and contains capabilities for fulfilling or rejecting the corresponding promise.</p>
Copy file name to clipboardexpand all lines: spec/async-generator-function-objects.html
+13-13
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
<p>AsyncGenerator Function objects are functions that are usually created by evaluating |AsyncGeneratorDeclaration|, |AsyncGeneratorExpression|, and |AsyncGeneratorMethod| syntactic productions. They may also be created by calling the %AsyncGeneratorFunction% intrinsic.</p>
<p>The `AsyncGeneratorFunction` constructor is the %AsyncGeneratorFunction% intrinsic. When `AsyncGeneratorFunction` is called as a function rather than as a constructor, it creates and initializes a new AsyncGeneratorFunction object. Thus the function call `AsyncGeneratorFunction (...)` is equivalent to the object creation expression `new AsyncGeneratorFunction (...)` with the same arguments.</p>
6
6
<p>`AsyncGeneratorFunction` is designed to be subclassable. It may be used as the value of an `extends` clause of a class definition. Subclass constructors that intend to inherit the specified `AsyncGeneratorFunction` behaviour must include a `super` call to the `AsyncGeneratorFunction` constructor to create and initialize subclass instances with the internal slots necessary for built-in AsyncGeneratorFunction behaviour. All ECMAScript syntactic forms for defining async generator function objects create direct instances of `AsyncGeneratorFunction`. There is no syntactic means to create instances of `AsyncGeneratorFunction` subclasses.</p>
<p>The last argument specifies the body (executable code) of an async generator function; any preceding arguments specify formal parameters.</p>
11
11
<p>When the `AsyncGeneratorFunction` function is called with some arguments _p1_, _p2_, … , _pn_, _body_ (where _n_ might be 0, that is, there are no "_p_" arguments, and where _body_ might also not be provided), the following steps are taken:</p>
<h1>Properties of the AsyncGeneratorFunction Constructor</h1>
25
25
<p>The `AsyncGeneratorFunction` constructor is a standard built-in function object that inherits from the `Function` constructor. The value of the [[Prototype]] internal slot of the `AsyncGeneratorFunction` constructor is the intrinsic object %Function%.</p>
26
26
<p>The value of the [[Extensible]] internal slot of the AsyncGeneratorFunction constructor is *true*.</p>
27
27
<p>The value of the `name` property of the AsyncGeneratorFunction is `"AsyncGeneratorFunction"`.</p>
28
28
<p>The `AsyncGeneratorFunction` constructor has the following properties:</p>
<p>This is a data property with a value of 1. This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
<h1>Properties of the AsyncGeneratorFunction Prototype Object</h1>
44
44
<p>The AsyncGeneratorFunction prototype object is an ordinary object. It is not a function object and does not have an [[ECMAScriptCode]] internal slot or any other of the internal slots listed in (TODO: table-27 link) or (TODO: table link to AsyncGenerator internal slots). In addition to being the value of the prototype property of the %AsyncGeneratorFunction% intrinsic, it is the %AsyncGenerator% intrinsic.</p>
45
45
<p>The value of the [[Prototype]] internal slot of the AsyncGeneratorFunction prototype object is the %FunctionPrototype% intrinsic object. The initial value of the [[Extensible]] internal slot of the AsyncGeneratorFunction prototype object is *true*.</p>
<p>Every AsyncGeneratorFunction instance is an ECMAScript function object and has the internal slots listed in (TODO: table-27 link). The value of the [[FunctionKind]] internal slot for all such instances is `"generator"`.</p>
69
69
<p>Each AsyncGeneratorFunction instance has the following own properties:</p>
<p>The value of the `length` property is an integer that indicates the typical number of arguments expected by the AsyncGeneratorFunction. However, the language permits the function to be invoked with some other number of arguments. The behaviour of an AsyncGeneratorFunction when invoked on a number of arguments other than the number specified by its `length` property depends on the function.</p>
74
74
<p>This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *true* }.</p>
<p>The specification for the `name` property of Function instances given in <emu-xrefhref="#sec-function-instances-name"></emu-xref> also applies to AsyncGeneratorFunction instances.</p>
<p>Whenever an AsyncGeneratorFunction instance is created another ordinary object is also created and is the initial value of the async generator function's `prototype` property. The value of the prototype property is used to initialize the [[Prototype]] internal slot of a newly created AsyncGenerator object when the generator function object is invoked using [[Call]].</p>
85
85
<p>This property has the attributes { [[Writable]]: *true*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.</p>
Copy file name to clipboardexpand all lines: spec/async-generator-objects.html
+8-8
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,20 @@
2
2
3
3
<p>AsyncGenerator instances directly inherit properties from the object that is the value of the `prototype` property of the AsyncGenerator function that created the instance. AsyncGenerator instances indirectly inherit properties from the AsyncGenerator Prototype intrinsic, %AsyncGeneratorPrototype%.</p>
<p>The AsyncGenerator prototype object is the %AsyncGeneratorPrototype% intrinsic. It is also the initial value of the `prototype` property of the %AsyncGenerator% intrinsic (the AsyncGeneratorFunction.prototype).</p>
8
8
<p>The AsyncGenerator prototype is an ordinary object. It is not an AsyncGenerator instance and does not have an [[AsyncGeneratorState]] internal slot.</p>
9
9
<p>The value of the [[Prototype]] internal slot of the AsyncGenerator prototype object is the intrinsic object %AsyncIteratorPrototype%. The initial value of the [[Extensible]] internal slot of the AsyncGenerator prototype object is *true*.</p>
10
10
<p>All AsyncGenerator instances indirectly inherit properties of the AsyncGenerator prototype object.</p>
Copy file name to clipboardexpand all lines: spec/definitions.html
+5-5
Original file line number
Diff line number
Diff line change
@@ -17,10 +17,10 @@ <h2>Syntax</h2>
17
17
<p>|YieldExpression| and |AwaitExpression| cannot be used within the |FormalParameters| of an async generator function because any expressions that are part of |FormalParameters| are evaluated before the resulting async generator object is in a resumable state.</p>
18
18
</emu-note>
19
19
<emu-note>
20
-
<p>Abstract operations relating to async generator objects are defined in <emu-xrefhref="#sec-async-generator-abstract-operations"></emu-xref>.</p>
20
+
<p>Abstract operations relating to async generator objects are defined in <emu-xrefhref="#sec-asyncgenerator-abstract-operations"></emu-xref>.</p>
<p>The abstract operation ForIn/OfHeadEvaluation is called with arguments _TDZnames_, _expr_, _iterationKind_, and _async_. The value of _iterationKind_ is ~enumerate~, ~iterate~, or ~async-iterate~.</p>
<p>The abstract operation ForIn/OfBodyEvaluation is called with arguments _lhs_, _stmt_, _iterator_, _lhsKind_, _labelSet_, and optional argument _iteratorKind_. The value of _lhsKind_ is either ~assignment~, ~varBinding~ or ~lexicalBinding~. The value of _iteratorKind_ is either ~normal~ or ~async~.</p>
0 commit comments