browser.js |
|
0 |
comment-multi-line-html-close.js |
---
description: >
HTML-like comments are not available in module code
(MultiLineHTMLCloseComment)
esid: sec-html-like-comments
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
410 |
comment-single-line-html-close.js |
---
description: >
HTML-like comments are not available in module code
(SingleLineHTMLCloseComment)
esid: sec-html-like-comments
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
406 |
comment-single-line-html-open.js |
---
description: >
HTML-like comments are not available in module code
(SingleLineHTMLOpenComment)
esid: sec-html-like-comments
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
406 |
early-dup-export-as-star-as.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: >
It is a Syntax Error if the ExportedNames of ModuleItemList contains any
duplicate entries.
flags: [module]
features: [export-star-as-namespace-from-module]
negative:
phase: parse
type: SyntaxError
--- |
562 |
early-dup-export-decl.js |
---
es6id: 15.2.1.1
description: >
It is a Syntax Error if the ExportedNames of ModuleItemList contains any
duplicate entries.
flags: [module]
negative:
phase: parse
type: SyntaxError
features: [generators]
--- |
470 |
early-dup-export-dflt-id.js |
---
esid: sec-module-semantics-static-semantics-early-errors
es6id: 15.2.1.1
description: >
It is a Syntax Error if the ExportedNames of ModuleItemList contains any
duplicate entries.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
510 |
early-dup-export-dflt.js |
---
es6id: 15.2.1.1
description: >
It is a Syntax Error if the ExportedNames of ModuleItemList contains any
duplicate entries.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
458 |
early-dup-export-id-as.js |
---
esid: sec-module-semantics-static-semantics-early-errors
es6id: 15.2.1.1
description: >
It is a Syntax Error if the ExportedNames of ModuleItemList contains any
duplicate entries.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
505 |
early-dup-export-id.js |
---
es6id: 15.2.1.1
description: >
It is a Syntax Error if the ExportedNames of ModuleItemList contains any
duplicate entries.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
435 |
early-dup-export-star-as-dflt.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: >
It is a Syntax Error if the ExportedNames of ModuleItemList contains any
duplicate entries.
flags: [module]
features: [export-star-as-namespace-from-module]
negative:
phase: parse
type: SyntaxError
--- |
570 |
early-dup-lables.js |
---
es6id: 15.2.1.1
description: >
It is a Syntax Error if ContainsDuplicateLabels of ModuleItemList with
argument « » is true.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
426 |
early-dup-lex.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: >
It is a Syntax Error if the LexicallyDeclaredNames of ModuleItemList
contains any duplicate entries.
flags: [module]
features: [let, const]
negative:
phase: parse
type: SyntaxError
--- |
493 |
early-dup-top-function-async-generator.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: >
It is a Syntax Error if the LexicallyDeclaredNames of ModuleItemList
contains any duplicate entries.
At the top level of a Module, function declarations are treated like
lexical declarations rather than like var declarations.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
610 |
early-dup-top-function-async.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: >
It is a Syntax Error if the LexicallyDeclaredNames of ModuleItemList
contains any duplicate entries.
At the top level of a Module, function declarations are treated like
lexical declarations rather than like var declarations.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
609 |
early-dup-top-function-generator.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: >
It is a Syntax Error if the LexicallyDeclaredNames of ModuleItemList
contains any duplicate entries.
At the top level of a Module, function declarations are treated like
lexical declarations rather than like var declarations.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
604 |
early-dup-top-function.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: >
It is a Syntax Error if the LexicallyDeclaredNames of ModuleItemList
contains any duplicate entries.
At the top level of a Module, function declarations are treated like
lexical declarations rather than like var declarations.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
603 |
early-export-global.js |
---
esid: sec-module-semantics-static-semantics-early-errors
es6id: 15.2.1.1
description: Exporting a global binding
info: |
It is a Syntax Error if any element of the ExportedBindings of
ModuleItemList does not also occur in either the VarDeclaredNames of
ModuleItemList, or the LexicallyDeclaredNames of ModuleItemList.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
618 |
early-export-ill-formed-string.js |
---
description: >
Ill formed unicode cannot be an exported name
esid: sec-module-semantics
info: |
ModuleExportName : StringLiteral
It is a Syntax Error if IsStringWellFormedUnicode of the StringValue of StringLiteral is *false*.
flags: [module]
negative:
phase: parse
type: SyntaxError
features: [arbitrary-module-namespace-names]
--- |
796 |
early-export-unresolvable.js |
---
es6id: 15.2.1.1
description: >
It is a Syntax Error if any element of the ExportedBindings of
ModuleItemList does not also occur in either the VarDeclaredNames of
ModuleItemList, or the LexicallyDeclaredNames of ModuleItemList.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
534 |
early-import-arguments.js |
---
description: ImportedBinding is a BindingIdentifier and cannot be "arguments"
esid: sec-imports
info: |
ImportSpecifier :
ImportedBinding
IdentifierName as ImportedBinding
ImportedBinding :
BindingIdentifier
12.1.1 Static Semantics : Early Errors
BindingIdentifier : Identifier
- It is a Syntax Error if the code matched by this production is contained
in strict mode code and the StringValue of Identifier is "arguments" or
"eval".
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
1072 |
early-import-as-arguments.js |
---
description: ImportedBinding is a BindingIdentifier and cannot be "arguments"
esid: sec-imports
info: |
ImportSpecifier :
ImportedBinding
IdentifierName as ImportedBinding
ImportedBinding :
BindingIdentifier
12.1.1 Static Semantics : Early Errors
BindingIdentifier : Identifier
- It is a Syntax Error if the code matched by this production is contained
in strict mode code and the StringValue of Identifier is "arguments" or
"eval".
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
1067 |
early-import-as-eval.js |
---
description: ImportedBinding is a BindingIdentifier and cannot be "eval"
esid: sec-imports
info: |
ImportSpecifier :
ImportedBinding
IdentifierName as ImportedBinding
ImportedBinding :
BindingIdentifier
12.1.1 Static Semantics : Early Errors
BindingIdentifier : Identifier
- It is a Syntax Error if the code matched by this production is contained
in strict mode code and the StringValue of Identifier is "arguments" or
"eval".
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
1052 |
early-import-eval.js |
---
description: ImportedBinding is a BindingIdentifier and cannot be "eval"
esid: sec-imports
info: |
ImportSpecifier :
ImportedBinding
IdentifierName as ImportedBinding
ImportedBinding :
BindingIdentifier
12.1.1 Static Semantics : Early Errors
BindingIdentifier : Identifier
- It is a Syntax Error if the code matched by this production is contained
in strict mode code and the StringValue of Identifier is "arguments" or
"eval".
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
1052 |
early-lex-and-var.js |
---
es6id: 10.2.1
description: >
It is a Syntax Error if any element of the LexicallyDeclaredNames of
ModuleItemList also occurs in the VarDeclaredNames of ModuleItemList.
flags: [module]
features: [let]
negative:
phase: parse
type: SyntaxError
--- |
475 |
early-new-target.js |
---
es6id: 15.2.1.1
description: >
It is a Syntax Error if ModuleItemList Contains NewTarget
flags: [module]
negative:
phase: parse
type: SyntaxError
features: [new.target]
--- |
397 |
early-strict-mode.js |
---
description: Module code is always strict mode code.
es6id: 10.2.1
esid: sec-strict-mode-code
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
375 |
early-super.js |
---
es6id: 15.2.1.1
description: >
It is a Syntax Error if ModuleItemList Contains super.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
366 |
early-undef-break.js |
---
es6id: 15.2.1.1
description: >
It is a Syntax Error if ContainsUndefinedBreakTarget of ModuleItemList with
argument « » is true.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
441 |
early-undef-continue.js |
---
es6id: 15.2.1.1
description: >
It is a Syntax Error if ContainsUndefinedContinueTarget of ModuleItemList
with arguments « » and « » is true.
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
458 |
eval-export-cls-semi.js |
---
description: >
An exported class declaration does not need to be terminated with a
semicolon or newline
esid: sec-moduleevaluation
flags: [module]
--- |
437 |
eval-export-dflt-cls-anon-semi.js |
---
description: >
An exported default "anonymous" class declaration does not need to be
terminated with a semicolon or newline
esid: sec-moduleevaluation
flags: [module]
--- |
463 |
eval-export-dflt-cls-anon.js |
---
description: >
Default "anonymous" class declaration is correctly initialized upon
evaluation
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
15.2.3.11 Runtime Semantics: Evaluation
ExportDeclaration : export default ClassDeclaration
[...]
3. Let className be the sole element of BoundNames of ClassDeclaration.
4. If className is "*default*", then
a. Let hasNameProperty be ? HasOwnProperty(value, "name").
b. If hasNameProperty is false, perform SetFunctionName(value,
"default").
c. Let env be the running execution context's LexicalEnvironment.
d. Perform ? InitializeBoundName("*default*", value, env).
5. Return NormalCompletion(empty).
flags: [module]
--- |
1234 |
eval-export-dflt-cls-name-meth.js |
---
description: >
Default "anonymous" class declaration containing a static `name` method is
correctly initialized upon evaluation
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
15.2.3.11 Runtime Semantics: Evaluation
ExportDeclaration : export default ClassDeclaration
[...]
3. Let className be the sole element of BoundNames of ClassDeclaration.
4. If className is "*default*", then
a. Let hasNameProperty be ? HasOwnProperty(value, "name").
b. If hasNameProperty is false, perform SetFunctionName(value,
"default").
c. Let env be the running execution context's LexicalEnvironment.
d. Perform ? InitializeBoundName("*default*", value, env).
5. Return NormalCompletion(empty).
flags: [module]
--- |
1245 |
eval-export-dflt-cls-named-semi.js |
---
description: >
An exported default "named" class declaration does not need to be
terminated with a semicolon or newline
esid: sec-moduleevaluation
flags: [module]
--- |
461 |
eval-export-dflt-cls-named.js |
---
description: >
Default "named" class declaration is correctly initialized upon
evaluation
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
15.2.3.11 Runtime Semantics: Evaluation
ExportDeclaration : export default ClassDeclaration
[...]
3. Let className be the sole element of BoundNames of ClassDeclaration.
4. If className is "*default*", then
a. Let hasNameProperty be ? HasOwnProperty(value, "name").
b. If hasNameProperty is false, perform SetFunctionName(value,
"default").
c. Let env be the running execution context's LexicalEnvironment.
d. Perform ? InitializeBoundName("*default*", value, env).
5. Return NormalCompletion(empty).
flags: [module]
--- |
1235 |
eval-export-dflt-expr-cls-anon.js |
---
description: >
Default AssignmentExpression (which can be recognized as an "anonymous"
class declaration) is correctly initialized upon evaluation
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
15.2.3.11 Runtime Semantics: Evaluation
ExportDeclaration : export default AssignmentExpression;
[...]
3. If IsAnonymousFunctionDefinition(AssignmentExpression) is true, then
a. Let hasNameProperty be ? HasOwnProperty(value, "name").
b. If hasNameProperty is false, perform SetFunctionName(value,
"default").
4. Let env be the running execution context's LexicalEnvironment.
5. Perform ? InitializeBoundName("*default*", value, env).
[...]
flags: [module]
--- |
1224 |
eval-export-dflt-expr-cls-name-meth.js |
---
description: >
Default AssignmentExpression (which can be recognized as an "anonymous"
class declaration with a static `name` method) is correctly initialized
upon evaluation
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
15.2.3.11 Runtime Semantics: Evaluation
ExportDeclaration : export default ClassDeclaration
[...]
3. Let className be the sole element of BoundNames of ClassDeclaration.
4. If className is "*default*", then
a. Let hasNameProperty be ? HasOwnProperty(value, "name").
b. If hasNameProperty is false, perform SetFunctionName(value,
"default").
c. Let env be the running execution context's LexicalEnvironment.
d. Perform ? InitializeBoundName("*default*", value, env).
5. Return NormalCompletion(empty).
flags: [module]
--- |
1304 |
eval-export-dflt-expr-cls-named.js |
---
description: >
Default AssignmentExpression (which can be recognized as a "named" class
declaration) is correctly initialized upon evaluation
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
15.2.3.11 Runtime Semantics: Evaluation
ExportDeclaration : export default AssignmentExpression;
[...]
3. If IsAnonymousFunctionDefinition(AssignmentExpression) is true, then
a. Let hasNameProperty be ? HasOwnProperty(value, "name").
b. If hasNameProperty is false, perform SetFunctionName(value,
"default").
4. Let env be the running execution context's LexicalEnvironment.
5. Perform ? InitializeBoundName("*default*", value, env).
[...]
flags: [module]
--- |
1224 |
eval-export-dflt-expr-err-eval.js |
---
description: >
Abrupt completions resulting from evaluation on AssignmentExpression are
forwarded to the runtime.
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
15.2.3.11 Runtime Semantics: Evaluation
ExportDeclaration : export default AssignmentExpression;
[...]
1. Let rhs be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(rhs).
6.2.3.1 GetValue (V)
1. ReturnIfAbrupt(V).
2. If Type(V) is not Reference, return V.
3. Let base be GetBase(V).
4. If IsUnresolvableReference(V) is true, throw a ReferenceError exception.
negative:
phase: runtime
type: Test262Error
flags: [module]
--- |
996 |
eval-export-dflt-expr-err-get-value.js |
---
description: >
Abrupt completions resulting from value retrieval are forwarded to the
runtime.
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
15.2.3.11 Runtime Semantics: Evaluation
ExportDeclaration : export default AssignmentExpression;
[...]
1. Let rhs be the result of evaluating AssignmentExpression.
2. Let value be ? GetValue(rhs).
6.2.3.1 GetValue (V)
1. ReturnIfAbrupt(V).
2. If Type(V) is not Reference, return V.
3. Let base be GetBase(V).
4. If IsUnresolvableReference(V) is true, throw a ReferenceError exception.
negative:
phase: runtime
type: ReferenceError
flags: [module]
--- |
949 |
eval-export-dflt-expr-fn-anon.js |
---
description: >
Default AssignmentExpression (which can be recognized as an "anonymous"
function declaration) is correctly initialized upon evaluation
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
15.2.3.11 Runtime Semantics: Evaluation
ExportDeclaration : export default AssignmentExpression;
[...]
3. If IsAnonymousFunctionDefinition(AssignmentExpression) is true, then
a. Let hasNameProperty be ? HasOwnProperty(value, "name").
b. If hasNameProperty is false, perform SetFunctionName(value,
"default").
4. Let env be the running execution context's LexicalEnvironment.
5. Perform ? InitializeBoundName("*default*", value, env).
[...]
flags: [module]
--- |
1203 |
eval-export-dflt-expr-fn-named.js |
---
description: >
Default AssignmentExpression (which can be recognized as a "named" function
declaration) is correctly initialized upon evaluation
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
15.2.3.11 Runtime Semantics: Evaluation
ExportDeclaration : export default AssignmentExpression;
[...]
3. If IsAnonymousFunctionDefinition(AssignmentExpression) is true, then
a. Let hasNameProperty be ? HasOwnProperty(value, "name").
b. If hasNameProperty is false, perform SetFunctionName(value,
"default").
4. Let env be the running execution context's LexicalEnvironment.
5. Perform ? InitializeBoundName("*default*", value, env).
[...]
flags: [module]
--- |
1201 |
eval-export-dflt-expr-gen-anon.js |
---
description: >
Default AssignmentExpression (which can be recognized as an "anonymous"
generator function declaration) is correctly initialized upon evaluation
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
15.2.3.11 Runtime Semantics: Evaluation
ExportDeclaration : export default AssignmentExpression;
[...]
3. If IsAnonymousFunctionDefinition(AssignmentExpression) is true, then
a. Let hasNameProperty be ? HasOwnProperty(value, "name").
b. If hasNameProperty is false, perform SetFunctionName(value,
"default").
4. Let env be the running execution context's LexicalEnvironment.
5. Perform ? InitializeBoundName("*default*", value, env).
[...]
flags: [module]
features: [generators]
--- |
1258 |
eval-export-dflt-expr-gen-named.js |
---
description: >
Default AssignmentExpression (which can be recognized as a "named"
generator function declaration) is correctly initialized upon evaluation
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
15.2.3.11 Runtime Semantics: Evaluation
ExportDeclaration : export default AssignmentExpression;
[...]
3. If IsAnonymousFunctionDefinition(AssignmentExpression) is true, then
a. Let hasNameProperty be ? HasOwnProperty(value, "name").
b. If hasNameProperty is false, perform SetFunctionName(value,
"default").
4. Let env be the running execution context's LexicalEnvironment.
5. Perform ? InitializeBoundName("*default*", value, env).
[...]
flags: [module]
features: [generators]
--- |
1251 |
eval-export-dflt-expr-in.js |
---
description: >
The `in` operator may occur within an exported AssignmentExpression
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
15.2.3 Exports
Syntax
ExportDeclaration :
export default [lookahead ∉ { function, class }] AssignmentExpression[In];
flags: [module]
--- |
686 |
eval-export-dflt-fun-anon-semi.js |
---
description: >
An exported default "anonymous" function declaration does not need to be
terminated with a semicolon or newline
esid: sec-moduleevaluation
flags: [module]
--- |
471 |
eval-export-dflt-fun-named-semi.js |
---
description: >
An exported default "named" function declaration does not need to be
terminated with a semicolon or newline
esid: sec-moduleevaluation
flags: [module]
--- |
469 |
eval-export-dflt-gen-anon-semi.js |
---
description: >
An exported default "anonymous" generator function declaration does not
need to be terminated with a semicolon or newline
esid: sec-moduleevaluation
flags: [module]
features: [generators]
--- |
506 |
eval-export-dflt-gen-named-semi.js |
---
description: >
An exported default "named" generator function declaration does not need to
be terminated with a semicolon or newline
esid: sec-moduleevaluation
flags: [module]
features: [generators]
--- |
503 |
eval-export-fun-semi.js |
---
description: >
An exported function declaration does not need to be terminated with a
semicolon or newline
esid: sec-moduleevaluation
flags: [module]
--- |
445 |
eval-export-gen-semi.js |
---
description: >
An exported generator function declaration does not need to be terminated
with a semicolon or newline
esid: sec-moduleevaluation
flags: [module]
features: [generators]
--- |
479 |
eval-gtbndng-indirect-trlng-comma.js |
---
description: >
NamedImports in ImportDeclaration may contain a trailing comma
esid: sec-moduleevaluation
info: |
8.1.1.5.1 GetBindingValue (N, S)
[...]
3. If the binding for N is an indirect binding, then
a. Let M and N2 be the indirection values provided when this binding for
N was created.
b. Let targetEnv be M.[[Environment]].
c. If targetEnv is undefined, throw a ReferenceError exception.
d. Let targetER be targetEnv's EnvironmentRecord.
e. Return ? targetER.GetBindingValue(N2, S).
flags: [module]
--- |
857 |
eval-gtbndng-indirect-trlng-comma_FIXTURE.js |
|
194 |
eval-gtbndng-indirect-update-as.js |
---
description: >
Modifications to named bindings that occur after dependency has been
evaluated are reflected in local binding
esid: sec-moduleevaluation
info: |
8.1.1.5.1 GetBindingValue (N, S)
[...]
3. If the binding for N is an indirect binding, then
a. Let M and N2 be the indirection values provided when this binding for
N was created.
b. Let targetEnv be M.[[Environment]].
c. If targetEnv is undefined, throw a ReferenceError exception.
d. Let targetER be targetEnv's EnvironmentRecord.
e. Return ? targetER.GetBindingValue(N2, S).
includes: [fnGlobalObject.js]
flags: [module]
--- |
1248 |
eval-gtbndng-indirect-update-as_FIXTURE.js |
|
270 |
eval-gtbndng-indirect-update-dflt.js |
---
description: >
Modifications to default binding that occur after dependency has been
evaluated are reflected in local binding
info: |
8.1.1.5.1 GetBindingValue (N, S)
[...]
3. If the binding for N is an indirect binding, then
a. Let M and N2 be the indirection values provided when this binding for
N was created.
b. Let targetEnv be M.[[Environment]].
c. If targetEnv is undefined, throw a ReferenceError exception.
d. Let targetER be targetEnv's EnvironmentRecord.
e. Return ? targetER.GetBindingValue(N2, S).
flags: [module]
--- |
908 |
eval-gtbndng-indirect-update-dflt_FIXTURE.js |
|
231 |
eval-gtbndng-indirect-update.js |
---
description: >
Modifications to named bindings that occur after dependency has been
evaluated are reflected in local binding
esid: sec-moduleevaluation
info: |
8.1.1.5.1 GetBindingValue (N, S)
[...]
3. If the binding for N is an indirect binding, then
a. Let M and N2 be the indirection values provided when this binding for
N was created.
b. Let targetEnv be M.[[Environment]].
c. If targetEnv is undefined, throw a ReferenceError exception.
d. Let targetER be targetEnv's EnvironmentRecord.
e. Return ? targetER.GetBindingValue(N2, S).
includes: [fnGlobalObject.js]
flags: [module]
--- |
1184 |
eval-gtbndng-indirect-update_FIXTURE.js |
|
270 |
eval-gtbndng-local-bndng-cls.js |
---
description: References to local `let` bindings resolve successfully
esid: sec-moduleevaluation
info: |
8.1.1.5.1 GetBindingValue (N, S)
[...]
3. If the binding for N is an indirect binding, then
[...]
5. Return the value currently bound to N in envRec.
14.5.16 Runtime Semantics: Evaluation
ClassDeclaration : class BindingIdentifier ClassTail
1. Let status be the result of BindingClassDeclarationEvaluation of this
ClassDeclaration.
2. ReturnIfAbrupt(status).
3. Return NormalCompletion(empty).
14.5.15 Runtime Semantics: BindingClassDeclarationEvaluation
[...]
7. Perform ? InitializeBoundName(className, value, env).
[...]
flags: [module]
--- |
1065 |
eval-gtbndng-local-bndng-const.js |
---
description: References to local `const` bindings resolve successfully
esid: sec-moduleevaluation
info: |
8.1.1.5.1 GetBindingValue (N, S)
[...]
3. If the binding for N is an indirect binding, then
[...]
5. Return the value currently bound to N in envRec.
13.3.1.4 Runtime Semantics: Evaluation
LexicalBinding : BindingIdentifier Initializer
[...]
6. Return InitializeReferencedBinding(lhs, value).
flags: [module]
--- |
712 |
eval-gtbndng-local-bndng-let.js |
---
description: References to local `let` bindings resolve successfully
esid: sec-moduleevaluation
info: |
8.1.1.5.1 GetBindingValue (N, S)
[...]
3. If the binding for N is an indirect binding, then
[...]
5. Return the value currently bound to N in envRec.
13.3.1.4 Runtime Semantics: Evaluation
LexicalBinding : BindingIdentifier Initializer
[...]
6. Return InitializeReferencedBinding(lhs, value).
flags: [module]
--- |
752 |
eval-gtbndng-local-bndng-var.js |
---
description: References to local `var` bindings resolve successfully
esid: sec-moduleevaluation
info: |
8.1.1.5.1 GetBindingValue (N, S)
[...]
3. If the binding for N is an indirect binding, then
[...]
5. Return the value currently bound to N in envRec.
15.2.1.16.4 ModuleDeclarationInstantiation( )
[...]
14. Let declaredVarNames be a new empty List.
15. For each element d in varDeclarations do
a. For each element dn of the BoundNames of d do
i. If dn is not an element of declaredVarNames, then
1. Perform ! envRec.CreateMutableBinding(dn, false).
2. Call envRec.InitializeBinding(dn, undefined).
3. Append dn to declaredVarNames.
[...]
13.3.2.4 Runtime Semantics: Evaluation
VariableDeclaration : BindingIdentifier Initializer
[...]
6. Return ? PutValue(lhs, value).
flags: [module]
--- |
1211 |
eval-rqstd-abrupt-err-type_FIXTURE.js |
|
199 |
eval-rqstd-abrupt-err-uri_FIXTURE.js |
|
195 |
eval-rqstd-abrupt.js |
---
description: >
Abrupt completion during module evaluation precludes further evaluation
esid: sec-moduleevaluation
info: |
[...]
6. For each String required that is an element of
module.[[RequestedModules]] do,
a. Let requiredModule be ? HostResolveImportedModule(module, required).
b. Perform ? requiredModule.ModuleEvaluation().
negative:
phase: runtime
type: TypeError
flags: [module]
--- |
735 |
eval-rqstd-once.js |
---
description: Requested modules are evaluated exactly once
esid: sec-moduleevaluation
info: |
[...]
4. If module.[[Evaluated]] is true, return undefined.
5. Set module.[[Evaluated]] to true.
6. For each String required that is an element of module.[[RequestedModules]] do,
a. Let requiredModule be ? HostResolveImportedModule(module, required).
b. Perform ? requiredModule.ModuleEvaluation().
[...]
includes: [fnGlobalObject.js]
flags: [module]
features: [export-star-as-namespace-from-module]
--- |
1348 |
eval-rqstd-once_FIXTURE.js |
|
440 |
eval-rqstd-order-1_FIXTURE.js |
|
218 |
eval-rqstd-order-2_FIXTURE.js |
|
219 |
eval-rqstd-order-3_FIXTURE.js |
|
219 |
eval-rqstd-order-4_FIXTURE.js |
|
241 |
eval-rqstd-order-5_FIXTURE.js |
|
219 |
eval-rqstd-order-6_FIXTURE.js |
|
241 |
eval-rqstd-order-7_FIXTURE.js |
|
219 |
eval-rqstd-order-8_FIXTURE.js |
|
241 |
eval-rqstd-order-9_FIXTURE.js |
|
210 |
eval-rqstd-order.js |
---
description: >
Requested modules are evaluated prior to the requesting module in source
code order
esid: sec-moduleevaluation
info: |
[...]
6. For each String required that is an element of
module.[[RequestedModules]] do,
a. Let requiredModule be ? HostResolveImportedModule(module, required).
b. Perform ? requiredModule.ModuleEvaluation().
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
includes: [fnGlobalObject.js]
flags: [module]
features: [export-star-as-namespace-from-module]
--- |
1303 |
eval-self-abrupt.js |
---
description: Abrupt completion from module evaluation is reported
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
17. Suspend moduleCxt and remove it from the execution context stack.
18. Resume the context that is now on the top of the execution context
stack as the running execution context.
19. Return Completion(result).
negative:
phase: runtime
type: Test262Error
flags: [module]
--- |
697 |
eval-self-once.js |
---
description: Module is evaluated exactly once
esid: sec-moduleevaluation
info: |
Evaluate( ) Concrete Method
[...]
4. Let result be InnerModuleEvaluation(module, stack, 0).
[...]
InnerModuleEvaluation( module, stack, index )
[...]
2. If module.[[Status]] is "evaluated", then
a. If module.[[EvaluationError]] is undefined, return index.
b. Otherwise return module.[[EvaluationError]].
[...]
6. For each String required that is an element of module.[[RequestedModules]] do,
a. Let requiredModule be ? HostResolveImportedModule(module, required).
[...]
c. Set index to ? InnerModuleEvaluation(requiredModule, stack, index).
[...]
includes: [fnGlobalObject.js]
flags: [module]
features: [export-star-as-namespace-from-module]
--- |
1581 |
eval-this.js |
---
description: >
Module Environment Records provide a this binding, and the value is
`undefined`.
esid: sec-moduleevaluation
info: |
[...]
16. Let result be the result of evaluating module.[[ECMAScriptCode]].
[...]
12.2.2 The this Keyword
12.2.2.1 Runtime Semantics: Evaluation
PrimaryExpression : this
1. Return ? ResolveThisBinding( ).
8.3.4 ResolveThisBinding ( )
1. Let envRec be GetThisEnvironment( ).
2. Return ? envRec.GetThisBinding().
8.3.3 GetThisEnvironment ( )
1. Let lex be the running execution context's LexicalEnvironment.
2. Repeat
a. Let envRec be lex's EnvironmentRecord.
b. Let exists be envRec.HasThisBinding().
c. If exists is true, return envRec.
d. Let outer be the value of lex's outer environment reference.
e. Let lex be outer.
8.1.1.5.3 HasThisBinding ()
1. Return true.
8.1.1.5.4 GetThisBinding ()
1. Return undefined.
flags: [module]
--- |
1212 |
export-default-asyncfunction-declaration-binding-exists.js |
---
description: >
ExportDeclaration : HoistableDeclaration : AsyncFunctionDeclaration
esid: prod-HoistableDeclaration
info: |
ExportDeclaration :
HoistableDeclaration[Yield, Await, Default]:
HoistableDeclaration[Yield, Await, Default]:
AsyncFunctionDeclaration[?Yield, ?Await, ?Default]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
610 |
export-default-asyncfunction-declaration-binding.js |
---
description: >
ExportDeclaration : HoistableDeclaration : AsyncFunctionDeclaration
esid: prod-HoistableDeclaration
info: |
ExportDeclaration :
HoistableDeclaration[Yield, Await, Default]:
HoistableDeclaration[Yield, Await, Default]:
AsyncFunctionDeclaration[?Yield, ?Await, ?Default]
flags: [module]
--- |
550 |
export-default-asyncgenerator-declaration-binding-exists.js |
---
description: >
ExportDeclaration : HoistableDeclaration : AsyncGeneratorDeclaration
esid: prod-HoistableDeclaration
info: |
ExportDeclaration :
HoistableDeclaration[Yield, Await, Default]:
HoistableDeclaration[Yield, Await, Default]:
AsyncGeneratorDeclaration[?Yield, ?Await, ?Default]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
615 |
export-default-asyncgenerator-declaration-binding.js |
---
description: >
ExportDeclaration : HoistableDeclaration : AsyncGeneratorDeclaration
esid: prod-HoistableDeclaration
info: |
ExportDeclaration :
HoistableDeclaration[Yield, Await, Default]:
HoistableDeclaration[Yield, Await, Default]:
AsyncGeneratorDeclaration[?Yield, ?Await, ?Default]
flags: [module]
--- |
556 |
export-default-function-declaration-binding-exists.js |
---
description: >
ExportDeclaration : HoistableDeclaration : FunctionDeclaration
esid: prod-HoistableDeclaration
info: |
ExportDeclaration :
HoistableDeclaration[Yield, Await, Default]:
HoistableDeclaration[Yield, Await, Default]:
FunctionDeclaration[?Yield, ?Await, ?Default]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
594 |
export-default-function-declaration-binding.js |
---
description: >
ExportDeclaration : HoistableDeclaration : FunctionDeclaration
esid: prod-HoistableDeclaration
info: |
ExportDeclaration :
HoistableDeclaration[Yield, Await, Default]:
HoistableDeclaration[Yield, Await, Default]:
FunctionDeclaration[?Yield, ?Await, ?Default]
flags: [module]
--- |
534 |
export-default-generator-declaration-binding-exists.js |
---
description: >
ExportDeclaration : HoistableDeclaration : GeneratorDeclaration
esid: prod-HoistableDeclaration
info: |
ExportDeclaration :
HoistableDeclaration[Yield, Await, Default]:
HoistableDeclaration[Yield, Await, Default]:
GeneratorDeclaration[?Yield, ?Await, ?Default]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
597 |
export-default-generator-declaration-binding.js |
---
description: >
ExportDeclaration : HoistableDeclaration : GeneratorDeclaration
esid: prod-HoistableDeclaration
info: |
ExportDeclaration :
HoistableDeclaration[Yield, Await, Default]:
HoistableDeclaration[Yield, Await, Default]:
GeneratorDeclaration[?Yield, ?Await, ?Default]
flags: [module]
--- |
538 |
export-expname-binding-index.js |
---
esid: sec-module-namespace-exotic-objects
description: >
Internal methods of module namespace exotic objects are correct
with non-Identifier bindings that are integer indices.
info: |
[[HasProperty]] ( P )
[...]
3. If P is an element of exports, return true.
4. Return false.
[[Get]] ( P, Receiver )
[...]
13. Return ? targetEnv.GetBindingValue(binding.[[BindingName]], true).
[[Set]] ( P, V, Receiver )
1. Return false.
[[Delete]] ( P )
[...]
4. If P is an element of exports, return false.
5. Return true.
flags: [module]
features: [arbitrary-module-namespace-names, Reflect]
--- |
1279 |
export-expname-binding-index_FIXTURE.js |
|
221 |
export-expname-binding-string.js |
---
description: Module Namespace Objects can have non-Identifier properties
esid: prod-ExportSpecifier
info: |
ExportSpecifier[From] :
IdentifierName `as` ModuleExportName
ModuleExportName : StringLiteral
flags: [module]
features: [arbitrary-module-namespace-names]
--- |
620 |
export-expname-from-as-unpaired-surrogate.js |
---
description: >
ExportSpecifier : ModuleExportName
esid: prod-ExportSpecifier
info: |
ModuleExportName : StringLiteral
It is a Syntax Error if IsStringWellFormedUnicode of the StringValue of
StringLiteral is *false*.
flags: [module]
features: [arbitrary-module-namespace-names]
negative:
phase: parse
type: SyntaxError
--- |
606 |
export-expname-from-binding-string.js |
---
description: >
ExportSpecifier : ModuleExportName
esid: prod-ExportSpecifier
info: |
ExportFromClause :
NamedExports[+From]
ExportSpecifier[From] :
IdentifierName `as` ModuleExportName
ModuleExportName : StringLiteral
flags: [module]
features: [arbitrary-module-namespace-names]
--- |
714 |
export-expname-from-star-string.js |
---
description: >
ExportFromClause : `*` `as` ModuleExportName
esid: prod-ExportFromClause
info: |
ExportFromClause :
`*` `as` ModuleExportName
ModuleExportName : StringLiteral
flags: [module]
features: [arbitrary-module-namespace-names]
--- |
653 |
export-expname-from-star-unpaired-surrogate.js |
---
description: >
ExportSpecifier : ModuleExportName
esid: prod-ExportSpecifier
info: |
ModuleExportName : StringLiteral
It is a Syntax Error if IsStringWellFormedUnicode of the StringValue of
StringLiteral is *false*.
flags: [module]
features: [arbitrary-module-namespace-names]
negative:
phase: parse
type: SyntaxError
--- |
600 |
export-expname-from-star.js |
---
description: >
ExportFromClause : `*`
esid: prod-ExportFromClause
info: |
ExportFromClause :
`*`
flags: [module]
features: [arbitrary-module-namespace-names]
--- |
509 |
export-expname-from-string-binding.js |
---
description: >
ExportFromClause : NamedExports
esid: prod-ExportFromClause
info: |
ExportFromClause :
NamedExports[+From]
NamedExports[From] :
[+From] ModuleExportName as IdentifierName
flags: [module]
features: [arbitrary-module-namespace-names]
--- |
671 |
export-expname-from-string-string.js |
---
description: >
ExportFromClause : NamedExports
esid: prod-ExportFromClause
info: |
ExportFromClause :
NamedExports[+From]
NamedExports[From] :
[+From] ModuleExportName as ModuleExportName
flags: [module]
features: [arbitrary-module-namespace-names]
--- |
674 |
export-expname-from-string.js |
---
description: >
ExportFromClause : NamedExports
esid: prod-ExportFromClause
info: |
ExportFromClause :
NamedExports[+From]
NamedExports[From] :
[+From] ModuleExportName
ModuleExportName : StringLiteral
flags: [module]
features: [arbitrary-module-namespace-names]
--- |
632 |
export-expname-from-unpaired-surrogate.js |
---
description: >
ExportSpecifier : ModuleExportName
esid: prod-ExportSpecifier
info: |
ModuleExportName : StringLiteral
It is a Syntax Error if IsStringWellFormedUnicode of the StringValue of
StringLiteral is *false*.
flags: [module]
features: [arbitrary-module-namespace-names]
negative:
phase: parse
type: SyntaxError
--- |
597 |
export-expname-import-string-binding.js |
---
description: >
ImportSpecifier :
ModuleExportName `as` IdentifierName
esid: prod-ImportSpecifier
info: |
ImportSpecifier :
ModuleExportName `as` IdentifierName
flags: [module]
features: [arbitrary-module-namespace-names]
--- |
524 |
export-expname-import-unpaired-surrogate.js |
---
description: >
ExportSpecifier : ModuleExportName
esid: prod-ExportSpecifier
info: |
ModuleExportName : StringLiteral
It is a Syntax Error if IsStringWellFormedUnicode of the StringValue of
StringLiteral is *false*.
flags: [module]
features: [arbitrary-module-namespace-names]
negative:
phase: parse
type: SyntaxError
--- |
604 |
export-expname-string-binding.js |
---
description: >
ExportDeclaration : `export` NamedExports `;`
esid: sec-exports-static-semantics-early-errors
info: |
ExportDeclaration : `export` NamedExports `;`
It is a Syntax Error if ReferencedBindings of |NamedExports| contains any
|ModuleExportName|.
flags: [module]
features: [arbitrary-module-namespace-names]
negative:
phase: parse
type: SyntaxError
--- |
627 |
export-expname-unpaired-surrogate.js |
---
description: >
ExportSpecifier : ModuleExportName
esid: prod-ExportSpecifier
info: |
ModuleExportName : StringLiteral
It is a Syntax Error if IsStringWellFormedUnicode of the StringValue of
StringLiteral is *false*.
flags: [module]
features: [arbitrary-module-namespace-names]
negative:
phase: parse
type: SyntaxError
--- |
588 |
export-expname_FIXTURE.js |
|
258 |
export-star-as-dflt.js |
---
description: A default export cannot be provided by an export * or export * from "mod" declaration
esid: sec-static-semantics-exportentriesformodule
info: |
15.2..3.6 Static Semantics: ExportEntriesForModule
[...]
ExportFromClause : * as IdentifierName
1. Let exportName be the StringValue of IdentifierName.
2. Let entry be the ExportEntry Record { [[ModuleRequest]]: module, [[ImportName]]: "*", [[LocalName]]: null, [[ExportName]]: exportName }.
3. Return a new List containing entry.
flags: [module]
features: [export-star-as-namespace-from-module]
--- |
1237 |
export-star-as-dflt_FIXTURE.js |
|
186 |
import-attributes |
|
|
instn-iee-bndng-cls.js |
---
description: >
Imported binding reflects state of indirectly-exported `class` binding
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
16. Let lexDeclarations be the LexicallyScopedDeclarations of code.
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i, If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
--- |
2108 |
instn-iee-bndng-cls_FIXTURE.js |
|
650 |
instn-iee-bndng-const.js |
---
description: >
Imported binding reflects state of indirectly-exported `const` binding
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
16. Let lexDeclarations be the LexicallyScopedDeclarations of code.
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i, If IsConstantDeclaration of d is true, then
1. Perform ! envRec.CreateImmutableBinding(dn, true).
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
--- |
2163 |
instn-iee-bndng-const_FIXTURE.js |
|
652 |
instn-iee-bndng-fun.js |
---
description: >
Imported binding reflects state of indirectly-exported function binding
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
16. Let lexDeclarations be the LexicallyScopedDeclarations of code.
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i, If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
--- |
2274 |
instn-iee-bndng-fun_FIXTURE.js |
|
650 |
instn-iee-bndng-gen.js |
---
description: >
Imported binding reflects state of indirectly-exported generator function
binding
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
16. Let lexDeclarations be the LexicallyScopedDeclarations of code.
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i, If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
features: [generators]
--- |
2312 |
instn-iee-bndng-gen_FIXTURE.js |
|
650 |
instn-iee-bndng-let.js |
---
description: >
Imported binding reflects state of indirectly-exported `let` binding
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
16. Let lexDeclarations be the LexicallyScopedDeclarations of code.
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i, If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
--- |
2102 |
instn-iee-bndng-let_FIXTURE.js |
|
650 |
instn-iee-bndng-var.js |
---
description: >
Imported binding reflects state of indirectly-exported `var` binding
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
16. Let lexDeclarations be the LexicallyScopedDeclarations of code.
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i, If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
--- |
2263 |
instn-iee-bndng-var_FIXTURE.js |
|
650 |
instn-iee-err-ambiguous-1_FIXTURE.js |
|
190 |
instn-iee-err-ambiguous-2_FIXTURE.js |
|
190 |
instn-iee-err-ambiguous-as.js |
---
description: IndirectExportEntries validation - ambiguous imported bindings
esid: sec-moduledeclarationinstantiation
info: |
[...]
9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
b. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
[...]
15.2.1.16.3 ResolveExport
[...]
9. Let starResolution be null.
10. For each ExportEntry Record e in module.[[StarExportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
e.[[ModuleRequest]]).
b. Let resolution be ? importedModule.ResolveExport(exportName,
resolveSet, exportStarSet).
c. If resolution is "ambiguous", return "ambiguous".
d. If resolution is not null, then
i. If starResolution is null, let starResolution be resolution.
ii. Else,
1. Assert: there is more than one * import that includes the
requested name.
2. If resolution.[[Module]] and starResolution.[[Module]] are
not the same Module Record or
SameValue(resolution.[[BindingName]],
starResolution.[[BindingName]]) is false, return "ambiguous".
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1681 |
instn-iee-err-ambiguous.js |
---
description: IndirectExportEntries validation - ambiguous imported bindings
esid: sec-moduledeclarationinstantiation
info: |
[...]
9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
b. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
[...]
15.2.1.16.3 ResolveExport
[...]
9. Let starResolution be null.
10. For each ExportEntry Record e in module.[[StarExportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
e.[[ModuleRequest]]).
b. Let resolution be ? importedModule.ResolveExport(exportName,
resolveSet, exportStarSet).
c. If resolution is "ambiguous", return "ambiguous".
d. If resolution is not null, then
i. If starResolution is null, let starResolution be resolution.
ii. Else,
1. Assert: there is more than one * import that includes the
requested name.
2. If resolution.[[Module]] and starResolution.[[Module]] are
not the same Module Record or
SameValue(resolution.[[BindingName]],
starResolution.[[BindingName]]) is false, return "ambiguous".
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1676 |
instn-iee-err-ambiguous_FIXTURE.js |
|
288 |
instn-iee-err-circular-as.js |
---
description: IndirectExportEntries validation - circular imported bindings
esid: sec-moduledeclarationinstantiation
info: |
[...]
9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
b. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
[...]
15.2.1.16.3 ResolveExport
[...]
2. For each Record {[[Module]], [[ExportName]]} r in resolveSet, do:
a. If module and r.[[Module]] are the same Module Record and
SameValue(exportName, r.[[ExportName]]) is true, then
i. Assert: this is a circular import request.
ii. Return null.
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1074 |
instn-iee-err-circular.js |
---
description: IndirectExportEntries validation - circular imported bindings
esid: sec-moduledeclarationinstantiation
info: |
[...]
9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
b. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
[...]
15.2.1.16.3 ResolveExport
[...]
2. For each Record {[[Module]], [[ExportName]]} r in resolveSet, do:
a. If module and r.[[Module]] are the same Module Record and
SameValue(exportName, r.[[ExportName]]) is true, then
i. Assert: this is a circular import request.
ii. Return null.
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1069 |
instn-iee-err-circular_FIXTURE.js |
|
225 |
instn-iee-err-dflt-thru-star-as.js |
---
description: IndirectExportEntries validation - default not found (excluding *)
esid: sec-moduledeclarationinstantiation
info: |
[...]
9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
b. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
[...]
15.2.1.16.3 ResolveExport
[...]
6. If SameValue(exportName, "default") is true, then
a. Assert: A default export was not explicitly defined by this module.
b. Throw a SyntaxError exception.
c. NOTE A default export cannot be provided by an export *.
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1050 |
instn-iee-err-dflt-thru-star-dflt_FIXTURE.js |
|
208 |
instn-iee-err-dflt-thru-star-int_FIXTURE.js |
|
240 |
instn-iee-err-dflt-thru-star.js |
---
description: IndirectExportEntries validation - default not found (excluding *)
esid: sec-moduledeclarationinstantiation
info: |
[...]
9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
b. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
[...]
15.2.1.16.3 ResolveExport
[...]
6. If SameValue(exportName, "default") is true, then
a. Assert: A default export was not explicitly defined by this module.
b. Throw a SyntaxError exception.
c. NOTE A default export cannot be provided by an export *.
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1045 |
instn-iee-err-not-found-as.js |
---
description: IndirectExportEntries validation - undefined imported bindings
esid: sec-moduledeclarationinstantiation
info: |
[...]
9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
b. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
[...]
15.2.1.16.3 ResolveExport
[...]
9. Let starResolution be null.
10. For each ExportEntry Record e in module.[[StarExportEntries]], do
[...]
11. Return starResolution.
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
948 |
instn-iee-err-not-found-empty_FIXTURE.js |
|
178 |
instn-iee-err-not-found.js |
---
description: IndirectExportEntries validation - undefined imported bindings
esid: sec-moduledeclarationinstantiation
info: |
[...]
9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
b. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
[...]
15.2.1.16.3 ResolveExport
[...]
9. Let starResolution be null.
10. For each ExportEntry Record e in module.[[StarExportEntries]], do
[...]
11. Return starResolution.
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
943 |
instn-iee-iee-cycle-2_FIXTURE.js |
|
839 |
instn-iee-iee-cycle.js |
---
description: >
There are no restrictions on the number of cycles during module traversal
during indirect export resolution, given unique export names.
esid: sec-moduledeclarationinstantiation
info: |
[...]
9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
b. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
15.2.1.16.3 ResolveExport( exportName, resolveSet, exportStarSet )
2. For each Record {[[Module]], [[ExportName]]} r in resolveSet, do:
a. If module and r.[[Module]] are the same Module Record and
SameValue(exportName, r.[[ExportName]]) is true, then
i. Assert: this is a circular import request.
ii. Return null.
3. Append the Record {[[Module]]: module, [[ExportName]]: exportName} to resolveSet.
[...]
5. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. If SameValue(exportName, e.[[ExportName]]) is true, then
i. Assert: module imports a specific binding for this export.
ii. Let importedModule be ? HostResolveImportedModule(module,
e.[[ModuleRequest]]).
iii. Let indirectResolution be ?
importedModule.ResolveExport(e.[[ImportName]], resolveSet,
exportStarSet).
iv. If indirectResolution is not null, return indirectResolution.
flags: [module]
--- |
2501 |
instn-iee-star-cycle-2_FIXTURE.js |
|
238 |
instn-iee-star-cycle-indirect-x_FIXTURE.js |
|
387 |
instn-iee-star-cycle.js |
---
description: >
Modules can be visited more than once when resolving bindings through
"star" exports as long as the exportName is different each time.
esid: sec-moduledeclarationinstantiation
info: |
[...]
9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
[...]
15.2.1.16.3 ResolveExport( exportName, resolveSet )
[...]
3. Append the Record {[[Module]]: module, [[ExportName]]: exportName} to resolveSet.
4. For each ExportEntry Record e in module.[[LocalExportEntries]], do
a. If SameValue(exportName, e.[[ExportName]]) is true, then
i. Assert: module provides the direct binding for this export.
ii. Return Record{[[Module]]: module, [[BindingName]]: e.[[LocalName]]}.
5. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. If SameValue(exportName, e.[[ExportName]]) is true, then
i. Assert: module imports a specific binding for this export.
ii. Let importedModule be ? HostResolveImportedModule(module, e.[[ModuleRequest]]).
iii. Return ? importedModule.ResolveExport(e.[[ImportName]], resolveSet).
[...]
8. For each ExportEntry Record e in module.[[StarExportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module, e.[[ModuleRequest]]).
b. Let resolution be ? importedModule.ResolveExport(exportName, resolveSet).
[...]
d. If resolution is not null, then
i. If starResolution is null, let starResolution be resolution.
[...]
9. Return starResolution.
flags: [module]
--- |
2025 |
instn-iee-trlng-comma.js |
---
description: >
ExportsList in ExportDeclaration may include a trailing comma
esid: sec-moduledeclarationinstantiation
info: |
[...]
9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »).
[...]
flags: [module]
--- |
816 |
instn-iee-trlng-comma_FIXTURE.js |
|
196 |
instn-local-bndng-cls.js |
---
description: >
Mutable bindings are created in the lexical environment record prior to
execution for class declarations
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
1296 |
instn-local-bndng-const.js |
---
description: >
Mutable bindings are created in the lexical environment record prior to
execution for `const` declarations
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
1. Perform ! envRec.CreateImmutableBinding(dn, true).
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
1297 |
instn-local-bndng-export-cls.js |
---
description: >
Binding is created and initialized to `undefined` for exported `class`
declarations
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
938 |
instn-local-bndng-export-const.js |
---
description: >
Binding is created but not initialized for exported `const` statements
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
924 |
instn-local-bndng-export-fun.js |
---
description: >
Binding is created and initialized to `undefined` for exported function
declarations
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
975 |
instn-local-bndng-export-gen.js |
---
description: >
Binding is created and initialized to `undefined` for exported generator
function declarations
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
999 |
instn-local-bndng-export-let.js |
---
description: >
Binding is created but not initialized for exported `let` statements
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
920 |
instn-local-bndng-export-var.js |
---
description: >
Binding is created and initialized to `undefined` for exported `var`
declarations
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
961 |
instn-local-bndng-for-dup.js |
---
description: >
Only one attempt is made to create a binding for any number of variable
declarations within `for` statements
esid: sec-moduledeclarationinstantiation
info: |
[...]
13. Let varDeclarations be the VarScopedDeclarations of code.
14. Let declaredVarNames be a new empty List.
15. For each element d in varDeclarations do
a. For each element dn of the BoundNames of d do
i. If dn is not an element of declaredVarNames, then
1. Perform ! envRec.CreateMutableBinding(dn, false).
[...]
3. Append dn to declaredVarNames.
[...]
flags: [module]
--- |
891 |
instn-local-bndng-for.js |
---
description: >
Mutable bindings are initialized in the lexical environment record prior to
execution for variable declarations within `for` statements
esid: sec-moduledeclarationinstantiation
info: |
[...]
13. Let varDeclarations be the VarScopedDeclarations of code.
14. Let declaredVarNames be a new empty List.
15. For each element d in varDeclarations do
a. For each element dn of the BoundNames of d do
i. If dn is not an element of declaredVarNames, then
1. Perform ! envRec.CreateMutableBinding(dn, false).
2. Call envRec.InitializeBinding(dn, undefined).
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
1323 |
instn-local-bndng-fun.js |
---
description: >
Mutable bindings are initialized in the lexical environment record prior to
execution for function declarations
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
1. Let fo be the result of performing InstantiateFunctionObject
for d with argument env.
2. Call envRec.InitializeBinding(dn, fo).
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
1728 |
instn-local-bndng-gen.js |
---
description: >
Mutable bindings are initialized in the lexical environment record prior to
execution for generator function declarations
esid: sec-moduledeclarationinstantiation
info: |
[...]
15. For each element d in varDeclarations do
a. For each element dn of the BoundNames of d do
i. If dn is not an element of declaredVarNames, then
1. Perform ! envRec.CreateMutableBinding(dn, false).
2. Call envRec.InitializeBinding(dn, undefined).
3. Append dn to declaredVarNames.
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
1561 |
instn-local-bndng-let.js |
---
description: >
Mutable bindings are created in the lexical environment record prior to
execution for `let` declarations
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
1284 |
instn-local-bndng-var-dup.js |
---
description: >
Only one attempt is made to create a binding for any number of variable
declarations
esid: sec-moduledeclarationinstantiation
info: |
[...]
13. Let varDeclarations be the VarScopedDeclarations of code.
14. Let declaredVarNames be a new empty List.
15. For each element d in varDeclarations do
a. For each element dn of the BoundNames of d do
i. If dn is not an element of declaredVarNames, then
1. Perform ! envRec.CreateMutableBinding(dn, false).
[...]
3. Append dn to declaredVarNames.
[...]
flags: [module]
--- |
833 |
instn-local-bndng-var.js |
---
description: >
Mutable bindings are initialized in the lexical environment record prior to
execution for variable declarations
esid: sec-moduledeclarationinstantiation
info: |
[...]
13. Let varDeclarations be the VarScopedDeclarations of code.
14. Let declaredVarNames be a new empty List.
15. For each element d in varDeclarations do
a. For each element dn of the BoundNames of d do
i. If dn is not an element of declaredVarNames, then
1. Perform ! envRec.CreateMutableBinding(dn, false).
2. Call envRec.InitializeBinding(dn, undefined).
3. Append dn to declaredVarNames.
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
1330 |
instn-named-bndng-cls.js |
---
description: Imported binding reflects state of exported `class` binding
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
16. Let lexDeclarations be the LexicallyScopedDeclarations of code.
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i, If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
--- |
1861 |
instn-named-bndng-const.js |
---
description: Imported binding reflects state of exported `const` binding
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
16. Let lexDeclarations be the LexicallyScopedDeclarations of code.
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i, If IsConstantDeclaration of d is true, then
1. Perform ! envRec.CreateImmutableBinding(dn, true).
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
--- |
1914 |
instn-named-bndng-dflt-cls.js |
---
description: >
Imported binding reflects state of exported default binding ("anonymous"
class declaration)
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
1. Let fo be the result of performing InstantiateFunctionObject
for d with argument env.
2. Call envRec.InitializeBinding(dn, fo).
[...]
14.5 Class Definitions
Syntax
ClassDeclaration[Yield, Default]:
class BindingIdentifier[?Yield] ClassTail[?Yield]
[+Default] class ClassTail[?Yield]
flags: [module]
--- |
1322 |
instn-named-bndng-dflt-expr.js |
---
description: >
Imported binding reflects state of exported default binding (expressions)
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
--- |
1415 |
instn-named-bndng-dflt-fun-anon.js |
---
description: >
Imported binding reflects state of exported default binding ("anonymous"
function declaration)
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
1. Let fo be the result of performing InstantiateFunctionObject
for d with argument env.
2. Call envRec.InitializeBinding(dn, fo).
[...]
14.1.20 Runtime Semantics: InstantiateFunctionObject
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
1. If the function code for FunctionDeclaration is strict mode code, let
strict be true. Otherwise let strict be false.
2. Let F be FunctionCreate(Normal, FormalParameters, FunctionBody, scope,
strict).
3. Perform MakeConstructor(F).
4. Perform SetFunctionName(F, "default").
5. Return F.
14.1 Function Definitions
Syntax
FunctionDeclaration[Yield, Default] :
function BindingIdentifier[?Yield] ( FormalParameters ) { FunctionBody }
[+Default] function ( FormalParameters ) { FunctionBody }
flags: [module]
--- |
1875 |
instn-named-bndng-dflt-fun-named.js |
---
description: >
Imported binding reflects state of exported default binding ("named"
function declaration)
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
1. Let fo be the result of performing InstantiateFunctionObject
for d with argument env.
2. Call envRec.InitializeBinding(dn, fo).
[...]
14.1.20 Runtime Semantics: InstantiateFunctionObject
FunctionDeclaration : function ( FormalParameters ) { FunctionBody }
1. If the function code for FunctionDeclaration is strict mode code, let
strict be true. Otherwise let strict be false.
2. Let F be FunctionCreate(Normal, FormalParameters, FunctionBody, scope,
strict).
3. Perform MakeConstructor(F).
4. Perform SetFunctionName(F, "default").
5. Return F.
14.1 Function Definitions
Syntax
FunctionDeclaration[Yield, Default] :
function BindingIdentifier[?Yield] ( FormalParameters ) { FunctionBody }
[+Default] function ( FormalParameters ) { FunctionBody }
flags: [module]
--- |
1876 |
instn-named-bndng-dflt-gen-anon.js |
---
description: >
Imported binding reflects state of exported default binding ("anonymous"
generator function declaration)
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
1. Let fo be the result of performing InstantiateFunctionObject
for d with argument env.
2. Call envRec.InitializeBinding(dn, fo).
[...]
14.4.12 Runtime Semantics: InstantiateFunctionObject
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
1. If the function code for GeneratorDeclaration is strict mode code, let
strict be true. Otherwise let strict be false.
2. Let F be GeneratorFunctionCreate(Normal, FormalParameters,
GeneratorBody, scope, strict).
3. Let prototype be ObjectCreate(%GeneratorPrototype%).
4. Perform DefinePropertyOrThrow(F, "prototype",
PropertyDescriptor{[[Value]]: prototype, [[Writable]]: true,
[[Enumerable]]: false, [[Configurable]]: false}).
5. Perform SetFunctionName(F, "default").
6. Return F.
14.4 Generator Function Definitions
Syntax
GeneratorDeclaration[Yield, Default] :
function * BindingIdentifier[?Yield] ( FormalParameters[Yield] ) { GeneratorBody }
[+Default] function * ( FormalParameters[Yield] ) { GeneratorBody }
flags: [module]
features: [generators]
--- |
2183 |
instn-named-bndng-dflt-gen-named.js |
---
description: >
Imported binding reflects state of exported default binding ("named"
generator function declaration)
esid: sec-moduledeclarationinstantiation
info: |
[...]
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i. If IsConstantDeclaration of d is true, then
[...]
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
1. Let fo be the result of performing InstantiateFunctionObject
for d with argument env.
2. Call envRec.InitializeBinding(dn, fo).
[...]
14.4.12 Runtime Semantics: InstantiateFunctionObject
GeneratorDeclaration : function * ( FormalParameters ) { GeneratorBody }
1. If the function code for GeneratorDeclaration is strict mode code, let
strict be true. Otherwise let strict be false.
2. Let F be GeneratorFunctionCreate(Normal, FormalParameters,
GeneratorBody, scope, strict).
3. Let prototype be ObjectCreate(%GeneratorPrototype%).
4. Perform DefinePropertyOrThrow(F, "prototype",
PropertyDescriptor{[[Value]]: prototype, [[Writable]]: true,
[[Enumerable]]: false, [[Configurable]]: false}).
5. Perform SetFunctionName(F, "default").
6. Return F.
14.4 Generator Function Definitions
Syntax
GeneratorDeclaration[Yield, Default] :
function * BindingIdentifier[?Yield] ( FormalParameters[Yield] ) { GeneratorBody }
[+Default] function * ( FormalParameters[Yield] ) { GeneratorBody }
flags: [module]
features: [generators]
--- |
2183 |
instn-named-bndng-dflt-named.js |
---
description: >
An ImportClause may contain both an ImportedDefaultBinding and NamedImports
esid: sec-imports
info: |
Syntax
ImportClause:
ImportedDefaultBinding
NameSpaceImport
NamedImports
ImportedDefaultBinding , NameSpaceImport
ImportedDefaultBinding , NamedImports
flags: [module]
--- |
715 |
instn-named-bndng-dflt-star.js |
---
description: >
An ImportClause may contain both an ImportedDefaultBinding and a
NameSpaceImport
esid: sec-imports
info: |
Syntax
ImportClause:
ImportedDefaultBinding
NameSpaceImport
NamedImports
ImportedDefaultBinding , NameSpaceImport
ImportedDefaultBinding , NamedImports
flags: [module]
--- |
707 |
instn-named-bndng-fun.js |
---
description: Imported binding reflects state of exported function binding
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
16. Let lexDeclarations be the LexicallyScopedDeclarations of code.
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i, If IsConstantDeclaration of d is true, then
1. Perform ! envRec.CreateImmutableBinding(dn, true).
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
1. Let fo be the result of performing InstantiateFunctionObject
for d with argument env.
2. Call envRec.InitializeBinding(dn, fo).
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
--- |
2249 |
instn-named-bndng-gen.js |
---
description: >
Imported binding reflects state of exported generator function binding
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
16. Let lexDeclarations be the LexicallyScopedDeclarations of code.
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i, If IsConstantDeclaration of d is true, then
1. Perform ! envRec.CreateImmutableBinding(dn, true).
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
1. Let fo be the result of performing InstantiateFunctionObject
for d with argument env.
2. Call envRec.InitializeBinding(dn, fo).
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
features: [generators]
--- |
2315 |
instn-named-bndng-let.js |
---
description: Imported binding reflects state of exported `const` binding
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
16. Let lexDeclarations be the LexicallyScopedDeclarations of code.
17. For each element d in lexDeclarations do
a. For each element dn of the BoundNames of d do
i, If IsConstantDeclaration of d is true, then
1. Perform ! envRec.CreateImmutableBinding(dn, true).
ii. Else,
1. Perform ! envRec.CreateMutableBinding(dn, false).
iii. If d is a GeneratorDeclaration production or a
FunctionDeclaration production, then
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
--- |
1910 |
instn-named-bndng-trlng-comma.js |
---
description: >
Imported binding reflects state of exported `var` binding when ImportsList
has a trailing comma
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
14. Let declaredVarNames be a new empty List.
15. For each element d in varDeclarations do
a. For each element dn of the BoundNames of d do
i. If dn is not an element of declaredVarNames, then
1. Perform ! envRec.CreateMutableBinding(dn, false).
2. Call envRec.InitializeBinding(dn, undefined).
3. Append dn to declaredVarNames.
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
--- |
1998 |
instn-named-bndng-var.js |
---
description: Imported binding reflects state of exported `var` binding
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
14. Let declaredVarNames be a new empty List.
15. For each element d in varDeclarations do
a. For each element dn of the BoundNames of d do
i. If dn is not an element of declaredVarNames, then
1. Perform ! envRec.CreateMutableBinding(dn, false).
2. Call envRec.InitializeBinding(dn, undefined).
3. Append dn to declaredVarNames.
[...]
8.1.1.5.5 CreateImportBinding
[...]
5. Create an immutable indirect binding in envRec for N that references M
and N2 as its target binding and record that the binding is initialized.
6. Return NormalCompletion(empty).
flags: [module]
--- |
1940 |
instn-named-err-ambiguous-1_FIXTURE.js |
|
190 |
instn-named-err-ambiguous-2_FIXTURE.js |
|
190 |
instn-named-err-ambiguous-as.js |
---
description: Named import binding - resolution failure (ambiguous name)
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
15.2.1.16.3 ResolveExport
[...]
9. Let starResolution be null.
10. For each ExportEntry Record e in module.[[StarExportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
e.[[ModuleRequest]]).
b. Let resolution be ? importedModule.ResolveExport(exportName,
resolveSet, exportStarSet).
c. If resolution is "ambiguous", return "ambiguous".
d. If resolution is not null, then
i. If starResolution is null, let starResolution be resolution.
ii. Else,
1. Assert: there is more than one * import that includes the
requested name.
2. If resolution.[[Module]] and starResolution.[[Module]] are
not the same Module Record or
SameValue(resolution.[[BindingName]],
starResolution.[[BindingName]]) is false, return "ambiguous".
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1882 |
instn-named-err-ambiguous.js |
---
description: Named import binding - resolution failure (ambiguous name)
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
15.2.1.16.3 ResolveExport
[...]
9. Let starResolution be null.
10. For each ExportEntry Record e in module.[[StarExportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
e.[[ModuleRequest]]).
b. Let resolution be ? importedModule.ResolveExport(exportName,
resolveSet, exportStarSet).
c. If resolution is "ambiguous", return "ambiguous".
d. If resolution is not null, then
i. If starResolution is null, let starResolution be resolution.
ii. Else,
1. Assert: there is more than one * import that includes the
requested name.
2. If resolution.[[Module]] and starResolution.[[Module]] are
not the same Module Record or
SameValue(resolution.[[BindingName]],
starResolution.[[BindingName]]) is false, return "ambiguous".
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1877 |
instn-named-err-ambiguous_FIXTURE.js |
|
292 |
instn-named-err-dflt-thru-star-as.js |
---
description: Named import binding - default not found (excluding *)
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
15.2.1.16.3 ResolveExport
[...]
6. If SameValue(exportName, "default") is true, then
a. Assert: A default export was not explicitly defined by this module.
b. Throw a SyntaxError exception.
c. NOTE A default export cannot be provided by an export *.
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1243 |
instn-named-err-dflt-thru-star-dflt.js |
---
description: Named import binding - default not found (excluding *)
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
15.2.1.16.3 ResolveExport
[...]
6. If SameValue(exportName, "default") is true, then
a. Assert: A default export was not explicitly defined by this module.
b. Throw a SyntaxError exception.
c. NOTE A default export cannot be provided by an export *.
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1228 |
instn-named-err-dflt-thru-star-dflt_FIXTURE.js |
|
208 |
instn-named-err-dflt-thru-star-int_FIXTURE.js |
|
242 |
instn-named-err-not-found-as.js |
---
description: Named import binding - resolution failure (not found)
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
15.2.1.16.3 ResolveExport
[...]
9. Let starResolution be null.
10. For each ExportEntry Record e in module.[[StarExportEntries]], do
[...]
11. Return starResolution.
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1144 |
instn-named-err-not-found-dflt.js |
---
description: Named import binding - resolution failure (not found)
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
15.2.1.16.3 ResolveExport
[...]
9. Let starResolution be null.
10. For each ExportEntry Record e in module.[[StarExportEntries]], do
[...]
11. Return starResolution.
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1135 |
instn-named-err-not-found-empty_FIXTURE.js |
|
178 |
instn-named-err-not-found.js |
---
description: Named import binding - resolution failure (not found)
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
15.2.1.16.3 ResolveExport
[...]
9. Let starResolution be null.
10. For each ExportEntry Record e in module.[[StarExportEntries]], do
[...]
11. Return starResolution.
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1139 |
instn-named-id-name.js |
---
description: >
The first identifier in an ImportSpecifier containing `as` may be any valid
IdentifierName
esid: sec-imports
info: |
ImportSpecifier:
ImportedBinding
IdentifierName as ImportedBinding
flags: [module]
--- |
1193 |
instn-named-iee-cycle-2_FIXTURE.js |
|
865 |
instn-named-iee-cycle.js |
---
description: >
There are no restrictions on the number of cycles during module traversal
during indirect export resolution, given unique export names.
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
ii. If resolution is null or resolution is "ambiguous", throw a
SyntaxError exception.
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
15.2.1.16.3 ResolveExport( exportName, resolveSet, exportStarSet )
2. For each Record {[[Module]], [[ExportName]]} r in resolveSet, do:
a. If module and r.[[Module]] are the same Module Record and
SameValue(exportName, r.[[ExportName]]) is true, then
i. Assert: this is a circular import request.
ii. Return null.
3. Append the Record {[[Module]]: module, [[ExportName]]: exportName} to resolveSet.
[...]
5. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. If SameValue(exportName, e.[[ExportName]]) is true, then
i. Assert: module imports a specific binding for this export.
ii. Let importedModule be ? HostResolveImportedModule(module,
e.[[ModuleRequest]]).
iii. Let indirectResolution be ?
importedModule.ResolveExport(e.[[ImportName]], resolveSet,
exportStarSet).
iv. If indirectResolution is not null, return indirectResolution.
flags: [module]
--- |
2915 |
instn-named-star-cycle-2_FIXTURE.js |
|
240 |
instn-named-star-cycle-indirect-x_FIXTURE.js |
|
389 |
instn-named-star-cycle.js |
---
description: >
Modules can be visited more than once when resolving bindings through
"star" exports as long as the exportName is different each time.
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
[...]
c. Else,
i. Let resolution be ?
importedModule.ResolveExport(in.[[ImportName]], « », « »).
[...]
iii. Call envRec.CreateImportBinding(in.[[LocalName]],
resolution.[[Module]], resolution.[[BindingName]]).
[...]
15.2.1.16.3 ResolveExport( exportName, resolveSet )
[...]
3. Append the Record {[[Module]]: module, [[ExportName]]: exportName} to resolveSet.
4. For each ExportEntry Record e in module.[[LocalExportEntries]], do
a. If SameValue(exportName, e.[[ExportName]]) is true, then
i. Assert: module provides the direct binding for this export.
ii. Return Record{[[Module]]: module, [[BindingName]]: e.[[LocalName]]}.
5. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. If SameValue(exportName, e.[[ExportName]]) is true, then
i. Assert: module imports a specific binding for this export.
ii. Let importedModule be ? HostResolveImportedModule(module, e.[[ModuleRequest]]).
iii. Return ? importedModule.ResolveExport(e.[[ImportName]], resolveSet).
[...]
8. For each ExportEntry Record e in module.[[StarExportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module, e.[[ModuleRequest]]).
b. Let resolution be ? importedModule.ResolveExport(exportName, resolveSet).
[...]
d. If resolution is not null, then
i. If starResolution is null, let starResolution be resolution.
[...]
9. Return starResolution.
flags: [module]
--- |
2321 |
instn-once.js |
---
description: Module is linked exactly once
esid: sec-moduledeclarationlinking
info: |
Link ( ) Concrete Method
[...]
4. Let result be InnerModuleLinking(module, stack, 0).
[...]
InnerModuleLinking( module, stack, index )
[...]
2. If module.[[Status]] is "linking", "linked", or "evaluated", then
a. Return index.
3. Assert: module.[[Status]] is "unlinked".
4. Set module.[[Status]] to "linking".
[...]
9. For each String required that is an element of module.[[RequestedModules]], do
a. Let requiredModule be ? HostResolveImportedModule(module, required).
b. Set index to ? InnerModuleLinking(requiredModule, stack, index).
[...]
flags: [module]
features: [export-star-as-namespace-from-module]
--- |
1311 |
instn-resolve-empty-export.js |
---
description: >
A NamedExport without an ExportsList contributes to the list of requested
modules
esid: sec-moduledeclarationinstantiation
info: |
[...]
8. For each String required that is an element of
module.[[RequestedModules]] do,
a. NOTE: Before instantiating a module, all of the modules it requested
must be available. An implementation may perform this test at any
time prior to this point.
b. Let requiredModule be ? HostResolveImportedModule(module, required).
c. Perform ? requiredModule.ModuleDeclarationInstantiation().
15.2.2.5 Static Semantics: ModuleRequests
ImportDeclaration : import ImportClause FromClause;
1. Return ModuleRequests of FromClause.
15.2.3 Exports
Syntax
NamedExport:
{ }
{ ExportsList }
{ ExportsList , }
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1195 |
instn-resolve-empty-export_FIXTURE.js |
|
181 |
instn-resolve-empty-import.js |
---
description: >
An ImportClause without an ImportsList contributes to the list of requested
modules
esid: sec-moduledeclarationinstantiation
info: |
[...]
8. For each String required that is an element of
module.[[RequestedModules]] do,
a. NOTE: Before instantiating a module, all of the modules it requested
must be available. An implementation may perform this test at any
time prior to this point.
b. Let requiredModule be ? HostResolveImportedModule(module, required).
c. Perform ? requiredModule.ModuleDeclarationInstantiation().
15.2.2.5 Static Semantics: ModuleRequests
ImportDeclaration : import ImportClause FromClause;
1. Return ModuleRequests of FromClause.
15.2.3 Exports
Syntax
ImportClause :
ImportedDefaultBinding
NameSpaceImport
NamedImports
ImportedDefaultBinding , NameSpaceImport
ImportedDefaultBinding , NamedImports
NamedImports :
{ }
{ ImportsList }
{ ImportsList , }
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1391 |
instn-resolve-empty-import_FIXTURE.js |
|
181 |
instn-resolve-err-syntax-1.js |
---
description: Requested modules that produce an early SyntaxError
esid: sec-moduledeclarationinstantiation
info: |
[...]
8. For each String required that is an element of
module.[[RequestedModules]] do,
[...]
b. Let requiredModule be ? HostResolveImportedModule(module, required).
[...]
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
643 |
instn-resolve-err-syntax-1_FIXTURE.js |
|
183 |
instn-resolve-err-syntax-2.js |
---
description: Requested modules that produce an early SyntaxError
esid: sec-moduledeclarationinstantiation
info: |
[...]
8. For each String required that is an element of
module.[[RequestedModules]] do,
[...]
b. Let requiredModule be ? HostResolveImportedModule(module, required).
[...]
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
643 |
instn-resolve-err-syntax-2_FIXTURE.js |
|
181 |
instn-resolve-order-depth-child_FIXTURE.js |
|
235 |
instn-resolve-order-depth-reference_FIXTURE.js |
|
181 |
instn-resolve-order-depth-syntax_FIXTURE.js |
|
183 |
instn-resolve-order-depth.js |
---
description: Module dependencies are resolved following a depth-first strategy
esid: sec-moduledeclarationinstantiation
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
505 |
instn-resolve-order-src-reference_FIXTURE.js |
|
181 |
instn-resolve-order-src-syntax_FIXTURE.js |
|
183 |
instn-resolve-order-src-valid_FIXTURE.js |
|
178 |
instn-resolve-order-src.js |
---
description: Modules dependencies are resolved in source text order
esid: sec-moduledeclarationinstantiation
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
547 |
instn-same-global-set_FIXTURE.js |
|
222 |
instn-same-global.js |
---
description: Modules share the same global `this` value
esid: sec-moduledeclarationinstantiation
info: |
[...]
6. Let env be NewModuleEnvironment(realm.[[GlobalEnv]]).
7. Set module.[[Environment]] to env.
[...]
includes: [fnGlobalObject.js]
flags: [module]
--- |
584 |
instn-star-ambiguous-1_FIXTURE.js |
|
225 |
instn-star-ambiguous-2_FIXTURE.js |
|
226 |
instn-star-ambiguous.js |
---
description: >
Ambiguous exports are not reflected in module namespace objects, nor do
they trigger an error upon resolution
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
i. Let namespace be ? GetModuleNamespace(importedModule).
[...]
15.2.1.18 Runtime Semantics: GetModuleNamespace
[...]
3. If namespace is undefined, then
[...]
c. For each name that is an element of exportedNames,
i. Let resolution be ? module.ResolveExport(name, « », « »).
ii. If resolution is null, throw a SyntaxError exception.
iii. If resolution is not "ambiguous", append name to
unambiguousNames.
d. Let namespace be ModuleNamespaceCreate(module, unambiguousNames).
flags: [module]
--- |
1482 |
instn-star-ambiguous_FIXTURE.js |
|
282 |
instn-star-as-props-dflt-skip.js |
---
description: >
Default exports are included in an imported module namespace object when module exported with `* as namespace`
esid: sec-moduledeclarationinstantiation
info: |
[...]
4. Let result be InnerModuleInstantiation(module, stack, 0).
[...]
InnerModuleInstantiation( module, stack, index )
[...]
10. Perform ? ModuleDeclarationEnvironmentSetup(module).
[...]
ModuleDeclarationEnvironmentSetup( module )
[...]
c. If in.[[ImportName]] is "*", then
[...]
d. Else,
i. Let resolution be ? importedModule.ResolveExport(in.[[ImportName]], « »).
ii. If resolution is null or "ambiguous", throw a SyntaxError exception.
iii. If resolution.[[BindingName]] is "*namespace*", then
1. Let namespace be ? GetModuleNamespace(resolution.[[Module]]).
[...]
15.2.1.18 Runtime Semantics: GetModuleNamespace
[...]
3. If namespace is undefined, then
a. Let exportedNames be ? module.GetExportedNames(« »).
[...]
15.2.1.16.2 GetExportedNames
[...]
7. For each ExportEntry Record e in module.[[StarExportEntries]], do
[...]
c. For each element n of starNames, do
i. If SameValue(n, "default") is false, then
[...]
flags: [module]
features: [export-star-as-namespace-from-module]
--- |
1858 |
instn-star-binding.js |
---
description: Immutable binding is created for module namespace object
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
i. Let namespace be ? GetModuleNamespace(importedModule).
ii. Perform ! envRec.CreateImmutableBinding(in.[[LocalName]], true).
iii. Call envRec.InitializeBinding(in.[[LocalName]], namespace).
[...]
flags: [module]
--- |
1105 |
instn-star-equality-other_FIXTURE.js |
|
247 |
instn-star-equality.js |
---
description: A single namespace is created for each module
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
i. Let namespace be ? GetModuleNamespace(importedModule).
ii. Perform ! envRec.CreateImmutableBinding(in.[[LocalName]], true).
iii. Call envRec.InitializeBinding(in.[[LocalName]], namespace).
[...]
15.2.1.18 Runtime Semantics: GetModuleNamespace
1. Assert: module is an instance of a concrete subclass of Module Record.
2. Let namespace be module.[[Namespace]].
3. If namespace is undefined, then
[...]
4. Return namespace.
flags: [module]
--- |
1743 |
instn-star-err-not-found-empty_FIXTURE.js |
|
178 |
instn-star-err-not-found-faulty_FIXTURE.js |
|
241 |
instn-star-err-not-found.js |
---
description: >
Importing a namespace for a module which contains an unresolvable named
export
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
i. Let namespace be ? GetModuleNamespace(importedModule).
[...]
15.2.1.18 Runtime Semantics: GetModuleNamespace
[...]
3. If namespace is undefined, then
[...]
c. For each name that is an element of exportedNames,
i. Let resolution be ? module.ResolveExport(name, « », « »).
ii. If resolution is null, throw a SyntaxError exception.
negative:
phase: resolution
type: SyntaxError
flags: [module]
--- |
1121 |
instn-star-id-name.js |
---
description: >
Namespace object reports properties for any valid exported IdentifierName.
esid: sec-imports
info: |
[...]
5. For each ExportEntry Record e in module.[[LocalExportEntries]], do
a. Assert: module provides the direct binding for this export.
b. Append e.[[ExportName]] to exportedNames.
[...]
flags: [module]
--- |
1307 |
instn-star-iee-cycle-2_FIXTURE.js |
|
852 |
instn-star-iee-cycle.js |
---
description: >
There are no restrictions on the number of cycles during module traversal
during indirect export resolution, given unique export names.
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
i. Let namespace be ? GetModuleNamespace(importedModule).
ii. Perform ! envRec.CreateImmutableBinding(in.[[LocalName]], true).
iii. Call envRec.InitializeBinding(in.[[LocalName]], namespace).
[...]
15.2.1.16.3 ResolveExport( exportName, resolveSet, exportStarSet )
2. For each Record {[[Module]], [[ExportName]]} r in resolveSet, do:
a. If module and r.[[Module]] are the same Module Record and
SameValue(exportName, r.[[ExportName]]) is true, then
i. Assert: this is a circular import request.
ii. Return null.
3. Append the Record {[[Module]]: module, [[ExportName]]: exportName} to resolveSet.
[...]
5. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. If SameValue(exportName, e.[[ExportName]]) is true, then
i. Assert: module imports a specific binding for this export.
ii. Let importedModule be ? HostResolveImportedModule(module,
e.[[ModuleRequest]]).
iii. Let indirectResolution be ?
importedModule.ResolveExport(e.[[ImportName]], resolveSet,
exportStarSet).
iv. If indirectResolution is not null, return indirectResolution.
flags: [module]
--- |
2744 |
instn-star-props-circular-a_FIXTURE.js |
|
252 |
instn-star-props-circular-b_FIXTURE.js |
|
252 |
instn-star-props-circular.js |
---
description: >
Circular "star" imports do not trigger infinite recursion during name
enumeration.
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
i. Let namespace be ? GetModuleNamespace(importedModule).
[...]
15.2.1.18 Runtime Semantics: GetModuleNamespace
[...]
3. If namespace is undefined, then
a. Let exportedNames be ? module.GetExportedNames(« »).
[...]
15.2.1.16.2 GetExportedNames
1. Let module be this Source Text Module Record.
2. If exportStarSet contains module, then
a. Assert: We've reached the starting point of an import * circularity.
b. Return a new empty List.
flags: [module]
--- |
1537 |
instn-star-props-dflt-keep-indirect-def_FIXTURE.js |
|
197 |
instn-star-props-dflt-keep-indirect-reexport_FIXTURE.js |
|
256 |
instn-star-props-dflt-keep-indirect.js |
---
description: >
Indirect default exports are included in the module namespace object
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
i. Let namespace be ? GetModuleNamespace(importedModule).
[...]
15.2.1.18 Runtime Semantics: GetModuleNamespace
[...]
3. If namespace is undefined, then
a. Let exportedNames be ? module.GetExportedNames(« »).
[...]
15.2.1.16.2 GetExportedNames
[...]
6. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. Assert: module imports a specific binding for this export.
b. Append e.[[ExportName]] to exportedNames.
[...]
flags: [module]
--- |
1211 |
instn-star-props-dflt-keep-local-named_FIXTURE.js |
|
215 |
instn-star-props-dflt-keep-local-prod_FIXTURE.js |
|
197 |
instn-star-props-dflt-keep-local.js |
---
description: >
Local default exports are included in the module namespace object
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
i. Let namespace be ? GetModuleNamespace(importedModule).
[...]
15.2.1.18 Runtime Semantics: GetModuleNamespace
[...]
3. If namespace is undefined, then
a. Let exportedNames be ? module.GetExportedNames(« »).
[...]
15.2.1.16.2 GetExportedNames
[...]
5. For each ExportEntry Record e in module.[[LocalExportEntries]], do
a. Assert: module provides the direct binding for this export.
b. Append e.[[ExportName]] to exportedNames.
[...]
flags: [module]
--- |
1424 |
instn-star-props-dflt-skip-named_FIXTURE.js |
|
238 |
instn-star-props-dflt-skip-prod_FIXTURE.js |
|
232 |
instn-star-props-dflt-skip-star-as-named-end_FIXTURE.js |
|
229 |
instn-star-props-dflt-skip-star-as-named_FIXTURE.js |
|
251 |
instn-star-props-dflt-skip-star-as-prod-end_FIXTURE.js |
|
223 |
instn-star-props-dflt-skip-star-as-prod_FIXTURE.js |
|
255 |
instn-star-props-dflt-skip-star-named_FIXTURE.js |
|
239 |
instn-star-props-dflt-skip-star-prod_FIXTURE.js |
|
238 |
instn-star-props-dflt-skip.js |
---
description: >
Default exports are not included in the module namespace object
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
i. Let namespace be ? GetModuleNamespace(importedModule).
[...]
15.2.1.18 Runtime Semantics: GetModuleNamespace
[...]
3. If namespace is undefined, then
a. Let exportedNames be ? module.GetExportedNames(« »).
[...]
15.2.1.16.2 GetExportedNames
[...]
7. For each ExportEntry Record e in module.[[StarExportEntries]], do
[...]
c. For each element n of starNames, do
i. If SameValue(n, "default") is false, then
[...]
flags: [module]
--- |
1495 |
instn-star-props-nrml-1_FIXTURE.js |
|
932 |
instn-star-props-nrml-indirect_FIXTURE.js |
|
234 |
instn-star-props-nrml-star_FIXTURE.js |
|
887 |
instn-star-props-nrml.js |
---
description: >
Module namespace object reports properties for all ExportEntries of all
dependencies.
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
i. Let namespace be ? GetModuleNamespace(importedModule).
[...]
3. If namespace is undefined, then
a. Let exportedNames be ? module.GetExportedNames(« »).
b. Let unambiguousNames be a new empty List.
c. For each name that is an element of exportedNames,
i. Let resolution be ? module.ResolveExport(name, « », « »).
ii. If resolution is null, throw a SyntaxError exception.
iii. If resolution is not "ambiguous", append name to
unambiguousNames.
d. Let namespace be ModuleNamespaceCreate(module, unambiguousNames).
flags: [module]
features: [export-star-as-namespace-from-module]
--- |
3423 |
instn-star-star-cycle-2_FIXTURE.js |
|
239 |
instn-star-star-cycle-indirect-x_FIXTURE.js |
|
388 |
instn-star-star-cycle.js |
---
description: >
Modules can be visited more than once when resolving bindings through
"star" exports as long as the exportName is different each time.
esid: sec-moduledeclarationinstantiation
info: |
[...]
12. For each ImportEntry Record in in module.[[ImportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module,
in.[[ModuleRequest]]).
b. If in.[[ImportName]] is "*", then
i. Let namespace be ? GetModuleNamespace(importedModule).
ii. Perform ! envRec.CreateImmutableBinding(in.[[LocalName]], true).
iii. Call envRec.InitializeBinding(in.[[LocalName]], namespace).
[...]
15.2.1.16.3 ResolveExport( exportName, resolveSet )
[...]
3. Append the Record {[[Module]]: module, [[ExportName]]: exportName} to resolveSet.
4. For each ExportEntry Record e in module.[[LocalExportEntries]], do
a. If SameValue(exportName, e.[[ExportName]]) is true, then
i. Assert: module provides the direct binding for this export.
ii. Return Record{[[Module]]: module, [[BindingName]]: e.[[LocalName]]}.
5. For each ExportEntry Record e in module.[[IndirectExportEntries]], do
a. If SameValue(exportName, e.[[ExportName]]) is true, then
i. Assert: module imports a specific binding for this export.
ii. Let importedModule be ? HostResolveImportedModule(module, e.[[ModuleRequest]]).
iii. Return ? importedModule.ResolveExport(e.[[ImportName]], resolveSet).
[...]
8. For each ExportEntry Record e in module.[[StarExportEntries]], do
a. Let importedModule be ? HostResolveImportedModule(module, e.[[ModuleRequest]]).
b. Let resolution be ? importedModule.ResolveExport(exportName, resolveSet).
[...]
d. If resolution is not null, then
i. If starResolution is null, let starResolution be resolution.
[...]
9. Return starResolution.
flags: [module]
--- |
2286 |
instn-uniq-env-rec-other_FIXTURE.js |
|
393 |
instn-uniq-env-rec.js |
---
description: Modules have distinct environment records
esid: sec-moduledeclarationinstantiation
info: |
[...]
6. Let env be NewModuleEnvironment(realm.[[GlobalEnv]]).
7. Set module.[[Environment]] to env.
[...]
8.1.2.6 NewModuleEnvironment (E)
1. Let env be a new Lexical Environment.
[...]
flags: [module]
features: [generators]
--- |
1947 |
invalid-private-names-call-expression-bad-reference.js |
---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, top level of module body)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated, module]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
--- |
1268 |
invalid-private-names-call-expression-this.js |
---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, top level of module body)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated, module]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
--- |
1262 |
invalid-private-names-member-expression-bad-reference.js |
---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, top level of module body)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated, module]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
--- |
1269 |
invalid-private-names-member-expression-this.js |
---
description: this reference in member expression (Invalid private names should throw a SyntaxError, top level of module body)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated, module]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
--- |
1256 |
namespace |
|
|
parse-err-decl-pos-export-arrow-function.js |
---
description: Expression cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
382 |
parse-err-decl-pos-export-block-stmt-list.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
382 |
parse-err-decl-pos-export-block-stmt.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
374 |
parse-err-decl-pos-export-class-decl-meth-static.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
402 |
parse-err-decl-pos-export-class-decl-meth.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
395 |
parse-err-decl-pos-export-class-decl-method-gen-static.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
426 |
parse-err-decl-pos-export-class-decl-method-gen.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
419 |
parse-err-decl-pos-export-class-expr-meth-gen-static.js |
---
description: Expression cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
428 |
parse-err-decl-pos-export-class-expr-meth-gen.js |
---
description: Expression cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
421 |
parse-err-decl-pos-export-class-expr-meth-static.js |
---
description: Expression cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
404 |
parse-err-decl-pos-export-class-expr-meth.js |
---
description: Expression cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
397 |
parse-err-decl-pos-export-do-while.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
387 |
parse-err-decl-pos-export-for-const.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
398 |
parse-err-decl-pos-export-for-in-const.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
392 |
parse-err-decl-pos-export-for-in-let.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
390 |
parse-err-decl-pos-export-for-in-lhs.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
386 |
parse-err-decl-pos-export-for-in-var.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
390 |
parse-err-decl-pos-export-for-let.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
396 |
parse-err-decl-pos-export-for-lhs.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
392 |
parse-err-decl-pos-export-for-of-const.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
392 |
parse-err-decl-pos-export-for-of-let.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
390 |
parse-err-decl-pos-export-for-of-lhs.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
386 |
parse-err-decl-pos-export-for-of-var.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
390 |
parse-err-decl-pos-export-for-var.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
396 |
parse-err-decl-pos-export-function-decl.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
387 |
parse-err-decl-pos-export-function-expr.js |
---
description: Expression cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
389 |
parse-err-decl-pos-export-generator-decl.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
411 |
parse-err-decl-pos-export-generator-expr.js |
---
description: Expression cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
390 |
parse-err-decl-pos-export-if-else.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
389 |
parse-err-decl-pos-export-if-if.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
381 |
parse-err-decl-pos-export-labeled.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
379 |
parse-err-decl-pos-export-object-gen-method.js |
---
description: Expression cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
410 |
parse-err-decl-pos-export-object-getter.js |
---
description: Expression cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
390 |
parse-err-decl-pos-export-object-method.js |
---
description: Expression cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
386 |
parse-err-decl-pos-export-object-setter.js |
---
description: Expression cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
391 |
parse-err-decl-pos-export-switch-case-dflt.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
401 |
parse-err-decl-pos-export-switch-case.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
392 |
parse-err-decl-pos-export-switch-dftl.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
393 |
parse-err-decl-pos-export-try-catch-finally.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
408 |
parse-err-decl-pos-export-try-catch.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
396 |
parse-err-decl-pos-export-try-finally.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
392 |
parse-err-decl-pos-export-try-try.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
396 |
parse-err-decl-pos-export-while.js |
---
description: Statement cannot contain an `export` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
384 |
parse-err-decl-pos-import-arrow-function.js |
---
description: Expression cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
414 |
parse-err-decl-pos-import-block-stmt-list.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
415 |
parse-err-decl-pos-import-block-stmt.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
402 |
parse-err-decl-pos-import-class-decl-meth-static.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
442 |
parse-err-decl-pos-import-class-decl-meth.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
428 |
parse-err-decl-pos-import-class-decl-method-gen-static.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
472 |
parse-err-decl-pos-import-class-decl-method-gen.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
458 |
parse-err-decl-pos-import-class-expr-meth-gen-static.js |
---
description: Expression cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
472 |
parse-err-decl-pos-import-class-expr-meth-gen.js |
---
description: Expression cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
458 |
parse-err-decl-pos-import-class-expr-meth-static.js |
---
description: Expression cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
444 |
parse-err-decl-pos-import-class-expr-meth.js |
---
description: Expression cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
430 |
parse-err-decl-pos-import-do-while.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
413 |
parse-err-decl-pos-import-for-const.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
425 |
parse-err-decl-pos-import-for-in-const.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
422 |
parse-err-decl-pos-import-for-in-let.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
418 |
parse-err-decl-pos-import-for-in-lhs.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
414 |
parse-err-decl-pos-import-for-in-var.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
418 |
parse-err-decl-pos-import-for-let.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
421 |
parse-err-decl-pos-import-for-lhs.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
417 |
parse-err-decl-pos-import-for-of-const.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
422 |
parse-err-decl-pos-import-for-of-let.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
418 |
parse-err-decl-pos-import-for-of-lhs.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
414 |
parse-err-decl-pos-import-for-of-var.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
418 |
parse-err-decl-pos-import-for-var.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
421 |
parse-err-decl-pos-import-function-decl.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
418 |
parse-err-decl-pos-import-function-expr.js |
---
description: Expression cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
420 |
parse-err-decl-pos-import-generator-decl.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
443 |
parse-err-decl-pos-import-generator-expr.js |
---
description: Expression cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
422 |
parse-err-decl-pos-import-if-else.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
414 |
parse-err-decl-pos-import-if-if.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
404 |
parse-err-decl-pos-import-labeled.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
404 |
parse-err-decl-pos-import-object-gen-method.js |
---
description: Expression cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
445 |
parse-err-decl-pos-import-object-getter.js |
---
description: Expression cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
421 |
parse-err-decl-pos-import-object-method.js |
---
description: Expression cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
417 |
parse-err-decl-pos-import-object-setter.js |
---
description: Expression cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
422 |
parse-err-decl-pos-import-switch-case-dflt.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
435 |
parse-err-decl-pos-import-switch-case.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
421 |
parse-err-decl-pos-import-switch-dftl.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
422 |
parse-err-decl-pos-import-try-catch-finally.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
443 |
parse-err-decl-pos-import-try-catch.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
423 |
parse-err-decl-pos-import-try-finally.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
421 |
parse-err-decl-pos-import-try-try.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
421 |
parse-err-decl-pos-import-while.js |
---
description: Statement cannot contain an `import` declaration
esid: sec-modules
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
407 |
parse-err-export-dflt-const.js |
---
esid: sec-exports
es6id: 15.2.3
description: The default export may not be a LexicalDeclaration (const)
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
404 |
parse-err-export-dflt-expr.js |
---
description: >
Expression not permitted in AssignmentExpression position
esid: sec-exports
info: |
ExportDeclaration:
export * FromClause;
export * as IdentifierName FromClause;
export NamedExports FromClause;
export NamedExports;
export VariableStatement
export Declaration
export default HoistableDeclaration[Default]
export default ClassDeclaration[Default]
export default [lookahead ∉ { function, class }] AssignmentExpression[In];
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
796 |
parse-err-export-dflt-let.js |
---
esid: sec-exports
es6id: 15.2.3
description: The default export may not be a LexicalDeclaration (let)
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
393 |
parse-err-export-dflt-var.js |
---
esid: sec-exports
es6id: 15.2.3
description: The default export may not be a VariableStatement
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
386 |
parse-err-hoist-lex-fun.js |
---
description: >
Function declarations are interpreted as lexically-scoped in module code
esid: sec-module-semantics-static-semantics-lexicallydeclarednames
info: |
ModuleItem : StatementListItem
1. Return LexicallyDeclaredNames of StatementListItem.
15.2.1.1 Static Semantics: Early Errors
- It is a Syntax Error if any element of the LexicallyDeclaredNames of
ModuleItemList also occurs in the VarDeclaredNames of ModuleItemList.
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
755 |
parse-err-hoist-lex-gen.js |
---
description: >
Generator function declarations are interpreted as lexically-scoped in
module code
esid: sec-module-semantics-static-semantics-lexicallydeclarednames
info: |
ModuleItem : StatementListItem
1. Return LexicallyDeclaredNames of StatementListItem.
15.2.1.1 Static Semantics: Early Errors
- It is a Syntax Error if any element of the LexicallyDeclaredNames of
ModuleItemList also occurs in the VarDeclaredNames of ModuleItemList.
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
793 |
parse-err-invoke-anon-fun-decl.js |
---
description: >
Anonymous function declaration must not be interpreted as an expression
esid: sec-exports
info: |
ExportDeclaration:
export * FromClause
export * as IdentifierName FromClause;
export NamedExports FromClause;
export NamedExports;
export VariableStatement
export Declaration
export default HoistableDeclaration[Default]
export default ClassDeclaration[Default]
export default [lookahead ∉ { function, class }] AssignmentExpression[In];
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
814 |
parse-err-invoke-anon-gen-decl.js |
---
description: >
Anonymous generator function declaration must not be interpreted as an
expression
esid: sec-exports
info: |
ExportDeclaration:
export * FromClause;
export * as IdentifierName FromClause;
export NamedExports FromClause;
export NamedExports;
export VariableStatement
export Declaration
export default HoistableDeclaration[Default]
export default ClassDeclaration[Default]
export default [lookahead ∉ { function, class }] AssignmentExpression[In];
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [generators]
--- |
854 |
parse-err-return.js |
---
esid: sec-modules
es6id: 15.2
description: ReturnStatement may not be used directly within ModuleBody
info: |
Syntax
Module :
ModuleBodyopt
ModuleBody :
ModuleItemList
ModuleItemList :
ModuleItem
ModuleItemList ModuleItem
ModuleItem:
ImportDeclaration
ExportDeclaration
StatementListItem[~Yield, ~Return]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
624 |
parse-err-semi-dflt-expr.js |
---
description: >
"export default AssignmentExpression" declarations require a trailing
semicolon or LineTerminator
esid: sec-exports
info: |
ExportDeclaration:
export * FromClause;
export * as IdentifierName FromClause;
export NamedExports FromClause;
export NamedExports;
export VariableStatement
export Declaration
export default HoistableDeclaration[Default]
export default ClassDeclaration[Default]
export default [lookahead ∉ { function, class }] AssignmentExpression[In];
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
839 |
parse-err-semi-export-star.js |
---
description: >
"export *" declarations require a trailing semicolon or LineTerminator
esid: sec-exports
info: |
ExportDeclaration:
export * FromClause;
export * as IdentifierName FromClause;
export NamedExports FromClause;
export NamedExports;
export VariableStatement
export Declaration
export default HoistableDeclaration[Default]
export default ClassDeclaration[Default]
export default [lookahead ∉ { function, class }] AssignmentExpression[In];
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [export-star-as-namespace-from-module]
--- |
885 |
parse-err-semi-name-space-export.js |
---
description: >
"export NameSpaceExport FromClause" declarations require a trailing semicolon
or LineTerminator
esid: sec-exports
info: |
ExportDeclaration:
export * FromClause;
export * as IdentifierName FromClause;
export NamedExports FromClause;
export NamedExports;
export VariableStatement
export Declaration
export default HoistableDeclaration[Default]
export default ClassDeclaration[Default]
export default [lookahead ∉ { function, class }] AssignmentExpression[In];
negative:
phase: parse
type: SyntaxError
flags: [module]
features: [export-star-as-namespace-from-module]
--- |
924 |
parse-err-semi-named-export-from.js |
---
description: >
"export NamedExports FromClause" declarations require a trailing semicolon
or LineTerminator
esid: sec-exports
info: |
ExportDeclaration:
export * FromClause;
export * as IdentifierName FromClause;
export NamedExports FromClause;
export NamedExports;
export VariableStatement
export Declaration
export default HoistableDeclaration[Default]
export default ClassDeclaration[Default]
export default [lookahead ∉ { function, class }] AssignmentExpression[In];
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
870 |
parse-err-semi-named-export.js |
---
description: >
"export NamedExports" declarations require a trailing semicolon or
LineTerminator
esid: sec-exports
info: |
ExportDeclaration:
export * FromClause;
export * as IdentifierName FromClause;
export NamedExports FromClause;
export NamedExports;
export VariableStatement
export Declaration
export default HoistableDeclaration[Default]
export default ClassDeclaration[Default]
export default [lookahead ∉ { function, class }] AssignmentExpression[In];
negative:
phase: parse
type: SyntaxError
flags: [module]
--- |
813 |
parse-err-syntax-1.js |
---
description: Early SyntaxError resulting from module parsing
esid: sec-parsemodule
negative:
phase: parse
type: SyntaxError
info: |
[...]
2. Parse sourceText using Module as the goal symbol and analyze the parse
result for any Early Error conditions. If the parse was successful and
no early errors were found, let body be the resulting parse tree.
Otherwise, let body be a List of one or more SyntaxError objects
representing the parsing errors and/or early errors.
flags: [module]
--- |
733 |
parse-err-syntax-2.js |
---
description: Early SyntaxError resulting from module parsing
esid: sec-parsemodule
negative:
phase: parse
type: SyntaxError
info: |
[...]
2. Parse sourceText using Module as the goal symbol and analyze the parse
result for any Early Error conditions. If the parse was successful and
no early errors were found, let body be the resulting parse tree.
Otherwise, let body be a List of one or more SyntaxError objects
representing the parsing errors and/or early errors.
flags: [module]
--- |
736 |
parse-err-yield.js |
---
esid: sec-modules
es6id: 15.2
description: YieldExpression may not be used directly within ModuleBody
info: |
Syntax
Module :
ModuleBodyopt
ModuleBody :
ModuleItemList
ModuleItemList :
ModuleItem
ModuleItemList ModuleItem
ModuleItem:
ImportDeclaration
ExportDeclaration
StatementListItem[~Yield, ~Return]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
623 |
parse-export-empty.js |
---
description: A NamedExport does not require an ExportsList.
esid: sec-parsemodule
info: |
ExportDeclaration:
export * FromClause;
export * as IdentifierName FromClause;
export NamedExports FromClause;
export NamedExports;
export VariableStatement
export Declaration
export default HoistableDeclaration[Default]
export default ClassDeclaration[Default]
export default [lookahead ∉ { function, class }] AssignmentExpression[In];
NamedExports:
{ }
{ ExportsList }
{ ExportsList , }
NOTE: This form has no observable side effects.
flags: [module]
--- |
920 |
private-identifiers-not-empty.js |
---
esid: sec-static-semantics-early-errors
description: >
ModuleBody : ModuleItemList
It is a Syntax Error if AllPrivateIdentifiersValid of ModuleItemList with an empty List as an argument is false.
flags: [module]
features: [class-static-fields-private]
negative:
phase: parse
type: SyntaxError
--- |
544 |
privatename-not-valid-earlyerr-module-1.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: Early error when referencing privatename in constructor without being declared in class fields
info: |
Static Semantics: Early Errors
Module : ModuleBody
It is a Syntax Error if AllPrivateNamesValid of ModuleBody with an empty List as an argument is false.
features: [class, class-fields-private]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
682 |
privatename-not-valid-earlyerr-module-2.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: Early error when referencing privatename in function without declaring in class
info: |
Static Semantics: Early Errors
Module : ModuleBody
It is a Syntax Error if AllPrivateNamesValid of ModuleBody with an empty List as an argument is false.
features: [class, class-fields-private]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
657 |
privatename-not-valid-earlyerr-module-3.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: Early error when referencing privatename in field without being declared in class fields
info: |
Static Semantics: Early Errors
Module : ModuleBody
It is a Syntax Error if AllPrivateNamesValid of ModuleBody with an empty List as an argument is false.
features: [class, class-fields-private, class-fields-public]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
677 |
privatename-not-valid-earlyerr-module-4.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: Early error when referencing privatename that has not been declared in class.
info: |
Static Semantics: Early Errors
Static Semantics: Early Errors
Module : ModuleBody
It is a Syntax Error if AllPrivateNamesValid of ModuleBody with an empty List as an argument is false.
features: [class, class-fields-private]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
728 |
privatename-not-valid-earlyerr-module-5.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: Early error when referencing privatename outside of class
info: |
Static Semantics: Early Errors
Module : ModuleBody
It is a Syntax Error if AllPrivateNamesValid of ModuleBody with an empty List as an argument is false.
features: [class, class-fields-private]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
629 |
privatename-not-valid-earlyerr-module-6.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: Early error when referencing privatename outside of class.
info: |
Static Semantics: Early Errors
Module : ModuleBody
It is a Syntax Error if AllPrivateNamesValid of ModuleBody with an empty List as an argument is false.
features: [class, class-fields-private]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
623 |
privatename-not-valid-earlyerr-module-7.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: Early error when referencing privatename on object, outside of class.
info: |
Static Semantics: Early Errors
Module : ModuleBody
It is a Syntax Error if AllPrivateNamesValid of ModuleBody with an empty List as an argument is false.
features: [class-fields-private]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
622 |
privatename-not-valid-earlyerr-module-8.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: Early error when referencing privatename on object, outside of class.
info: |
Static Semantics: Early Errors
Module : ModuleBody
It is a Syntax Error if AllPrivateNamesValid of ModuleBody with an empty List as an argument is false.
features: [class-fields-private]
flags: [module]
negative:
phase: parse
type: SyntaxError
--- |
631 |
privatename-valid-no-earlyerr.js |
---
esid: sec-module-semantics-static-semantics-early-errors
description: Referencing privatename in class within class does not error.
info: |
Static Semantics: Early Errors
Module : ModuleBody
It is a Syntax Error if AllPrivateNamesValid of ModuleBody with an empty List as an argument is false.
Static Semantics: AllPrivateNamesValid
AllPrivateNamesValid is an abstract operation which takes names as an argument.
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
ClassBody:ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2.Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements, passing in the names of the caller. If all pieces return true, then return true. If any returns false, return false.
flags: [module]
features: [class, class-fields-private]
--- |
1588 |
resources |
|
|
shell.js |
---
description: |
Produce a reliable global object
defines: [fnGlobalObject]
--- |
383 |
source-phase-import |
|
|
top-level-await |
|
|
verify-dfs-a_FIXTURE.js |
|
286 |
verify-dfs-b_FIXTURE.js |
|
234 |
verify-dfs.js |
---
description: Dynamic import can't preempt DFS evaluation order
esid: sec-moduleevaluation
info: |
Evaluate ( ) Concrete Method
1. Assert: This call to Evaluate is not happening at the same time as another call to Evaluate within the surrounding agent.
[...]
flags: [module, async]
features: [dynamic-import]
--- |
966 |