You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1377,8 +1376,7 @@ WebAssembly modules can be used in a module graph with ECMAScript modules and So
1377
1376
1378
1377
Note: While this specification is not yet merged into the main Wasm specification, since it defines both a Source Phase Imports integration and an evaluation/instance phase integration, implementations may choose to implement only the Source Phase Imports as its own smaller proposal without implementing the full evaluation/instance phase import support. In this case, the `ResolveExport` abstract operation should be implemented as returning null, and the `InitializeEnvironment` and `ExecuteModule` abstract operations implemented as unconditionally throwing a `SyntaxError` exception. This note will be removed when this proposal is upstreamed.
1379
1378
1380
-
<dfn export>WebAssembly Module Record</dfn>s are a subclass of [=Cyclic Module Record=] which contain WebAssembly code. WebAssembly Module Records have one additional internal slot:
1381
-
* \[[WebAssemblyModule]] : a WebAssembly {{Module}} object
1379
+
<dfn export>WebAssembly Module Record</dfn>s are a subclass of [=Cyclic Module Record=] which contain WebAssembly code.
1382
1380
1383
1381
<div algorithm>
1384
1382
To <dfn export>parse a WebAssembly module</dfn> given a <a>byte sequence</a> |bytes|, a Realm |realm| and object |hostDefined|, perform the following steps.
@@ -1393,8 +1391,9 @@ To <dfn export>parse a WebAssembly module</dfn> given a <a>byte sequence</a> |by
1393
1391
1. Return {
1394
1392
<!-- Abstract Module Records -->
1395
1393
\[[Realm]]: |realm|,
1396
-
\[[Environment]]: undefined,
1397
-
\[[Namespace]]: undefined,
1394
+
\[[Environment]]: ~empty~,
1395
+
\[[Namespace]]: ~empty~,
1396
+
\[[ModuleSource]]: |module|,
1398
1397
\[[HostDefined]]: |hostDefined|,
1399
1398
<!-- Cyclic Module Records -->
1400
1399
\[[Status]]: "new",
@@ -1409,8 +1408,6 @@ To <dfn export>parse a WebAssembly module</dfn> given a <a>byte sequence</a> |by
1409
1408
\[[TopLevelCapability]]: ~empty~
1410
1409
\[[AsyncParentModules]]: « »,
1411
1410
\[[PendingAsyncDependencies]]: ~empty~,
1412
-
<!-- WebAssembly Module Records -->
1413
-
\[[WebAssemblyModule]]: |module|
1414
1411
}.
1415
1412
1416
1413
Note: From HTML, it's not observable when [=parse a WebAssembly module=] begins, so any work perfomed in compilation may be performed off-thread.
@@ -1419,7 +1416,7 @@ Note: From HTML, it's not observable when [=parse a WebAssembly module=] begins,
1419
1416
<div algorithm>
1420
1417
The <dfn>export name list</dfn> of a WebAssembly Module Record |record| is defined by the following algorithm:
1421
1418
1422
-
1. Let |module| be |record|'s \[[WebAssemblyModule]] internal slot.
1419
+
1. Let |module| be |record|'s \[[ModuleSource]] internal slot.
1423
1420
1. Let |exports| be an empty [=list=].
1424
1421
1. For each (|name|, <var ignore>type</var>) in [=module_exports=](|module|.\[[Module]])
1425
1422
1. [=list/Append=] |name| to the end of |exports|.
@@ -1462,7 +1459,7 @@ WebAssembly Module Records have the following methods:
Hosts should implement [$HostGetModuleSourceName$] such that whenever a WebAssembly {{Module}} object is provided with a \[[Module]] internal slot, the string "<code data-x="">WebAssembly.Module</code>" is always returned.
0 commit comments