@@ -79,8 +79,9 @@ urlPrefix: https://tc39.github.io/ecma262/; spec: ECMASCRIPT
79
79
text: CreateArrayFromList; url: sec-createarrayfromlist
80
80
text: Cyclic Module Record; url: cyclic-module-record
81
81
text: GetMethod; url: sec-getmethod
82
- text: ToBigInt64; url: #sec-tobigint64
83
- text: Module Namespace exotic object; url: #sec-module-namespace-exotic-objects
82
+ text: ToBigInt64; url: sec-tobigint64
83
+ text: Module Namespace exotic object; url: sec-module-namespace-exotic-objects
84
+ text: ResolvedBinding Record; url: resolvedbinding-record
84
85
type: abstract-op
85
86
text: CreateDataPropertyOrThrow; url: sec-createdatapropertyorthrow
86
87
text: CreateMethodProperty; url: sec-createmethodproperty
@@ -1488,21 +1489,24 @@ WebAssembly Module Records have the following methods:
1488
1489
1. [=list/iterate|For each=] (|importedModuleName|, |name|, |importtype|) in [=module_imports=] (|module|),
1489
1490
1. Let |importedModule| be [$GetImportedModule$] (|record|, |importedModuleName|).
1490
1491
1. Let |resolution| be |importedModule|.ResolveExport(|name|).
1491
- 1. If |resolution|.\[[Module]] is a WebAssembly Module Record,
1492
- 1. Let |resolutionInstance| be |resolution|.\[[Module]] .\[[Instance]] .
1493
- 1. If |resolutionInstance| is ~empty~ then,
1492
+ 1. Assert: |resolution| is a [=ResolvedBinding Record=] , as validated during environment initialization.
1493
+ 1. Let |resolvedModule| be |resolution|.\\[[Module]] .
1494
+ 1. Let |resolvedName| be |resolution|.\[[BindingName]] .
1495
+ 1. If |resolvedModule| is a WebAssembly Module Record,
1496
+ 1. If |resolvedModule|.\[[Instance]] is ~empty~ then,
1494
1497
1. Throw a {LinkError} exception.
1495
- 1. Let |resolutionModule| be |resolution|.\[[Module]] .\[[ModuleSource]] .\[[Module]] .
1496
- 1. Let |resolutionName| be |resolution|.\[[BindingName]] .
1497
- 1. Let |externval| be [=instance_export=] (|resolutionInstance|, |resolutionName|).
1498
+ 1. Assert: |resolvedModule|.\[[Instance]] is a WebAssembly {{Instance}} object.
1499
+ 1. Assert: |resolvedModule|.\[[ModuleSource]] is a WebAssembly {{Module}} object.
1500
+ 1. Let |module| be |resolvedModule|.\[[ModuleSource]] .\[[Module]] .
1501
+ 1. Let |externval| be [=instance_export=] (|resolvedModule|.\[[Instance]] , |resolvedName|).
1498
1502
1. Assert: |externval| is not [=error=] .
1499
- 1. Assert: [=module_exports=] (|resolutionModule |) contains an element (|resolutionName |, <var ignore> type</var> ).
1500
- 1. Let |externtype| be the value of |type| for the element (|resolutionName |, |type|) in [=module_exports=] (|resolutionModule |).
1503
+ 1. Assert: [=module_exports=] (|module |) contains an element (|resolvedName |, <var ignore> type</var> ).
1504
+ 1. Let |externtype| be the value of |type| for the element (|resolvedName |, |type|) in [=module_exports=] (|module |).
1501
1505
1. If |importtype| is not an [=extern subtype=] of |externtype|, throw a {{LinkError}} exception.
1502
1506
1. [=list/Append=] |externval| to |imports|.
1503
1507
1. Otherwise,
1504
- 1. Let |env| be |resolution|.\ [[Module]] .\[[Environment]] .
1505
- 1. Let |v| be [=?=] |env|.GetBindingValue(|resolution|.\ [[BindingName]] , true).
1508
+ 1. Let |env| be |resolvedModule| .\[[Environment]] .
1509
+ 1. Let |v| be [=?=] |env|.GetBindingValue(|resolvedName| , true).
1506
1510
1. If |importtype| is of the form [=func=] |functype|,
1507
1511
1. If [$IsCallable$] (|v|) is false, throw a {{LinkError}} exception.
1508
1512
1. If |v| has a \[[FunctionAddress]] internal slot, and therefore is an [=Exported Function=] ,
0 commit comments