From 290bbfbbfc4377ce44f2dca879df0372a885ab9c Mon Sep 17 00:00:00 2001
From: Leo Balter <leonardo.balter@gmail.com>
Date: Tue, 2 Oct 2018 11:45:24 -0400
Subject: [PATCH] split valid and invalid syntax templates

---
 .../empty-args-early-error.case               |  7 +---
 src/dynamic-import/empty-str-arg.case         |  2 +-
 ...ested-arrow-assignment-expression.template | 31 ++++++++++++++++
 .../syntax/invalid/nested-arrow.template      | 33 +++++++++++++++++
 .../nested-async-function-await.template      | 33 +++++++++++++++++
 ...ested-async-function-return-await.template | 34 ++++++++++++++++++
 .../invalid/nested-async-function.template    | 34 ++++++++++++++++++
 .../invalid/nested-block-labeled.template     | 33 +++++++++++++++++
 .../syntax/invalid/nested-block.template      | 33 +++++++++++++++++
 .../syntax/invalid/nested-do-while.template   | 33 +++++++++++++++++
 .../syntax/invalid/nested-do.template         | 35 +++++++++++++++++++
 .../invalid/nested-else-braceless.template    | 33 +++++++++++++++++
 .../syntax/invalid/nested-else.template       | 35 +++++++++++++++++++
 .../invalid/nested-function-return.template   | 33 +++++++++++++++++
 .../syntax/invalid/nested-function.template   | 33 +++++++++++++++++
 .../invalid/nested-if-braceless.template      | 31 ++++++++++++++++
 .../syntax/invalid/nested-if.template         | 33 +++++++++++++++++
 .../syntax/invalid/nested-labeled.template    | 33 +++++++++++++++++
 .../syntax/invalid/nested-while.template      | 35 +++++++++++++++++++
 .../syntax/invalid/top-level.template         | 21 +++++++++++
 ...ested-arrow-assignment-expression.template |  2 +-
 .../syntax/{ => valid}/nested-arrow.template  |  2 +-
 .../nested-async-function-await.template      |  2 +-
 ...ested-async-function-return-await.template |  2 +-
 .../nested-async-function.template            |  2 +-
 .../{ => valid}/nested-block-labeled.template |  2 +-
 .../syntax/{ => valid}/nested-block.template  |  2 +-
 .../{ => valid}/nested-do-while.template      |  2 +-
 .../syntax/{ => valid}/nested-do.template     |  2 +-
 .../nested-else-braceless.template            |  2 +-
 .../syntax/{ => valid}/nested-else.template   |  2 +-
 .../nested-function-return.template           |  2 +-
 .../{ => valid}/nested-function.template      |  2 +-
 .../{ => valid}/nested-if-braceless.template  |  2 +-
 .../syntax/{ => valid}/nested-if.template     |  2 +-
 .../{ => valid}/nested-labeled.template       |  2 +-
 .../syntax/{ => valid}/nested-while.template  |  2 +-
 .../syntax/{ => valid}/top-level.template     |  2 +-
 38 files changed, 606 insertions(+), 25 deletions(-)
 create mode 100644 src/dynamic-import/syntax/invalid/nested-arrow-assignment-expression.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-arrow.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-async-function-await.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-async-function-return-await.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-async-function.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-block-labeled.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-block.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-do-while.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-do.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-else-braceless.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-else.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-function-return.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-function.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-if-braceless.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-if.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-labeled.template
 create mode 100644 src/dynamic-import/syntax/invalid/nested-while.template
 create mode 100644 src/dynamic-import/syntax/invalid/top-level.template
 rename src/dynamic-import/syntax/{ => valid}/nested-arrow-assignment-expression.template (91%)
 rename src/dynamic-import/syntax/{ => valid}/nested-arrow.template (93%)
 rename src/dynamic-import/syntax/{ => valid}/nested-async-function-await.template (93%)
 rename src/dynamic-import/syntax/{ => valid}/nested-async-function-return-await.template (93%)
 rename src/dynamic-import/syntax/{ => valid}/nested-async-function.template (93%)
 rename src/dynamic-import/syntax/{ => valid}/nested-block-labeled.template (92%)
 rename src/dynamic-import/syntax/{ => valid}/nested-block.template (93%)
 rename src/dynamic-import/syntax/{ => valid}/nested-do-while.template (93%)
 rename src/dynamic-import/syntax/{ => valid}/nested-do.template (93%)
 rename src/dynamic-import/syntax/{ => valid}/nested-else-braceless.template (92%)
 rename src/dynamic-import/syntax/{ => valid}/nested-else.template (93%)
 rename src/dynamic-import/syntax/{ => valid}/nested-function-return.template (92%)
 rename src/dynamic-import/syntax/{ => valid}/nested-function.template (93%)
 rename src/dynamic-import/syntax/{ => valid}/nested-if-braceless.template (92%)
 rename src/dynamic-import/syntax/{ => valid}/nested-if.template (93%)
 rename src/dynamic-import/syntax/{ => valid}/nested-labeled.template (92%)
 rename src/dynamic-import/syntax/{ => valid}/nested-while.template (93%)
 rename src/dynamic-import/syntax/{ => valid}/top-level.template (86%)

diff --git a/src/dynamic-import/empty-args-early-error.case b/src/dynamic-import/empty-args-early-error.case
index 85a880268d..1d10aed931 100644
--- a/src/dynamic-import/empty-args-early-error.case
+++ b/src/dynamic-import/empty-args-early-error.case
@@ -3,17 +3,12 @@
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
 desc: It's a SyntaxError if AssignmentExpression is omitted
-template: syntax
-negative:
-  phase: parse
-  type: SyntaxError
+template: syntax/invalid
 info: |
   ImportCall :
       import()
 
 ---*/
-//- setup
-throw "Test262: This statement should not be evaluated.";
 //- params
 
 //- teardown
diff --git a/src/dynamic-import/empty-str-arg.case b/src/dynamic-import/empty-str-arg.case
index 9d0ae8fac2..0a83fe4979 100644
--- a/src/dynamic-import/empty-str-arg.case
+++ b/src/dynamic-import/empty-str-arg.case
@@ -3,7 +3,7 @@
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
 desc: Calling import('')
-template: syntax
+template: syntax/valid
 ---*/
 
 //- params
diff --git a/src/dynamic-import/syntax/invalid/nested-arrow-assignment-expression.template b/src/dynamic-import/syntax/invalid/nested-arrow-assignment-expression.template
new file mode 100644
index 0000000000..d7ba06d126
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-arrow-assignment-expression.template
@@ -0,0 +1,31 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-arrow-assignment-expression-
+name: nested arrow syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+let f = () => import(/*{ params }*/);
diff --git a/src/dynamic-import/syntax/invalid/nested-arrow.template b/src/dynamic-import/syntax/invalid/nested-arrow.template
new file mode 100644
index 0000000000..87d81473ac
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-arrow.template
@@ -0,0 +1,33 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-arrow-
+name: nested arrow syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+let f = () => {
+  import(/*{ params }*/);
+};
diff --git a/src/dynamic-import/syntax/invalid/nested-async-function-await.template b/src/dynamic-import/syntax/invalid/nested-async-function-await.template
new file mode 100644
index 0000000000..36cf95be97
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-async-function-await.template
@@ -0,0 +1,33 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-arrow-
+name: nested arrow syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+async function f() {
+  await import(/*{ params }*/);
+}
diff --git a/src/dynamic-import/syntax/invalid/nested-async-function-return-await.template b/src/dynamic-import/syntax/invalid/nested-async-function-return-await.template
new file mode 100644
index 0000000000..6d3c320b6f
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-async-function-return-await.template
@@ -0,0 +1,34 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-arrow-
+name: nested arrow syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+async function f() {
+  return await import(/*{ params }*/);
+}
+
diff --git a/src/dynamic-import/syntax/invalid/nested-async-function.template b/src/dynamic-import/syntax/invalid/nested-async-function.template
new file mode 100644
index 0000000000..30cff1cd0b
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-async-function.template
@@ -0,0 +1,34 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-arrow-
+name: nested arrow syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+async function f() {
+  import(/*{ params }*/);
+}
+
diff --git a/src/dynamic-import/syntax/invalid/nested-block-labeled.template b/src/dynamic-import/syntax/invalid/nested-block-labeled.template
new file mode 100644
index 0000000000..e4f3060026
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-block-labeled.template
@@ -0,0 +1,33 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-block-labeled-
+name: nested block syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+label: {
+  import(/*{ params }*/);
+};
diff --git a/src/dynamic-import/syntax/invalid/nested-block.template b/src/dynamic-import/syntax/invalid/nested-block.template
new file mode 100644
index 0000000000..402289a11a
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-block.template
@@ -0,0 +1,33 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-block-
+name: nested block syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+{
+  import(/*{ params }*/);
+};
diff --git a/src/dynamic-import/syntax/invalid/nested-do-while.template b/src/dynamic-import/syntax/invalid/nested-do-while.template
new file mode 100644
index 0000000000..2e4e386913
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-do-while.template
@@ -0,0 +1,33 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-do-while-
+name: nested do syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+do {
+  import(/*{ params }*/);
+} while (false);
diff --git a/src/dynamic-import/syntax/invalid/nested-do.template b/src/dynamic-import/syntax/invalid/nested-do.template
new file mode 100644
index 0000000000..0b02887b21
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-do.template
@@ -0,0 +1,35 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-do-
+name: nested do syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+let x = 0;
+do {
+  x++;
+  import(/*{ params }*/);
+} while (!x);
diff --git a/src/dynamic-import/syntax/invalid/nested-else-braceless.template b/src/dynamic-import/syntax/invalid/nested-else-braceless.template
new file mode 100644
index 0000000000..71ee8417d3
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-else-braceless.template
@@ -0,0 +1,33 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-else-braceless-
+name: nested else syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+if (false) {
+
+} else import(/*{ params }*/);
diff --git a/src/dynamic-import/syntax/invalid/nested-else.template b/src/dynamic-import/syntax/invalid/nested-else.template
new file mode 100644
index 0000000000..09f8144185
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-else.template
@@ -0,0 +1,35 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-else-
+name: nested else syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+if (false) {
+
+} else {
+  import(/*{ params }*/);
+}
diff --git a/src/dynamic-import/syntax/invalid/nested-function-return.template b/src/dynamic-import/syntax/invalid/nested-function-return.template
new file mode 100644
index 0000000000..855b080e11
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-function-return.template
@@ -0,0 +1,33 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-function-return-
+name: nested function syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+function fn() {
+  return import(/*{ params }*/);
+}
diff --git a/src/dynamic-import/syntax/invalid/nested-function.template b/src/dynamic-import/syntax/invalid/nested-function.template
new file mode 100644
index 0000000000..595ef5f31c
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-function.template
@@ -0,0 +1,33 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-function-
+name: nested function syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+function fn() {
+  import(/*{ params }*/);
+}
diff --git a/src/dynamic-import/syntax/invalid/nested-if-braceless.template b/src/dynamic-import/syntax/invalid/nested-if-braceless.template
new file mode 100644
index 0000000000..5855636f36
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-if-braceless.template
@@ -0,0 +1,31 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-if-braceless-
+name: nested if syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+if (true) import(/*{ params }*/);
diff --git a/src/dynamic-import/syntax/invalid/nested-if.template b/src/dynamic-import/syntax/invalid/nested-if.template
new file mode 100644
index 0000000000..365e293d89
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-if.template
@@ -0,0 +1,33 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-if-
+name: nested if syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+if (true) {
+  import(/*{ params }*/);
+}
diff --git a/src/dynamic-import/syntax/invalid/nested-labeled.template b/src/dynamic-import/syntax/invalid/nested-labeled.template
new file mode 100644
index 0000000000..bfaf1267c7
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-labeled.template
@@ -0,0 +1,33 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-labeled-block-
+name: nested block syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+{
+  import(/*{ params }*/);
+};
diff --git a/src/dynamic-import/syntax/invalid/nested-while.template b/src/dynamic-import/syntax/invalid/nested-while.template
new file mode 100644
index 0000000000..33deb3305d
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/nested-while.template
@@ -0,0 +1,35 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/nested-while-
+name: nested while syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+  1. Let referencingScriptOrModule be ! GetActiveScriptOrModule().
+  2. Assert: referencingScriptOrModule is a Script Record or Module Record (i.e. is not null).
+  3. Let argRef be the result of evaluating AssignmentExpression.
+  4. Let specifier be ? GetValue(argRef).
+  5. Let promiseCapability be ! NewPromiseCapability(%Promise%).
+  6. Let specifierString be ToString(specifier).
+  7. IfAbruptRejectPromise(specifierString, promiseCapability).
+  8. Perform ! HostImportModuleDynamically(referencingScriptOrModule, specifierString, promiseCapability).
+  9. Return promiseCapability.[[Promise]].
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+let x = 0;
+while (!x) {
+  x++;
+  import(/*{ params }*/);
+};
diff --git a/src/dynamic-import/syntax/invalid/top-level.template b/src/dynamic-import/syntax/invalid/top-level.template
new file mode 100644
index 0000000000..400baa31a4
--- /dev/null
+++ b/src/dynamic-import/syntax/invalid/top-level.template
@@ -0,0 +1,21 @@
+// 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.
+/*---
+path: language/module-code/dynamic-import/syntax/invalid/top-level-
+name: top level syntax
+esid: sec-import-call-runtime-semantics-evaluation
+info: |
+  ImportCall :
+      import( AssignmentExpression )
+
+flags: [module]
+features: [dynamic-import]
+negative:
+  phase: parse
+  type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+import(/*{ params }*/);
diff --git a/src/dynamic-import/syntax/nested-arrow-assignment-expression.template b/src/dynamic-import/syntax/valid/nested-arrow-assignment-expression.template
similarity index 91%
rename from src/dynamic-import/syntax/nested-arrow-assignment-expression.template
rename to src/dynamic-import/syntax/valid/nested-arrow-assignment-expression.template
index 798c194643..054ee113f1 100644
--- a/src/dynamic-import/syntax/nested-arrow-assignment-expression.template
+++ b/src/dynamic-import/syntax/valid/nested-arrow-assignment-expression.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-arrow-assignment-expression-
+path: language/module-code/dynamic-import/syntax/valid/nested-arrow-assignment-expression-
 name: nested arrow syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-arrow.template b/src/dynamic-import/syntax/valid/nested-arrow.template
similarity index 93%
rename from src/dynamic-import/syntax/nested-arrow.template
rename to src/dynamic-import/syntax/valid/nested-arrow.template
index 2231921600..a30d99b7f1 100644
--- a/src/dynamic-import/syntax/nested-arrow.template
+++ b/src/dynamic-import/syntax/valid/nested-arrow.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-arrow-
+path: language/module-code/dynamic-import/syntax/valid/nested-arrow-
 name: nested arrow syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-async-function-await.template b/src/dynamic-import/syntax/valid/nested-async-function-await.template
similarity index 93%
rename from src/dynamic-import/syntax/nested-async-function-await.template
rename to src/dynamic-import/syntax/valid/nested-async-function-await.template
index 29244230c6..4fbcf30651 100644
--- a/src/dynamic-import/syntax/nested-async-function-await.template
+++ b/src/dynamic-import/syntax/valid/nested-async-function-await.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-arrow-
+path: language/module-code/dynamic-import/syntax/valid/nested-arrow-
 name: nested arrow syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-async-function-return-await.template b/src/dynamic-import/syntax/valid/nested-async-function-return-await.template
similarity index 93%
rename from src/dynamic-import/syntax/nested-async-function-return-await.template
rename to src/dynamic-import/syntax/valid/nested-async-function-return-await.template
index 5f60295037..f693b00d2b 100644
--- a/src/dynamic-import/syntax/nested-async-function-return-await.template
+++ b/src/dynamic-import/syntax/valid/nested-async-function-return-await.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-arrow-
+path: language/module-code/dynamic-import/syntax/valid/nested-arrow-
 name: nested arrow syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-async-function.template b/src/dynamic-import/syntax/valid/nested-async-function.template
similarity index 93%
rename from src/dynamic-import/syntax/nested-async-function.template
rename to src/dynamic-import/syntax/valid/nested-async-function.template
index 263bd0d4ac..003d6b36b7 100644
--- a/src/dynamic-import/syntax/nested-async-function.template
+++ b/src/dynamic-import/syntax/valid/nested-async-function.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-arrow-
+path: language/module-code/dynamic-import/syntax/valid/nested-arrow-
 name: nested arrow syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-block-labeled.template b/src/dynamic-import/syntax/valid/nested-block-labeled.template
similarity index 92%
rename from src/dynamic-import/syntax/nested-block-labeled.template
rename to src/dynamic-import/syntax/valid/nested-block-labeled.template
index 66b595a2f4..d61a3660ab 100644
--- a/src/dynamic-import/syntax/nested-block-labeled.template
+++ b/src/dynamic-import/syntax/valid/nested-block-labeled.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-block-labeled-
+path: language/module-code/dynamic-import/syntax/valid/nested-block-labeled-
 name: nested block syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-block.template b/src/dynamic-import/syntax/valid/nested-block.template
similarity index 93%
rename from src/dynamic-import/syntax/nested-block.template
rename to src/dynamic-import/syntax/valid/nested-block.template
index 4f4a5f0b0a..d4426718be 100644
--- a/src/dynamic-import/syntax/nested-block.template
+++ b/src/dynamic-import/syntax/valid/nested-block.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-block-
+path: language/module-code/dynamic-import/syntax/valid/nested-block-
 name: nested block syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-do-while.template b/src/dynamic-import/syntax/valid/nested-do-while.template
similarity index 93%
rename from src/dynamic-import/syntax/nested-do-while.template
rename to src/dynamic-import/syntax/valid/nested-do-while.template
index 49c36d243f..6f45278a4e 100644
--- a/src/dynamic-import/syntax/nested-do-while.template
+++ b/src/dynamic-import/syntax/valid/nested-do-while.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-do-while-
+path: language/module-code/dynamic-import/syntax/valid/nested-do-while-
 name: nested do syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-do.template b/src/dynamic-import/syntax/valid/nested-do.template
similarity index 93%
rename from src/dynamic-import/syntax/nested-do.template
rename to src/dynamic-import/syntax/valid/nested-do.template
index 7ca410f471..ee1c149d70 100644
--- a/src/dynamic-import/syntax/nested-do.template
+++ b/src/dynamic-import/syntax/valid/nested-do.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-do-
+path: language/module-code/dynamic-import/syntax/valid/nested-do-
 name: nested do syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-else-braceless.template b/src/dynamic-import/syntax/valid/nested-else-braceless.template
similarity index 92%
rename from src/dynamic-import/syntax/nested-else-braceless.template
rename to src/dynamic-import/syntax/valid/nested-else-braceless.template
index ad7ff05947..b020744eab 100644
--- a/src/dynamic-import/syntax/nested-else-braceless.template
+++ b/src/dynamic-import/syntax/valid/nested-else-braceless.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-else-braceless-
+path: language/module-code/dynamic-import/syntax/valid/nested-else-braceless-
 name: nested else syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-else.template b/src/dynamic-import/syntax/valid/nested-else.template
similarity index 93%
rename from src/dynamic-import/syntax/nested-else.template
rename to src/dynamic-import/syntax/valid/nested-else.template
index 04552060a7..3189049b78 100644
--- a/src/dynamic-import/syntax/nested-else.template
+++ b/src/dynamic-import/syntax/valid/nested-else.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-else-
+path: language/module-code/dynamic-import/syntax/valid/nested-else-
 name: nested else syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-function-return.template b/src/dynamic-import/syntax/valid/nested-function-return.template
similarity index 92%
rename from src/dynamic-import/syntax/nested-function-return.template
rename to src/dynamic-import/syntax/valid/nested-function-return.template
index 9cc9b6ed3a..640468fb34 100644
--- a/src/dynamic-import/syntax/nested-function-return.template
+++ b/src/dynamic-import/syntax/valid/nested-function-return.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-function-return-
+path: language/module-code/dynamic-import/syntax/valid/nested-function-return-
 name: nested function syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-function.template b/src/dynamic-import/syntax/valid/nested-function.template
similarity index 93%
rename from src/dynamic-import/syntax/nested-function.template
rename to src/dynamic-import/syntax/valid/nested-function.template
index 44712eae6e..7a599c4d3e 100644
--- a/src/dynamic-import/syntax/nested-function.template
+++ b/src/dynamic-import/syntax/valid/nested-function.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-function-
+path: language/module-code/dynamic-import/syntax/valid/nested-function-
 name: nested function syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-if-braceless.template b/src/dynamic-import/syntax/valid/nested-if-braceless.template
similarity index 92%
rename from src/dynamic-import/syntax/nested-if-braceless.template
rename to src/dynamic-import/syntax/valid/nested-if-braceless.template
index a900189b5d..93d0673761 100644
--- a/src/dynamic-import/syntax/nested-if-braceless.template
+++ b/src/dynamic-import/syntax/valid/nested-if-braceless.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-if-braceless-
+path: language/module-code/dynamic-import/syntax/valid/nested-if-braceless-
 name: nested if syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-if.template b/src/dynamic-import/syntax/valid/nested-if.template
similarity index 93%
rename from src/dynamic-import/syntax/nested-if.template
rename to src/dynamic-import/syntax/valid/nested-if.template
index 95dffd1159..a58c649ba5 100644
--- a/src/dynamic-import/syntax/nested-if.template
+++ b/src/dynamic-import/syntax/valid/nested-if.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-if-
+path: language/module-code/dynamic-import/syntax/valid/nested-if-
 name: nested if syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-labeled.template b/src/dynamic-import/syntax/valid/nested-labeled.template
similarity index 92%
rename from src/dynamic-import/syntax/nested-labeled.template
rename to src/dynamic-import/syntax/valid/nested-labeled.template
index 0b34bf952e..c58078c523 100644
--- a/src/dynamic-import/syntax/nested-labeled.template
+++ b/src/dynamic-import/syntax/valid/nested-labeled.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-labeled-block-
+path: language/module-code/dynamic-import/syntax/valid/nested-labeled-block-
 name: nested block syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/nested-while.template b/src/dynamic-import/syntax/valid/nested-while.template
similarity index 93%
rename from src/dynamic-import/syntax/nested-while.template
rename to src/dynamic-import/syntax/valid/nested-while.template
index 4639357431..6a4c4ab814 100644
--- a/src/dynamic-import/syntax/nested-while.template
+++ b/src/dynamic-import/syntax/valid/nested-while.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-nested-while-
+path: language/module-code/dynamic-import/syntax/valid/nested-while-
 name: nested while syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
diff --git a/src/dynamic-import/syntax/top-level.template b/src/dynamic-import/syntax/valid/top-level.template
similarity index 86%
rename from src/dynamic-import/syntax/top-level.template
rename to src/dynamic-import/syntax/valid/top-level.template
index f2f43a6a1a..6782aee0bd 100644
--- a/src/dynamic-import/syntax/top-level.template
+++ b/src/dynamic-import/syntax/valid/top-level.template
@@ -2,7 +2,7 @@
 // Copyright (C) 2018 the V8 project authors. All rights reserved.
 // This code is governed by the BSD license found in the LICENSE file.
 /*---
-path: language/module-code/dynamic-import/syntax-top-level-
+path: language/module-code/dynamic-import/syntax/valid/top-level-
 name: top level syntax
 esid: sec-import-call-runtime-semantics-evaluation
 info: |
-- 
GitLab