Regenerate tests

This commit is contained in:
Leo Balter 2018-10-03 13:39:16 -04:00 committed by Rick Waldron
parent 8b021346a5
commit e8305a7920
51 changed files with 69 additions and 949 deletions

View File

@ -1,40 +0,0 @@
// 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]
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);

View File

@ -1,40 +0,0 @@
// 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]
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);

View File

@ -1,61 +0,0 @@
// 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]
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);

View File

@ -1,50 +0,0 @@
// 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]
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);

View File

@ -1,49 +0,0 @@
// 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]
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);

View File

@ -2,7 +2,7 @@
// - 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)
description: Abrupt completion during module evaluation precludes further evaluation (nested do while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async]

View File

@ -2,7 +2,7 @@
// - 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)
description: Abrupt completion during module evaluation precludes further evaluation (nested do while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async]

View File

@ -2,7 +2,7 @@
// - 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)
description: IndirectExportEntries validation - ambiguous imported bindings (nested do while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async]

View File

@ -2,7 +2,7 @@
// - 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)
description: IndirectExportEntries validation - circular imported bindings (nested do while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async]

View File

@ -2,7 +2,7 @@
// - 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)
description: IndirectExportEntries validation - undefined imported bindings (nested do while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async]

View File

@ -1,38 +0,0 @@
// 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]
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);
};

View File

@ -1,38 +0,0 @@
// 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]
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);
};

View File

@ -1,59 +0,0 @@
// 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]
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);
};

View File

@ -1,48 +0,0 @@
// 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]
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);
};

View File

@ -1,47 +0,0 @@
// 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]
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);
};

View File

@ -40,7 +40,7 @@ async function f() {
assert.sameValue(imported.default(), 1);
assert.sameValue(imported.default, 2);
}).then($DONE, $DONE).catch($DONE);
});
}
f();
f().then($DONE, $DONE).catch($DONE);

View File

@ -48,7 +48,7 @@ async function f() {
assert.sameValue(imported.x, 2);
}).then($DONE, $DONE).catch($DONE);
});
}
f();
f().then($DONE, $DONE).catch($DONE);

View File

@ -27,7 +27,7 @@ async function f() {
assert.sameValue(imported.x, 1);
}).then($DONE, $DONE).catch($DONE);
});
}
f();
f().then($DONE, $DONE).catch($DONE);

View File

@ -35,12 +35,12 @@ info: |
---*/
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);
return await import('./eval-gtbndng-indirect-update-dflt_FIXTURE.js');
}
f();
f().then(imported => {
assert.sameValue(imported.default(), 1);
assert.sameValue(imported.default, 2);
}).then($DONE, $DONE).catch($DONE);

View File

@ -36,19 +36,19 @@ info: |
---*/
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);
return await import('./eval-gtbndng-indirect-update_FIXTURE.js');
}
f();
f().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);

View File

@ -23,11 +23,11 @@ info: |
---*/
async function f() {
return await import('./dynamic-import-module_FIXTURE.js').then(imported => {
assert.sameValue(imported.x, 1);
}).then($DONE, $DONE).catch($DONE);
return await import('./dynamic-import-module_FIXTURE.js');
}
f();
f().then(imported => {
assert.sameValue(imported.x, 1);
}).then($DONE, $DONE).catch($DONE);

View File

@ -31,4 +31,3 @@ async function f() {
}
f();

View File

@ -1,46 +0,0 @@
// 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]
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);

View File

@ -1,54 +0,0 @@
// 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]
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);

View File

@ -1,33 +0,0 @@
// 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]
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);

View File

@ -2,7 +2,7 @@
// - 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)
description: Modifications to default binding that occur after dependency has been evaluated are reflected in local binding (nested do while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async]

View File

@ -2,7 +2,7 @@
// - src/dynamic-import/eval-gtbndng-indirect-update.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)
description: Modifications to named bindings that occur after dependency has been evaluated are reflected in local binding (nested do while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async]

View File

@ -2,7 +2,7 @@
// - src/dynamic-import/returns-promise.case
// - src/dynamic-import/default/nested-do-while.template
/*---
description: Dynamic import() returns a Promise object. (nested do syntax)
description: Dynamic import() returns a Promise object. (nested do while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async]

View File

@ -1,44 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/eval-gtbdng-indirect-update-dflt.case
// - src/dynamic-import/default/nested-labeled-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]
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);
};

View File

@ -1,52 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/eval-gtbndng-indirect-update.case
// - src/dynamic-import/default/nested-labeled-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]
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);
};

View File

@ -1,31 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/returns-promise.case
// - src/dynamic-import/default/nested-labeled-block.template
/*---
description: Dynamic import() returns a Promise object. (nested block)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, async]
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);
};

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/assignment-expr-not-optional.case
// - src/dynamic-import/syntax/invalid/nested-arrow.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested arrow syntax)
@ -25,8 +25,7 @@ info: |
ImportCall :
import()
import( AssignmentExpression[+In, ?Yield] )
---*/
throw "Test262: This statement should not be evaluated.";

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/assignment-expr-not-optional.case
// - src/dynamic-import/syntax/invalid/nested-arrow-assignment-expression.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested arrow syntax)
@ -25,8 +25,7 @@ info: |
ImportCall :
import()
import( AssignmentExpression[+In, ?Yield] )
---*/
throw "Test262: This statement should not be evaluated.";

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/assignment-expr-not-optional.case
// - src/dynamic-import/syntax/invalid/nested-block.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested block syntax)
@ -25,8 +25,7 @@ info: |
ImportCall :
import()
import( AssignmentExpression[+In, ?Yield] )
---*/
throw "Test262: This statement should not be evaluated.";

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/assignment-expr-not-optional.case
// - src/dynamic-import/syntax/invalid/nested-block-labeled.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested block syntax)
@ -25,8 +25,7 @@ info: |
ImportCall :
import()
import( AssignmentExpression[+In, ?Yield] )
---*/
throw "Test262: This statement should not be evaluated.";

View File

@ -1,40 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/syntax/invalid/nested-do.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested do syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, module]
negative:
phase: parse
type: SyntaxError
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]].
ImportCall :
import()
---*/
throw "Test262: This statement should not be evaluated.";
let x = 0;
do {
x++;
import();
} while (!x);
/* The params region intentionally empty */

View File

@ -1,8 +1,8 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/assignment-expr-not-optional.case
// - src/dynamic-import/syntax/invalid/nested-do-while.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested do syntax)
description: It's a SyntaxError if AssignmentExpression is omitted (nested do while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, module]
@ -25,8 +25,7 @@ info: |
ImportCall :
import()
import( AssignmentExpression[+In, ?Yield] )
---*/
throw "Test262: This statement should not be evaluated.";

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/assignment-expr-not-optional.case
// - src/dynamic-import/syntax/invalid/nested-else.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested else syntax)
@ -25,8 +25,7 @@ info: |
ImportCall :
import()
import( AssignmentExpression[+In, ?Yield] )
---*/
throw "Test262: This statement should not be evaluated.";

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/assignment-expr-not-optional.case
// - src/dynamic-import/syntax/invalid/nested-else-braceless.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested else syntax)
@ -25,8 +25,7 @@ info: |
ImportCall :
import()
import( AssignmentExpression[+In, ?Yield] )
---*/
throw "Test262: This statement should not be evaluated.";

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/assignment-expr-not-optional.case
// - src/dynamic-import/syntax/invalid/nested-function.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested function syntax)
@ -25,8 +25,7 @@ info: |
ImportCall :
import()
import( AssignmentExpression[+In, ?Yield] )
---*/
throw "Test262: This statement should not be evaluated.";

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/assignment-expr-not-optional.case
// - src/dynamic-import/syntax/invalid/nested-function-return.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested function syntax)
@ -25,8 +25,7 @@ info: |
ImportCall :
import()
import( AssignmentExpression[+In, ?Yield] )
---*/
throw "Test262: This statement should not be evaluated.";

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/assignment-expr-not-optional.case
// - src/dynamic-import/syntax/invalid/nested-if.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested if syntax)
@ -25,8 +25,7 @@ info: |
ImportCall :
import()
import( AssignmentExpression[+In, ?Yield] )
---*/
throw "Test262: This statement should not be evaluated.";

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/assignment-expr-not-optional.case
// - src/dynamic-import/syntax/invalid/nested-if-braceless.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested if syntax)
@ -25,8 +25,7 @@ info: |
ImportCall :
import()
import( AssignmentExpression[+In, ?Yield] )
---*/
throw "Test262: This statement should not be evaluated.";

View File

@ -1,38 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/syntax/invalid/nested-labeled.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested block syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated, module]
negative:
phase: parse
type: SyntaxError
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]].
ImportCall :
import()
---*/
throw "Test262: This statement should not be evaluated.";
{
import();
};
/* The params region intentionally empty */

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/assignment-expr-not-optional.case
// - src/dynamic-import/syntax/invalid/nested-while.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (nested while syntax)
@ -25,8 +25,7 @@ info: |
ImportCall :
import()
import( AssignmentExpression[+In, ?Yield] )
---*/
throw "Test262: This statement should not be evaluated.";

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-args-early-error.case
// - src/dynamic-import/assignment-expr-not-optional.case
// - src/dynamic-import/syntax/invalid/top-level.template
/*---
description: It's a SyntaxError if AssignmentExpression is omitted (top level syntax)
@ -15,8 +15,7 @@ info: |
ImportCall :
import()
import( AssignmentExpression[+In, ?Yield] )
---*/
throw "Test262: This statement should not be evaluated.";

View File

@ -1,29 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-str-arg.case
// - src/dynamic-import/syntax/valid/nested-do.template
/*---
description: Calling import('') (nested do syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated]
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('');
} while (!x);

View File

@ -2,7 +2,7 @@
// - src/dynamic-import/empty-str-arg.case
// - src/dynamic-import/syntax/valid/nested-do-while.template
/*---
description: Calling import('') (nested do syntax)
description: Calling import('') (nested do while syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated]

View File

@ -1,27 +0,0 @@
// This file was procedurally generated from the following sources:
// - src/dynamic-import/empty-str-arg.case
// - src/dynamic-import/syntax/valid/nested-labeled.template
/*---
description: Calling import('') (nested block syntax)
esid: sec-import-call-runtime-semantics-evaluation
features: [dynamic-import]
flags: [generated]
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('');
};