diff --git a/src/dynamic-import/catch/nested-with.template b/src/dynamic-import/catch/nested-with.template deleted file mode 100644 index e88b46e674..0000000000 --- a/src/dynamic-import/catch/nested-with.template +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2018 Leo Balter. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -path: language/module-code/dynamic-import/catch/nested-with-import-catch- -name: nested with -esid: sec-import-call-runtime-semantics-evaluation -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]]. -features: [dynamic-import] -flags: [async, noStrict] ----*/ - -with ({}) { - /*{ import }*/.catch(error => { - - /*{ body }*/ - - }).then($DONE, $DONE); -} - \ No newline at end of file diff --git a/src/dynamic-import/default/nested-with.template b/src/dynamic-import/default/nested-with.template deleted file mode 100644 index 0520321497..0000000000 --- a/src/dynamic-import/default/nested-with.template +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (C) 2018 Leo Balter. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. -/*--- -path: language/module-code/dynamic-import/usage/nested-with-import-then- -name: nested with -esid: sec-import-call-runtime-semantics-evaluation -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]]. -features: [dynamic-import] -flags: [async, noStrict] ----*/ - -with ({}) { - /*{ import }*/.then(imported => { - - /*{ body }*/ - - }).then($DONE, $DONE).catch($DONE); -} diff --git a/test/language/module-code/dynamic-import/catch/nested-with-import-catch-eval-rqstd-abrupt-typeerror.js b/test/language/module-code/dynamic-import/catch/nested-with-import-catch-eval-rqstd-abrupt-typeerror.js deleted file mode 100644 index cf8b175614..0000000000 --- a/test/language/module-code/dynamic-import/catch/nested-with-import-catch-eval-rqstd-abrupt-typeerror.js +++ /dev/null @@ -1,39 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dynamic-import/eval-rqstd-abrupt-typeerror.case -// - src/dynamic-import/catch/nested-with.template -/*--- -description: Abrupt completion during module evaluation precludes further evaluation (nested with) -esid: sec-import-call-runtime-semantics-evaluation -features: [dynamic-import] -flags: [generated, async, noStrict] -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(). - ----*/ - -with ({}) { - import('./eval-rqstd-abrupt-err-type_FIXTURE.js').catch(error => { - - assert.sameValue(error.name, 'TypeError'); - - }).then($DONE, $DONE); -} - \ No newline at end of file diff --git a/test/language/module-code/dynamic-import/catch/nested-with-import-catch-eval-rqstd-abrupt-urierror.js b/test/language/module-code/dynamic-import/catch/nested-with-import-catch-eval-rqstd-abrupt-urierror.js deleted file mode 100644 index 7544674b0b..0000000000 --- a/test/language/module-code/dynamic-import/catch/nested-with-import-catch-eval-rqstd-abrupt-urierror.js +++ /dev/null @@ -1,39 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dynamic-import/eval-rqstd-abrupt-urierror.case -// - src/dynamic-import/catch/nested-with.template -/*--- -description: Abrupt completion during module evaluation precludes further evaluation (nested with) -esid: sec-import-call-runtime-semantics-evaluation -features: [dynamic-import] -flags: [generated, async, noStrict] -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(). - ----*/ - -with ({}) { - import('./eval-rqstd-abrupt-err-uri_FIXTURE.js').catch(error => { - - assert.sameValue(error.name, 'URIError'); - - }).then($DONE, $DONE); -} - \ No newline at end of file diff --git a/test/language/module-code/dynamic-import/catch/nested-with-import-catch-file-does-not-exist.js b/test/language/module-code/dynamic-import/catch/nested-with-import-catch-file-does-not-exist.js deleted file mode 100644 index 082c42f568..0000000000 --- a/test/language/module-code/dynamic-import/catch/nested-with-import-catch-file-does-not-exist.js +++ /dev/null @@ -1,36 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dynamic-import/file-does-not-exist.case -// - src/dynamic-import/catch/nested-with.template -/*--- -description: Non existent file can't resolve to a Script or Module Record (nested with) -esid: sec-import-call-runtime-semantics-evaluation -features: [dynamic-import] -flags: [generated, async, noStrict] -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]]. - - - If a Module Record corresponding to the pair referencingModulereferencingScriptOrModule, - specifier does not exist or cannot be created, an exception must be thrown. - ----*/ - -with ({}) { - import('./THIS_FILE_DOES_NOT_EXIST.js').catch(error => { - - assert.notSameValue(typeof error, 'undefined'); - - }).then($DONE, $DONE); -} - \ No newline at end of file diff --git a/test/language/module-code/dynamic-import/catch/nested-with-import-catch-instn-iee-err-ambiguous-import.js b/test/language/module-code/dynamic-import/catch/nested-with-import-catch-instn-iee-err-ambiguous-import.js deleted file mode 100644 index 028e8d5104..0000000000 --- a/test/language/module-code/dynamic-import/catch/nested-with-import-catch-instn-iee-err-ambiguous-import.js +++ /dev/null @@ -1,60 +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-with.template -/*--- -description: IndirectExportEntries validation - ambiguous imported bindings (nested with) -esid: sec-import-call-runtime-semantics-evaluation -features: [dynamic-import] -flags: [generated, async, noStrict] -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". - ----*/ - -with ({}) { - import('./instn-iee-err-ambiguous-export_FIXTURE.js').catch(error => { - - assert.sameValue(error.name, 'SyntaxError'); - - }).then($DONE, $DONE); -} - \ No newline at end of file diff --git a/test/language/module-code/dynamic-import/catch/nested-with-import-catch-instn-iee-err-circular.js b/test/language/module-code/dynamic-import/catch/nested-with-import-catch-instn-iee-err-circular.js deleted file mode 100644 index 07dd99c501..0000000000 --- a/test/language/module-code/dynamic-import/catch/nested-with-import-catch-instn-iee-err-circular.js +++ /dev/null @@ -1,49 +0,0 @@ -// This file was procedurally generated from the following sources: -// - src/dynamic-import/instn-iee-err-circular.case -// - src/dynamic-import/catch/nested-with.template -/*--- -description: IndirectExportEntries validation - circular imported bindings (nested with) -esid: sec-import-call-runtime-semantics-evaluation -features: [dynamic-import] -flags: [generated, async, noStrict] -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. - ----*/ - -with ({}) { - import('./instn-iee-err-circular-1_FIXTURE.js').catch(error => { - - assert.sameValue(error.name, 'SyntaxError'); - - }).then($DONE, $DONE); -} - \ No newline at end of file