?
u
/
Well-known intrinsics are built-in objects that are explicitly referenced by the algorithms of this specification and which usually have
Within this specification a reference such as %name% means the intrinsic object, associated with the current
Intrinsic Name | Global Name | ECMAScript Language Association |
---|---|---|
%AbstractModuleSource% |
The %AbstractModuleSource% |
|
|
AggregateError
|
The AggregateError |
|
Array
|
The Array |
|
ArrayBuffer
|
The ArrayBuffer |
|
The prototype of Array iterator objects ( |
|
|
The prototype of async-from-sync iterator objects ( |
|
|
The |
|
|
The |
|
%AsyncGeneratorPrototype% |
The prototype of async generator objects ( |
|
|
An object that all standard built-in async iterator objects indirectly inherit from | |
|
Atomics
|
The Atomics object ( |
|
BigInt
|
The BigInt |
|
BigInt64Array
|
The BigInt64Array |
|
BigUint64Array
|
The BigUint64Array |
|
Boolean
|
The Boolean |
|
DataView
|
The DataView |
|
Date
|
The Date |
|
decodeURI
|
The decodeURI function ( |
|
decodeURIComponent
|
The decodeURIComponent function ( |
|
encodeURI
|
The encodeURI function ( |
|
encodeURIComponent
|
The encodeURIComponent function ( |
|
Error
|
The Error |
|
eval
|
The eval function ( |
|
EvalError
|
The EvalError |
|
FinalizationRegistry
|
The |
|
Float32Array
|
The Float32Array |
|
Float64Array
|
The Float64Array |
|
The prototype of For-In iterator objects ( |
|
|
Function
|
The Function |
|
The |
|
%GeneratorPrototype% |
The prototype of generator objects ( |
|
|
Int8Array
|
The Int8Array |
|
Int16Array
|
The Int16Array |
|
Int32Array
|
The Int32Array |
|
isFinite
|
The isFinite function ( |
|
isNaN
|
The isNaN function ( |
|
An object that all standard built-in iterator objects indirectly inherit from | |
|
JSON
|
The JSON object ( |
|
Map
|
The Map |
|
The prototype of Map iterator objects ( |
|
|
Math
|
The Math object ( |
%ModuleSource% |
ModuleSource
|
A ModuleSource object ( |
|
Number
|
The Number |
|
Object
|
The Object |
|
parseFloat
|
The parseFloat function ( |
|
parseInt
|
The parseInt function ( |
|
Promise
|
The Promise |
|
Proxy
|
The Proxy |
|
RangeError
|
The RangeError |
|
ReferenceError
|
The ReferenceError |
|
Reflect
|
The Reflect object ( |
|
RegExp
|
The RegExp |
|
The prototype of RegExp String Iterator objects ( |
|
|
Set
|
The Set |
|
The prototype of Set iterator objects ( |
|
|
SharedArrayBuffer
|
The SharedArrayBuffer |
|
String
|
The String |
|
The prototype of String iterator objects ( |
|
|
Symbol
|
The Symbol |
|
SyntaxError
|
The SyntaxError |
|
A |
|
|
The super class of all typed Array |
|
|
TypeError
|
The TypeError |
|
Uint8Array
|
The Uint8Array |
|
Uint8ClampedArray
|
The Uint8ClampedArray |
|
Uint16Array
|
The Uint16Array |
|
Uint32Array
|
The Uint32Array |
|
URIError
|
The URIError |
|
WeakMap
|
The WeakMap |
|
WeakRef
|
The |
|
WeakSet
|
The WeakSet |
Additional entries in
The abstract operation EvaluateImportCall takes arguments specifierExpression (a
The abstract operation ContinueDynamicImport takes arguments promiseCapability (a import()
A Module Record encapsulates structural information about the imports and exports of a single module. This information is used to link the imports and exports of sets of connected modules. A Module Record includes four fields that are only used when evaluating a module.
For specification purposes Module Record values are values of the
Module Record defines the fields listed in
Field Name | Value Type | Meaning |
---|---|---|
[[Realm]] |
a |
The |
[[Environment]] |
a |
The |
[[Namespace]] |
an Object or |
The Module Namespace Object ( |
[[HostDefined]] |
anything (default value is |
Field reserved for use by |
Method | Purpose |
---|---|
LoadRequestedModules( [ hostDefined ] ) |
Prepares the module for linking by recursively loading all its dependencies, and returns a promise. |
Link() |
Prepare the module for evaluation by transitively resolving all module dependencies and creating a LoadRequestedModules must have completed successfully prior to invoking this method. |
|
|
Evaluate() |
Returns a promise for the evaluation of this module and its dependencies, resolving on successful evaluation or if it has already been evaluated successfully, and rejecting for an evaluation error or if it has already been evaluated unsuccessfully. If the promise is rejected, Link must have completed successfully prior to invoking this method. |
ResolveExport(exportName [, resolveSet]) |
Return the binding of a name exported by this module. Bindings are represented by a ResolvedBinding Record, of the form { [[Module]]: Each time this operation is called with a specific exportName, resolveSet pair as arguments it must return the same result. LoadRequestedModules must have completed successfully prior to invoking this method. |
GetDirectExports() |
Returns a list of lists of the names of each direct export from this module, where each name is unique. |
GetReexports() |
Returns a list of reexports of this module. Reexports are represented by a Reexport Record, of the form { [[ExportName]]: String, [[ImportName]]: String | |
GetStarExports() |
Returns a list of ModuleRequest |
GetModuleSource() |
It returns either a When called multiple times on the same The returned object should have a [[Prototype]] internal slot whose value is For |
GetModuleSourceName() |
For For |
The GetStarExports concrete method of an Abstract
The default implementation of GetStarExports returns an empty list, while concrete
The GetReexports concrete method of an Abstract
The default implementation of GetReexports returns an empty list, while concrete
A Cyclic Module Record is used to represent information about a module that can participate in dependency cycles with other modules that are subclasses of the
In addition to the fields defined in
Field Name | Value Type | Meaning |
---|---|---|
[[Status]] |
|
Initially |
[[EvaluationError]] |
a |
A |
[[ModuleSource]] |
an Object or |
If this module has generated a module source object through GetModuleSource(), then this will be that object. |
[[DFSIndex]] |
an |
Auxiliary field used during Link and Evaluate only. If [[Status]] is |
[[DFSAncestorIndex]] |
an |
Auxiliary field used during Link and Evaluate only. If [[Status]] is |
[[RequestedModules]] |
a |
A |
[[CycleRoot]] |
a |
The first visited module of the cycle, the root DFS ancestor of the strongly connected component. For a module not in a cycle this would be the module itself. Once Evaluate has completed, a module's [[DFSAncestorIndex]] is equal to the [[DFSIndex]] of its [[CycleRoot]]. |
[[HasImportMeta]] | a Boolean |
Whether this module contains an import.meta expression.
|
[[HasTLA]] | a Boolean |
Whether this module is individually asynchronous (for example, if it's a |
[[AsyncEvaluation]] | a Boolean |
Whether this module is either itself asynchronous or has an asynchronous dependency. Note: The order in which this field is set is used to order queued executions, see |
[[TopLevelCapability]] |
a |
If this module is the [[CycleRoot]] of some cycle, and Evaluate() was called on some module in that cycle, this field contains the |
[[AsyncParentModules]] |
a |
If this module or a dependency has [[HasTLA]] |
[[PendingAsyncDependencies]] |
an |
If this module has any asynchronous dependencies, this tracks the number of asynchronous dependency modules remaining to execute for this module. A module with asynchronous dependencies will be executed when this field reaches 0 and there are no execution errors. |
The abstract operation ParseModule takes arguments sourceText (
await
.An implementation may parse module source text and analyse it for Early Error conditions prior to the evaluation of ParseModule for that module source text. However, the reporting of any errors must be deferred until the point where this specification actually performs ParseModule upon that source text.
GetDirectExports does not filter out or throw an exception for names that have ambiguous star export bindings.
The GetReexports concrete method of a
The GetStarExports concrete method of a
The GetModuleSource concrete method of a
The
An implementation of HostGetModuleSourceName must conform to the following requirements:
The
An implementation of HostGetModuleRecordFromSource must conform to the following requirements:
The abstract operation GetModuleNamespace takes argument module (an instance of a concrete subclass of
GetModuleNamespace never throws. Instead, unresolvable names are simply excluded from the namespace at this point. They will lead to a real linking error later unless they are all ambiguous star exports that are not explicitly requested anywhere.
The abstract operation GetExportedNames takes argument module (an Abstract
GetDirectExports and GetReexports must always be conformant to export name uniqueness without any duplicated export names between these lists.
The abstract operation PopulateExportStarSet takes argument module (An Abstract
PopulateExportStarSet does not filter out or throw an exception for names that have ambiguous star export bindings.
Module Source Objects represent modules in their source import phase, which are not linked, instantiated or executed.
A Module Source Object is an object for which
All Module Source Objects should have a prototype of %AbstractModuleSource%.prototype.
The %AbstractModuleSource%
super
call to it.This function performs the following steps when called:
The %AbstractModuleSource% intrinsic object:
The initial value of %AbstractModuleSource%.prototype
is the
This property has the attributes { [[Writable]]:
The %AbstractModuleSource% prototype object:
The initial value of %AbstractModuleSource%.prototype.constructor
is %AbstractModuleSource%.
%AbstractModuleSource%.prototype [@@toStringTag]
is an
This property has the attributes { [[Enumerable]]:
The initial value of the
This method performs the following steps when called:
This method performs the following steps when called:
Direct exports each provide a
Direct exports are sorted by first sorting the
AbstractModuleSource.prototype.hasImportMeta
is an
AbstractModuleSource.prototype.hasTopLevelAwait
is an
The %ModuleSource%
This function performs the following steps when called:
The %ModuleSource% prototype object:
The initial value of %ModuleSource%.prototype.constructor
is %ModuleSource%.
ModuleSource instances are
ModuleSource instances have a [[SourceTextModuleRecord]] internal slot.
The abstract operation GetModuleSourceSourceTextModuleRecord takes argument M (a ModuleSource Instance) and returns either a
This abstract operation is the required implementation of
HostGrowSharedArrayBuffer(...)
HostResizeArrayBuffer(...)
© 2024 Luca Casonato, Guy Bedford
All Software contained in this document ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://ecma-international.org/memento/codeofconduct.htm FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.