From 54689ffa699527dabd437d397c613cbe0090ce93 Mon Sep 17 00:00:00 2001 From: Leo Balter Date: Wed, 3 Oct 2018 14:33:23 -0400 Subject: [PATCH] Update checklist and other fixups --- src/dynamic-import/checklist.md | 63 ++++++++++++++++--- ...ested-arrow-assignment-expression.template | 2 +- .../default/nested-arrow.template | 2 +- .../nested-async-function-await.template | 2 +- ...ested-async-function-return-await.template | 2 +- .../default/nested-async-function.template | 2 +- .../default/nested-block-labeled.template | 2 +- .../default/nested-block.template | 2 +- .../default/nested-do-while.template | 2 +- .../default/nested-else.template | 2 +- .../default/nested-function.template | 2 +- .../default/nested-if-braceless.template | 2 +- src/dynamic-import/default/nested-if.template | 2 +- .../default/nested-while.template | 2 +- src/dynamic-import/default/top-level.template | 2 +- ...se => empty-str-is-valid-assign-expr.case} | 0 ...=> eval-gtbndng-indirect-update-dflt.case} | 0 .../instn-iee-err-not-found.case | 28 --------- .../instn-iee-err-not-found-empty_FIXTURE.js | 4 -- 19 files changed, 68 insertions(+), 55 deletions(-) rename src/dynamic-import/{empty-str-arg.case => empty-str-is-valid-assign-expr.case} (100%) rename src/dynamic-import/{eval-gtbdng-indirect-update-dflt.case => eval-gtbndng-indirect-update-dflt.case} (100%) delete mode 100644 src/dynamic-import/instn-iee-err-not-found.case delete mode 100644 test/language/module-code/dynamic-import/catch/instn-iee-err-not-found-empty_FIXTURE.js diff --git a/src/dynamic-import/checklist.md b/src/dynamic-import/checklist.md index f9f0021989..e26f8e1af1 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 554c730eff..7d6d90aa8e 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 b14d661b26..061526cac5 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 f46b2a1baa..7e561c6ae1 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 cc42ac10a3..55e85c71ee 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 728e8262c0..f83da4142f 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 d40583d8cb..71e8125919 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 a5351812f4..ebfce21e35 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 63f3ea89a0..902b3236e9 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 3088603d31..b26a128e16 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 b03f2d62cd..48e60f4bfc 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 87921a8797..3e6582c3d1 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 7b7f5a7ca2..c8fb0c83e6 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 469640edd3..fa2a103a2f 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 3ab2f0fb66..9982059a09 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 52cd8d0dfc..0000000000 --- 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 e46c626cf4..0000000000 --- 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. - -;