mirror of
https://github.com/tc39/test262.git
synced 2025-07-21 21:14:45 +02:00
Generate tests
This commit is contained in:
parent
c77078809c
commit
a3eef3f39f
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/nested-arrow.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
let f = () => {
|
||||
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
||||
f();
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/nested-arrow.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
let f = () => {
|
||||
import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
||||
f();
|
@ -0,0 +1,61 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/nested-arrow.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
let f = () => {
|
||||
import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
||||
f();
|
@ -0,0 +1,50 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/nested-arrow.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
let f = () => {
|
||||
import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
||||
f();
|
@ -0,0 +1,49 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/nested-arrow.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
let f = () => {
|
||||
import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
||||
f();
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/nested-async-function-await.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested in async function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
await import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/nested-async-function-await.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested in async function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
await import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,61 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/nested-async-function-await.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (nested in async function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
await import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,50 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/nested-async-function-await.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (nested in async function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
await import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,49 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/nested-async-function-await.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (nested in async function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
await import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,41 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/nested-async-function.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested in async function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,41 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/nested-async-function.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested in async function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,62 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/nested-async-function.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (nested in async function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,51 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/nested-async-function.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (nested in async function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,50 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/nested-async-function.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (nested in async function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/nested-async-function-return-await.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested in async function, returns awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
return await import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/nested-async-function-return-await.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested in async function, returns awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
return await import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,61 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/nested-async-function-return-await.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (nested in async function, returns awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
return await import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,50 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/nested-async-function-return-await.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (nested in async function, returns awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
return await import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,49 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/nested-async-function-return-await.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (nested in async function, returns awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
return await import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/nested-block.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/nested-block.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,59 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/nested-block.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (nested block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,48 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/nested-block.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (nested block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,47 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/nested-block.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (nested block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/nested-block-labeled.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested block syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
label: {
|
||||
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/nested-block-labeled.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested block syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
label: {
|
||||
import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,59 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/nested-block-labeled.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (nested block syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
label: {
|
||||
import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,48 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/nested-block-labeled.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (nested block syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
label: {
|
||||
import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,47 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/nested-block-labeled.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (nested block syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
label: {
|
||||
import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/nested-do.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested do)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
do {
|
||||
x++;
|
||||
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
} while (!x);
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/nested-do.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested do)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
do {
|
||||
x++;
|
||||
import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
} while (!x);
|
@ -0,0 +1,61 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/nested-do.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (nested do)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
do {
|
||||
x++;
|
||||
import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
} while (!x);
|
@ -0,0 +1,50 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/nested-do.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (nested do)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
do {
|
||||
x++;
|
||||
import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
} while (!x);
|
@ -0,0 +1,49 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/nested-do.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (nested do)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
do {
|
||||
x++;
|
||||
import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
} while (!x);
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/nested-do-while.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested do syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
do {
|
||||
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
} while (false);
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/nested-do-while.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested do syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
do {
|
||||
import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
} while (false);
|
@ -0,0 +1,59 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/nested-do-while.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (nested do syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
do {
|
||||
import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
} while (false);
|
@ -0,0 +1,48 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/nested-do-while.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (nested do syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
do {
|
||||
import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
} while (false);
|
@ -0,0 +1,47 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/nested-do-while.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (nested do syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
do {
|
||||
import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
} while (false);
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/nested-else.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested else)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
if (false) {
|
||||
|
||||
} else {
|
||||
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/nested-else.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested else)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
if (false) {
|
||||
|
||||
} else {
|
||||
import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/nested-else.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (nested else)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
if (false) {
|
||||
|
||||
} else {
|
||||
import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/nested-else.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (nested else)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
if (false) {
|
||||
|
||||
} else {
|
||||
import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/nested-else.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (nested else)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
if (false) {
|
||||
|
||||
} else {
|
||||
import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/nested-function.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
function f() {
|
||||
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
f();
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/nested-function.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
function f() {
|
||||
import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
f();
|
@ -0,0 +1,60 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/nested-function.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (nested function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
function f() {
|
||||
import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
f();
|
@ -0,0 +1,49 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/nested-function.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (nested function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
function f() {
|
||||
import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
f();
|
@ -0,0 +1,48 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/nested-function.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (nested function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
function f() {
|
||||
import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
f();
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/nested-if.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested if)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
if (true) {
|
||||
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/nested-if.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested if)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
if (true) {
|
||||
import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/nested-if.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (nested if)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
if (true) {
|
||||
import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/nested-if.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (nested if)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
if (true) {
|
||||
import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/nested-if.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (nested if)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
if (true) {
|
||||
import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/nested-labeled-block.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested labeled block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/nested-labeled-block.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested labeled block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,59 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/nested-labeled-block.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (nested labeled block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,48 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/nested-labeled-block.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (nested labeled block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,47 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/nested-labeled-block.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (nested labeled block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/nested-while.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested while)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
while (!x) {
|
||||
x++;
|
||||
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/nested-while.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (nested while)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
while (!x) {
|
||||
x++;
|
||||
import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,61 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/nested-while.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (nested while)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
while (!x) {
|
||||
x++;
|
||||
import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,50 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/nested-while.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (nested while)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
while (!x) {
|
||||
x++;
|
||||
import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,49 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/nested-while.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (nested while)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
while (!x) {
|
||||
x++;
|
||||
import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,36 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case
|
||||
// - src/dynamic-import/catch/top-level.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (top level)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'TypeError');
|
||||
|
||||
}).then($DONE, $DONE);
|
@ -0,0 +1,36 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-rqstd-abrupt-urierror.case
|
||||
// - src/dynamic-import/catch/top-level.template
|
||||
/*---
|
||||
description: Abrupt completion during module evaluation precludes further evaluation (top level)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
6. For each String required that is an element of
|
||||
module.[[RequestedModules]] do,
|
||||
a. Let requiredModule be ? HostResolveImportedModule(module, required).
|
||||
b. Perform ? requiredModule.ModuleEvaluation().
|
||||
|
||||
---*/
|
||||
|
||||
import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'URIError');
|
||||
|
||||
}).then($DONE, $DONE);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-ambiguous-import.case
|
||||
// - src/dynamic-import/catch/top-level.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - ambiguous imported bindings (top level)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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".
|
||||
|
||||
---*/
|
||||
|
||||
import('./instn-iee-err-ambiguous-export.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
@ -0,0 +1,46 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-circular.case
|
||||
// - src/dynamic-import/catch/top-level.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - circular imported bindings (top level)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
@ -0,0 +1,45 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/instn-iee-err-not-found.case
|
||||
// - src/dynamic-import/catch/top-level.template
|
||||
/*---
|
||||
description: IndirectExportEntries validation - undefined imported bindings (top level)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
[...]
|
||||
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.
|
||||
|
||||
---*/
|
||||
|
||||
import('./instn-iee-err-not-found-empty_FIXTURE.js').catch(error => {
|
||||
|
||||
assert.sameValue(error.name, 'SyntaxError');
|
||||
|
||||
}).then($DONE, $DONE);
|
@ -0,0 +1,52 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-as.case
|
||||
// - src/dynamic-import/default/nested-arrow-assignment-expression.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
let f = () => import('./eval-gtbndng-indirect-update-as_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an imported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
});
|
||||
|
||||
|
||||
f().then($DONE, $DONE).catch($DONE);
|
@ -0,0 +1,45 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-dflt.case
|
||||
// - src/dynamic-import/default/nested-arrow-assignment-expression.template
|
||||
/*---
|
||||
description: Modifications to default binding that occur after dependency has been evaluated are reflected in local binding (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
let f = () => import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.default(), 1);
|
||||
assert.sameValue(imported.default, 2);
|
||||
|
||||
});
|
||||
|
||||
|
||||
f().then($DONE, $DONE).catch($DONE);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbndng-indirect-update.case
|
||||
// - src/dynamic-import/default/nested-arrow-assignment-expression.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
let f = () => import('./eval-gtbndng-indirect-update_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an exported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
f().then($DONE, $DONE).catch($DONE);
|
@ -0,0 +1,32 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/returns-promise.case
|
||||
// - src/dynamic-import/default/nested-arrow-assignment-expression.template
|
||||
/*---
|
||||
description: Dynamic import() returns a Promise object. (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
---*/
|
||||
|
||||
let f = () => import('./dynamic-import-module_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
});
|
||||
|
||||
|
||||
f().then($DONE, $DONE).catch($DONE);
|
@ -0,0 +1,54 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-as.case
|
||||
// - src/dynamic-import/default/nested-arrow.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
let f = () => {
|
||||
return import('./eval-gtbndng-indirect-update-as_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an imported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
};
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,47 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-dflt.case
|
||||
// - src/dynamic-import/default/nested-arrow.template
|
||||
/*---
|
||||
description: Modifications to default binding that occur after dependency has been evaluated are reflected in local binding (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
let f = () => {
|
||||
return import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.default(), 1);
|
||||
assert.sameValue(imported.default, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
};
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,55 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbndng-indirect-update.case
|
||||
// - src/dynamic-import/default/nested-arrow.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
let f = () => {
|
||||
return import('./eval-gtbndng-indirect-update_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an exported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
};
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,34 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/returns-promise.case
|
||||
// - src/dynamic-import/default/nested-arrow.template
|
||||
/*---
|
||||
description: Dynamic import() returns a Promise object. (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
---*/
|
||||
|
||||
let f = () => {
|
||||
return import('./dynamic-import-module_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
};
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-as.case
|
||||
// - src/dynamic-import/default/nested-async-function-await.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested in async function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
await import('./eval-gtbndng-indirect-update-as_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an imported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,46 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-dflt.case
|
||||
// - src/dynamic-import/default/nested-async-function-await.template
|
||||
/*---
|
||||
description: Modifications to default binding that occur after dependency has been evaluated are reflected in local binding (nested in async function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
await import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.default(), 1);
|
||||
assert.sameValue(imported.default, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,54 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbndng-indirect-update.case
|
||||
// - src/dynamic-import/default/nested-async-function-await.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested in async function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
await import('./eval-gtbndng-indirect-update_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an exported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,33 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/returns-promise.case
|
||||
// - src/dynamic-import/default/nested-async-function-await.template
|
||||
/*---
|
||||
description: Dynamic import() returns a Promise object. (nested in async function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
await import('./dynamic-import-module_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,54 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-as.case
|
||||
// - src/dynamic-import/default/nested-async-function.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested in async function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
import('./eval-gtbndng-indirect-update-as_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an imported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
}
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,47 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-dflt.case
|
||||
// - src/dynamic-import/default/nested-async-function.template
|
||||
/*---
|
||||
description: Modifications to default binding that occur after dependency has been evaluated are reflected in local binding (nested in async function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.default(), 1);
|
||||
assert.sameValue(imported.default, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
}
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,55 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbndng-indirect-update.case
|
||||
// - src/dynamic-import/default/nested-async-function.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested in async function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
import('./eval-gtbndng-indirect-update_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an exported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
}
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-as.case
|
||||
// - src/dynamic-import/default/nested-async-function-return-await.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested in async function, returns awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
return await import('./eval-gtbndng-indirect-update-as_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an imported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,46 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-dflt.case
|
||||
// - src/dynamic-import/default/nested-async-function-return-await.template
|
||||
/*---
|
||||
description: Modifications to default binding that occur after dependency has been evaluated are reflected in local binding (nested in async function, returns awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
return await import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.default(), 1);
|
||||
assert.sameValue(imported.default, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,54 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbndng-indirect-update.case
|
||||
// - src/dynamic-import/default/nested-async-function-return-await.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested in async function, returns awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
return await import('./eval-gtbndng-indirect-update_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an exported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,33 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/returns-promise.case
|
||||
// - src/dynamic-import/default/nested-async-function-return-await.template
|
||||
/*---
|
||||
description: Dynamic import() returns a Promise object. (nested in async function, returns awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
return await import('./dynamic-import-module_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,34 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/returns-promise.case
|
||||
// - src/dynamic-import/default/nested-async-function.template
|
||||
/*---
|
||||
description: Dynamic import() returns a Promise object. (nested in async function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
import('./dynamic-import-module_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
}
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,51 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-as.case
|
||||
// - src/dynamic-import/default/nested-block.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./eval-gtbndng-indirect-update-as_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an imported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
};
|
@ -0,0 +1,44 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-dflt.case
|
||||
// - src/dynamic-import/default/nested-block.template
|
||||
/*---
|
||||
description: Modifications to default binding that occur after dependency has been evaluated are reflected in local binding (nested block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.default(), 1);
|
||||
assert.sameValue(imported.default, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
};
|
@ -0,0 +1,52 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbndng-indirect-update.case
|
||||
// - src/dynamic-import/default/nested-block.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./eval-gtbndng-indirect-update_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an exported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
};
|
@ -0,0 +1,31 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/returns-promise.case
|
||||
// - src/dynamic-import/default/nested-block.template
|
||||
/*---
|
||||
description: Dynamic import() returns a Promise object. (nested block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
---*/
|
||||
|
||||
{
|
||||
import('./dynamic-import-module_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
};
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-as.case
|
||||
// - src/dynamic-import/default/nested-do.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested do)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
do {
|
||||
x++;
|
||||
import('./eval-gtbndng-indirect-update-as_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an imported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
} while (!x);
|
@ -0,0 +1,46 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-dflt.case
|
||||
// - src/dynamic-import/default/nested-do.template
|
||||
/*---
|
||||
description: Modifications to default binding that occur after dependency has been evaluated are reflected in local binding (nested do)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
do {
|
||||
x++;
|
||||
import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.default(), 1);
|
||||
assert.sameValue(imported.default, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
} while (!x);
|
@ -0,0 +1,54 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbndng-indirect-update.case
|
||||
// - src/dynamic-import/default/nested-do.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested do)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
do {
|
||||
x++;
|
||||
import('./eval-gtbndng-indirect-update_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an exported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
} while (!x);
|
@ -0,0 +1,33 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/returns-promise.case
|
||||
// - src/dynamic-import/default/nested-do.template
|
||||
/*---
|
||||
description: Dynamic import() returns a Promise object. (nested do)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
---*/
|
||||
|
||||
let x = 0;
|
||||
do {
|
||||
x++;
|
||||
import('./dynamic-import-module_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
} while (!x);
|
@ -0,0 +1,51 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-as.case
|
||||
// - src/dynamic-import/default/nested-do-while.template
|
||||
/*---
|
||||
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested do syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
includes: [fnGlobalObject.js]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
do {
|
||||
import('./eval-gtbndng-indirect-update-as_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.x, 1);
|
||||
|
||||
// This function is exposed on the global scope (instead of as an imported
|
||||
// binding) in order to avoid possible false positives from assuming correct
|
||||
// behavior of the semantics under test.
|
||||
fnGlobalObject().test262update();
|
||||
|
||||
assert.sameValue(imported.x, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
} while (false);
|
@ -0,0 +1,44 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/eval-gtbdng-indirect-update-dflt.case
|
||||
// - src/dynamic-import/default/nested-do-while.template
|
||||
/*---
|
||||
description: Modifications to default binding that occur after dependency has been evaluated are reflected in local binding (nested do syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated, async, module]
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
|
||||
2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
|
||||
3. Let argRef be the result of evaluating AssignmentExpression.
|
||||
4. Let specifier be ? GetValue(argRef).
|
||||
5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
|
||||
6. Let specifierString be ToString(specifier).
|
||||
7. IfAbruptRejectPromise(specifierString, promiseCapability).
|
||||
8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
|
||||
9. Return promiseCapability.[[Promise]].
|
||||
|
||||
|
||||
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).
|
||||
|
||||
---*/
|
||||
|
||||
do {
|
||||
import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js').then(imported => {
|
||||
|
||||
assert.sameValue(imported.default(), 1);
|
||||
assert.sameValue(imported.default, 2);
|
||||
|
||||
}).then($DONE, $DONE).catch($DONE);
|
||||
} while (false);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user