Skip to content

Commit 63fd392

Browse files
committed
test(test262): admit exact top-level await cohort
1 parent 0f4d858 commit 63fd392

14 files changed

Lines changed: 1646 additions & 29 deletions

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,12 @@ jobs:
7070
node scripts/check-test262-artifact-inventory.mjs
7171
node scripts/check-bc5-pinned-atoms.mjs --self-test
7272
node scripts/check-bc5-pinned-opcodes.mjs --self-test
73+
node --check scripts/audit-negative-diagnostics.mjs
7374
node --check scripts/test-negative-diagnostic-generator.mjs
7475
node --check scripts/generate-test262-dynamic-import-a.mjs
7576
node --check scripts/generate-test262-tla-core-a.mjs
77+
node --check scripts/generate-test262-tla-b.mjs
78+
node --check scripts/test-generate-test262-tla-b.mjs
7679
node --check scripts/generate-test262-module-var-lexical-shadow-a.mjs
7780
node --check scripts/generate-test262-module-import-attributes-a.mjs
7881
node --check scripts/test-generate-test262-module-import-attributes-a.mjs
@@ -165,6 +168,9 @@ jobs:
165168
--suite "$suite" --check-current
166169
node scripts/generate-test262-tla-core-a.mjs \
167170
--suite "$suite" --check-current
171+
node scripts/test-generate-test262-tla-b.mjs --suite "$suite"
172+
node scripts/generate-test262-tla-b.mjs \
173+
--suite "$suite" --check-current
168174
node scripts/generate-test262-module-var-lexical-shadow-a.mjs \
169175
--suite "$suite" \
170176
--quickjs-runner "$oracle_source/run-test262" \

compat/test262-oxide.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,6 +2176,13 @@ test/language/module-code/parse-err-semi-named-export.js
21762176
test/language/module-code/parse-err-syntax-1.js
21772177
test/language/module-code/parse-err-syntax-2.js
21782178
test/language/module-code/parse-err-yield.js
2179+
test/language/module-code/top-level-await/module-import-rejection-body.js
2180+
test/language/module-code/top-level-await/module-import-rejection.js
2181+
test/language/module-code/top-level-await/syntax/early-does-not-propagate-to-fn-declaration-body.js
2182+
test/language/module-code/top-level-await/syntax/early-does-not-propagate-to-fn-declaration-params.js
2183+
test/language/module-code/top-level-await/syntax/early-does-not-propagate-to-fn-expr-body.js
2184+
test/language/module-code/top-level-await/syntax/early-does-not-propagate-to-fn-expr-params.js
2185+
test/language/module-code/top-level-await/syntax/early-no-escaped-await.js
21792186
test/language/reserved-words/await-module.js
21802187
test/language/statements/async-function/array-destructuring-param-strict-body.js
21812188
test/language/statements/async-function/dflt-params-duplicates.js

compat/upstream.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ config_sha256 = "79c64748ff1182baf5433d0a8378e3666738a785d02faf71f0d459ed42ae897
1919
test_count = 53125
2020
metadata_records_sha256 = "a37219960819e56a5c5c1723d31d6a33095c778bf5347385187fde96f927a06a"
2121
oxide_profile = "compat/test262-oxide.conf"
22-
oxide_profile_sha256 = "86bd42bca1d12b09431a59b61ef615455ba2092bb63c8a5057f8d6ee21c2dd05"
22+
oxide_profile_sha256 = "aa9fa3581c86cf1f1ef786a54c2023107f3a99002129b726024ddd8ea0838d67"
2323
expected_errors = "test262_errors.txt"
2424

2525
[test262_es5]

dev-support/test262/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,19 @@ match; Test262 paths and source hashes remain dev-support data and never enter
4141
the production parser.
4242

4343
`negative-diagnostic-rules.tsv` is the complete registry for the semantic
44-
`rule` column and names the corresponding pinned QuickJS parser anchor. The
44+
`rule` column and names the corresponding pinned QuickJS source anchor. The
4545
authenticated audit tool rejects unknown or unused rules. Scheduled
4646
differential CI replays every exact contract through pinned QuickJS using the
4747
same Script/Module goal and strict-prefix policy and compares error type,
4848
message, line, and column. Parse contracts use an isolated command-line source;
49-
Module resolution contracts execute the authenticated root path inside the
50-
pinned suite through `run-test262 -N --module`, so QuickJS loads the real
51-
dependency graph. That oracle proves type, message, and location; the Oxide
52-
runner separately observes compilation, linking, and execution to enforce the
53-
declared phase. An absent location is represented by two empty TSV fields.
49+
Module resolution and runtime contracts execute the authenticated root path
50+
inside the pinned suite through `run-test262 -N --module`, so QuickJS loads the
51+
real dependency graph. Runtime dependency-rejection contracts additionally
52+
require an exact first source frame from their sole direct dependency; a root
53+
throw with the same type and message is rejected. The Oxide runner reads only
54+
own data properties, including the Error stack, when recovering the matching
55+
location and separately observes compilation, linking, and execution to enforce
56+
the declared phase. An absent location is represented by two empty TSV fields.
5457

5558
`negative-diagnostic-exemptions.tsv` freezes the legacy variants admitted
5659
before exact diagnostic contracts became mandatory. Every audited negative

0 commit comments

Comments
 (0)