fix(intl): delegate locale prototype methods#700
Conversation
Implement Intl-aware Number, Array, and Date toLocale* prototype methods via the default shim layer. Closes #605
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Suite TimingTest Runner (interpreted: 9,897 passed; bytecode: 9,897 passed)
MemoryGC rows aggregate the main thread plus all worker thread-local GCs. Test runner worker shutdown frees thread-local heaps in bulk; that shutdown reclamation is not counted as GC collections or collected objects.
Benchmarks (interpreted: 407; bytecode: 407)
MemoryGC rows aggregate the main thread plus all worker thread-local GCs. Benchmark runner performs explicit between-file collections, so collection and collected-object counts can be much higher than the test runner.
Measured on ubuntu-latest x64. |
Benchmark Results407 benchmarks Interpreted: 🟢 5 improved · 🔴 400 regressed · 2 unchanged · avg -28.3% arraybuffer.js — Interp: 🔴 14 · avg -36.0% · Bytecode: 🔴 11, 3 unch. · avg -11.9%
arrays.js — Interp: 🔴 19 · avg -31.6% · Bytecode: 🟢 2, 🔴 13, 4 unch. · avg -5.4%
async-await.js — Interp: 🔴 6 · avg -37.6% · Bytecode: 🔴 5, 1 unch. · avg -9.4%
async-generators.js — Interp: 🔴 2 · avg -43.3% · Bytecode: 🔴 2 · avg -10.6%
base64.js — Interp: 🔴 10 · avg -24.4% · Bytecode: 🟢 7, 🔴 3 · avg +0.8%
classes.js — Interp: 🔴 31 · avg -26.2% · Bytecode: 🔴 16, 15 unch. · avg -5.7%
closures.js — Interp: 🔴 11 · avg -31.2% · Bytecode: 🔴 11 · avg -11.9%
collections.js — Interp: 🔴 12 · avg -31.9% · Bytecode: 🔴 12 · avg -12.0%
csv.js — Interp: 🔴 13 · avg -30.4% · Bytecode: 🔴 13 · avg -11.0%
destructuring.js — Interp: 🔴 22 · avg -28.9% · Bytecode: 🔴 21, 1 unch. · avg -9.4%
fibonacci.js — Interp: 🔴 8 · avg -31.7% · Bytecode: 🔴 8 · avg -11.6%
float16array.js — Interp: 🔴 32 · avg -29.2% · Bytecode: 🟢 5, 🔴 20, 7 unch. · avg +0.1%
for-of.js — Interp: 🔴 7 · avg -25.6% · Bytecode: 🔴 6, 1 unch. · avg -10.5%
generators.js — Interp: 🔴 4 · avg -28.5% · Bytecode: 🔴 3, 1 unch. · avg -6.2%
iterators.js — Interp: 🔴 42 · avg -32.2% · Bytecode: 🔴 37, 5 unch. · avg -8.3%
json.js — Interp: 🔴 20 · avg -30.5% · Bytecode: 🔴 20 · avg -10.8%
jsx.jsx — Interp: 🔴 21 · avg -23.8% · Bytecode: 🟢 1, 🔴 9, 11 unch. · avg -2.8%
modules.js — Interp: 🔴 9 · avg -28.0% · Bytecode: 🔴 9 · avg -14.8%
numbers.js — Interp: 🔴 11 · avg -30.2% · Bytecode: 🔴 11 · avg -11.1%
objects.js — Interp: 🔴 7 · avg -28.0% · Bytecode: 🔴 5, 2 unch. · avg -5.4%
promises.js — Interp: 🔴 12 · avg -21.1% · Bytecode: 🔴 11, 1 unch. · avg -8.7%
regexp.js — Interp: 🔴 11 · avg -21.9% · Bytecode: 🟢 6, 🔴 5 · avg +0.8%
strings.js — Interp: 🔴 19 · avg -28.2% · Bytecode: 🔴 19 · avg -12.1%
tsv.js — Interp: 🔴 9 · avg -22.6% · Bytecode: 🔴 8, 1 unch. · avg -8.6%
typed-arrays.js — Interp: 🔴 21, 1 unch. · avg -32.1% · Bytecode: 🔴 19, 3 unch. · avg -18.4%
uint8array-encoding.js — Interp: 🟢 4, 🔴 14 · avg -17.8% · Bytecode: 🟢 12, 🔴 1, 5 unch. · avg +19.2%
weak-collections.js — Interp: 🟢 1, 🔴 13, 1 unch. · avg -21.3% · Bytecode: 🔴 14, 1 unch. · avg -14.0%
Deterministic profile diffDeterministic profile diff: no significant changes. 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. |
test262 Conformance
Areas closest to 100%
Per-test deltas (+35 / -2)Newly failing (2):
Newly passing (35):
Steady-state failures are non-blocking; regressions vs the cached main baseline (lower total pass count, or any PASS → non-PASS transition) fail the conformance gate. Measured on ubuntu-latest x64, bytecode mode. Areas grouped by the first two test262 path components; minimum 25 attempted tests, areas already at 100% excluded. Δ vs main compares against the most recent cached |
Summary
Number.prototype.toLocaleString,Array.prototype.toLocaleString, and DatetoLocaleString/toLocaleDateString/toLocaleTimeStringbehavior through the default shim layer.Intl.*Formatmutations do not affect the prototype methods.Closes #605
Testing
Commands run:
./build.pas loader testrunner loaderbare./build/GocciaTestRunner tests/built-ins/Number/prototype/toLocaleString.js tests/built-ins/Array/prototype/toLocaleString.js tests/built-ins/Date/prototype/toLocaleString.js tests/built-ins/Date/prototype/toLocaleDateString.js tests/built-ins/Date/prototype/toLocaleTimeString.js --no-progress --exit-on-first-failure./build/GocciaTestRunner tests/built-ins/Number/prototype/toLocaleString.js tests/built-ins/Array/prototype/toLocaleString.js tests/built-ins/Date/prototype/toLocaleString.js tests/built-ins/Date/prototype/toLocaleDateString.js tests/built-ins/Date/prototype/toLocaleTimeString.js --mode=bytecode --no-progress --exit-on-first-failurebun scripts/run_test262_suite.ts --suite-dir /tmp/goccia-test262-605 --categories intl402 --filter 'intl402/Array/prototype/toLocaleString/**' --mode bytecode --jobs 1 --verbose(2/2 pass)bun scripts/run_test262_suite.ts --suite-dir /tmp/goccia-test262-605 --categories intl402 --filter 'intl402/Number/prototype/toLocaleString/**' --mode bytecode --jobs 1 --verbose(6/7 pass; remaining exception-equivalence failure matches existing Intl exception metadata limitations)bun scripts/run_test262_suite.ts --suite-dir /tmp/goccia-test262-605 --categories intl402 --filter 'intl402/Date/prototype/**' --mode bytecode --jobs 1 --verbose(11/12 pass; remaining exception-equivalence failure matches existing Intl exception metadata limitations)./format.pas --checkgit diff --check./build/GocciaTestRunner tests --no-progress(9854/9859 pass; remaining failures are FFI fixture loads for./fixtures/ffi/libfixture.dylib)