diff --git a/src/dynamic-import/checklist.md b/src/dynamic-import/checklist.md index f9f0021989e89236a880165e5416a31640fe7af1..e26f8e1af1a2ad764815a9969f13db903258bb4b 100644 --- a/src/dynamic-import/checklist.md +++ b/src/dynamic-import/checklist.md @@ -4,25 +4,70 @@ _general places it can be found as a CallExpression_ +- [x] top level - [x] consise body of an ArrowFunction - [x] function body of an ArrowFunction - [ ] consise body of an __Async__ ArrowFunction - [ ] function body of an __Async__ ArrowFunction -- [ ] async function await +- [ ] try catch in async function +- [x] await position of an async function +- [x] return await position of an async function +- [x] nested in an async function +- [x] labeled blocks +- [x] blocks +- [x] do while +- [ ] else braceless +- [x] else block +- [x] if braceless +- [x] if block +- [x] while block ## Cases ### Syntax -- [x] assignment expression is not optional -- [x] empty string is a valid assignment expression (not a syntax error) - -## - - - - +- [x] assignment expression is not optional `assignment-expr-not-optional.case` +- [x] empty string is a valid assignment expression (not a syntax error) `empty-str-is-valid-assign-expr.case` +- [ ] _Forbidden Extensions: ImportCall must not be extended._ (Only one assignment expression allowed) + - [ ] no trailling comma, it's not an arguments list + - [ ] no other expressions +### Common usage +- [x] indirect update default binding `eval-gtbndng-indirect-update-dflt.case` +- [x] indirect update named binding `eval-gtbndng-indirect-update-dflt.case` +- [ ] Assignment Expression evaluations. Most can be used as syntax tests only, e.g. exprs evaluating to a boolean value) or error catching + - [ ] ConditionalExpression + - [ ] Primary Expressions on the import Assign. Expr. position (?) + - [ ] Cover Parenthesis expressions + - [ ] ... + - [ ] YieldExpression + - [ ] Check yield usage + - [ ] ArrowFunction + - [ ] AsyncArrowFunction + - [ ] LeftHandSideExpression = AssignmentExpression + - [ ] LeftHandSideExpression AssignmentOperator AssignmentExpression +- [ ] ToString on the AssignmentExpression value +- [ ] nest `import()` in CallExpressions + - [ ] `import(import(...))` + - [ ] ... (other CallExpressions here) +- [ ] Goal target can be a script code (not module code) + - [ ] in this case, it should not export anything (and it's not a SyntaxError like in static imports) + - [ ] indirect updates +- [ ] Goal target can be a module code (having module specific syntax) +- [ ] module code on host syntax +- [ ] Multiple imports on the same imported module + - [ ] verify indirect updates +- [ ] ImportCall in runtime returns a Promise + - [ ] Verify ctor + - [ ] Use in Promise.all? + - [ ] await resolving (include failures) + - [ ] Use Promise.prototype + - [ ] Promise.resolve +### Error catching +- [x] resolved runtime error (TypeError) `eval-rqstd-abrupt-typeerror.case` +- [x] resolved runtime error (URIError) `eval-rqstd-abrupt-urierror.case` +- [x] ambiguous import +- [x] circular import error diff --git a/src/dynamic-import/default/nested-arrow-assignment-expression.template b/src/dynamic-import/default/nested-arrow-assignment-expression.template index 554c730eff0570030396bf1e026f652251470811..7d6d90aa8e8eaba943471772d3c0b2b13fd0cb01 100644 --- a/src/dynamic-import/default/nested-arrow-assignment-expression.template +++ b/src/dynamic-import/default/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/nested-arrow-assignment-expression- +path: language/module-code/dynamic-import/usage/nested-arrow-assignment-expression- name: nested arrow esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/default/nested-arrow.template b/src/dynamic-import/default/nested-arrow.template index b14d661b26cfe0b393c5d77dbe6755c8d9ca7bac..061526cac5f036ea3672a8db3e3312cdccd7cb56 100644 --- a/src/dynamic-import/default/nested-arrow.template +++ b/src/dynamic-import/default/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/nested-arrow-import-then- +path: language/module-code/dynamic-import/usage/nested-arrow-import-then- name: nested arrow esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/default/nested-async-function-await.template b/src/dynamic-import/default/nested-async-function-await.template index f46b2a1baa7cd5caebf7736f9254be256113a362..7e561c6ae1b83e3f880dacd90aa12ac13afa534c 100644 --- a/src/dynamic-import/default/nested-async-function-await.template +++ b/src/dynamic-import/default/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/nested-async-function-await- +path: language/module-code/dynamic-import/usage/nested-async-function-await- name: nested in async function, awaited esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/default/nested-async-function-return-await.template b/src/dynamic-import/default/nested-async-function-return-await.template index cc42ac10a3d2040ea657316dee1d4552351a7ee8..55e85c71ee81c229858e7321047a2acf0a97e061 100644 --- a/src/dynamic-import/default/nested-async-function-return-await.template +++ b/src/dynamic-import/default/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/nested-async-function-return-await- +path: language/module-code/dynamic-import/usage/nested-async-function-return-await- name: nested in async function, returns awaited esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/default/nested-async-function.template b/src/dynamic-import/default/nested-async-function.template index 728e8262c0f5b5d8b68bf444c640fa7121c7f3d1..f83da4142f1f7a978cb3cfd59d9cdb92a69fb4c1 100644 --- a/src/dynamic-import/default/nested-async-function.template +++ b/src/dynamic-import/default/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/nested-async-function- +path: language/module-code/dynamic-import/usage/nested-async-function- name: nested in async function esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/default/nested-block-labeled.template b/src/dynamic-import/default/nested-block-labeled.template index d40583d8cbfdc50d002f17f3970d6e2b2ffe0ca5..71e8125919f352a23d4252ec0228d0fa948536f2 100644 --- a/src/dynamic-import/default/nested-block-labeled.template +++ b/src/dynamic-import/default/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/usage/syntax-nested-block-labeled- name: nested block syntax esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/default/nested-block.template b/src/dynamic-import/default/nested-block.template index a5351812f49c35572ad3a7b2122d15abc11c8464..ebfce21e35d358654e0d0d4fd170282dde675af6 100644 --- a/src/dynamic-import/default/nested-block.template +++ b/src/dynamic-import/default/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/nested-block-import-then- +path: language/module-code/dynamic-import/usage/nested-block-import-then- name: nested block esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/default/nested-do-while.template b/src/dynamic-import/default/nested-do-while.template index 63f3ea89a0f7a55b7db421b09c035347fe54bdc0..902b3236e9fb2232fd3d5fd731189618ae7d11a1 100644 --- a/src/dynamic-import/default/nested-do-while.template +++ b/src/dynamic-import/default/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/nested-do-while- +path: language/module-code/dynamic-import/usage/nested-do-while- name: nested do while syntax esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/default/nested-else.template b/src/dynamic-import/default/nested-else.template index 3088603d31752c61777add6a406718f7e12bec22..b26a128e16df70eb2b17cefc3c5fbbaba1b2004f 100644 --- a/src/dynamic-import/default/nested-else.template +++ b/src/dynamic-import/default/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/nested-else-import-then- +path: language/module-code/dynamic-import/usage/nested-else-import-then- name: nested else esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/default/nested-function.template b/src/dynamic-import/default/nested-function.template index b03f2d62cdbedb61a4e7640e4b171b198e2e7f9e..48e60f4bfc70fb2f88d189ed697d2ed585a6d895 100644 --- a/src/dynamic-import/default/nested-function.template +++ b/src/dynamic-import/default/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/nested-function-import-then- +path: language/module-code/dynamic-import/usage/nested-function-import-then- name: nested function esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/default/nested-if-braceless.template b/src/dynamic-import/default/nested-if-braceless.template index 87921a8797da4c6d4287e578f7d0bfb1ffbc9a2f..3e6582c3d1ad81f5b85e2f6bf271714425dd4466 100644 --- a/src/dynamic-import/default/nested-if-braceless.template +++ b/src/dynamic-import/default/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/nested-if-braceless- +path: language/module-code/dynamic-import/usage/nested-if-braceless- name: nested if syntax esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/default/nested-if.template b/src/dynamic-import/default/nested-if.template index 7b7f5a7ca206c7a9c272753d6f66aff63fc86b94..c8fb0c83e6c2af48b289f3f6ba15f776e7125456 100644 --- a/src/dynamic-import/default/nested-if.template +++ b/src/dynamic-import/default/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/nested-if-import-then- +path: language/module-code/dynamic-import/usage/nested-if-import-then- name: nested if esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/default/nested-while.template b/src/dynamic-import/default/nested-while.template index 469640edd3262193736b835b363b64d6547529f5..fa2a103a2f6205bf0090e14e5bb145ee3dedb6e3 100644 --- a/src/dynamic-import/default/nested-while.template +++ b/src/dynamic-import/default/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/nested-while-import-then- +path: language/module-code/dynamic-import/usage/nested-while-import-then- name: nested while esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/default/top-level.template b/src/dynamic-import/default/top-level.template index 3ab2f0fb66b8b738b539349c3b144316842c60b1..9982059a0992d06d78a460615cf34791c27a06a5 100644 --- a/src/dynamic-import/default/top-level.template +++ b/src/dynamic-import/default/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/top-level-import-then- +path: language/module-code/dynamic-import/usage/top-level-import-then- name: top level esid: sec-import-call-runtime-semantics-evaluation info: | diff --git a/src/dynamic-import/empty-str-arg.case b/src/dynamic-import/empty-str-is-valid-assign-expr.case similarity index 100% rename from src/dynamic-import/empty-str-arg.case rename to src/dynamic-import/empty-str-is-valid-assign-expr.case diff --git a/src/dynamic-import/eval-gtbdng-indirect-update-dflt.case b/src/dynamic-import/eval-gtbndng-indirect-update-dflt.case similarity index 100% rename from src/dynamic-import/eval-gtbdng-indirect-update-dflt.case rename to src/dynamic-import/eval-gtbndng-indirect-update-dflt.case diff --git a/src/dynamic-import/instn-iee-err-not-found.case b/src/dynamic-import/instn-iee-err-not-found.case deleted file mode 100644 index 52cd8d0dfc1026eef56cfd6beb18cc747c27f105..0000000000000000000000000000000000000000 --- a/src/dynamic-import/instn-iee-err-not-found.case +++ /dev/null @@ -1,28 +0,0 @@ -// 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: IndirectExportEntries validation - undefined imported bindings -esid: sec-moduledeclarationinstantiation -info: | - [...] - 9. For each ExportEntry Record e in module.[[IndirectExportEntries]], do - a. Let resolution be ? module.ResolveExport(e.[[ExportName]], « », « »). - b. If resolution is null or resolution is "ambiguous", throw a - SyntaxError exception. - [...] - - 15.2.1.16.3 ResolveExport - - [...] - 9. Let starResolution be null. - 10. For each ExportEntry Record e in module.[[StarExportEntries]], do - [...] - 11. Return starResolution. -template: catch ----*/ - -//- params -'./instn-iee-err-not-found-empty_FIXTURE.js' -//- body -assert.sameValue(error.name, 'SyntaxError'); diff --git a/test/language/module-code/dynamic-import/catch/instn-iee-err-not-found-empty_FIXTURE.js b/test/language/module-code/dynamic-import/catch/instn-iee-err-not-found-empty_FIXTURE.js deleted file mode 100644 index e46c626cf4c891ec4017bc2ab2281b9114c22e91..0000000000000000000000000000000000000000 --- a/test/language/module-code/dynamic-import/catch/instn-iee-err-not-found-empty_FIXTURE.js +++ /dev/null @@ -1,4 +0,0 @@ -// Copyright (C) 2016 the V8 project authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -;