mirror of https://github.com/tc39/test262.git
Generate tests
This commit is contained in:
parent
65df2bd23c
commit
51a0bad7d4
|
@ -0,0 +1,36 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-arrow-assignment-expression.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
let f = () => new import('');
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-arrow.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
let f = () => {
|
||||
new import('');
|
||||
};
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/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 preceeded by the new keyword (nested in async arrow function, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
(async () => {
|
||||
await new import('')
|
||||
});
|
|
@ -0,0 +1,36 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/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 preceeded by the new keyword (nested in async arrow function, returned)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
(async () => await new import(''))
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-function-await.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
async function f() {
|
||||
await new import('');
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-function.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
async function f() {
|
||||
new import('');
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/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 preceeded by the new keyword (nested arrow syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
async function f() {
|
||||
return await new import('');
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-async-generator-await.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested in async generator, awaited)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
async function * f() {
|
||||
await new import('')
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-block-labeled.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested block syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
label: {
|
||||
new import('');
|
||||
};
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-block.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested block syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
{
|
||||
new import('');
|
||||
};
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-do-while.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested do while syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
do {
|
||||
new import('');
|
||||
} while (false);
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-else-braceless.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested else syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
if (false) {
|
||||
|
||||
} else new import('');
|
|
@ -0,0 +1,40 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-else.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested else syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
if (false) {
|
||||
|
||||
} else {
|
||||
new import('');
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-function.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested function syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
function fn() {
|
||||
new import('');
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-function-return.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested function syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
function fn() {
|
||||
return new import('');
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-if-braceless.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested if syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
if (true) new import('');
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-if.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested if syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
if (true) {
|
||||
new import('');
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-while.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested while syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
let x = 0;
|
||||
while (!x) {
|
||||
x++;
|
||||
new import('');
|
||||
};
|
|
@ -0,0 +1,38 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/nested-with.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (nested with syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [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( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
with ({}) {
|
||||
new import('');
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
// This file was procedurally generated from the following sources:
|
||||
// - src/dynamic-import/no-new-call-expression.case
|
||||
// - src/dynamic-import/syntax/invalid/top-level.template
|
||||
/*---
|
||||
description: ImportCall is a CallExpression, it can't be preceeded by the new keyword (top level syntax)
|
||||
esid: sec-import-call-runtime-semantics-evaluation
|
||||
features: [dynamic-import]
|
||||
flags: [generated]
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
info: |
|
||||
ImportCall :
|
||||
import( AssignmentExpression )
|
||||
|
||||
|
||||
CallExpression:
|
||||
ImportCall
|
||||
|
||||
ImportCall :
|
||||
import( AssignmentExpression[+In, ?Yield] )
|
||||
---*/
|
||||
|
||||
throw "Test262: This statement should not be evaluated.";
|
||||
|
||||
new import('');
|
Loading…
Reference in New Issue