Skip to content

Commit a2a469d

Browse files
Update on top of the new ECMA-262 module loading logic (#69)
1 parent b7d9182 commit a2a469d

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

document/js-api/index.bs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ urlPrefix: https://tc39.github.io/ecma262/; spec: ECMASCRIPT
9999
type: abstract-op
100100
text: CreateDataPropertyOrThrow; url: sec-createdatapropertyorthrow
101101
text: CreateMethodProperty; url: sec-createmethodproperty
102-
text: HostResolveImportedModule; url: sec-hostresolveimportedmodule
102+
text: GetImportedModule; url: url-GetImportedModule
103103
text: NewModuleEnvironment; url: sec-newmoduleenvironment
104104
text: OrdinaryObjectCreate; url: sec-ordinaryobjectcreate
105105
urlPrefix: https://webassembly.github.io/spec/core/; spec: WebAssembly; type: dfn
@@ -1264,16 +1264,18 @@ To <dfn export>parse a WebAssembly module</dfn> given a an {{ArrayBuffer}} |byte
12641264
\[[Namespace]]: undefined,
12651265
\[[HostDefined]]: |hostDefined|,
12661266
<!-- Cyclic Module Records -->
1267-
\[[Status]]: "unlinked",
1267+
\[[Status]]: "new",
12681268
\[[EvaluationError]]: undefined,
12691269
\[[DFSIndex]]: undefined,
12701270
\[[DFSAncestorIndex]]: undefined,
12711271
\[[RequestedModules]]: |requestedModules|,
1272-
\[[Async]]: true,
1273-
\[[AsyncEvaluating]]: false,
1274-
\[[TopLevelCapability]]: undefined
1275-
\[[AsyncParentModules]]: undefined,
1276-
\[[PendingAsyncDependencies]]: undefined,
1272+
\[[LoadedModules]]: &laquo; &raquo;,
1273+
\[[CycleRoot]]: ~empty~,
1274+
\[[HasTLA]]: true,
1275+
\[[AsyncEvaluation]]: true,
1276+
\[[TopLevelCapability]]: ~empty~
1277+
\[[AsyncParentModules]]: &laquo; &raquo;,
1278+
\[[PendingAsyncDependencies]]: ~empty~,
12771279
<!-- WebAssembly Module Records -->
12781280
\[[WebAssemblyModule]]: |module|
12791281
}.
@@ -1327,14 +1329,12 @@ WebAssembly Module Records have the following methods:
13271329
<h3 id="module-execution">ExecuteModule ( [ |promiseCapability| ] ) Concrete Method</h3>
13281330
1. Assert: |promiseCapability| was provided.
13291331
1. Let |record| be this WebAssembly Module Record.
1330-
1. Assert: |record|.\[[Async]] is true.
1331-
1. Assert: |record|.\[[ModuleAsync]] is true.
1332+
1. Assert: |record|.\[[HasTLA]] is true.
13321333
1. Let |module| be |record|.\[[WebAssemblyModule]].
13331334
1. Let |imports| be a new, empty [=map=].
13341335
1. For each (|importedModuleName|, |name|, <var ignore>type</var>) in [=module_imports=](|module|.\[[Module]]),
13351336
1. If |imports|[|importedModuleName|] does not exist, set |imports|[|importedModuleName|] to a new, empty [=map=].
1336-
1. Let |importedModule| be ! [$HostResolveImportedModule$](|record|, |importedModuleName|).
1337-
1. NOTE: The above call cannot fail because imported module requests are a subset of |record|.\[[RequestedModules]], and these have been resolved earlier in this algorithm.
1337+
1. Let |importedModule| be [$GetImportedModule$](|record|, |importedModuleName|).
13381338
1. Let |value| be ? |importedModule|.\[[Environment]].GetBindingValue(|name|, true).
13391339
1. Set |imports|[|importedModuleName|][|name|] to |value|.
13401340
1. Let |importsObject| be ! [$OrdinaryObjectCreate$](null).
@@ -1347,9 +1347,9 @@ WebAssembly Module Records have the following methods:
13471347
1. [=Upon fulfillment=] of |instancePromise| with value |instance|:
13481348
1. For each |name| in the [=export name list=] of |record|,
13491349
1. Perform ! |record|.\[[Environment]].InitializeBinding(|name|, ! Get(|instance|.\[[Exports]], |name|)).
1350-
1. Perform ! [=Call=](|promiseCapability|.\[[Resolve]], undefined, undefined).
1350+
1. Perform ! [=Call=](|promiseCapability|.\[[Resolve]], undefined, &laquo; undefined &raquo;).
13511351
1. [=Upon rejection=] of |instancePromise| with reason |r|:
1352-
1. Perform ! [=Call=](|promiseCapability|.\[[Reject]], undefined, |r|).
1352+
1. Perform ! [=Call=](|promiseCapability|.\[[Reject]], undefined, &laquo; |r| &raquo;).
13531353

13541354
Note: exported bindings are left uninitialized, i.e., in TDZ.
13551355

0 commit comments

Comments
 (0)