Name Description Size
async-module-does-not-block-sibling-modules.js --- esid: sec-innermoduleevaluation description: > While an asynchronous module is waiting for a promise resolution, sibling modules in the modules graph must be evaluated. flags: [module, async] features: [top-level-await] --- 528
async-module-sync_FIXTURE.js 202
async-module-tla_FIXTURE.js 225
await-awaits-thenable-not-callable.js --- esid: prod-AwaitExpression description: > Await can await any thenable. If the thenable's then is not callable, await evaluates to the thenable flags: [module, async] features: [top-level-await] --- 460
await-awaits-thenables-that-throw.js --- esid: prod-AwaitExpression description: > Await can await any thenable. flags: [module, async] features: [top-level-await] --- 501
await-awaits-thenables.js --- esid: prod-AwaitExpression description: > Await can await any thenable. flags: [module, async] features: [top-level-await] --- 413
await-dynamic-import-rejection.js --- esid: sec-moduleevaluation description: > Top Level Await on a Dynamic import info: | InnerModuleEvaluation( module, stack, index ) ... 14. If module.[[PendingAsyncDependencies]] is > 0, set module.[[AsyncEvaluating]] to true. 15. Otherwise, if module.[[Async]] is true, perform ! ExecuteAsyncModule(module). 16. Otherwise, perform ? module.ExecuteModule(). ExecuteAsyncModule ( module ) 1. Assert: module.[[Status]] is "evaluating" or "evaluated". 2. Assert: module.[[Async]] is true. 3. Set module.[[AsyncEvaluating]] to true. 4. Let capability be ! NewPromiseCapability(%Promise%). 5. Let stepsFulfilled be the steps of a CallAsyncModuleFulfilled function as specified below. ... 8. Let stepsRejected be the steps of a CallAsyncModuleRejected function as specified below. ... 11. Perform ! PerformPromiseThen(capability.[[Promise]], onFulfilled, onRejected). 12. Perform ! module.ExecuteModule(capability). 13. Return. ExecuteModule ( [ capability ] ) ... 11. If module.[[Async]] is false, then a. Assert: capability was not provided. b. Push moduleCxt on to the execution context stack; moduleCxt is now the running execution context. c. Let result be the result of evaluating module.[[ECMAScriptCode]]. d. Suspend moduleCxt and remove it from the execution context stack. e. Resume the context that is now on the top of the execution context stack as the running execution context. f. Return Completion(result). 12. Otherwise, a. Assert: capability is a PromiseCapability Record. b. Perform ! AsyncBlockStart(capability, module.[[ECMAScriptCode]], moduleCxt). c. Return. flags: [module] features: [top-level-await, dynamic-import] negative: phase: runtime type: TypeError --- 2056
await-dynamic-import-resolution.js --- esid: sec-moduleevaluation description: > Top Level Await on a Dynamic import info: | InnerModuleEvaluation( module, stack, index ) ... 14. If module.[[PendingAsyncDependencies]] is > 0, set module.[[AsyncEvaluating]] to true. 15. Otherwise, if module.[[Async]] is true, perform ! ExecuteAsyncModule(module). 16. Otherwise, perform ? module.ExecuteModule(). ExecuteAsyncModule ( module ) 1. Assert: module.[[Status]] is "evaluating" or "evaluated". 2. Assert: module.[[Async]] is true. 3. Set module.[[AsyncEvaluating]] to true. 4. Let capability be ! NewPromiseCapability(%Promise%). 5. Let stepsFulfilled be the steps of a CallAsyncModuleFulfilled function as specified below. ... 8. Let stepsRejected be the steps of a CallAsyncModuleRejected function as specified below. ... 11. Perform ! PerformPromiseThen(capability.[[Promise]], onFulfilled, onRejected). 12. Perform ! module.ExecuteModule(capability). 13. Return. ExecuteModule ( [ capability ] ) ... 11. If module.[[Async]] is false, then a. Assert: capability was not provided. b. Push moduleCxt on to the execution context stack; moduleCxt is now the running execution context. c. Let result be the result of evaluating module.[[ECMAScriptCode]]. d. Suspend moduleCxt and remove it from the execution context stack. e. Resume the context that is now on the top of the execution context stack as the running execution context. f. Return Completion(result). 12. Otherwise, a. Assert: capability is a PromiseCapability Record. b. Perform ! AsyncBlockStart(capability, module.[[ECMAScriptCode]], moduleCxt). c. Return. flags: [module, async] features: [top-level-await, dynamic-import] --- 2064
await-expr-func-expression.js --- description: > A function after top level await is an expression and not a hoistable declaration info: | ModuleItem: StatementListItem[~Yield, +Await, ~Return] ... ExpressionStatement[Yield, Await]: [lookahead ∉ { {, function, async [no LineTerminator here] function, class, let [ }] Expression[+In, ?Yield, ?Await]; UnaryExpression[Yield, Await] [+Await]AwaitExpression[?Yield] AwaitExpression[Yield]: await UnaryExpression[?Yield, +Await] ... PrimaryExpression[Yield, Await]: this IdentifierReference[?Yield, ?Await] Literal ArrayLiteral[?Yield, ?Await] ObjectLiteral[?Yield, ?Await] FunctionExpression ClassExpression[?Yield, ?Await] GeneratorExpression AsyncFunctionExpression AsyncGeneratorExpression RegularExpressionLiteral TemplateLiteral[?Yield, ?Await, ~Tagged] CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await] esid: prod-AwaitExpression flags: [module, async] features: [top-level-await] --- 1285
await-expr-new-expr-reject.js --- description: > Evaluation of a rejected promise info: | ModuleItem: StatementListItem[~Yield, +Await, ~Return] ... UnaryExpression[Yield, Await] [+Await]AwaitExpression[?Yield] AwaitExpression[Yield]: await UnaryExpression[?Yield, +Await] ... LeftHandSideExpression[Yield, Await]: NewExpression[?Yield, ?Await] CallExpression[?Yield, ?Await] NewExpression[Yield, Await]: MemberExpression[?Yield, ?Await] new NewExpression[?Yield, ?Await] MemberExpression[Yield, Await]: ... new MemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await] esid: prod-AwaitExpression flags: [module, async] features: [top-level-await] --- 1031
await-expr-new-expr.js --- description: > Evaluation of await before a NewExpression info: | ModuleItem: StatementListItem[~Yield, +Await, ~Return] ... UnaryExpression[Yield, Await] [+Await]AwaitExpression[?Yield] AwaitExpression[Yield]: await UnaryExpression[?Yield, +Await] ... LeftHandSideExpression[Yield, Await]: NewExpression[?Yield, ?Await] CallExpression[?Yield, ?Await] NewExpression[Yield, Await]: MemberExpression[?Yield, ?Await] new NewExpression[?Yield, ?Await] MemberExpression[Yield, Await]: ... new MemberExpression[?Yield, ?Await] Arguments[?Yield, ?Await] esid: prod-AwaitExpression flags: [module, async] features: [top-level-await] --- 958
await-expr-regexp.js --- description: > Verify a RegularExpressionLiteral following an AwaitExpression is not ambiguous to an Division info: | ModuleItem: StatementListItem[~Yield, +Await, ~Return] ... UnaryExpression[Yield, Await] [+Await]AwaitExpression[?Yield] AwaitExpression[Yield]: await UnaryExpression[?Yield, +Await] ... PrimaryExpression[Yield, Await]: this IdentifierReference[?Yield, ?Await] Literal ArrayLiteral[?Yield, ?Await] ObjectLiteral[?Yield, ?Await] FunctionExpression ClassExpression[?Yield, ?Await] GeneratorExpression AsyncFunctionExpression AsyncGeneratorExpression RegularExpressionLiteral TemplateLiteral[?Yield, ?Await, ~Tagged] CoverParenthesizedExpressionAndArrowParameterList[?Yield, ?Await] esid: prod-AwaitExpression flags: [module, async] features: [top-level-await] --- 1185
await-expr-reject-throws.js --- description: > AwaitExpression evaluates to abrupt completions in promise rejections info: | ModuleItem: StatementListItem[~Yield, +Await, ~Return] ... UnaryExpression[Yield, Await] void UnaryExpression[?Yield, ?Await] [+Await]AwaitExpression[?Yield] AwaitExpression[Yield]: await UnaryExpression[?Yield, +Await] esid: prod-AwaitExpression flags: [module, async] features: [top-level-await] --- 1519
await-expr-resolution.js --- description: > AwaitExpression Resolutions info: | ModuleItem: StatementListItem[~Yield, +Await, ~Return] ... UnaryExpression[Yield, Await] void UnaryExpression[?Yield, ?Await] [+Await]AwaitExpression[?Yield] AwaitExpression[Yield]: await UnaryExpression[?Yield, +Await] esid: prod-AwaitExpression flags: [module, async] features: [top-level-await] --- 1168
await-void-expr.js --- description: > AwaitExpression void resolves into undefined info: | ModuleItem: StatementListItem[~Yield, +Await, ~Return] ... UnaryExpression[Yield, Await] void UnaryExpression[?Yield, ?Await] [+Await]AwaitExpression[?Yield] AwaitExpression[Yield]: await UnaryExpression[?Yield, +Await] esid: prod-AwaitExpression flags: [module, async] features: [top-level-await] --- 626
browser.js 0
dfs-invariant-async_FIXTURE.js 214
dfs-invariant-direct-1_FIXTURE.js 253
dfs-invariant-direct-2_FIXTURE.js 253
dfs-invariant-indirect_FIXTURE.js 256
dfs-invariant.js --- description: Parent completion orderings match the synchronous module behavior info: | 6.2.4 AsyncModuleExecutionFulfilled ( module ) [...] 5. Let _execList_ be a new empty List. 6. Perform ! GatherAsyncParentCompletions(_module_, _execList_). 7. Let _sortedExecList_ be a List of elements that are the elements of _execList_, in the order in which they had their [[AsyncEvaluating]] fields set to *true* in InnerModuleEvaluation. 8. Assert: All elements of _sortedExecList_ have their [[AsyncEvaluating]] field set to *true*, [[PendingAsyncDependencies]] field set to 0 and [[EvaluationError]] field set to *undefined*. [...] Dependency graph for this test: dfs-invariant.js .-----------------------------------+-------. | | v | | dfs-invariant-indirect_FIXTURE.js | .---|----------------------' v v v dfs-invariant-direct-1_FIXTURE.js dfs-invariant-direct-2_FIXTURE.js '--------. .--------' v v dfs-invariant-async_FIXTURE.js esid: sec-moduleevaluation flags: [module] features: [top-level-await, globalThis] --- 1749
dynamic-import-of-waiting-module-2_FIXTURE.js 165
dynamic-import-of-waiting-module.js --- esid: sec-ContinueDynamicImport description: > Dynamic import of an ~evaluating-async~ module waits for the module to finish its evaluation info: | ContinueDynamicImport ( _promiseCapability_, _moduleCompletion_ ) 1. ... 1. Let _module_ be _moduleCompletion_.[[Value]]. 1. Let _loadPromise_ be _module_.LoadRequestedModules(). 1. Let _rejectedClosure_ be a new Abstract Closure with parameters (_reason_) that captures _promiseCapability_ and performs the following steps when called: 1. Perform ! Call(_promiseCapability_.[[Reject]], *undefined*, « _reason_ »). 1. Return ~unused~. 1. Let _onRejected_ be CreateBuiltinFunction(_rejectedClosure_, 1, *""*, « »). 1. Let _linkAndEvaluateClosure_ be a new Abstract Closure with no parameters that captures _module_, _promiseCapability_, and _onRejected_ and performs the following steps when called: 1. Let _link_ be Completion(_module_.Link()). 1. ... 1. Let _evaluatePromise_ be _module_.Evaluate(). 1. Let _fulfilledClosure_ be a new Abstract Closure with no parameters that captures _module_ and _promiseCapability_ and performs the following steps when called: 1. Let _namespace_ be GetModuleNamespace(_module_). 1. Perform ! <emu-meta effects="user-code">Call</emu-meta>(_promiseCapability_.[[Resolve]], *undefined*, « _namespace_ »). 1. Return ~unused~. 1. Let _onFulfilled_ be CreateBuiltinFunction(_fulfilledClosure_, 0, *""*, « »). 1. Perform PerformPromiseThen(_evaluatePromise_, _onFulfilled_, _onRejected_). 1. Return ~unused~. 1. Let _linkAndEvaluate_ be CreateBuiltinFunction(_linkAndEvaluateClosure_, 0, *""*, « »). 1. Perform PerformPromiseThen(_loadPromise_, _linkAndEvaluate_, _onRejected_). 1. Return ~unused~. _module_ . Evaluate ( ) 4. If _module_.[[TopLevelCapability]] is not ~empty~, then a. Return _module_.[[TopLevelCapability]].[[Promise]]. flags: [async] features: [dynamic-import] includes: [asyncHelpers.js] --- 3353
dynamic-import-of-waiting-module_FIXTURE.js 242
dynamic-import-rejection.js --- esid: sec-moduleevaluation description: > Dynamic imported module with async exports info: | InnerModuleEvaluation( module, stack, index ) ... 14. If module.[[PendingAsyncDependencies]] is > 0, set module.[[AsyncEvaluating]] to true. 15. Otherwise, if module.[[Async]] is true, perform ! ExecuteAsyncModule(module). 16. Otherwise, perform ? module.ExecuteModule(). ExecuteAsyncModule ( module ) 1. Assert: module.[[Status]] is "evaluating" or "evaluated". 2. Assert: module.[[Async]] is true. 3. Set module.[[AsyncEvaluating]] to true. 4. Let capability be ! NewPromiseCapability(%Promise%). 5. Let stepsFulfilled be the steps of a CallAsyncModuleFulfilled function as specified below. ... 8. Let stepsRejected be the steps of a CallAsyncModuleRejected function as specified below. ... 11. Perform ! PerformPromiseThen(capability.[[Promise]], onFulfilled, onRejected). 12. Perform ! module.ExecuteModule(capability). 13. Return. ExecuteModule ( [ capability ] ) ... 11. If module.[[Async]] is false, then a. Assert: capability was not provided. b. Push moduleCxt on to the execution context stack; moduleCxt is now the running execution context. c. Let result be the result of evaluating module.[[ECMAScriptCode]]. d. Suspend moduleCxt and remove it from the execution context stack. e. Resume the context that is now on the top of the execution context stack as the running execution context. f. Return Completion(result). 12. Otherwise, a. Assert: capability is a PromiseCapability Record. b. Perform ! AsyncBlockStart(capability, module.[[ECMAScriptCode]], moduleCxt). c. Return. flags: [module, async] features: [top-level-await, dynamic-import] --- 2204
dynamic-import-resolution.js --- esid: sec-moduleevaluation description: > Dynamic imported module with async exports info: | InnerModuleEvaluation( module, stack, index ) ... 14. If module.[[PendingAsyncDependencies]] is > 0, set module.[[AsyncEvaluating]] to true. 15. Otherwise, if module.[[Async]] is true, perform ! ExecuteAsyncModule(module). 16. Otherwise, perform ? module.ExecuteModule(). ExecuteAsyncModule ( module ) 1. Assert: module.[[Status]] is "evaluating" or "evaluated". 2. Assert: module.[[Async]] is true. 3. Set module.[[AsyncEvaluating]] to true. 4. Let capability be ! NewPromiseCapability(%Promise%). 5. Let stepsFulfilled be the steps of a CallAsyncModuleFulfilled function as specified below. ... 8. Let stepsRejected be the steps of a CallAsyncModuleRejected function as specified below. ... 11. Perform ! PerformPromiseThen(capability.[[Promise]], onFulfilled, onRejected). 12. Perform ! module.ExecuteModule(capability). 13. Return. ExecuteModule ( [ capability ] ) ... 11. If module.[[Async]] is false, then a. Assert: capability was not provided. b. Push moduleCxt on to the execution context stack; moduleCxt is now the running execution context. c. Let result be the result of evaluating module.[[ECMAScriptCode]]. d. Suspend moduleCxt and remove it from the execution context stack. e. Resume the context that is now on the top of the execution context stack as the running execution context. f. Return Completion(result). 12. Otherwise, a. Assert: capability is a PromiseCapability Record. b. Perform ! AsyncBlockStart(capability, module.[[ECMAScriptCode]], moduleCxt). c. Return. flags: [module, async] features: [top-level-await, dynamic-import] --- 2086
early-errors-await-not-simple-assignment-target.js --- esid: prod-AwaitExpression description: > await is not a simple assignment target and cannot be assigned to. negative: phase: parse type: SyntaxError flags: [module] features: [top-level-await] --- 408
fulfillment-order.js --- esid: sec-async-module-execution-fulfilled description: > When an async module fulfills, the promises relative to itself and its ancestors are resolved in leaf-to-root order info: | AsyncModuleExecutionFulfilled ( module ) ... 7. If module.[[TopLevelCapability]] is not empty, then a. Assert: module.[[CycleRoot]] and module are the same Module Record. b. Perform ! Call(module.[[TopLevelCapability]].[[Resolve]], undefined, « undefined »). 8. Let execList be a new empty List. 9. Perform GatherAvailableAncestors(module, execList). 10. Assert: All elements of execList have their [[AsyncEvaluationOrder]] field set to an integer, [[PendingAsyncDependencies]] field set to 0, and [[EvaluationError]] field set to empty. 11. Let sortedExecList be a List whose elements are the elements of execList, sorted by their [[AsyncEvaluationOrder]] field in ascending order. 12. For each Cyclic Module Record m of sortedExecList, do a. If m.[[Status]] is evaluated, then i. Assert: m.[[EvaluationError]] is not empty. b. Else if m.[[HasTLA]] is true, then i. Perform ExecuteAsyncModule(m). c. Else, i. Let result be m.ExecuteModule(). ii. If result is an abrupt completion, then 1. Perform AsyncModuleExecutionRejected(m, result.[[Value]]). iii. Else, 1. Set m.[[AsyncEvaluationOrder]] to done. 2. Set m.[[Status]] to evaluated. 3. If m.[[TopLevelCapability]] is not empty, then a. Assert: m.[[CycleRoot]] and m are the same Module Record. b. Perform ! Call(m.[[TopLevelCapability]].[[Resolve]], undefined, « undefined »). flags: [module, async] features: [top-level-await, promise-with-resolvers] includes: [compareArray.js] --- 2685
fulfillment-order_a-sentinel_FIXTURE.js 250
fulfillment-order_a_FIXTURE.js 314
fulfillment-order_b-sentinel_FIXTURE.js 250
fulfillment-order_b_FIXTURE.js 349
fulfillment-order_setup_FIXTURE.js 306
if-await-expr.js --- description: > Evaluate Await expression for IfStatement info: | ModuleItem: StatementListItem[~Yield, +Await, ~Return] ... UnaryExpression[Yield, Await] [+Await]AwaitExpression[?Yield] AwaitExpression[Yield]: await UnaryExpression[?Yield, +Await] esid: prod-AwaitExpression flags: [module, async] features: [top-level-await] --- 646
module-async-import-async-resolution-ticks.js --- esid: sec-moduleevaluation description: > Ticks from async module (w/ TLA) won't change loading async module info: | Table 3: Additional Fields of Cyclic Module Records [[Async]] ... Having an asynchronous dependency does not make the module asynchronous. This field must not change after the module is parsed. Evaluate ( ) Concrete Method ... 6. Let capability be ! NewPromiseCapability(%Promise%). 7. Set module.[[TopLevelCapability]] to capability. 8. Let result be InnerModuleEvaluation(module, stack, 0). 9. If result is an abrupt completion, then ... d. Perform ! Call(capability.[[Reject]], undefined, «result.[[Value]]»). 10. Otherwise, ... b. If module.[[AsyncEvaluating]] is false, then i. Perform ! Call(capability.[[Resolve]], undefined, «undefined»). ... 11. Return undefinedcapability.[[Promise]]. InnerModuleEvaluation( module, stack, index ) ... 14. If module.[[PendingAsyncDependencies]] is > 0, set module.[[AsyncEvaluating]] to true. 15. Otherwise, if module.[[Async]] is true, perform ! ExecuteAsyncModule(module). 16. Otherwise, perform ? module.ExecuteModule(). ExecuteAsyncModule ( module ) 1. Assert: module.[[Status]] is "evaluating" or "evaluated". 2. Assert: module.[[Async]] is true. 3. Set module.[[AsyncEvaluating]] to true. 4. Let capability be ! NewPromiseCapability(%Promise%). 5. Let stepsFulfilled be the steps of a CallAsyncModuleFulfilled function as specified below. ... 8. Let stepsRejected be the steps of a CallAsyncModuleRejected function as specified below. ... 11. Perform ! PerformPromiseThen(capability.[[Promise]], onFulfilled, onRejected). 12. Perform ! module.ExecuteModule(capability). 13. Return. ExecuteModule ( [ capability ] ) ... 11. If module.[[Async]] is false, then a. Assert: capability was not provided. b. Push moduleCxt on to the execution context stack; moduleCxt is now the running execution context. c. Let result be the result of evaluating module.[[ECMAScriptCode]]. d. Suspend moduleCxt and remove it from the execution context stack. e. Resume the context that is now on the top of the execution context stack as the running execution context. f. Return Completion(result). 12. Otherwise, a. Assert: capability is a PromiseCapability Record. b. Perform ! AsyncBlockStart(capability, module.[[ECMAScriptCode]], moduleCxt). c. Return. flags: [module, async] features: [top-level-await] --- 3042
module-graphs-does-not-hang.js --- description: Module graphs with Top-Level Await shouldn't hang. flags: [module, async] features: [top-level-await] --- 411
module-graphs-grandparent-tla_FIXTURE.js 224
module-graphs-parent-tla_FIXTURE.js 202
module-import-rejection-body.js --- esid: sec-moduleevaluation description: > Evaluate imported rejected module info: | Table 3: Additional Fields of Cyclic Module Records [[Async]] ... Having an asynchronous dependency does not make the module asynchronous. This field must not change after the module is parsed. Evaluate ( ) Concrete Method ... 6. Let capability be ! NewPromiseCapability(%Promise%). 7. Set module.[[TopLevelCapability]] to capability. 8. Let result be InnerModuleEvaluation(module, stack, 0). 9. If result is an abrupt completion, then ... d. Perform ! Call(capability.[[Reject]], undefined, «result.[[Value]]»). 10. Otherwise, ... b. If module.[[AsyncEvaluating]] is false, then i. Perform ! Call(capability.[[Resolve]], undefined, «undefined»). ... 11. Return undefinedcapability.[[Promise]]. InnerModuleEvaluation( module, stack, index ) ... 14. If module.[[PendingAsyncDependencies]] is > 0, set module.[[AsyncEvaluating]] to true. 15. Otherwise, if module.[[Async]] is true, perform ! ExecuteAsyncModule(module). 16. Otherwise, perform ? module.ExecuteModule(). ExecuteAsyncModule ( module ) 1. Assert: module.[[Status]] is "evaluating" or "evaluated". 2. Assert: module.[[Async]] is true. 3. Set module.[[AsyncEvaluating]] to true. 4. Let capability be ! NewPromiseCapability(%Promise%). 5. Let stepsFulfilled be the steps of a CallAsyncModuleFulfilled function as specified below. ... 8. Let stepsRejected be the steps of a CallAsyncModuleRejected function as specified below. ... 11. Perform ! PerformPromiseThen(capability.[[Promise]], onFulfilled, onRejected). 12. Perform ! module.ExecuteModule(capability). 13. Return. ExecuteModule ( [ capability ] ) ... 11. If module.[[Async]] is false, then a. Assert: capability was not provided. b. Push moduleCxt on to the execution context stack; moduleCxt is now the running execution context. c. Let result be the result of evaluating module.[[ECMAScriptCode]]. d. Suspend moduleCxt and remove it from the execution context stack. e. Resume the context that is now on the top of the execution context stack as the running execution context. f. Return Completion(result). 12. Otherwise, a. Assert: capability is a PromiseCapability Record. b. Perform ! AsyncBlockStart(capability, module.[[ECMAScriptCode]], moduleCxt). c. Return. flags: [module] features: [top-level-await] negative: phase: runtime type: TypeError --- 2794
module-import-rejection-body_FIXTURE.js 297
module-import-rejection-tick.js --- esid: sec-moduleevaluation description: > Evaluate imported rejected module info: | Table 3: Additional Fields of Cyclic Module Records [[Async]] ... Having an asynchronous dependency does not make the module asynchronous. This field must not change after the module is parsed. Evaluate ( ) Concrete Method ... 6. Let capability be ! NewPromiseCapability(%Promise%). 7. Set module.[[TopLevelCapability]] to capability. 8. Let result be InnerModuleEvaluation(module, stack, 0). 9. If result is an abrupt completion, then ... d. Perform ! Call(capability.[[Reject]], undefined, «result.[[Value]]»). 10. Otherwise, ... b. If module.[[AsyncEvaluating]] is false, then i. Perform ! Call(capability.[[Resolve]], undefined, «undefined»). ... 11. Return undefinedcapability.[[Promise]]. InnerModuleEvaluation( module, stack, index ) ... 14. If module.[[PendingAsyncDependencies]] is > 0, set module.[[AsyncEvaluating]] to true. 15. Otherwise, if module.[[Async]] is true, perform ! ExecuteAsyncModule(module). 16. Otherwise, perform ? module.ExecuteModule(). ExecuteAsyncModule ( module ) 1. Assert: module.[[Status]] is "evaluating" or "evaluated". 2. Assert: module.[[Async]] is true. 3. Set module.[[AsyncEvaluating]] to true. 4. Let capability be ! NewPromiseCapability(%Promise%). 5. Let stepsFulfilled be the steps of a CallAsyncModuleFulfilled function as specified below. ... 8. Let stepsRejected be the steps of a CallAsyncModuleRejected function as specified below. ... 11. Perform ! PerformPromiseThen(capability.[[Promise]], onFulfilled, onRejected). 12. Perform ! module.ExecuteModule(capability). 13. Return. ExecuteModule ( [ capability ] ) ... 11. If module.[[Async]] is false, then a. Assert: capability was not provided. b. Push moduleCxt on to the execution context stack; moduleCxt is now the running execution context. c. Let result be the result of evaluating module.[[ECMAScriptCode]]. d. Suspend moduleCxt and remove it from the execution context stack. e. Resume the context that is now on the top of the execution context stack as the running execution context. f. Return Completion(result). 12. Otherwise, a. Assert: capability is a PromiseCapability Record. b. Perform ! AsyncBlockStart(capability, module.[[ECMAScriptCode]], moduleCxt). c. Return. flags: [module] features: [top-level-await] negative: phase: runtime type: RangeError --- 2796
module-import-rejection-tick_FIXTURE.js 405
module-import-rejection.js --- esid: sec-moduleevaluation description: > Evaluate imported rejected module info: | Table 3: Additional Fields of Cyclic Module Records [[Async]] ... Having an asynchronous dependency does not make the module asynchronous. This field must not change after the module is parsed. Evaluate ( ) Concrete Method ... 6. Let capability be ! NewPromiseCapability(%Promise%). 7. Set module.[[TopLevelCapability]] to capability. 8. Let result be InnerModuleEvaluation(module, stack, 0). 9. If result is an abrupt completion, then ... d. Perform ! Call(capability.[[Reject]], undefined, «result.[[Value]]»). 10. Otherwise, ... b. If module.[[AsyncEvaluating]] is false, then i. Perform ! Call(capability.[[Resolve]], undefined, «undefined»). ... 11. Return undefinedcapability.[[Promise]]. InnerModuleEvaluation( module, stack, index ) ... 14. If module.[[PendingAsyncDependencies]] is > 0, set module.[[AsyncEvaluating]] to true. 15. Otherwise, if module.[[Async]] is true, perform ! ExecuteAsyncModule(module). 16. Otherwise, perform ? module.ExecuteModule(). ExecuteAsyncModule ( module ) 1. Assert: module.[[Status]] is "evaluating" or "evaluated". 2. Assert: module.[[Async]] is true. 3. Set module.[[AsyncEvaluating]] to true. 4. Let capability be ! NewPromiseCapability(%Promise%). 5. Let stepsFulfilled be the steps of a CallAsyncModuleFulfilled function as specified below. ... 8. Let stepsRejected be the steps of a CallAsyncModuleRejected function as specified below. ... 11. Perform ! PerformPromiseThen(capability.[[Promise]], onFulfilled, onRejected). 12. Perform ! module.ExecuteModule(capability). 13. Return. ExecuteModule ( [ capability ] ) ... 11. If module.[[Async]] is false, then a. Assert: capability was not provided. b. Push moduleCxt on to the execution context stack; moduleCxt is now the running execution context. c. Let result be the result of evaluating module.[[ECMAScriptCode]]. d. Suspend moduleCxt and remove it from the execution context stack. e. Resume the context that is now on the top of the execution context stack as the running execution context. f. Return Completion(result). 12. Otherwise, a. Assert: capability is a PromiseCapability Record. b. Perform ! AsyncBlockStart(capability, module.[[ECMAScriptCode]], moduleCxt). c. Return. flags: [module] features: [top-level-await] negative: phase: runtime type: TypeError --- 2798
module-import-rejection_FIXTURE.js 566
module-import-resolution.js --- esid: sec-moduleevaluation description: > Evaluate imported module with async exports info: | Table 3: Additional Fields of Cyclic Module Records [[Async]] ... Having an asynchronous dependency does not make the module asynchronous. This field must not change after the module is parsed. Evaluate ( ) Concrete Method ... 6. Let capability be ! NewPromiseCapability(%Promise%). 7. Set module.[[TopLevelCapability]] to capability. 8. Let result be InnerModuleEvaluation(module, stack, 0). 9. If result is an abrupt completion, then ... d. Perform ! Call(capability.[[Reject]], undefined, «result.[[Value]]»). 10. Otherwise, ... b. If module.[[AsyncEvaluating]] is false, then i. Perform ! Call(capability.[[Resolve]], undefined, «undefined»). ... 11. Return undefinedcapability.[[Promise]]. InnerModuleEvaluation( module, stack, index ) ... 14. If module.[[PendingAsyncDependencies]] is > 0, set module.[[AsyncEvaluating]] to true. 15. Otherwise, if module.[[Async]] is true, perform ! ExecuteAsyncModule(module). 16. Otherwise, perform ? module.ExecuteModule(). ExecuteAsyncModule ( module ) 1. Assert: module.[[Status]] is "evaluating" or "evaluated". 2. Assert: module.[[Async]] is true. 3. Set module.[[AsyncEvaluating]] to true. 4. Let capability be ! NewPromiseCapability(%Promise%). 5. Let stepsFulfilled be the steps of a CallAsyncModuleFulfilled function as specified below. ... 8. Let stepsRejected be the steps of a CallAsyncModuleRejected function as specified below. ... 11. Perform ! PerformPromiseThen(capability.[[Promise]], onFulfilled, onRejected). 12. Perform ! module.ExecuteModule(capability). 13. Return. ExecuteModule ( [ capability ] ) ... 11. If module.[[Async]] is false, then a. Assert: capability was not provided. b. Push moduleCxt on to the execution context stack; moduleCxt is now the running execution context. c. Let result be the result of evaluating module.[[ECMAScriptCode]]. d. Suspend moduleCxt and remove it from the execution context stack. e. Resume the context that is now on the top of the execution context stack as the running execution context. f. Return Completion(result). 12. Otherwise, a. Assert: capability is a PromiseCapability Record. b. Perform ! AsyncBlockStart(capability, module.[[ECMAScriptCode]], moduleCxt). c. Return. flags: [module, async] features: [top-level-await] --- 2938
module-import-resolution_FIXTURE.js 370
module-import-unwrapped.js --- esid: sec-moduleevaluation description: > Evaluate imported module with unwrapped imported promises info: | Table 3: Additional Fields of Cyclic Module Records [[Async]] ... Having an asynchronous dependency does not make the module asynchronous. This field must not change after the module is parsed. Evaluate ( ) Concrete Method ... 6. Let capability be ! NewPromiseCapability(%Promise%). 7. Set module.[[TopLevelCapability]] to capability. 8. Let result be InnerModuleEvaluation(module, stack, 0). 9. If result is an abrupt completion, then ... d. Perform ! Call(capability.[[Reject]], undefined, «result.[[Value]]»). 10. Otherwise, ... b. If module.[[AsyncEvaluating]] is false, then i. Perform ! Call(capability.[[Resolve]], undefined, «undefined»). ... 11. Return undefinedcapability.[[Promise]]. InnerModuleEvaluation( module, stack, index ) ... 14. If module.[[PendingAsyncDependencies]] is > 0, set module.[[AsyncEvaluating]] to true. 15. Otherwise, if module.[[Async]] is true, perform ! ExecuteAsyncModule(module). 16. Otherwise, perform ? module.ExecuteModule(). ExecuteAsyncModule ( module ) 1. Assert: module.[[Status]] is "evaluating" or "evaluated". 2. Assert: module.[[Async]] is true. 3. Set module.[[AsyncEvaluating]] to true. 4. Let capability be ! NewPromiseCapability(%Promise%). 5. Let stepsFulfilled be the steps of a CallAsyncModuleFulfilled function as specified below. ... 8. Let stepsRejected be the steps of a CallAsyncModuleRejected function as specified below. ... 11. Perform ! PerformPromiseThen(capability.[[Promise]], onFulfilled, onRejected). 12. Perform ! module.ExecuteModule(capability). 13. Return. ExecuteModule ( [ capability ] ) ... 11. If module.[[Async]] is false, then a. Assert: capability was not provided. b. Push moduleCxt on to the execution context stack; moduleCxt is now the running execution context. c. Let result be the result of evaluating module.[[ECMAScriptCode]]. d. Suspend moduleCxt and remove it from the execution context stack. e. Resume the context that is now on the top of the execution context stack as the running execution context. f. Return Completion(result). 12. Otherwise, a. Assert: capability is a PromiseCapability Record. b. Perform ! AsyncBlockStart(capability, module.[[ECMAScriptCode]], moduleCxt). c. Return. flags: [module, async] features: [top-level-await] --- 3482
module-import-unwrapped_FIXTURE.js 332
module-self-import-async-resolution-ticks.js --- esid: sec-moduleevaluation description: > Ticks from async module (w/ TLA) self importing info: | Table 3: Additional Fields of Cyclic Module Records [[Async]] ... Having an asynchronous dependency does not make the module asynchronous. This field must not change after the module is parsed. Evaluate ( ) Concrete Method ... 6. Let capability be ! NewPromiseCapability(%Promise%). 7. Set module.[[TopLevelCapability]] to capability. 8. Let result be InnerModuleEvaluation(module, stack, 0). 9. If result is an abrupt completion, then ... d. Perform ! Call(capability.[[Reject]], undefined, «result.[[Value]]»). 10. Otherwise, ... b. If module.[[AsyncEvaluating]] is false, then i. Perform ! Call(capability.[[Resolve]], undefined, «undefined»). ... 11. Return undefinedcapability.[[Promise]]. InnerModuleEvaluation( module, stack, index ) ... 14. If module.[[PendingAsyncDependencies]] is > 0, set module.[[AsyncEvaluating]] to true. 15. Otherwise, if module.[[Async]] is true, perform ! ExecuteAsyncModule(module). 16. Otherwise, perform ? module.ExecuteModule(). ExecuteAsyncModule ( module ) 1. Assert: module.[[Status]] is "evaluating" or "evaluated". 2. Assert: module.[[Async]] is true. 3. Set module.[[AsyncEvaluating]] to true. 4. Let capability be ! NewPromiseCapability(%Promise%). 5. Let stepsFulfilled be the steps of a CallAsyncModuleFulfilled function as specified below. ... 8. Let stepsRejected be the steps of a CallAsyncModuleRejected function as specified below. ... 11. Perform ! PerformPromiseThen(capability.[[Promise]], onFulfilled, onRejected). 12. Perform ! module.ExecuteModule(capability). 13. Return. ExecuteModule ( [ capability ] ) ... 11. If module.[[Async]] is false, then a. Assert: capability was not provided. b. Push moduleCxt on to the execution context stack; moduleCxt is now the running execution context. c. Let result be the result of evaluating module.[[ECMAScriptCode]]. d. Suspend moduleCxt and remove it from the execution context stack. e. Resume the context that is now on the top of the execution context stack as the running execution context. f. Return Completion(result). 12. Otherwise, a. Assert: capability is a PromiseCapability Record. b. Perform ! AsyncBlockStart(capability, module.[[ECMAScriptCode]], moduleCxt). c. Return. flags: [module, async] features: [top-level-await] --- 3119
module-sync-import-async-resolution-ticks.js --- esid: sec-moduleevaluation description: > Ticks from sync module (no TLA) loading async module info: | Table 3: Additional Fields of Cyclic Module Records [[Async]] ... Having an asynchronous dependency does not make the module asynchronous. This field must not change after the module is parsed. Evaluate ( ) Concrete Method ... 6. Let capability be ! NewPromiseCapability(%Promise%). 7. Set module.[[TopLevelCapability]] to capability. 8. Let result be InnerModuleEvaluation(module, stack, 0). 9. If result is an abrupt completion, then ... d. Perform ! Call(capability.[[Reject]], undefined, «result.[[Value]]»). 10. Otherwise, ... b. If module.[[AsyncEvaluating]] is false, then i. Perform ! Call(capability.[[Resolve]], undefined, «undefined»). ... 11. Return undefinedcapability.[[Promise]]. InnerModuleEvaluation( module, stack, index ) ... 14. If module.[[PendingAsyncDependencies]] is > 0, set module.[[AsyncEvaluating]] to true. 15. Otherwise, if module.[[Async]] is true, perform ! ExecuteAsyncModule(module). 16. Otherwise, perform ? module.ExecuteModule(). ExecuteAsyncModule ( module ) 1. Assert: module.[[Status]] is "evaluating" or "evaluated". 2. Assert: module.[[Async]] is true. 3. Set module.[[AsyncEvaluating]] to true. 4. Let capability be ! NewPromiseCapability(%Promise%). 5. Let stepsFulfilled be the steps of a CallAsyncModuleFulfilled function as specified below. ... 8. Let stepsRejected be the steps of a CallAsyncModuleRejected function as specified below. ... 11. Perform ! PerformPromiseThen(capability.[[Promise]], onFulfilled, onRejected). 12. Perform ! module.ExecuteModule(capability). 13. Return. ExecuteModule ( [ capability ] ) ... 11. If module.[[Async]] is false, then a. Assert: capability was not provided. b. Push moduleCxt on to the execution context stack; moduleCxt is now the running execution context. c. Let result be the result of evaluating module.[[ECMAScriptCode]]. d. Suspend moduleCxt and remove it from the execution context stack. e. Resume the context that is now on the top of the execution context stack as the running execution context. f. Return Completion(result). 12. Otherwise, a. Assert: capability is a PromiseCapability Record. b. Perform ! AsyncBlockStart(capability, module.[[ECMAScriptCode]], moduleCxt). c. Return. flags: [module, async] features: [top-level-await] --- 2992
new-await-parens.js --- esid: prod-AwaitExpression description: > `new (await Constructor)` returns instance of Constructor flags: [module, async] features: [top-level-await] --- 635
new-await-script-code.js --- esid: prod-AwaitExpression description: > await is not a keyword in script code features: [top-level-await] --- 342
new-await.js --- esid: prod-AwaitExpression description: > await cannot immediately follow new in module code negative: phase: parse type: SyntaxError flags: [module] features: [top-level-await] --- 394
no-operand.js --- esid: prod-AwaitExpression description: > await requries an operand. negative: phase: parse type: SyntaxError flags: [module] features: [top-level-await] --- 360
pending-async-dep-from-cycle.js --- esid: sec-innermoduleevaluation description: > A module depending on an async module of a separate cycle should wait for the cycle root to complete info: | Module graph: ┌──────────────────┐ │ entrypoint │ └──────────────────┘ │ │ ▼ ▼ ┌──────────────────┐ ┌────────────────────────┐ │ cycle root (TLA) │ │ importer of cycle leaf │ └──────────────────┘ └────────────────────────┘ │ ▲ │ ▼ │ │ ┌──────────────────┐ │ │ cycle leaf (TLA) │ ◄──────┘ └──────────────────┘ This test exercises step 11.c.iv.1 of the following algorithm when _module_ is "importer of cycle leaf", _requiredModule_ is "cycle leaf (TLA)", and _requiredModule_.[[CycleRoot]] is "cycle root (TLA)". The [[Status]] of "cycle leaf (TLA)" and of "cycle root (TLA)" is ~evaluating-async~, because they have already been traversed and they are blocked on the TLA in "cycle leaf (TLA)". Thus, their [[AsyncEvaluationOrder]] is an integer, so the _requiredModule_ variable is used to determine what module "importer of cycle leaf" should wait for. InnerModuleEvaluation ( module, stack, index ) ... 11. For each ModuleRequest Record request of module.[[RequestedModules]], do a. Let requiredModule be GetImportedModule(module, request). b. Set index to ? InnerModuleEvaluation(requiredModule, stack, index). c. If requiredModule is a Cyclic Module Record, then i. Assert: requiredModule.[[Status]] is one of evaluating, evaluating-async, or evaluated. ii. Assert: requiredModule.[[Status]] is evaluating if and only if stack contains requiredModule. iii. If requiredModule.[[Status]] is evaluating, then 1. Set module.[[DFSAncestorIndex]] to min(module.[[DFSAncestorIndex]], requiredModule.[[DFSAncestorIndex]]). iv. Else, 1. Set requiredModule to requiredModule.[[CycleRoot]]. 2. Assert: requiredModule.[[Status]] is either evaluating-async or evaluated. 3. If requiredModule.[[EvaluationError]] is not empty, return ? requiredModule.[[EvaluationError]]. v. If requiredModule.[[AsyncEvaluationOrder]] is an integer, then 1. Set module.[[PendingAsyncDependencies]] to module.[[PendingAsyncDependencies]] + 1. 2. Append module to requiredModule.[[AsyncParentModules]]. flags: [module, async] features: [top-level-await] includes: [compareArray.js] --- 3711
pending-async-dep-from-cycle_cycle-leaf_FIXTURE.js 320
pending-async-dep-from-cycle_cycle-root_FIXTURE.js 320
pending-async-dep-from-cycle_import-cycle-leaf_FIXTURE.js 277
pending-async-dep-from-cycle_setup_FIXTURE.js 187
rejection-order.js --- esid: sec-async-module-execution-rejected description: > When an async module rejects, the promises relative to itself and its ancestors are resolved in leaf-to-root order info: | AsyncModuleExecutionRejected ( module, error ) ... 9. If module.[[TopLevelCapability]] is not empty, then a. Assert: module.[[CycleRoot]] and module are the same Module Record. b. Perform ! Call(module.[[TopLevelCapability]].[[Reject]], undefined, « error »). 10. For each Cyclic Module Record m of module.[[AsyncParentModules]], do a. Perform AsyncModuleExecutionRejected(m, error). flags: [module, async] features: [top-level-await, promise-with-resolvers] includes: [compareArray.js] --- 1558
rejection-order_a-sentinel_FIXTURE.js 248
rejection-order_a_FIXTURE.js 310
rejection-order_b-sentinel_FIXTURE.js 248
rejection-order_b_FIXTURE.js 345
rejection-order_setup_FIXTURE.js 306
shell.js --- description: | A collection of assertion and wrapper functions for testing asynchronous built-ins. defines: [asyncTest, assert.throwsAsync] --- 3626
syntax
tla_FIXTURE.js 185
top-level-ticks-2.js --- esid: sec-asyncblockstart description: > Evaluation of await ticks order info: | AsyncBlockStart ( promiseCapability, asyncBody, asyncContext ) 1. Assert: promiseCapability is a PromiseCapability Record. 2. Let runningContext be the running execution context. 3. Set the code evaluation state of asyncContext such that when evaluation is resumed for that execution context the following steps will be performed: a. Let result be the result of evaluating asyncBody. ... includes: [compareArray.js] flags: [module, async] features: [top-level-await] --- 1284
top-level-ticks.js --- esid: sec-asyncblockstart description: > Evaluation of await ticks order info: | AsyncBlockStart ( promiseCapability, asyncBody, asyncContext ) 1. Assert: promiseCapability is a PromiseCapability Record. 2. Let runningContext be the running execution context. 3. Set the code evaluation state of asyncContext such that when evaluation is resumed for that execution context the following steps will be performed: a. Let result be the result of evaluating asyncBody. ... includes: [compareArray.js] flags: [module, async] features: [top-level-await] --- 1296
unobservable-global-async-evaluation-count-reset-a_FIXTURE.js 347
unobservable-global-async-evaluation-count-reset-b_FIXTURE.js 303
unobservable-global-async-evaluation-count-reset-c_FIXTURE.js 174
unobservable-global-async-evaluation-count-reset-d_FIXTURE.js 421
unobservable-global-async-evaluation-count-reset-e_FIXTURE.js 281
unobservable-global-async-evaluation-count-reset-setup_FIXTURE.js 330
unobservable-global-async-evaluation-count-reset.js --- description: > An implementation may unobservably reset [[ModuleAsyncEvaluationCount]] to 0 whenever there are no pending modules. info: | IncrementModuleAsyncEvaluationCount ( ) 1. Let AR be the Agent Record of the surrounding agent. 2. Let count be AR.[[ModuleAsyncEvaluationCount]]. 3. Set AR.[[ModuleAsyncEvaluationCount]] to count + 1. 4. Return count. NOTE: This value is only used to keep track of the relative evaluation order between pending modules. An implementation may unobservably reset [[ModuleAsyncEvaluationCount]] to 0 whenever there are no pending modules. InnerModuleEvaluation ( module, stack, index ) ... 12. If module.[[PendingAsyncDependencies]] > 0 or module.[[HasTLA]] is true, then a. Assert: module.[[AsyncEvaluationOrder]] is unset. b. Set module.[[AsyncEvaluationOrder]] to IncrementModuleAsyncEvaluationCount(). ... AsyncModuleExecutionFulfilled ( module ) ... 9. Perform GatherAvailableAncestors(module, execList). 10. ... 11. Let sortedExecList be a List whose elements are the elements of execList, sorted by their [[AsyncEvaluationOrder]] field in ascending order. 12. For each Cyclic Module Record m of sortedExecList, do a. If m.[[Status]] is evaluated, then i. Assert: m.[[EvaluationError]] is not empty. b. Else if m.[[HasTLA]] is true, then i. Perform ExecuteAsyncModule(m). c. Else, i. Let result be m.ExecuteModule(). ... Module graph (the order of dependencies in each module is important, and it's left-to-right): ┌─────┐ ┌─────┐ ┌─────┐ │ A │ │ C │ │ D │ └─────┘ └─────┘ └─────┘ │ │ │ │ ▼ │ │ ┌─────┐ │ │ │ E │ │ │ └─────┘ │ │ ┌──────────────────┘ ▼ ▼ ┌───────┐ │ B │ └───────┘ Where B and C have top-level await. The test orchestrates the evaluation order such that: - Import A first - Once B starts evaluating, import C and immediately resolve its top-level await - Once C finishes evaluating, import D - Once E is evaluated, resolve B's await esid: sec-IncrementModuleAsyncEvaluationCount flags: [module, async] features: [top-level-await, dynamic-import, promise-with-resolvers] includes: [compareArray.js] --- 3485
void-await-expr.js --- description: > void AwaitExpression is still evaluated info: | ModuleItem: StatementListItem[~Yield, +Await, ~Return] ... UnaryExpression[Yield, Await] void UnaryExpression[?Yield, ?Await] [+Await]AwaitExpression[?Yield] AwaitExpression[Yield]: await UnaryExpression[?Yield, +Await] esid: prod-AwaitExpression flags: [module, async] features: [top-level-await] --- 666
while-dynamic-evaluation.js --- description: > Evaluate Await expression for IfStatement info: | ModuleItem: StatementListItem[~Yield, +Await, ~Return] ... UnaryExpression[Yield, Await] [+Await]AwaitExpression[?Yield] AwaitExpression[Yield]: await UnaryExpression[?Yield, +Await] esid: prod-AwaitExpression flags: [module, async] features: [top-level-await] --- 961