array-destructuring-param-strict-body.js |
---
description: ArrayBindingPattern and Use Strict Directive are not allowed to coexist for the same function. (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [rest-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
13.3.3.4 Static Semantics: IsSimpleParameterList
BindingElement : BindingPattern
1. Return false.
14.1.2 Static Semantics: Early Errors
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.2.1 Static Semantics: Early Errors
ArrowFunction : ArrowParameters => ConciseBody
- It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
IsSimpleParameterList of ArrowParameters is false.
14.3.1 Static Semantics: Early Errors
MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of PropertySetParameterList is false.
14.4.1 Static Semantics: Early Errors
GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
14.5.1 Static Semantics: Early Errors
AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of FormalParameters is false.
14.7.1 Static Semantics: Early Errors
AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.8.1 Static Semantics: Early Errors
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
- It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
--- |
4689 |
await-as-binding-identifier-escaped.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
945 |
await-as-binding-identifier.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
932 |
await-as-identifier-reference-escaped.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
953 |
await-as-identifier-reference.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
940 |
await-as-label-identifier-escaped.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
937 |
await-as-label-identifier.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
924 |
browser.js |
|
0 |
default-proto.js |
---
esid: sec-asyncgenerator-definitions-evaluatebody
description: >
Default [[Prototype]] value derived from realm of the async generator function.
info: |
Runtime Semantics: EvaluateBody
...
2. Let generator be ? OrdinaryCreateFromConstructor(functionObject, "%AsyncGeneratorPrototype%", « ... »).
3. Perform ! AsyncGeneratorStart(generator, FunctionBody).
4. Return Completion { [[Type]]: return, [[Value]]: generator, [[Target]]: empty }.
OrdinaryCreateFromConstructor ( constructor, intrinsicDefaultProto [ , internalSlotsList ] )
...
2. Let proto be ? GetPrototypeFromConstructor(constructor, intrinsicDefaultProto).
3. Return ObjectCreate(proto, internalSlotsList).
GetPrototypeFromConstructor ( constructor, intrinsicDefaultProto )
...
3. Let proto be ? Get(constructor, 'prototype').
4. If Type(proto) is not Object, then
a. Let realm be ? GetFunctionRealm(constructor).
b. Set proto to realm's intrinsic object named intrinsicDefaultProto.
5. Return proto.
features: [async-iteration, Symbol]
--- |
2043 |
dflt-params-abrupt.js |
---
description: Abrupt completion returned by evaluation of initializer (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1434 |
dflt-params-arg-val-not-undefined.js |
---
description: Use of initializer when argument value is not `undefined` (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
[...]
23. Let iteratorRecord be Record {[[Iterator]]:
CreateListIterator(argumentsList), [[Done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
a. Perform ? IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
--- |
2332 |
dflt-params-arg-val-undefined.js |
---
description: Use of initializer when argument value is `undefined` (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
[...]
23. Let iteratorRecord be Record {[[Iterator]]:
CreateListIterator(argumentsList), [[Done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
a. Perform ? IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
--- |
1601 |
dflt-params-duplicates.js |
---
description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.2 Static Semantics: Early Errors
StrictFormalParameters : FormalParameters
- It is a Syntax Error if BoundNames of FormalParameters contains any
duplicate elements.
FormalParameters : FormalParameterList
- It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
false and BoundNames of FormalParameterList contains any duplicate
elements.
--- |
1276 |
dflt-params-ref-later.js |
---
description: Referencing a parameter that occurs later in the ParameterList (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1417 |
dflt-params-ref-prior.js |
---
description: Referencing a parameter that occurs earlier in the ParameterList (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1634 |
dflt-params-ref-self.js |
---
description: Referencing a parameter from within its own initializer (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1406 |
dflt-params-rest.js |
---
description: RestParameter does not support an initializer (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1 Function Definitions
Syntax
FunctionRestParameter[Yield] :
BindingRestElement[?Yield]
13.3.3 Destructuring Binding Patterns
Syntax
BindingRestElement[Yield] :
...BindingIdentifier[?Yield]
...BindingPattern[?Yield]
--- |
1095 |
dflt-params-trailing-comma.js |
---
description: A trailing comma should not increase the respective length, using default parameters (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1302 |
dstr |
|
|
early-errors-expression-arguments-in-formal-parameters-strict.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-async-generator-function-definitions-static-semantics-early-errors
description: >
It is a SyntaxError if FormalParameters contains arguments in strict mode.
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
features: [async-iteration]
--- |
550 |
early-errors-expression-await-as-function-binding-identifier.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-identifiers-static-semantics-early-errors
description: >
`await` is not a valid BindingIdentifier for AsyncGeneratorExpressions.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
485 |
early-errors-expression-binding-identifier-arguments-strict.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-identifiers-static-semantics-early-errors
description: >
If the source code matching this production is strict code, it is a
Syntax Error if BindingIdentifier is the IdentifierName arguments.
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
features: [async-iteration]
--- |
588 |
early-errors-expression-binding-identifier-eval-strict.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-identifiers-static-semantics-early-errors
description: >
If the source code matching this production is strict code, it is a
Syntax Error if BindingIdentifier is the IdentifierName eval.
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
features: [async-iteration]
--- |
578 |
early-errors-expression-body-contains-super-call.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-async-generator-function-definitions-static-semantics-early-errors
description: >
It is a syntax error if AsyncGeneratorBody contains SuperCall is true.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
512 |
early-errors-expression-body-contains-super-property.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-async-generator-function-definitions-static-semantics-early-errors
description: >
It is a syntax error if AsyncGeneratorBody contains SuperProperty is true.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
519 |
early-errors-expression-eval-in-formal-parameters-strict.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-strict-mode-of-ecmascript
description: >
It is a SyntaxError if FormalParameters contains eval in strict mode.
negative:
phase: parse
type: SyntaxError
flags: [onlyStrict]
features: [async-iteration]
--- |
499 |
early-errors-expression-formals-body-duplicate-const.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-async-generator-function-definitions-static-semantics-early-errors
description: >
It is a SyntaxError if BoundNames of FormalParameters also occurs in the
LexicallyDeclaredNames of AsyncFunctionBody
info: |
It is a Syntax Error if any element of the BoundNames of FormalParameters
also occurs in the LexicallyDeclaredNames of GeneratorBody.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
711 |
early-errors-expression-formals-body-duplicate-let.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-async-generator-function-definitions-static-semantics-early-errors
description: >
It is a SyntaxError if BoundNames of FormalParameters also occurs in the
LexicallyDeclaredNames of AsyncFunctionBody
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
559 |
early-errors-expression-formals-contains-await-expr.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-async-generator-function-definitions-static-semantics-early-errors
description: >
It is a Syntax Error if FormalParameters Contains AwaitExpression is true.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
518 |
early-errors-expression-formals-contains-await.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-identifiers-static-semantics-early-errors
description: >
`await` is a reserved keyword within async generator function bodies and may
not be used as the binding identifier of a parameter.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
545 |
early-errors-expression-formals-contains-super-call.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-async-generator-function-definitions-static-semantics-early-errors
description: >
It is a syntax error if FormalParameters contains SuperCall is true.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
512 |
early-errors-expression-formals-contains-super-property.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-async-generator-function-definitions-static-semantics-early-errors
description: >
It is a syntax error if FormalParameters contains SuperProperty is true.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
519 |
early-errors-expression-formals-contains-yield-expr.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-async-generator-function-definitions-static-semantics-early-errors
description: >
It is a Syntax Error if FormalParameters Contains YieldExpression is true.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
516 |
early-errors-expression-formals-contains-yield.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-identifiers-static-semantics-early-errors
description: >
`yield` is a reserved keyword within async generator function bodies and may
not be used as the binding identifier of a parameter.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
545 |
early-errors-expression-label-name-await.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-identifiers-static-semantics-early-errors
description: >
`await` is a reserved keyword within async generator function bodies and may
not be used as a label.
info: |
BindingIdentifier : await
It is a Syntax Error if this production has an [Await] parameter.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
627 |
early-errors-expression-label-name-yield.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-identifiers-static-semantics-early-errors
description: >
`yield` is a reserved keyword within async generator function bodies and may
not be used as a label.
info: |
BindingIdentifier : Identifier
LabelIdentifier : Identifier
It is a Syntax Error if this production has an [Await] parameter and
StringValue of Identifier is "await".
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
710 |
early-errors-expression-not-simple-assignment-target.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: prod-LeftHandSideExpression
description: >
Async generator function expressions are not a simple assignment target.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
466 |
early-errors-expression-NSPL-with-USD.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-async-generator-function-definitions-static-semantics-early-errors
description: >
It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
584 |
early-errors-expression-yield-as-function-binding-identifier.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-async-generator-function-definitions-static-semantics-early-errors
description: >
`yield` is not a valid BindingIdentifier for AsyncGeneratorExpressions.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
510 |
early-errors-expression-yield-star-after-newline.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-generator-function-definitions
description: >
A newline may not precede the `*` token in a `yield` expression.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
476 |
escaped-async.js |
---
esid: sec-grammar-notation
description: >
The `async` contextual keyword must not contain Unicode escape sequences.
info: |
Terminal symbols are shown
in fixed width font, both in the productions of the grammars and throughout this
specification whenever the text directly refers to such a terminal symbol. These
are to appear in a script exactly as written. All terminal symbol code points
specified in this way are to be understood as the appropriate Unicode code points
from the Basic Latin range, as opposed to any similar-looking code points from
other Unicode ranges.
negative:
phase: parse
type: SyntaxError
features: [async-iteration]
--- |
890 |
eval-body-proto-realm.js |
---
esid: sec-asyncgenerator-definitions-evaluatebody
description: >
Default [[Prototype]] value derived from realm of the async generator function.
info: |
Runtime Semantics: EvaluateBody
...
2. Let generator be ? OrdinaryCreateFromConstructor(functionObject, "%AsyncGeneratorPrototype%", « ... »).
3. Perform ! AsyncGeneratorStart(generator, FunctionBody).
4. Return Completion { [[Type]]: return, [[Value]]: generator, [[Target]]: empty }.
OrdinaryCreateFromConstructor ( constructor, intrinsicDefaultProto [ , internalSlotsList ] )
...
2. Let proto be ? GetPrototypeFromConstructor(constructor, intrinsicDefaultProto).
3. Return ObjectCreate(proto, internalSlotsList).
GetPrototypeFromConstructor ( constructor, intrinsicDefaultProto )
...
3. Let proto be ? Get(constructor, 'prototype').
4. If Type(proto) is not Object, then
a. Let realm be ? GetFunctionRealm(constructor).
b. Set proto to realm's intrinsic object named intrinsicDefaultProto.
5. Return proto.
features: [async-iteration, cross-realm, Symbol]
--- |
2116 |
eval-var-scope-syntax-err.js |
---
description: sloppy direct eval in params introduces var (async generator function expression in sloppy code)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated, noStrict]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
Runtime Semantics: IteratorBindingInitialization
FormalParameter : BindingElement
1. Return the result of performing IteratorBindingInitialization for BindingElement with arguments iteratorRecord and environment.
--- |
1221 |
expression-await-as-yield-operand.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-generator-function-definitions
description: >
AwaitExpressions are valid operands to yield expressions.
flags: [async]
features: [async-iteration]
--- |
818 |
expression-await-promise-as-yield-operand.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-generator-function-definitions
description: >
AwaitExpressions are valid operands to yield expressions.
flags: [async]
features: [async-iteration]
--- |
869 |
expression-await-thenable-as-yield-operand.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-generator-function-definitions
description: >
AwaitExpressions are valid operands to yield expressions.
flags: [async]
features: [async-iteration]
--- |
902 |
expression-yield-as-operand.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-generator-function-definitions
description: >
`yield` expressions may be used as the right-hand-side of other `yield`
expressions.
flags: [async]
features: [async-iteration]
--- |
1052 |
expression-yield-as-statement.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-generator-function-definitions
description: >
`yield` is a valid statement within async generator function bodies.
flags: [async]
features: [async-iteration]
--- |
1519 |
expression-yield-newline.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-generator-function-definitions
description: >
Newlines terminate `yield` expressions.
flags: [async]
features: [async-iteration]
--- |
809 |
expression-yield-star-before-newline.js |
---
author: Caitlin Potter <caitp@igalia.com>
esid: sec-generator-function-definitions
description: >
The right-hand side of a `yield *` expression may appear on a new line.
flags: [async]
features: [async-iteration]
--- |
593 |
forbidden-ext |
|
|
generator-created-after-decl-inst.js |
---
esid: sec-asyncgenerator-definitions-evaluatebody
description: >
The generator object is created after FunctionDeclarationInstantiation.
info: |
14.5.10 Runtime Semantics: EvaluateBody
1. Perform ? FunctionDeclarationInstantiation(functionObject, argumentsList).
2. Let generator be ? OrdinaryCreateFromConstructor(functionObject, "%AsyncGeneratorPrototype%",
« [[AsyncGeneratorState]], [[AsyncGeneratorContext]], [[AsyncGeneratorQueue]] »).
3. Perform ! AsyncGeneratorStart(generator, FunctionBody).
...
features: [async-iteration]
--- |
896 |
name.js |
---
esid: sec-asyncgenerator-definitions-evaluation
description: Assignment of function `name` attribute
info: |
AsyncGeneratorExpression : async function * ( FormalParameters ) { AsyncGeneratorBody }
1. Let scope be the LexicalEnvironment of the running execution context.
2. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, "").
...
6. Return closure.
AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
1. Let scope be the running execution context's LexicalEnvironment.
2. Let funcEnv be ! NewDeclarativeEnvironment(scope).
3. Let envRec be funcEnv's EnvironmentRecord.
4. Let name be StringValue of BindingIdentifier.
5. Perform ! envRec.CreateImmutableBinding(name).
6. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, name).
...
11. Return closure.
includes: [propertyHelper.js]
--- |
1425 |
named-array-destructuring-param-strict-body.js |
---
description: ArrayBindingPattern and Use Strict Directive are not allowed to coexist for the same function. (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [rest-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
13.3.3.4 Static Semantics: IsSimpleParameterList
BindingElement : BindingPattern
1. Return false.
14.1.2 Static Semantics: Early Errors
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.2.1 Static Semantics: Early Errors
ArrowFunction : ArrowParameters => ConciseBody
- It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
IsSimpleParameterList of ArrowParameters is false.
14.3.1 Static Semantics: Early Errors
MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of PropertySetParameterList is false.
14.4.1 Static Semantics: Early Errors
GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
14.5.1 Static Semantics: Early Errors
AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of FormalParameters is false.
14.7.1 Static Semantics: Early Errors
AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.8.1 Static Semantics: Early Errors
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
- It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
--- |
4723 |
named-await-as-binding-identifier-escaped.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
950 |
named-await-as-binding-identifier.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
937 |
named-await-as-identifier-reference-escaped.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
958 |
named-await-as-identifier-reference.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
945 |
named-await-as-label-identifier-escaped.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
942 |
named-await-as-label-identifier.js |
---
description: await is a reserved keyword within generator function bodies and may not be used as a label identifier. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Await] parameter and
StringValue of Identifier is "await".
--- |
929 |
named-dflt-params-abrupt.js |
---
description: Abrupt completion returned by evaluation of initializer (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1468 |
named-dflt-params-arg-val-not-undefined.js |
---
description: Use of initializer when argument value is not `undefined` (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
[...]
23. Let iteratorRecord be Record {[[Iterator]]:
CreateListIterator(argumentsList), [[Done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
a. Perform ? IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
--- |
2366 |
named-dflt-params-arg-val-undefined.js |
---
description: Use of initializer when argument value is `undefined` (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
[...]
23. Let iteratorRecord be Record {[[Iterator]]:
CreateListIterator(argumentsList), [[Done]]: false}.
24. If hasDuplicates is true, then
[...]
25. Else,
a. Perform ? IteratorBindingInitialization for formals with
iteratorRecord and env as arguments.
[...]
--- |
1635 |
named-dflt-params-duplicates.js |
---
description: It is a Syntax Error if BoundNames of FormalParameters contains any duplicate elements. (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
14.1.2 Static Semantics: Early Errors
StrictFormalParameters : FormalParameters
- It is a Syntax Error if BoundNames of FormalParameters contains any
duplicate elements.
FormalParameters : FormalParameterList
- It is a Syntax Error if IsSimpleParameterList of FormalParameterList is
false and BoundNames of FormalParameterList contains any duplicate
elements.
--- |
1310 |
named-dflt-params-ref-later.js |
---
description: Referencing a parameter that occurs later in the ParameterList (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1451 |
named-dflt-params-ref-prior.js |
---
description: Referencing a parameter that occurs earlier in the ParameterList (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1668 |
named-dflt-params-ref-self.js |
---
description: Referencing a parameter from within its own initializer (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
14.1.19 Runtime Semantics: IteratorBindingInitialization
FormalsList : FormalsList , FormalParameter
1. Let status be the result of performing IteratorBindingInitialization for
FormalsList using iteratorRecord and environment as the arguments.
2. ReturnIfAbrupt(status).
3. Return the result of performing IteratorBindingInitialization for
FormalParameter using iteratorRecord and environment as the arguments.
--- |
1440 |
named-dflt-params-rest.js |
---
description: RestParameter does not support an initializer (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
14.1 Function Definitions
Syntax
FunctionRestParameter[Yield] :
BindingRestElement[?Yield]
13.3.3 Destructuring Binding Patterns
Syntax
BindingRestElement[Yield] :
...BindingIdentifier[?Yield]
...BindingPattern[?Yield]
--- |
1129 |
named-dflt-params-trailing-comma.js |
---
description: A trailing comma should not increase the respective length, using default parameters (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1336 |
named-eval-var-scope-syntax-err.js |
---
description: sloppy direct eval in params introduces var (async generator named function expression in sloppy code)
esid: sec-asyncgenerator-definitions-evaluation
features: [default-parameters, async-iteration]
flags: [generated, noStrict]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
Runtime Semantics: IteratorBindingInitialization
FormalParameter : BindingElement
1. Return the result of performing IteratorBindingInitialization for BindingElement with arguments iteratorRecord and environment.
--- |
1255 |
named-no-strict-reassign-fn-name-in-body-in-arrow.js |
---
description: Reassignment of function name is silently ignored in non-strict mode code. (async generator named function expression in non-strict mode code)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated, async, noStrict]
includes: [asyncHelpers.js]
info: |
AsyncGeneratorExpression :
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
--- |
1022 |
named-no-strict-reassign-fn-name-in-body-in-eval.js |
---
description: Reassignment of function name is silently ignored in non-strict mode code. (async generator named function expression in non-strict mode code)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated, async, noStrict]
includes: [asyncHelpers.js]
info: |
AsyncGeneratorExpression :
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
--- |
1008 |
named-no-strict-reassign-fn-name-in-body.js |
---
description: Reassignment of function name is silently ignored in non-strict mode code. (async generator named function expression in non-strict mode code)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated, async, noStrict]
includes: [asyncHelpers.js]
info: |
AsyncGeneratorExpression :
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
--- |
992 |
named-object-destructuring-param-strict-body.js |
---
description: ObjectBindingPattern and Use Strict Directive are not allowed to coexist for the same function. (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [rest-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
13.3.3.4 Static Semantics: IsSimpleParameterList
BindingElement : BindingPattern
1. Return false.
14.1.2 Static Semantics: Early Errors
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.2.1 Static Semantics: Early Errors
ArrowFunction : ArrowParameters => ConciseBody
- It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
IsSimpleParameterList of ArrowParameters is false.
14.3.1 Static Semantics: Early Errors
MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of PropertySetParameterList is false.
14.4.1 Static Semantics: Early Errors
GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
14.5.1 Static Semantics: Early Errors
AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of FormalParameters is false.
14.7.1 Static Semantics: Early Errors
AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.8.1 Static Semantics: Early Errors
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
- It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
--- |
4726 |
named-params-trailing-comma-multiple.js |
---
description: A trailing comma should not increase the respective length, using multiple parameters (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1329 |
named-params-trailing-comma-single.js |
---
description: A trailing comma should not increase the respective length, using a single parameter (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1293 |
named-rest-param-strict-body.js |
---
description: RestParameter and Use Strict Directive are not allowed to coexist for the same function. (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [rest-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
14.1.13 Static Semantics: IsSimpleParameterList
FormalParameters : FormalParameterList , FunctionRestParameter
1. Return false.
14.1.2 Static Semantics: Early Errors
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.2.1 Static Semantics: Early Errors
ArrowFunction : ArrowParameters => ConciseBody
- It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
IsSimpleParameterList of ArrowParameters is false.
14.3.1 Static Semantics: Early Errors
MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of PropertySetParameterList is false.
14.4.1 Static Semantics: Early Errors
GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
14.5.1 Static Semantics: Early Errors
AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of FormalParameters is false.
14.7.1 Static Semantics: Early Errors
AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.8.1 Static Semantics: Early Errors
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
- It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
--- |
4732 |
named-rest-params-trailing-comma-early-error.js |
---
description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] :
[empty]
FunctionRestParameter[?Yield, ?Await]
FormalParameterList[?Yield, ?Await]
FormalParameterList[?Yield, ?Await] ,
FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
--- |
1238 |
named-strict-error-reassign-fn-name-in-body-in-arrow-strict.js |
---
description: Reassignment of function name is silently ignored in non-strict mode code. (async generator named function expression in strict mode code)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated, async, onlyStrict]
includes: [asyncHelpers.js]
info: |
AsyncGeneratorExpression :
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
--- |
1129 |
named-strict-error-reassign-fn-name-in-body-in-eval-strict.js |
---
description: Reassignment of function name is silently ignored in non-strict mode code. (async generator named function expression in strict mode code)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated, async, onlyStrict]
includes: [asyncHelpers.js]
info: |
AsyncGeneratorExpression :
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
--- |
1115 |
named-strict-error-reassign-fn-name-in-body-strict.js |
---
description: Reassignment of function name is silently ignored in non-strict mode code. (async generator named function expression in strict mode code)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated, async, onlyStrict]
includes: [asyncHelpers.js]
info: |
AsyncGeneratorExpression :
async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
--- |
1099 |
named-unscopables-with-in-nested-fn.js |
---
description: Symbol.unscopables behavior across scope boundaries (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [globalThis, Symbol.unscopables, async-iteration]
flags: [generated, noStrict, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
...
Let envRec be lex's EnvironmentRecord.
Let exists be ? envRec.HasBinding(name).
HasBinding
...
If the withEnvironment flag of envRec is false, return true.
Let unscopables be ? Get(bindings, @@unscopables).
If Type(unscopables) is Object, then
Let blocked be ToBoolean(? Get(unscopables, N)).
If blocked is true, return false.
(The `with` Statement) Runtime Semantics: Evaluation
...
Set the withEnvironment flag of newEnv’s EnvironmentRecord to true.
...
--- |
2306 |
named-unscopables-with.js |
---
description: Symbol.unscopables behavior across scope boundaries (async generator named function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [globalThis, Symbol.unscopables, async-iteration]
flags: [generated, noStrict, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * BindingIdentifier
( FormalParameters ) { AsyncGeneratorBody }
[...]
7. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, funcEnv, strict).
[...]
...
Let envRec be lex's EnvironmentRecord.
Let exists be ? envRec.HasBinding(name).
HasBinding
...
If the withEnvironment flag of envRec is false, return true.
Let unscopables be ? Get(bindings, @@unscopables).
If Type(unscopables) is Object, then
Let blocked be ToBoolean(? Get(unscopables, N)).
If blocked is true, return false.
(The `with` Statement) Runtime Semantics: Evaluation
...
Set the withEnvironment flag of newEnv’s EnvironmentRecord to true.
...
--- |
2131 |
named-yield-as-binding-identifier-escaped.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
950 |
named-yield-as-binding-identifier.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
937 |
named-yield-as-identifier-reference-escaped.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
958 |
named-yield-as-identifier-reference.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
945 |
named-yield-as-label-identifier-escaped.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
942 |
named-yield-as-label-identifier.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
929 |
named-yield-identifier-non-strict.js |
---
description: Use of yield as a valid identifier in a function body inside a generator body in non strict mode (Async generator named expression - valid for non-strict only cases)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, noStrict, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1197 |
named-yield-identifier-spread-non-strict.js |
---
description: Mixed use of object spread and yield as a valid identifier in a function body inside a generator body in non strict mode (Async generator named expression - valid for non-strict only cases)
esid: prod-AsyncGeneratorExpression
features: [object-spread, Symbol, async-iteration]
flags: [generated, noStrict, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
Spread Properties
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
--- |
1764 |
named-yield-identifier-spread-strict-strict.js |
---
description: It's an early error if the AssignmentExpression is a function body with yield as an identifier in strict mode. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [object-spread, async-iteration]
flags: [generated, onlyStrict]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
Spread Properties
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
--- |
1135 |
named-yield-identifier-strict-strict.js |
---
description: It's an early error if the generator body has another function body with yield as an identifier in strict mode. (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, onlyStrict]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
967 |
named-yield-promise-reject-next-catch.js |
---
description: yield Promise.reject(value) is treated as throw value (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1280 |
named-yield-promise-reject-next-for-await-of-async-iterator.js |
---
description: yield * [Promise.reject(value)] is treated as throw value (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1405 |
named-yield-promise-reject-next-for-await-of-sync-iterator.js |
---
description: yield Promise.reject(value) in for-await-of is treated as throw value (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1390 |
named-yield-promise-reject-next-yield-star-async-iterator.js |
---
description: yield * (async iterator) is treated as throw value (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1366 |
named-yield-promise-reject-next-yield-star-sync-iterator.js |
---
description: yield * (async iterator) is treated as throw value (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1330 |
named-yield-promise-reject-next.js |
---
description: yield Promise.reject(value) is treated as throw value (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1281 |
named-yield-spread-arr-multiple.js |
---
description: Use yield value in a array spread position (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
includes: [compareArray.js]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
Array Initializer
SpreadElement[Yield, Await]:
...AssignmentExpression[+In, ?Yield, ?Await]
--- |
1195 |
named-yield-spread-arr-single.js |
---
description: Use yield value in a array spread position (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
Array Initializer
SpreadElement[Yield, Await]:
...AssignmentExpression[+In, ?Yield, ?Await]
--- |
1287 |
named-yield-spread-obj.js |
---
description: Use yield value in a object spread position (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [object-spread, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
Spread Properties
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
--- |
1214 |
named-yield-star-async-next.js |
---
description: Execution order for yield* with async iterator and next() (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
7214 |
named-yield-star-async-return.js |
---
description: execution order for yield* with async iterator and return() (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
...
c. Else,
i. Assert: received.[[Type]] is return.
ii. Let return be ? GetMethod(iterator, "return").
iii. If return is undefined, return Completion(received).
iv. Let innerReturnResult be ? Call(return, iterator, « received.[[Value]] »).
v. If generatorKind is async, then set innerReturnResult to ? Await(innerReturnResult).
...
vii. Let done be ? IteratorComplete(innerReturnResult).
viii. If done is true, then
1. Let value be ? IteratorValue(innerReturnResult).
2. If generatorKind is async, then set value to ? Await(value).
3. Return Completion{[[Type]]: return, [[Value]]: value, [[Target]]: empty}.
ix. If generatorKind is async, then let received be AsyncGeneratorYield(? IteratorValue(innerResult)).
...
AsyncGeneratorYield ( value )
...
8. Return ! AsyncGeneratorResolve(generator, value, false).
...
--- |
7933 |
named-yield-star-async-throw.js |
---
description: execution order for yield* with async iterator and throw() (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
...
b. Else if received.[[Type]] is throw, then
i. Let throw be ? GetMethod(iterator, "throw").
ii. If throw is not undefined, then
1. Let innerResult be ? Call(throw, iterator, « received.[[Value]] »).
2. If generatorKind is async, then set innerResult to ? Await(innerResult).
...
5. Let done be ? IteratorComplete(innerResult).
6. If done is true, then
a. Let resultValue be Return ? IteratorValue(innerResult).
b. If generatorKind is async, then set resultValue to ? Await(resultValue).
c. Return resultValue.
7. If generatorKind is async, then let received be AsyncGeneratorYield(? IteratorValue(innerResult)).
...
AsyncGeneratorYield ( value )
...
8. Return ! AsyncGeneratorResolve(generator, value, false).
...
--- |
7955 |
named-yield-star-expr-abrupt.js |
---
description: Abrupt completion while getting yield* operand (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
...
--- |
1391 |
named-yield-star-getiter-async-get-abrupt.js |
---
description: Abrupt completion while getting [Symbol.asyncIterator] (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
--- |
1898 |
named-yield-star-getiter-async-not-callable-boolean-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (boolean) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
2028 |
named-yield-star-getiter-async-not-callable-number-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (number) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
2022 |
named-yield-star-getiter-async-not-callable-object-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (object) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
2023 |
named-yield-star-getiter-async-not-callable-string-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (string) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
2023 |
named-yield-star-getiter-async-not-callable-symbol-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (symbol) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
2041 |
named-yield-star-getiter-async-null-sync-get-abrupt.js |
---
description: Abrupt completion while getting @@iterator after null @@asyncIterator (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
--- |
2028 |
named-yield-star-getiter-async-returns-abrupt.js |
---
description: Abrupt completion while calling [Symbol.asyncIterator] (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
...
--- |
1876 |
named-yield-star-getiter-async-returns-boolean-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - boolean (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1948 |
named-yield-star-getiter-async-returns-null-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - null (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1942 |
named-yield-star-getiter-async-returns-number-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - number (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1944 |
named-yield-star-getiter-async-returns-string-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - string (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1946 |
named-yield-star-getiter-async-returns-symbol-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - symbol (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1962 |
named-yield-star-getiter-async-returns-undefined-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - undefined (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1957 |
named-yield-star-getiter-async-undefined-sync-get-abrupt.js |
---
description: Abrupt completion while getting @@iterator after undefined @@asyncIterator (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
--- |
2043 |
named-yield-star-getiter-sync-get-abrupt.js |
---
description: Abrupt completion while getting [Symbol.iterator] (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
--- |
1881 |
named-yield-star-getiter-sync-not-callable-boolean-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (boolean) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1935 |
named-yield-star-getiter-sync-not-callable-number-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (number) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1929 |
named-yield-star-getiter-sync-not-callable-object-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (object) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1930 |
named-yield-star-getiter-sync-not-callable-string-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (string) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1930 |
named-yield-star-getiter-sync-not-callable-symbol-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (symbol) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1965 |
named-yield-star-getiter-sync-returns-abrupt.js |
---
description: Abrupt completion while calling [Symbol.iterator] (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
...
--- |
1831 |
named-yield-star-getiter-sync-returns-boolean-throw.js |
---
description: Non object returned by [Symbol.iterator]() - boolean (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
2006 |
named-yield-star-getiter-sync-returns-null-throw.js |
---
description: Non object returned by [Symbol.iterator]() - null (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
2000 |
named-yield-star-getiter-sync-returns-number-throw.js |
---
description: Non object returned by [Symbol.iterator]() - number (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
2001 |
named-yield-star-getiter-sync-returns-string-throw.js |
---
description: Non object returned by [Symbol.iterator]() - string (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
2002 |
named-yield-star-getiter-sync-returns-symbol-throw.js |
---
description: Non object returned by [Symbol.iterator]() - symbol (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
2015 |
named-yield-star-getiter-sync-returns-undefined-throw.js |
---
description: Non object returned by [Symbol.iterator]() - undefined (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
2015 |
named-yield-star-next-call-done-get-abrupt.js |
---
description: Abrupt completion while getting done (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
v. Let done be ? IteratorComplete(innerResult).
...
--- |
1892 |
named-yield-star-next-call-returns-abrupt.js |
---
description: Abrupt completion while calling next (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1657 |
named-yield-star-next-call-value-get-abrupt.js |
---
description: Abrupt completion while getting value (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
vi. If done is true, then
1. Return ? IteratorValue(innerResult).
...
--- |
1946 |
named-yield-star-next-get-abrupt.js |
---
description: Abrupt completion while getting next (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1652 |
named-yield-star-next-non-object-ignores-then.js |
---
description: If next() value is not-object, do not access respective then property (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
--- |
2328 |
named-yield-star-next-not-callable-boolean-throw.js |
---
description: Not-callable next value in a yield star position - boolean (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1652 |
named-yield-star-next-not-callable-null-throw.js |
---
description: Not-callable next value in a yield star position - null (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1646 |
named-yield-star-next-not-callable-number-throw.js |
---
description: Not-callable next value in a yield star position - number (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1648 |
named-yield-star-next-not-callable-object-throw.js |
---
description: Not-callable next value in a yield star position - object (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1648 |
named-yield-star-next-not-callable-string-throw.js |
---
description: Not-callable next value in a yield star position - string (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1648 |
named-yield-star-next-not-callable-symbol-throw.js |
---
description: Not-callable next value in a yield star position - symbol (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1658 |
named-yield-star-next-not-callable-undefined-throw.js |
---
description: Not-callable next value in a yield star position - undefined (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1661 |
named-yield-star-next-then-get-abrupt.js |
---
description: Return abrupt after getting next().then (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
8. Let then be Get(resolution, "then").
...
10. Get thenAction be then.[[Value]].
...
12. Perform EnqueueJob("PromiseJobs", PromiseResolveThenableJob, « promise,
resolution, thenAction »).
...
--- |
2264 |
named-yield-star-next-then-non-callable-boolean-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (boolean) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2170 |
named-yield-star-next-then-non-callable-null-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (null) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2164 |
named-yield-star-next-then-non-callable-number-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (number) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2166 |
named-yield-star-next-then-non-callable-object-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (object) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2166 |
named-yield-star-next-then-non-callable-string-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (string) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2166 |
named-yield-star-next-then-non-callable-symbol-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (symbol) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2176 |
named-yield-star-next-then-non-callable-undefined-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (undefined) (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2179 |
named-yield-star-next-then-returns-abrupt.js |
---
description: Return abrupt after calling next().then (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
8. Let then be Get(resolution, "then").
...
10. Get thenAction be then.[[Value]].
...
12. Perform EnqueueJob("PromiseJobs", PromiseResolveThenableJob, « promise,
resolution, thenAction »).
...
--- |
2264 |
named-yield-star-sync-next.js |
---
description: execution order for yield* with sync iterator and next() (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
5. Let received be NormalCompletion(undefined).
6. Repeat
a. If received.[[Type]] is normal, then
i. Let innerResult be ? IteratorNext(iterator, received.[[Value]]).
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
v. Let done be ? IteratorComplete(innerResult).
vi. If done is true, then
1. Return ? IteratorValue(innerResult).
vii. Let received be GeneratorYield(innerResult).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
%AsyncFromSyncIteratorPrototype%.next ( value )
...
5. Let nextResult be IteratorNext(syncIterator, value).
...
7. Let nextValue be IteratorValue(nextResult).
...
9. Let nextDone be IteratorComplete(nextResult).
...
12. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined,
« nextValue »).
...
14. Set onFulfilled.[[Done]] to nextDone.
15. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
onFulfilled, undefined, promiseCapability).
...
Async Iterator Value Unwrap Functions
1. Return ! CreateIterResultObject(value, F.[[Done]]).
--- |
6821 |
named-yield-star-sync-return.js |
---
description: execution order for yield* with sync iterator and return() (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
...
c. Else,
i. Assert: received.[[Type]] is return.
ii. Let return be ? GetMethod(iterator, "return").
iii. If return is undefined, return Completion(received).
iv. Let innerReturnResult be ? Call(return, iterator,
« received.[[Value]] »).
v. If generatorKind is async, then set innerReturnResult to
? Await(innerReturnResult).
...
vii. Let done be ? IteratorComplete(innerReturnResult).
viii. If done is true, then
1. Let value be ? IteratorValue(innerReturnResult).
2. Return Completion{[[Type]]: return, [[Value]]: value,
[[Target]]: empty}.
ix. Let received be GeneratorYield(innerResult).
%AsyncFromSyncIteratorPrototype%.return ( value )
5. Let return be GetMethod(syncIterator, "return").
...
...
8. Let returnResult be Call(return, syncIterator, « value »).
...
11. Let returnValue be IteratorValue(returnResult).
..
13. Let returnDone be IteratorComplete(returnResult).
...
16. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined, « returnValue »).
...
18. Set onFulfilled.[[Done]] to returnDone.
19. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
onFulfilled, undefined, promiseCapability).
...
--- |
6067 |
named-yield-star-sync-throw.js |
---
description: execution order for yield* with sync iterator and throw() (Named async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
...
b. Else if received.[[Type]] is throw, then
i. Let throw be ? GetMethod(iterator, "throw").
ii. If throw is not undefined, then
1. Let innerResult be ? Call(throw, iterator, « received.[[Value]] »).
2. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
5. Let done be ? IteratorComplete(innerResult).
6. If done is true, then
a. Return ? IteratorValue(innerResult).
7. Let received be GeneratorYield(innerResult).
...
%AsyncFromSyncIteratorPrototype%.throw ( value )
...
5. Let throw be GetMethod(syncIterator, "throw").
...
8. Let throwResult be Call(throw, syncIterator, « value »).
...
11. Let throwValue be IteratorValue(throwResult).
...
13. Let throwDone be IteratorComplete(throwResult).
...
16. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined,
« throwValue »).
...
18. Set onFulfilled.[[Done]] to throwDone.
19. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
onFulfilled, undefined, promiseCapability).
...
--- |
6027 |
object-destructuring-param-strict-body.js |
---
description: ObjectBindingPattern and Use Strict Directive are not allowed to coexist for the same function. (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [rest-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
13.3.3.4 Static Semantics: IsSimpleParameterList
BindingElement : BindingPattern
1. Return false.
14.1.2 Static Semantics: Early Errors
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.2.1 Static Semantics: Early Errors
ArrowFunction : ArrowParameters => ConciseBody
- It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
IsSimpleParameterList of ArrowParameters is false.
14.3.1 Static Semantics: Early Errors
MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of PropertySetParameterList is false.
14.4.1 Static Semantics: Early Errors
GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
14.5.1 Static Semantics: Early Errors
AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of FormalParameters is false.
14.7.1 Static Semantics: Early Errors
AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.8.1 Static Semantics: Early Errors
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
- It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
--- |
4692 |
params-trailing-comma-multiple.js |
---
description: A trailing comma should not increase the respective length, using multiple parameters (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1295 |
params-trailing-comma-single.js |
---
description: A trailing comma should not increase the respective length, using a single parameter (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] : FormalParameterList[?Yield, ?Await] ,
--- |
1259 |
rest-param-strict-body.js |
---
description: RestParameter and Use Strict Directive are not allowed to coexist for the same function. (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [rest-parameters, async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
14.1.13 Static Semantics: IsSimpleParameterList
FormalParameters : FormalParameterList , FunctionRestParameter
1. Return false.
14.1.2 Static Semantics: Early Errors
FunctionDeclaration : function BindingIdentifier ( FormalParameters ) { FunctionBody }
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
FunctionExpression : function BindingIdentifier ( FormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.2.1 Static Semantics: Early Errors
ArrowFunction : ArrowParameters => ConciseBody
- It is a Syntax Error if ContainsUseStrict of ConciseBody is true and
IsSimpleParameterList of ArrowParameters is false.
14.3.1 Static Semantics: Early Errors
MethodDefinition : PropertyName ( UniqueFormalParameters ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
MethodDefinition : set PropertyName ( PropertySetParameterList ) { FunctionBody }
- It is a Syntax Error if ContainsUseStrict of FunctionBody is true and
IsSimpleParameterList of PropertySetParameterList is false.
14.4.1 Static Semantics: Early Errors
GeneratorMethod : * PropertyName ( UniqueFormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
GeneratorDeclaration : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
GeneratorExpression : function * BindingIdentifier ( FormalParameters ) { GeneratorBody }
- It is a Syntax Error if ContainsUseStrict of GeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
14.5.1 Static Semantics: Early Errors
AsyncGeneratorMethod : async * PropertyName ( UniqueFormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncGeneratorDeclaration : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorDeclaration : async function * ( FormalParameters ) { AsyncGeneratorBody }
AsyncGeneratorExpression : async function * BindingIdentifier ( FormalParameters ) { AsyncGeneratorBody }
- It is a Syntax Error if ContainsUseStrict of AsyncGeneratorBody is true and
IsSimpleParameterList of FormalParameters is false.
14.7.1 Static Semantics: Early Errors
AsyncMethod : async PropertyName ( UniqueFormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of UniqueFormalParameters is false.
AsyncFunctionDeclaration : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionDeclaration : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function ( FormalParameters ) { AsyncFunctionBody }
AsyncFunctionExpression : async function BindingIdentifier ( FormalParameters ) { AsyncFunctionBody }
- It is a Syntax Error if ContainsUseStrict of AsyncFunctionBody is true and
IsSimpleParameterList of FormalParameters is false.
14.8.1 Static Semantics: Early Errors
AsyncArrowFunction : CoverCallExpressionAndAsyncArrowHead => AsyncConciseBody
- It is a Syntax Error if ContainsUseStrict of AsyncConciseBody is true and
IsSimpleParameterList of CoverCallExpressionAndAsyncArrowHead is false.
--- |
4698 |
rest-params-trailing-comma-early-error.js |
---
description: It's a syntax error if a FunctionRestParameter is followed by a trailing comma (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
Trailing comma in the parameters list
14.1 Function Definitions
FormalParameters[Yield, Await] :
[empty]
FunctionRestParameter[?Yield, ?Await]
FormalParameterList[?Yield, ?Await]
FormalParameterList[?Yield, ?Await] ,
FormalParameterList[?Yield, ?Await] , FunctionRestParameter[?Yield, ?Await]
--- |
1204 |
shell.js |
---
description: |
A collection of assertion and wrapper functions for testing asynchronous built-ins.
defines: [asyncTest, assert.throwsAsync]
--- |
4174 |
unscopables-with-in-nested-fn.js |
---
description: Symbol.unscopables behavior across scope boundaries (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [globalThis, Symbol.unscopables, async-iteration]
flags: [generated, noStrict, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
...
Let envRec be lex's EnvironmentRecord.
Let exists be ? envRec.HasBinding(name).
HasBinding
...
If the withEnvironment flag of envRec is false, return true.
Let unscopables be ? Get(bindings, @@unscopables).
If Type(unscopables) is Object, then
Let blocked be ToBoolean(? Get(unscopables, N)).
If blocked is true, return false.
(The `with` Statement) Runtime Semantics: Evaluation
...
Set the withEnvironment flag of newEnv’s EnvironmentRecord to true.
...
--- |
2272 |
unscopables-with.js |
---
description: Symbol.unscopables behavior across scope boundaries (async generator function expression)
esid: sec-asyncgenerator-definitions-evaluation
features: [globalThis, Symbol.unscopables, async-iteration]
flags: [generated, noStrict, async]
info: |
AsyncGeneratorExpression : async [no LineTerminator here] function * ( FormalParameters ) {
AsyncGeneratorBody }
[...]
3. Let closure be ! AsyncGeneratorFunctionCreate(Normal, FormalParameters,
AsyncGeneratorBody, scope, strict).
[...]
...
Let envRec be lex's EnvironmentRecord.
Let exists be ? envRec.HasBinding(name).
HasBinding
...
If the withEnvironment flag of envRec is false, return true.
Let unscopables be ? Get(bindings, @@unscopables).
If Type(unscopables) is Object, then
Let blocked be ToBoolean(? Get(unscopables, N)).
If blocked is true, return false.
(The `with` Statement) Runtime Semantics: Evaluation
...
Set the withEnvironment flag of newEnv’s EnvironmentRecord to true.
...
--- |
2097 |
yield-as-binding-identifier-escaped.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
945 |
yield-as-binding-identifier.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a binding identifier. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
BindingIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
932 |
yield-as-identifier-reference-escaped.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
953 |
yield-as-identifier-reference.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as an identifier reference. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
IdentifierReference : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
940 |
yield-as-label-identifier-escaped.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
937 |
yield-as-label-identifier.js |
---
description: yield is a reserved keyword within generator function bodies and may not be used as a label identifier. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
LabelIdentifier : Identifier
It is a Syntax Error if this production has a [Yield] parameter and
StringValue of Identifier is "yield".
--- |
924 |
yield-identifier-non-strict.js |
---
description: Use of yield as a valid identifier in a function body inside a generator body in non strict mode (Async generator expression - valid for non-strict only cases)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, noStrict, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1184 |
yield-identifier-spread-non-strict.js |
---
description: Mixed use of object spread and yield as a valid identifier in a function body inside a generator body in non strict mode (Async generator expression - valid for non-strict only cases)
esid: prod-AsyncGeneratorExpression
features: [object-spread, Symbol, async-iteration]
flags: [generated, noStrict, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
Spread Properties
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
--- |
1751 |
yield-identifier-spread-strict-strict.js |
---
description: It's an early error if the AssignmentExpression is a function body with yield as an identifier in strict mode. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [object-spread, async-iteration]
flags: [generated, onlyStrict]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
Spread Properties
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
--- |
1130 |
yield-identifier-strict-strict.js |
---
description: It's an early error if the generator body has another function body with yield as an identifier in strict mode. (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, onlyStrict]
negative:
phase: parse
type: SyntaxError
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
962 |
yield-promise-reject-next-catch.js |
---
description: yield Promise.reject(value) is treated as throw value (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1275 |
yield-promise-reject-next-for-await-of-async-iterator.js |
---
description: yield * [Promise.reject(value)] is treated as throw value (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1400 |
yield-promise-reject-next-for-await-of-sync-iterator.js |
---
description: yield Promise.reject(value) in for-await-of is treated as throw value (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1385 |
yield-promise-reject-next-yield-star-async-iterator.js |
---
description: yield * (async iterator) is treated as throw value (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1361 |
yield-promise-reject-next-yield-star-sync-iterator.js |
---
description: yield * (async iterator) is treated as throw value (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1325 |
yield-promise-reject-next.js |
---
description: yield Promise.reject(value) is treated as throw value (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
1276 |
yield-spread-arr-multiple.js |
---
description: Use yield value in a array spread position (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
includes: [compareArray.js]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
Array Initializer
SpreadElement[Yield, Await]:
...AssignmentExpression[+In, ?Yield, ?Await]
--- |
1190 |
yield-spread-arr-single.js |
---
description: Use yield value in a array spread position (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
Array Initializer
SpreadElement[Yield, Await]:
...AssignmentExpression[+In, ?Yield, ?Await]
--- |
1282 |
yield-spread-obj.js |
---
description: Use yield value in a object spread position (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [object-spread, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
Spread Properties
PropertyDefinition[Yield]:
(...)
...AssignmentExpression[In, ?Yield]
--- |
1209 |
yield-star-async-next.js |
---
description: Execution order for yield* with async iterator and next() (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
--- |
7209 |
yield-star-async-return.js |
---
description: execution order for yield* with async iterator and return() (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
...
c. Else,
i. Assert: received.[[Type]] is return.
ii. Let return be ? GetMethod(iterator, "return").
iii. If return is undefined, return Completion(received).
iv. Let innerReturnResult be ? Call(return, iterator, « received.[[Value]] »).
v. If generatorKind is async, then set innerReturnResult to ? Await(innerReturnResult).
...
vii. Let done be ? IteratorComplete(innerReturnResult).
viii. If done is true, then
1. Let value be ? IteratorValue(innerReturnResult).
2. If generatorKind is async, then set value to ? Await(value).
3. Return Completion{[[Type]]: return, [[Value]]: value, [[Target]]: empty}.
ix. If generatorKind is async, then let received be AsyncGeneratorYield(? IteratorValue(innerResult)).
...
AsyncGeneratorYield ( value )
...
8. Return ! AsyncGeneratorResolve(generator, value, false).
...
--- |
7928 |
yield-star-async-throw.js |
---
description: execution order for yield* with async iterator and throw() (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
...
b. Else if received.[[Type]] is throw, then
i. Let throw be ? GetMethod(iterator, "throw").
ii. If throw is not undefined, then
1. Let innerResult be ? Call(throw, iterator, « received.[[Value]] »).
2. If generatorKind is async, then set innerResult to ? Await(innerResult).
...
5. Let done be ? IteratorComplete(innerResult).
6. If done is true, then
a. Let resultValue be Return ? IteratorValue(innerResult).
b. If generatorKind is async, then set resultValue to ? Await(resultValue).
c. Return resultValue.
7. If generatorKind is async, then let received be AsyncGeneratorYield(? IteratorValue(innerResult)).
...
AsyncGeneratorYield ( value )
...
8. Return ! AsyncGeneratorResolve(generator, value, false).
...
--- |
7950 |
yield-star-expr-abrupt.js |
---
description: Abrupt completion while getting yield* operand (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
...
--- |
1386 |
yield-star-getiter-async-get-abrupt.js |
---
description: Abrupt completion while getting [Symbol.asyncIterator] (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
--- |
1893 |
yield-star-getiter-async-not-callable-boolean-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (boolean) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
2023 |
yield-star-getiter-async-not-callable-number-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (number) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
2017 |
yield-star-getiter-async-not-callable-object-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (object) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
2018 |
yield-star-getiter-async-not-callable-string-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (string) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
2018 |
yield-star-getiter-async-not-callable-symbol-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.asyncIterator] (symbol) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
2036 |
yield-star-getiter-async-null-sync-get-abrupt.js |
---
description: Abrupt completion while getting @@iterator after null @@asyncIterator (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
--- |
2023 |
yield-star-getiter-async-return-method-is-null.js |
---
esid: sec-generator-function-definitions-runtime-semantics-evaluation
description: >
If iterator's "return" method is `null`,
received completion is forwarded to the runtime.
info: |
YieldExpression : yield * AssignmentExpression
[...]
7. Repeat,
[...]
c. Else,
i. Assert: received.[[Type]] is return.
ii. Let return be ? GetMethod(iterator, "return").
iii. If return is undefined, then
[...]
2. Return Completion(received).
GetMethod ( V, P )
[...]
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
features: [Symbol.asyncIterator, async-iteration]
flags: [async]
--- |
1398 |
yield-star-getiter-async-returns-abrupt.js |
---
description: Abrupt completion while calling [Symbol.asyncIterator] (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
...
--- |
1871 |
yield-star-getiter-async-returns-boolean-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - boolean (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1943 |
yield-star-getiter-async-returns-null-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - null (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1937 |
yield-star-getiter-async-returns-number-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - number (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1939 |
yield-star-getiter-async-returns-string-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - string (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1941 |
yield-star-getiter-async-returns-symbol-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - symbol (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1957 |
yield-star-getiter-async-returns-undefined-throw.js |
---
description: Non object returned by [Symbol.asyncIterator]() - undefined (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
...
6. Let iterator be ? Call(method, obj).
7. If Type(iterator) is not Object, throw a TypeError exception.
...
--- |
1952 |
yield-star-getiter-async-throw-method-is-null.js |
---
esid: sec-generator-function-definitions-runtime-semantics-evaluation
description: >
If iterator's "throw" method is `null`,
AsyncIteratorClose is called before rising TypeError.
info: |
YieldExpression : yield * AssignmentExpression
[...]
7. Repeat,
[...]
b. Else if received.[[Type]] is throw, then
i. Let throw be ? GetMethod(iterator, "throw").
ii. If throw is not undefined, then
[...]
iii. Else,
[...]
3. If generatorKind is async, perform ? AsyncIteratorClose(iteratorRecord, closeCompletion).
[...]
6. Throw a TypeError exception.
GetMethod ( V, P )
[...]
2. Let func be ? GetV(V, P).
3. If func is either undefined or null, return undefined.
AsyncIteratorClose ( iteratorRecord, completion )
[...]
4. Let innerResult be GetMethod(iterator, "return").
5. If innerResult.[[Type]] is normal, then
a. Let return be innerResult.[[Value]].
b. If return is undefined, return Completion(completion).
features: [Symbol.asyncIterator, async-iteration]
flags: [async]
--- |
1957 |
yield-star-getiter-async-undefined-sync-get-abrupt.js |
---
description: Abrupt completion while getting @@iterator after undefined @@asyncIterator (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
--- |
2038 |
yield-star-getiter-sync-get-abrupt.js |
---
description: Abrupt completion while getting [Symbol.iterator] (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
--- |
1876 |
yield-star-getiter-sync-not-callable-boolean-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (boolean) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1930 |
yield-star-getiter-sync-not-callable-number-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (number) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1924 |
yield-star-getiter-sync-not-callable-object-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (object) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1925 |
yield-star-getiter-sync-not-callable-string-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (string) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1925 |
yield-star-getiter-sync-not-callable-symbol-throw.js |
---
description: Throws a TypeError on a non-callable [Symbol.iterator] (symbol) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
...
GetMethod ( V, P )
...
2. Let func be ? GetV(V, P).
...
4. If IsCallable(func) is false, throw a TypeError exception.
...
--- |
1960 |
yield-star-getiter-sync-returns-abrupt.js |
---
description: Abrupt completion while calling [Symbol.iterator] (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
...
--- |
1826 |
yield-star-getiter-sync-returns-boolean-throw.js |
---
description: Non object returned by [Symbol.iterator]() - boolean (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
2001 |
yield-star-getiter-sync-returns-null-throw.js |
---
description: Non object returned by [Symbol.iterator]() - null (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
1995 |
yield-star-getiter-sync-returns-number-throw.js |
---
description: Non object returned by [Symbol.iterator]() - number (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
1996 |
yield-star-getiter-sync-returns-string-throw.js |
---
description: Non object returned by [Symbol.iterator]() - string (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
1997 |
yield-star-getiter-sync-returns-symbol-throw.js |
---
description: Non object returned by [Symbol.iterator]() - symbol (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
2010 |
yield-star-getiter-sync-returns-undefined-throw.js |
---
description: Non object returned by [Symbol.iterator]() - undefined (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
1. Let exprRef be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
CreateAsyncFromSyncIterator(syncIterator)
1. If Type(syncIterator) is not Object, throw a TypeError exception.
...
--- |
2010 |
yield-star-next-call-done-get-abrupt.js |
---
description: Abrupt completion while getting done (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
v. Let done be ? IteratorComplete(innerResult).
...
--- |
1887 |
yield-star-next-call-returns-abrupt.js |
---
description: Abrupt completion while calling next (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1652 |
yield-star-next-call-value-get-abrupt.js |
---
description: Abrupt completion while getting value (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
vi. If done is true, then
1. Return ? IteratorValue(innerResult).
...
--- |
1941 |
yield-star-next-get-abrupt.js |
---
description: Abrupt completion while getting next (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1647 |
yield-star-next-non-object-ignores-then.js |
---
description: If next() value is not-object, do not access respective then property (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
--- |
2323 |
yield-star-next-not-callable-boolean-throw.js |
---
description: Not-callable next value in a yield star position - boolean (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1647 |
yield-star-next-not-callable-null-throw.js |
---
description: Not-callable next value in a yield star position - null (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1641 |
yield-star-next-not-callable-number-throw.js |
---
description: Not-callable next value in a yield star position - number (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1643 |
yield-star-next-not-callable-object-throw.js |
---
description: Not-callable next value in a yield star position - object (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1643 |
yield-star-next-not-callable-string-throw.js |
---
description: Not-callable next value in a yield star position - string (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1643 |
yield-star-next-not-callable-symbol-throw.js |
---
description: Not-callable next value in a yield star position - symbol (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1653 |
yield-star-next-not-callable-undefined-throw.js |
---
description: Not-callable next value in a yield star position - undefined (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
...
--- |
1656 |
yield-star-next-then-get-abrupt.js |
---
description: Return abrupt after getting next().then (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
8. Let then be Get(resolution, "then").
...
10. Get thenAction be then.[[Value]].
...
12. Perform EnqueueJob("PromiseJobs", PromiseResolveThenableJob, « promise,
resolution, thenAction »).
...
--- |
2259 |
yield-star-next-then-non-callable-boolean-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (boolean) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2165 |
yield-star-next-then-non-callable-null-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (null) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2159 |
yield-star-next-then-non-callable-number-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (number) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2161 |
yield-star-next-then-non-callable-object-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (object) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2161 |
yield-star-next-then-non-callable-string-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (string) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2161 |
yield-star-next-then-non-callable-symbol-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (symbol) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2171 |
yield-star-next-then-non-callable-undefined-fulfillpromise.js |
---
description: FulfillPromise if next().then is not-callable (undefined) (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
iv. If Type(innerResult) is not Object, throw a TypeError exception.
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
7. If Type(resolution) is not Object, then
a. Return FulfillPromise(promise, resolution).
8. Let then be Get(resolution, "then").
...
11. If IsCallable(thenAction) is false, then
a. Return FulfillPromise(promise, resolution).
...
--- |
2174 |
yield-star-next-then-returns-abrupt.js |
---
description: Return abrupt after calling next().then (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, Symbol.asyncIterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
a. If received.[[Type]] is normal, then
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
Await
...
2. Let promiseCapability be ! NewPromiseCapability(%Promise%).
3. Perform ! Call(promiseCapability.[[Resolve]], undefined, « promise »).
...
Promise Resolve Functions
...
8. Let then be Get(resolution, "then").
...
10. Get thenAction be then.[[Value]].
...
12. Perform EnqueueJob("PromiseJobs", PromiseResolveThenableJob, « promise,
resolution, thenAction »).
...
--- |
2259 |
yield-star-sync-next.js |
---
description: execution order for yield* with sync iterator and next() (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
2. Let value be ? GetValue(exprRef).
3. Let generatorKind be ! GetGeneratorKind().
4. Let iterator be ? GetIterator(value, generatorKind).
5. Let received be NormalCompletion(undefined).
6. Repeat
a. If received.[[Type]] is normal, then
i. Let innerResult be ? IteratorNext(iterator, received.[[Value]]).
ii. Let innerResult be ? Invoke(iterator, "next",
« received.[[Value]] »).
iii. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
v. Let done be ? IteratorComplete(innerResult).
vi. If done is true, then
1. Return ? IteratorValue(innerResult).
vii. Let received be GeneratorYield(innerResult).
...
GetIterator ( obj [ , hint ] )
...
3. If hint is async,
a. Set method to ? GetMethod(obj, @@asyncIterator).
b. If method is undefined,
i. Let syncMethod be ? GetMethod(obj, @@iterator).
ii. Let syncIterator be ? Call(syncMethod, obj).
iii. Return ? CreateAsyncFromSyncIterator(syncIterator).
...
%AsyncFromSyncIteratorPrototype%.next ( value )
...
5. Let nextResult be IteratorNext(syncIterator, value).
...
7. Let nextValue be IteratorValue(nextResult).
...
9. Let nextDone be IteratorComplete(nextResult).
...
12. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined,
« nextValue »).
...
14. Set onFulfilled.[[Done]] to nextDone.
15. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
onFulfilled, undefined, promiseCapability).
...
Async Iterator Value Unwrap Functions
1. Return ! CreateIterResultObject(value, F.[[Done]]).
--- |
6816 |
yield-star-sync-return.js |
---
description: execution order for yield* with sync iterator and return() (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration, Symbol.asyncIterator]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
...
c. Else,
i. Assert: received.[[Type]] is return.
ii. Let return be ? GetMethod(iterator, "return").
iii. If return is undefined, return Completion(received).
iv. Let innerReturnResult be ? Call(return, iterator,
« received.[[Value]] »).
v. If generatorKind is async, then set innerReturnResult to
? Await(innerReturnResult).
...
vii. Let done be ? IteratorComplete(innerReturnResult).
viii. If done is true, then
1. Let value be ? IteratorValue(innerReturnResult).
2. Return Completion{[[Type]]: return, [[Value]]: value,
[[Target]]: empty}.
ix. Let received be GeneratorYield(innerResult).
%AsyncFromSyncIteratorPrototype%.return ( value )
5. Let return be GetMethod(syncIterator, "return").
...
...
8. Let returnResult be Call(return, syncIterator, « value »).
...
11. Let returnValue be IteratorValue(returnResult).
..
13. Let returnDone be IteratorComplete(returnResult).
...
16. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined, « returnValue »).
...
18. Set onFulfilled.[[Done]] to returnDone.
19. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
onFulfilled, undefined, promiseCapability).
...
--- |
6062 |
yield-star-sync-throw.js |
---
description: execution order for yield* with sync iterator and throw() (Unnamed async generator expression)
esid: prod-AsyncGeneratorExpression
features: [Symbol.iterator, async-iteration]
flags: [generated, async]
info: |
Async Generator Function Definitions
AsyncGeneratorExpression :
async [no LineTerminator here] function * BindingIdentifier ( FormalParameters ) {
AsyncGeneratorBody }
YieldExpression: yield * AssignmentExpression
...
6. Repeat
...
b. Else if received.[[Type]] is throw, then
i. Let throw be ? GetMethod(iterator, "throw").
ii. If throw is not undefined, then
1. Let innerResult be ? Call(throw, iterator, « received.[[Value]] »).
2. If generatorKind is async, then set innerResult to
? Await(innerResult).
...
5. Let done be ? IteratorComplete(innerResult).
6. If done is true, then
a. Return ? IteratorValue(innerResult).
7. Let received be GeneratorYield(innerResult).
...
%AsyncFromSyncIteratorPrototype%.throw ( value )
...
5. Let throw be GetMethod(syncIterator, "throw").
...
8. Let throwResult be Call(throw, syncIterator, « value »).
...
11. Let throwValue be IteratorValue(throwResult).
...
13. Let throwDone be IteratorComplete(throwResult).
...
16. Perform ! Call(valueWrapperCapability.[[Resolve]], undefined,
« throwValue »).
...
18. Set onFulfilled.[[Done]] to throwDone.
19. Perform ! PerformPromiseThen(valueWrapperCapability.[[Promise]],
onFulfilled, undefined, promiseCapability).
...
--- |
6022 |
yield-thenable-create-resolving-functions-reject.js |
---
esid: sec-generator-function-definitions-runtime-semantics-evaluation
description: >
`reject` is anonymous built-in function with length of 1.
info: |
YieldExpression : yield AssignmentExpression
[...]
4. If generatorKind is async, then return ? AsyncGeneratorYield(value).
AsyncGeneratorYield ( value )
[...]
5. Set value to ? Await(value).
[...]
9. Return ! AsyncGeneratorResolve(generator, value, false).
Await
[...]
2. Let promise be ? PromiseResolve(%Promise%, value).
[...]
PromiseResolve ( C, x )
[...]
3. Let promiseCapability be ? NewPromiseCapability(C).
4. Perform ? Call(promiseCapability.[[Resolve]], undefined, « x »).
5. Return promiseCapability.[[Promise]].
NewPromiseCapability ( C )
[...]
7. Let promise be ? Construct(C, « executor »).
[...]
11. Return promiseCapability.
Promise ( executor )
[...]
8. Let resolvingFunctions be CreateResolvingFunctions(promise).
[...]
11. Return promise.
CreateResolvingFunctions ( promise )
[...]
7. Let reject be ! CreateBuiltinFunction(stepsReject, « [[Promise]], [[AlreadyResolved]] »).
[...]
10. Return the Record { [[Resolve]]: resolve, [[Reject]]: reject }.
flags: [async]
features: [async-iteration, Reflect.construct]
includes: [isConstructor.js]
--- |
1795 |
yield-thenable-create-resolving-functions-resolve.js |
---
esid: sec-generator-function-definitions-runtime-semantics-evaluation
description: >
`resolve` is anonymous built-in function with length of 1.
info: |
YieldExpression : yield AssignmentExpression
[...]
4. If generatorKind is async, then return ? AsyncGeneratorYield(value).
AsyncGeneratorYield ( value )
[...]
5. Set value to ? Await(value).
[...]
9. Return ! AsyncGeneratorResolve(generator, value, false).
Await
[...]
2. Let promise be ? PromiseResolve(%Promise%, value).
[...]
PromiseResolve ( C, x )
[...]
3. Let promiseCapability be ? NewPromiseCapability(C).
4. Perform ? Call(promiseCapability.[[Resolve]], undefined, « x »).
5. Return promiseCapability.[[Promise]].
NewPromiseCapability ( C )
[...]
7. Let promise be ? Construct(C, « executor »).
[...]
11. Return promiseCapability.
Promise ( executor )
[...]
8. Let resolvingFunctions be CreateResolvingFunctions(promise).
[...]
11. Return promise.
CreateResolvingFunctions ( promise )
[...]
3. Let resolve be ! CreateBuiltinFunction(stepsResolve, « [[Promise]], [[AlreadyResolved]] »).
[...]
10. Return the Record { [[Resolve]]: resolve, [[Reject]]: reject }.
flags: [async]
features: [async-iteration, Reflect.construct]
includes: [isConstructor.js]
--- |
1795 |