diff --git a/spec.html b/spec.html index 4b3f04c202..feab4a0f1a 100644 --- a/spec.html +++ b/spec.html @@ -3232,6 +3232,16 @@
A ModuleRequest Record represents a request to import a module up to a given phase. It consists of the following fields:
++ Field Name + | ++ Value Type + | ++ Meaning + | +
---|---|---|
+ [[Specifier]] + | ++ String + | ++ The module specifier + | +
+ [[Phase]] + | ++ ~source~ or ~evaluation~ + | ++ The target import phase + | +
It returns either a normal completion containing the Module Source Object corresponding to this source Module Record's source phase (
When called multiple times on the same Module Record, if GetModuleSource() returns a normal completion it must always return a normal completion containing the same object.
+The returned object should be an instance of a subclass of %AbstractModuleSource%, and it must have an internal slot [[ModuleSourceClassName]].
+For Module Records that do not have a source representation, GetModuleSource() must always return a throw completion whose [[Value]] is a *ReferenceError*.
+Source Text Module Record provides a GetModuleSource implementation that always returns an abrupt completion indicating that a source phase import is not available.
+An implementation of HostLoadImportedModule must conform to the following requirements:
The actual process performed is host-defined, but typically consists of performing whatever I/O operations are necessary to load the appropriate Module Record. Multiple different (_referrer_, _specifier_) pairs may map to the same Module Record instance. The actual mapping semantics is host-defined but typically a normalization process is applied to _specifier_ as part of the mapping process. A typical normalization process would include actions such as expansion of relative and abbreviated path specifiers.
+The actual process performed is host-defined, but typically consists of performing whatever I/O operations are necessary to load the appropriate Module Record. Multiple different (_referrer_, _moduleRequest_.[[Specifier]]) pairs may map to the same Module Record instance. The actual mapping semantics is host-defined but typically a normalization process is applied to _specifier_ as part of the mapping process. A typical normalization process would include actions such as expansion of relative and abbreviated path specifiers.
+ +Module Source Objects represent modules in their source import phase, which are not linked, instantiated or executed.
+All Module Source Objects must define a [[ModuleSourceClassName]] internal slot.
+All Module Source Objects should have a prototype of %AbstractModuleSource%.prototype.
+Hosts may define their own %AbstractModuleSource% subclasses for custom module types.
+ +The %AbstractModuleSource% constructor:
+This function performs the following steps when called:
+The %AbstractModuleSource% intrinsic object:
+The initial value of %AbstractModuleSource%`.prototype` is the %AbstractModuleSource% prototype object.
+This property has the attributes { [[Writable]]: *false*, [[Enumerable]]: *false*, [[Configurable]]: *false* }.
+The %AbstractModuleSource% prototype object:
+The initial value of %AbstractModuleSource%`.prototype.constructor` is %AbstractModuleSource%.
+%AbstractModuleSource%`.prototype[@@toStringTag]` is an accessor property whose set accessor function is *undefined*. Its get accessor function performs the following steps when called:
+This property has the attributes { [[Enumerable]]: *false*, [[Configurable]]: *true* }.
+The initial value of the *"name"* property of this function is *"get [Symbol.toStringTag]"*.
+A Module Namespace Object is a module namespace exotic object that provides runtime property-based access to a module's exported bindings. There is no constructor function for Module Namespace Objects. Instead, such an object is created for each module that is imported by an |ImportDeclaration| that contains a |NameSpaceImport|.