Update ECMAScript edition references to 2027#323
Conversation
- Refresh built-in and language docs to remove stale edition labels - Move features into the new ES2026/ES2027 tables and adjust proposal stage wording - Add coverage for 2026 and 2027 entries in the Goccia spec tests
📝 WalkthroughWalkthroughUpdated docs, language tables, and the internal ES feature catalog to add ES2026/ES2027 and WHATWG APIs, reclassify proposal-stage language to standard/spec references, bump README tagline to “ECMAScript 2027+”, update unit spec catalogs, and update tests to expect new year keys. Changes
Sequence Diagram(s)Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Suite Timing
Measured on ubuntu-latest x64. |
Benchmark Results364 benchmarks Interpreted: 🟢 19 improved · 🔴 276 regressed · 69 unchanged · avg -3.9% arraybuffer.js — Interp: 🟢 2, 🔴 10, 2 unch. · avg -6.0% · Bytecode: 🟢 1, 13 unch. · avg +1.0%
arrays.js — Interp: 🔴 12, 7 unch. · avg -3.0% · Bytecode: 🟢 10, 9 unch. · avg +2.5%
async-await.js — Interp: 🔴 5, 1 unch. · avg -5.4% · Bytecode: 🟢 2, 4 unch. · avg +1.2%
base64.js — Interp: 🟢 1, 🔴 7, 2 unch. · avg -3.9% · Bytecode: 🟢 1, 9 unch. · avg +1.1%
classes.js — Interp: 🔴 29, 2 unch. · avg -6.6% · Bytecode: 🟢 4, 🔴 2, 25 unch. · avg +0.4%
closures.js — Interp: 🔴 10, 1 unch. · avg -4.1% · Bytecode: 🟢 2, 9 unch. · avg +1.2%
collections.js — Interp: 🔴 10, 2 unch. · avg -10.1% · Bytecode: 🟢 1, 🔴 3, 8 unch. · avg +0.2%
destructuring.js — Interp: 🔴 17, 5 unch. · avg -4.5% · Bytecode: 🟢 9, 13 unch. · avg +2.6%
fibonacci.js — Interp: 🔴 8 · avg -7.7% · Bytecode: 🔴 1, 7 unch. · avg -0.3%
float16array.js — Interp: 🟢 2, 🔴 25, 5 unch. · avg -5.6% · Bytecode: 🟢 4, 🔴 5, 23 unch. · avg -0.1%
for-of.js — Interp: 🔴 4, 3 unch. · avg -2.8% · Bytecode: 🟢 2, 5 unch. · avg +1.5%
helpers/bench-module.js — Interp: 0 · Bytecode: 0
iterators.js — Interp: 🔴 38, 4 unch. · avg -6.0% · Bytecode: 🟢 26, 🔴 3, 13 unch. · avg +2.8%
json.js — Interp: 🔴 19, 1 unch. · avg -4.6% · Bytecode: 🟢 9, 11 unch. · avg +3.0%
jsx.jsx — Interp: 🟢 1, 🔴 17, 3 unch. · avg -3.7% · Bytecode: 🟢 10, 11 unch. · avg +2.2%
modules.js — Interp: 🟢 2, 🔴 1, 6 unch. · avg +0.6% · Bytecode: 🟢 3, 6 unch. · avg +1.0%
numbers.js — Interp: 🔴 4, 7 unch. · avg -1.9% · Bytecode: 🟢 3, 🔴 1, 7 unch. · avg -0.3%
objects.js — Interp: 🔴 4, 3 unch. · avg -4.2% · Bytecode: 🟢 3, 4 unch. · avg +2.8%
promises.js — Interp: 🔴 11, 1 unch. · avg -6.8% · Bytecode: 🟢 10, 2 unch. · avg +5.1%
regexp.js — Interp: 🔴 1, 10 unch. · avg -1.5% · Bytecode: 🟢 3, 🔴 3, 5 unch. · avg -0.2%
strings.js — Interp: 🟢 1, 🔴 16, 2 unch. · avg -5.0% · Bytecode: 🟢 8, 11 unch. · avg +2.3%
typed-arrays.js — Interp: 🔴 22 · avg -13.3% · Bytecode: 🟢 1, 🔴 9, 12 unch. · avg -1.2%
uint8array-encoding.js — Interp: 🟢 10, 🔴 6, 2 unch. · avg +26.0% · Bytecode: 🟢 2, 🔴 3, 13 unch. · avg -2.1%
Measured on ubuntu-latest x64. Benchmark ranges compare cached main-branch min/max ops/sec with the PR run; overlapping ranges are treated as unchanged noise. Percentage deltas are secondary context. |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
units/Goccia.Spec.pas (1)
173-183: ES2026 feature list looks complete and consistent.The ES2026_FEATURES array correctly captures the promoted features. Note that
docs/language-tables.mdlists bothMap.prototype.getOrInsertandgetOrInsertComputedon line 65, but onlygetOrInsertappears in theNamefield here. Consider whether the entry name should be updated toMap.prototype.getOrInsert/getOrInsertComputedor if a separate entry is needed — or if the current single entry is intentionally representing both methods under one umbrella.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@units/Goccia.Spec.pas` around lines 173 - 183, ES2026_FEATURES currently lists a single entry (Map.prototype.getOrInsert) but docs/language-tables.md mentions both Map.prototype.getOrInsert and getOrInsertComputed; update the ES2026_FEATURES entry to clearly reflect both methods by renaming the Name field to "Map.prototype.getOrInsert / getOrInsertComputed" or add a separate feature entry for getOrInsertComputed as appropriate; locate the ES2026_FEATURES array and modify the tuple with Name: 'Map.prototype.getOrInsert' (or add a new tuple) so the feature list matches the docs and unambiguously represents both methods.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/built-ins.md`:
- Line 415: Update the Iterator documentation phrase that currently reads "Stage
3 Joint Iteration proposal" to remove the stage label; replace it with a concise
term like "Joint Iteration" (or "Joint Iteration proposal") so the sentence
reads consistently with the rest of the docs alongside "ECMAScript Iterator
Helpers", "Iterator.concat", and "Iterator.zip".
- Line 72: The docs entry for Math.clamp still includes the "Stage 2" proposal
label; update the built-ins listing so Math.clamp is documented consistently
with the PR goal by removing the "(Stage 2 [proposal-math-clamp]...)" suffix and
keeping only "| `Math.clamp(x, min, max)` | Clamp to range |" (i.e., remove the
proposal/stage annotation for Math.clamp to match the other simplified built-in
entries).
In `@docs/language-tables.md`:
- Line 59: The docs entry listing `atob` / `btoa` as "ES2026" is incorrect;
update the ES2026 language table row for `atob` / `btoa` so it no longer claims
ECMAScript support: either remove the row from the ES2026 table entirely or
change its label to indicate WHATWG/Non-Standard. Reference the implementation
in units/Goccia.Builtins.Globals.pas and ensure the table note clarifies these
functions follow the WHATWG HTML spec rather than any ECMAScript edition.
---
Nitpick comments:
In `@units/Goccia.Spec.pas`:
- Around line 173-183: ES2026_FEATURES currently lists a single entry
(Map.prototype.getOrInsert) but docs/language-tables.md mentions both
Map.prototype.getOrInsert and getOrInsertComputed; update the ES2026_FEATURES
entry to clearly reflect both methods by renaming the Name field to
"Map.prototype.getOrInsert / getOrInsertComputed" or add a separate feature
entry for getOrInsertComputed as appropriate; locate the ES2026_FEATURES array
and modify the tuple with Name: 'Map.prototype.getOrInsert' (or add a new tuple)
so the feature list matches the docs and unambiguously represents both methods.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8bba8584-cd37-44e7-8310-0302356b9b8b
📒 Files selected for processing (9)
README.mddocs/built-ins-binary-data.mddocs/built-ins-temporal.mddocs/built-ins.mddocs/contributing/code-style.mddocs/language-tables.mddocs/language.mdtests/built-ins/Goccia/spec.jsunits/Goccia.Spec.pas
These are WHATWG HTML spec APIs, not ECMAScript standard. The implementation already annotates them as "WHATWG HTML spec §8.3". Move the row after all ES edition entries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move structuredClone and atob/btoa out of the ECMAScript table (they are WHATWG/W3C, not ECMA-262) - Add new "Web Platform APIs" section to language-tables.md with all 10 WHATWG/W3C APIs: console, structuredClone, DOMException, atob/btoa, queueMicrotask, URL, URLSearchParams, TextEncoder, TextDecoder, performance - Add WHATWG_FEATURES array to Goccia.Spec.pas and expose it on the Goccia.spec object as the 'whatwg' key Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/language-tables.md`:
- Around line 77-79: The table row for `DOMException` has a link to the Web IDL
spec but the visible label reads "HTML §4.3"; update the visible label to
accurately reference Web IDL (e.g., "Web IDL §4.3" or the correct Web IDL
section title) by editing the `DOMException` table row so the link text matches
the link target.
In `@units/Goccia.Spec.pas`:
- Around line 195-205: The WHATWG_FEATURES entry uses the Pascalized
"Performance" instead of the actual runtime/global API name; update the Name
field in the WHATWG_FEATURES array (TGocciaFeatureEntry) from 'Performance' to
'performance' so the table matches the exposed global API and documentation
(look for the tuple with Link
'https://w3c.github.io/hr-time/#dom-performance-now' inside WHATWG_FEATURES).
- Around line 173-183: The ES2026_FEATURES array in units/Goccia.Spec.pas only
lists 'Map.prototype.getOrInsert' but the docs state both 'getOrInsert' and
'getOrInsertComputed' are supported; update the ES2026_FEATURES constant (the
ES2026_FEATURES: array[0..8] of TGocciaFeatureEntry) to include a second entry
for 'Map.prototype.getOrInsertComputed' (with the appropriate spec link,
matching the existing Link pattern) so the runtime metadata and docs are
consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a430edec-8e5c-4a73-ae6c-06b7425a3b25
📒 Files selected for processing (2)
docs/language-tables.mdunits/Goccia.Spec.pas
- DOMException: label was "HTML §4.3" but link pointed to Web IDL spec; relabel to "Web IDL" - Map upsert: Goccia.Spec.pas only listed getOrInsert but both getOrInsert and getOrInsertComputed are implemented; sync with docs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
♻️ Duplicate comments (2)
docs/language-tables.md (1)
57-58:⚠️ Potential issue | 🟡 MinorKeep these ES2020 rows in sync with
Goccia.spec['2020'].The table now documents
import.metaand dynamicimport(), butunits/Goccia.Spec.passtill exposes only the original five ES2020 entries. Until those metadata rows are added there too, the docs andGoccia.specwill disagree.#!/bin/bash # Verify whether import.meta and dynamic import() are documented but absent from Goccia.spec metadata. rg -n -C2 'import\.meta|import\(\)|ES2020_FEATURES' docs/language-tables.md units/Goccia.Spec.pasExpected result:
docs/language-tables.mdcontains both ES2020 rows, whileunits/Goccia.Spec.pashas no matchingES2020_FEATURESentries.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/language-tables.md` around lines 57 - 58, The docs add ES2020 rows for `import.meta` and dynamic `import()` but `Goccia.spec['2020']` in units/Goccia.Spec.pas still lacks those metadata entries; update the ES2020 feature list (look for the `ES2020_FEATURES` / `Goccia.spec['2020']` definition in units/Goccia.Spec.pas) to include entries for `import.meta` and `import()` with the same supported status/details used in docs so the spec and docs remain in sync.units/Goccia.Spec.pas (1)
161-168:⚠️ Potential issue | 🟡 MinorAdd
Math.f16roundto the ES2025 catalog.
Goccia.spec['2025']now advertises onlyFloat16Array, but the repo’s own docs treatFloat16ArrayandMath.f16roundas the ES2025 pair. That leaves the public metadata incomplete.#!/bin/bash # Verify that Math.f16round is documented/implemented as ES2025 but omitted from Goccia.spec metadata. rg -n -C2 'Math\.f16round|Float16Array|ES2025_FEATURES' docs/language-tables.md units/Goccia.Builtins.Math.pas units/Goccia.Spec.pasExpected result:
docs/language-tables.mdandunits/Goccia.Builtins.Math.passhow bothFloat16ArrayandMath.f16round, whileunits/Goccia.Spec.paslists onlyFloat16ArrayinES2025_FEATURES.Based on learnings: In frostney/GocciaScript,
Math.f16roundandFloat16Arrayare ES2025 features (ECMAScript 16th edition, June 2025).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@units/Goccia.Spec.pas` around lines 161 - 168, The ES2025_FEATURES array in Goccia.Spec.pas is missing the Math.f16round entry; update the ES2025_FEATURES (TGocciaFeatureEntry) to include a new entry with Name: 'Math.f16round' and an appropriate Link (e.g. the ecma262 Math.f16round section), and expand the array bounds from [0..5] to [0..6] so the Float16Array and Math.f16round pair are both listed for ES2025.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@docs/language-tables.md`:
- Around line 57-58: The docs add ES2020 rows for `import.meta` and dynamic
`import()` but `Goccia.spec['2020']` in units/Goccia.Spec.pas still lacks those
metadata entries; update the ES2020 feature list (look for the `ES2020_FEATURES`
/ `Goccia.spec['2020']` definition in units/Goccia.Spec.pas) to include entries
for `import.meta` and `import()` with the same supported status/details used in
docs so the spec and docs remain in sync.
In `@units/Goccia.Spec.pas`:
- Around line 161-168: The ES2025_FEATURES array in Goccia.Spec.pas is missing
the Math.f16round entry; update the ES2025_FEATURES (TGocciaFeatureEntry) to
include a new entry with Name: 'Math.f16round' and an appropriate Link (e.g. the
ecma262 Math.f16round section), and expand the array bounds from [0..5] to
[0..6] so the Float16Array and Math.f16round pair are both listed for ES2025.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c2e28701-caf3-433c-8213-96b51d06cd97
📒 Files selected for processing (2)
docs/language-tables.mdunits/Goccia.Spec.pas
- Add ES2020 entries for `import.meta` and dynamic `import()` - Add `Math.f16round` to the ES2025 feature list
There was a problem hiding this comment.
🧹 Nitpick comments (1)
units/Goccia.Spec.pas (1)
285-297: Consider adding fixture coverage for the new non-year keys.
CreateSpecObjectnow exposeswhatwg, andCreateProposalObjectnow exposesstage-2. A small assertion for both would help keep these public keys from drifting in future metadata reshuffles.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@units/Goccia.Spec.pas` around lines 285 - 297, The test fixtures lack assertions for the new non-year keys added to the spec objects: update the relevant tests to assert that CreateSpecObject exposes the 'whatwg' key and CreateProposalObject exposes the 'stage-2' key; locate the object construction using CreateSpecObject and CreateProposalObject (where DefineReadOnlyProperty is called with 'whatwg' and 'stage-2', and CreateFeatureArray is used) and add small assertions that those properties exist and contain the expected array shape/value so future metadata reshuffles will break tests instead of drifting.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@units/Goccia.Spec.pas`:
- Around line 285-297: The test fixtures lack assertions for the new non-year
keys added to the spec objects: update the relevant tests to assert that
CreateSpecObject exposes the 'whatwg' key and CreateProposalObject exposes the
'stage-2' key; locate the object construction using CreateSpecObject and
CreateProposalObject (where DefineReadOnlyProperty is called with 'whatwg' and
'stage-2', and CreateFeatureArray is used) and add small assertions that those
properties exist and contain the expected array shape/value so future metadata
reshuffles will break tests instead of drifting.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a5e9ac8b-f0b9-4e0f-9771-ec4bcaa4a90e
📒 Files selected for processing (1)
units/Goccia.Spec.pas
Summary
jobCountand parallel-timing reporting from TestRunner/BenchmarkRunner outputs and the CI checks that asserted those fields.Testing
./build.pas testrunner && ./build/TestRunner tests./format.pas --check