mirror of
https://github.com/tc39/test262.git
synced 2025-07-29 00:44:32 +02:00
Add syntax tests for import.defer
(#4374)
These tests are all based on the existing dynamic import syntax tests, just updated to use the new syntax. This PR does not contain any manually written tests -- they are all generated.
This commit is contained in:
parent
d4052133d5
commit
573058ed2e
25
src/assignment-target-type/importcall-defer.case
Normal file
25
src/assignment-target-type/importcall-defer.case
Normal file
@ -0,0 +1,25 @@
|
||||
// Copyright (C) 2020 Rick Waldron. All rights reserved.
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
esid: sec-static-semantics-static-semantics-assignmenttargettype
|
||||
desc: >
|
||||
Static Semantics AssignmentTargetType, Return invalid.
|
||||
info: |
|
||||
ImportCall
|
||||
Static Semantics AssignmentTargetType, Return invalid.
|
||||
template: invalid
|
||||
flags: [module]
|
||||
features: [import-defer]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
//- assignmenttarget
|
||||
import.defer()
|
||||
//- operator
|
||||
=
|
||||
//- value
|
||||
1
|
@ -0,0 +1,16 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// Copyright (C) 2018 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
desc: It's a SyntaxError if AssignmentExpression is omitted
|
||||
template: syntax/invalid
|
||||
info: |
|
||||
ImportCall[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
features: [import-defer]
|
||||
---*/
|
||||
//- import
|
||||
import.defer()
|
||||
//- teardown
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,12 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// Copyright (C) 2018 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
desc: Calling import.defer('')
|
||||
template: syntax/valid
|
||||
features: [import-defer]
|
||||
---*/
|
||||
|
||||
//- import
|
||||
import.defer('./empty_FIXTURE.js')
|
18
src/dynamic-import/import-defer-no-new-call-expression.case
Normal file
18
src/dynamic-import/import-defer-no-new-call-expression.case
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
desc: ImportCall is a CallExpression, it can't be preceded by the new keyword
|
||||
template: syntax/invalid
|
||||
info: |
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
features: [import-defer]
|
||||
---*/
|
||||
|
||||
//- import
|
||||
new import.defer('./empty_FIXTURE.js')
|
18
src/dynamic-import/import-defer-no-rest-param.case
Normal file
18
src/dynamic-import/import-defer-no-rest-param.case
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
desc: ImportCall is not extensible - no rest parameter
|
||||
template: syntax/invalid
|
||||
info: |
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
features: [import-defer]
|
||||
---*/
|
||||
|
||||
//- import
|
||||
import.defer(...['./empty_FIXTURE.js'])
|
11
src/dynamic-import/import-defer-script-code-valid.case
Normal file
11
src/dynamic-import/import-defer-script-code-valid.case
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// Copyright (C) 2018 Leo Balter. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
desc: import.defer() can be used in script code
|
||||
template: syntax/valid
|
||||
features: [import-defer]
|
||||
---*/
|
||||
|
||||
//- import
|
||||
import.defer('./empty_FIXTURE.js')
|
@ -0,0 +1,40 @@
|
||||
// Copyright (C) 2025 Igalia, S.L. All rights reserved.
|
||||
// Copyright (C) 2018 Rick Waldron. All rights reserved.
|
||||
// Copyright (C) 2018 the V8 project authors. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
/*---
|
||||
desc: >
|
||||
Abrupt from ToString(specifier) rejects the promise
|
||||
esid: sec-moduleevaluation
|
||||
info: |
|
||||
Import Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
template: catch
|
||||
features: [import-defer]
|
||||
---*/
|
||||
|
||||
//- setup
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
//- import
|
||||
import.defer(obj)
|
||||
//- body
|
||||
assert.sameValue(error, 'custom error');
|
@ -0,0 +1,21 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/assignment-target-type/importcall-defer.case
|
||||
// - src/assignment-target-type/invalid/direct.template
|
||||
/*---
|
||||
description: Static Semantics AssignmentTargetType, Return invalid. (Direct assignment)
|
||||
features: [import-defer]
|
||||
flags: [generated, module]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
info: |
|
||||
Direct assignment
|
||||
|
||||
ImportCall
|
||||
Static Semantics AssignmentTargetType, Return invalid.
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
import.defer() = 1;
|
@ -0,0 +1,24 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/assignment-target-type/importcall-defer.case
|
||||
// - src/assignment-target-type/invalid/parenthesized.template
|
||||
/*---
|
||||
description: Static Semantics AssignmentTargetType, Return invalid. (ParenthesizedExpression)
|
||||
esid: sec-grouping-operator-static-semantics-assignmenttargettype
|
||||
features: [import-defer]
|
||||
flags: [generated, module]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
info: |
|
||||
ParenthesizedExpression: (Expression)
|
||||
|
||||
Return AssignmentTargetType of Expression.
|
||||
|
||||
ImportCall
|
||||
Static Semantics AssignmentTargetType, Return invalid.
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
(import.defer()) = 1;
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-arrow.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested arrow)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
let f = () => {
|
||||
import.defer(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
||||
|
||||
f();
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-async-arrow-fn-await.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested in async arrow function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const f = async () => {
|
||||
await import.defer(obj);
|
||||
}
|
||||
|
||||
f().catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
@ -0,0 +1,55 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-async-arrow-fn-return-await.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested in async arrow function, returned)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const f = async () => await import.defer(obj);
|
||||
|
||||
f().catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-async-function-await.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested in async function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
async function f() {
|
||||
await import.defer(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,58 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-async-function.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested in async function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
async function f() {
|
||||
import.defer(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
||||
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-async-function-return-await.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested in async function, returns awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
async function f() {
|
||||
return await import.defer(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
|
||||
f();
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-async-generator-await.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested in async generator, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import, async-iteration]
|
||||
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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
async function * f() {
|
||||
await import.defer(obj);
|
||||
}
|
||||
|
||||
f().next().catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-async-generator-return-await.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested in async generator, returns awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import, async-iteration]
|
||||
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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
async function * f() {
|
||||
return await import.defer(obj);
|
||||
}
|
||||
|
||||
f().next().catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
@ -0,0 +1,55 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-block.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested block)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
{
|
||||
import.defer(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,55 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-block-labeled.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested block syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
label: {
|
||||
import.defer(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,55 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-do-while.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested do while syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
do {
|
||||
import.defer(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
} while (false);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-else.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested else)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
if (false) {
|
||||
|
||||
} else {
|
||||
import.defer(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-function.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
function f() {
|
||||
import.defer(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
||||
f();
|
@ -0,0 +1,55 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-if.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested if)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
if (true) {
|
||||
import.defer(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/nested-while.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (nested while)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
let x = 0;
|
||||
while (!x) {
|
||||
x++;
|
||||
import.defer(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
||||
};
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-specifier-tostring-abrupt-rejects.case
|
||||
// - src/dynamic-import/catch/top-level.template
|
||||
/*---
|
||||
description: Abrupt from ToString(specifier) rejects the promise (top level)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 Calls
|
||||
|
||||
Runtime Semantics: Evaluation
|
||||
|
||||
ImportCall : import . defer ( |AssignmentExpression| )
|
||||
1. Return ? EvaluateImportCall(|AssignmentExpression|, ~defer~)
|
||||
|
||||
EvaluateImportCall ( specifierExpression, phase )
|
||||
1. Let _referrer_ be GetActiveScriptOrModule().
|
||||
1. If _referrer_ is *null*, set _referrer_ to the current Realm Record.
|
||||
1. Let _specifierRef_ be ? Evaluation of _specifierExpression_.
|
||||
1. Let _specifier_ be ? GetValue(_specifierRef_).
|
||||
1. Let _promiseCapability_ be ! NewPromiseCapability(%Promise%).
|
||||
1. Let _specifierString_ be Completion(ToString(_specifier_)).
|
||||
1. IfAbruptRejectPromise(_specifierString_, _promiseCapability_).
|
||||
...
|
||||
|
||||
---*/
|
||||
const obj = {
|
||||
toString() {
|
||||
throw 'custom error';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
import.defer(obj).catch(error => {
|
||||
|
||||
assert.sameValue(error, 'custom error');
|
||||
|
||||
}).then($DONE, $DONE);
|
@ -0,0 +1,36 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-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)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
let f = () => import.defer();
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,37 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-arrow-assignment-expression.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
let f = () => new import.defer('./empty_FIXTURE.js');
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-arrow-assignment-expression.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
let f = () => import.defer(...['./empty_FIXTURE.js']);
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-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)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
let f = () => {
|
||||
import.defer();
|
||||
};
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-arrow.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
let f = () => {
|
||||
new import.defer('./empty_FIXTURE.js');
|
||||
};
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-arrow.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
let f = () => {
|
||||
import.defer(...['./empty_FIXTURE.js']);
|
||||
};
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-assignment-expr-not-optional.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-arrow-fn-await.template
|
||||
/*---
|
||||
description: It's a SyntaxError if AssignmentExpression is omitted (nested in async arrow function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
(async () => {
|
||||
await import.defer()
|
||||
});
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-arrow-fn-await.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested in async arrow function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
(async () => {
|
||||
await new import.defer('./empty_FIXTURE.js')
|
||||
});
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-arrow-fn-await.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested in async arrow function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
(async () => {
|
||||
await import.defer(...['./empty_FIXTURE.js'])
|
||||
});
|
@ -0,0 +1,36 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-assignment-expr-not-optional.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-arrow-fn-return-await.template
|
||||
/*---
|
||||
description: It's a SyntaxError if AssignmentExpression is omitted (nested in async arrow function, returned)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
(async () => await import.defer())
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,37 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-arrow-fn-return-await.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested in async arrow function, returned)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
(async () => await new import.defer('./empty_FIXTURE.js'))
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-arrow-fn-return-await.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested in async arrow function, returned)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
(async () => await import.defer(...['./empty_FIXTURE.js']))
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-assignment-expr-not-optional.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-function-await.template
|
||||
/*---
|
||||
description: It's a SyntaxError if AssignmentExpression is omitted (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function f() {
|
||||
await import.defer();
|
||||
}
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-function-await.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function f() {
|
||||
await new import.defer('./empty_FIXTURE.js');
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-function-await.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function f() {
|
||||
await import.defer(...['./empty_FIXTURE.js']);
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-assignment-expr-not-optional.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-function.template
|
||||
/*---
|
||||
description: It's a SyntaxError if AssignmentExpression is omitted (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function f() {
|
||||
import.defer();
|
||||
}
|
||||
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-function.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function f() {
|
||||
new import.defer('./empty_FIXTURE.js');
|
||||
}
|
||||
|
@ -0,0 +1,41 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-function.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function f() {
|
||||
import.defer(...['./empty_FIXTURE.js']);
|
||||
}
|
||||
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-assignment-expr-not-optional.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-function-return-await.template
|
||||
/*---
|
||||
description: It's a SyntaxError if AssignmentExpression is omitted (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function f() {
|
||||
return await import.defer();
|
||||
}
|
||||
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-function-return-await.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function f() {
|
||||
return await new import.defer('./empty_FIXTURE.js');
|
||||
}
|
||||
|
@ -0,0 +1,41 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-function-return-await.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function f() {
|
||||
return await import.defer(...['./empty_FIXTURE.js']);
|
||||
}
|
||||
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-assignment-expr-not-optional.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-generator-await.template
|
||||
/*---
|
||||
description: It's a SyntaxError if AssignmentExpression is omitted (nested in async generator, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import, async-iteration]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function * f() {
|
||||
await import.defer()
|
||||
}
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-generator-await.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested in async generator, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import, async-iteration]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function * f() {
|
||||
await new import.defer('./empty_FIXTURE.js')
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-generator-await.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested in async generator, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import, async-iteration]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
async function * f() {
|
||||
await import.defer(...['./empty_FIXTURE.js'])
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-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)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
{
|
||||
import.defer();
|
||||
};
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-block.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested block syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
{
|
||||
new import.defer('./empty_FIXTURE.js');
|
||||
};
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-block.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested block syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
{
|
||||
import.defer(...['./empty_FIXTURE.js']);
|
||||
};
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-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)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
label: {
|
||||
import.defer();
|
||||
};
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-block-labeled.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested block syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
label: {
|
||||
new import.defer('./empty_FIXTURE.js');
|
||||
};
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-block-labeled.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested block syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
label: {
|
||||
import.defer(...['./empty_FIXTURE.js']);
|
||||
};
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-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 while syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
do {
|
||||
import.defer();
|
||||
} while (false);
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-do-while.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested do while syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
do {
|
||||
new import.defer('./empty_FIXTURE.js');
|
||||
} while (false);
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-do-while.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested do while syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
do {
|
||||
import.defer(...['./empty_FIXTURE.js']);
|
||||
} while (false);
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-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)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
if (false) {
|
||||
|
||||
} else import.defer();
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-else-braceless.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested else syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
if (false) {
|
||||
|
||||
} else new import.defer('./empty_FIXTURE.js');
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-else-braceless.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested else syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
if (false) {
|
||||
|
||||
} else import.defer(...['./empty_FIXTURE.js']);
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-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)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
if (false) {
|
||||
|
||||
} else {
|
||||
import.defer();
|
||||
}
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,41 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-else.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested else syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
if (false) {
|
||||
|
||||
} else {
|
||||
new import.defer('./empty_FIXTURE.js');
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-else.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested else syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
if (false) {
|
||||
|
||||
} else {
|
||||
import.defer(...['./empty_FIXTURE.js']);
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-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)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
function fn() {
|
||||
import.defer();
|
||||
}
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-function.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested function syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
function fn() {
|
||||
new import.defer('./empty_FIXTURE.js');
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-function.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested function syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
function fn() {
|
||||
import.defer(...['./empty_FIXTURE.js']);
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-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)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
function fn() {
|
||||
return import.defer();
|
||||
}
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-function-return.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested function syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
function fn() {
|
||||
return new import.defer('./empty_FIXTURE.js');
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-function-return.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested function syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
function fn() {
|
||||
return import.defer(...['./empty_FIXTURE.js']);
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-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)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
if (true) import.defer();
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,37 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-if-braceless.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested if syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
if (true) new import.defer('./empty_FIXTURE.js');
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-if-braceless.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested if syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
if (true) import.defer(...['./empty_FIXTURE.js']);
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-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)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
if (true) {
|
||||
import.defer();
|
||||
}
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-if.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested if syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
if (true) {
|
||||
new import.defer('./empty_FIXTURE.js');
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-if.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested if syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
if (true) {
|
||||
import.defer(...['./empty_FIXTURE.js']);
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-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)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
let x = 0;
|
||||
while (!x) {
|
||||
x++;
|
||||
import.defer();
|
||||
};
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,41 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-while.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested while syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
let x = 0;
|
||||
while (!x) {
|
||||
x++;
|
||||
new import.defer('./empty_FIXTURE.js');
|
||||
};
|
@ -0,0 +1,42 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-while.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested while syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
let x = 0;
|
||||
while (!x) {
|
||||
x++;
|
||||
import.defer(...['./empty_FIXTURE.js']);
|
||||
};
|
@ -0,0 +1,36 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-assignment-expr-not-optional.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-with-expression.template
|
||||
/*---
|
||||
description: It's a SyntaxError if AssignmentExpression is omitted (nested with syntax in the expression position)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated, noStrict]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
with (import.defer()) {}
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,37 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-with-expression.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested with syntax in the expression position)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated, noStrict]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
with (new import.defer('./empty_FIXTURE.js')) {}
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-with-expression.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested with syntax in the expression position)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated, noStrict]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
with (import.defer(...['./empty_FIXTURE.js'])) {}
|
@ -0,0 +1,38 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-assignment-expr-not-optional.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-with.template
|
||||
/*---
|
||||
description: It's a SyntaxError if AssignmentExpression is omitted (nested with syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated, noStrict]
|
||||
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[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
with ({}) {
|
||||
import.defer();
|
||||
}
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,39 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-with.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (nested with syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated, noStrict]
|
||||
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]].
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
with ({}) {
|
||||
new import.defer('./empty_FIXTURE.js');
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-with.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (nested with syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated, noStrict]
|
||||
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 . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
with ({}) {
|
||||
import.defer(...['./empty_FIXTURE.js']);
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-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)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
|
||||
ImportCall[Yield, Await] :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
import.defer();
|
||||
|
||||
/* The params region intentionally empty */
|
@ -0,0 +1,27 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/top-level.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceded by the new keyword (top level syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield, ?Await] )
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
new import.defer('./empty_FIXTURE.js');
|
@ -0,0 +1,28 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-no-rest-param.case
|
||||
// - src/dynamic-import/syntax/invalid/top-level.template
|
||||
/*---
|
||||
description: ImportCall is not extensible - no rest parameter (top level syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, dynamic-import]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
|
||||
ImportCall :
|
||||
import . defer ( AssignmentExpression[+In, ?Yield] )
|
||||
|
||||
This production doesn't allow the following production from ArgumentsList:
|
||||
|
||||
... AssignmentExpression
|
||||
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
import.defer(...['./empty_FIXTURE.js']);
|
@ -0,0 +1,25 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-empty-str-is-valid-assign-expr.case
|
||||
// - src/dynamic-import/syntax/valid/nested-arrow-assignment-expression.template
|
||||
/*---
|
||||
description: Calling import.defer('') (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 f = () => import.defer('./empty_FIXTURE.js');
|
@ -0,0 +1,25 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-script-code-valid.case
|
||||
// - src/dynamic-import/syntax/valid/nested-arrow-assignment-expression.template
|
||||
/*---
|
||||
description: import.defer() can be used in script code (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 f = () => import.defer('./empty_FIXTURE.js');
|
@ -0,0 +1,27 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-empty-str-is-valid-assign-expr.case
|
||||
// - src/dynamic-import/syntax/valid/nested-arrow.template
|
||||
/*---
|
||||
description: Calling import.defer('') (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 f = () => {
|
||||
import.defer('./empty_FIXTURE.js');
|
||||
};
|
@ -0,0 +1,27 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-script-code-valid.case
|
||||
// - src/dynamic-import/syntax/valid/nested-arrow.template
|
||||
/*---
|
||||
description: import.defer() can be used in script code (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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 f = () => {
|
||||
import.defer('./empty_FIXTURE.js');
|
||||
};
|
@ -0,0 +1,27 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-empty-str-is-valid-assign-expr.case
|
||||
// - src/dynamic-import/syntax/valid/nested-async-arrow-fn-await.template
|
||||
/*---
|
||||
description: Calling import.defer('') (nested in async arrow function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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]].
|
||||
|
||||
---*/
|
||||
|
||||
(async () => {
|
||||
await import.defer('./empty_FIXTURE.js')
|
||||
});
|
@ -0,0 +1,27 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-script-code-valid.case
|
||||
// - src/dynamic-import/syntax/valid/nested-async-arrow-fn-await.template
|
||||
/*---
|
||||
description: import.defer() can be used in script code (nested in async arrow function)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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]].
|
||||
|
||||
---*/
|
||||
|
||||
(async () => {
|
||||
await import.defer('./empty_FIXTURE.js')
|
||||
});
|
@ -0,0 +1,25 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-empty-str-is-valid-assign-expr.case
|
||||
// - src/dynamic-import/syntax/valid/nested-async-arrow-fn-return-await.template
|
||||
/*---
|
||||
description: Calling import.defer('') (nested in async arrow function, returned)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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]].
|
||||
|
||||
---*/
|
||||
|
||||
(async () => await import.defer('./empty_FIXTURE.js'));
|
@ -0,0 +1,25 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-script-code-valid.case
|
||||
// - src/dynamic-import/syntax/valid/nested-async-arrow-fn-return-await.template
|
||||
/*---
|
||||
description: import.defer() can be used in script code (nested in async arrow function, returned)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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]].
|
||||
|
||||
---*/
|
||||
|
||||
(async () => await import.defer('./empty_FIXTURE.js'));
|
@ -0,0 +1,27 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-empty-str-is-valid-assign-expr.case
|
||||
// - src/dynamic-import/syntax/valid/nested-async-function-await.template
|
||||
/*---
|
||||
description: Calling import.defer('') (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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]].
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
await import.defer('./empty_FIXTURE.js');
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-script-code-valid.case
|
||||
// - src/dynamic-import/syntax/valid/nested-async-function-await.template
|
||||
/*---
|
||||
description: import.defer() can be used in script code (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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]].
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
await import.defer('./empty_FIXTURE.js');
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-empty-str-is-valid-assign-expr.case
|
||||
// - src/dynamic-import/syntax/valid/nested-async-function.template
|
||||
/*---
|
||||
description: Calling import.defer('') (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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]].
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
import.defer('./empty_FIXTURE.js');
|
||||
}
|
||||
|
@ -0,0 +1,28 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/import-defer-script-code-valid.case
|
||||
// - src/dynamic-import/syntax/valid/nested-async-function.template
|
||||
/*---
|
||||
description: import.defer() can be used in script code (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [import-defer, 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]].
|
||||
|
||||
---*/
|
||||
|
||||
async function f() {
|
||||
import.defer('./empty_FIXTURE.js');
|
||||
}
|
||||
|
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