Fix Intl format and compare accessors#686
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (8)
📝 WalkthroughWalkthroughThis PR converts three Intl built-in properties— ChangesIntl accessor property conversion for format and compare
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Benchmark Results407 benchmarks Interpreted: 🟢 162 improved · 🔴 18 regressed · 227 unchanged · avg +3.5% arraybuffer.js — Interp: 🟢 7, 7 unch. · avg +7.6% · Bytecode: 🔴 12, 2 unch. · avg -6.5%
arrays.js — Interp: 🟢 8, 11 unch. · avg +6.8% · Bytecode: 🔴 19 · avg -12.1%
async-await.js — Interp: 🟢 5, 🔴 1 · avg +16.2% · Bytecode: 🔴 5, 1 unch. · avg -5.4%
async-generators.js — Interp: 🟢 2 · avg +40.5% · Bytecode: 🔴 1, 1 unch. · avg -6.5%
base64.js — Interp: 🟢 1, 🔴 2, 7 unch. · avg +0.1% · Bytecode: 🟢 6, 🔴 2, 2 unch. · avg +1.7%
classes.js — Interp: 🟢 13, 18 unch. · avg +3.1% · Bytecode: 🔴 29, 2 unch. · avg -8.5%
closures.js — Interp: 🟢 4, 7 unch. · avg +1.1% · Bytecode: 🔴 9, 2 unch. · avg -8.7%
collections.js — Interp: 🟢 2, 10 unch. · avg +0.2% · Bytecode: 🟢 2, 🔴 5, 5 unch. · avg -3.1%
csv.js — Interp: 🟢 1, 12 unch. · avg -0.1% · Bytecode: 🔴 13 · avg -12.9%
destructuring.js — Interp: 🟢 10, 12 unch. · avg +3.0% · Bytecode: 🔴 16, 6 unch. · avg -5.8%
fibonacci.js — Interp: 🟢 1, 7 unch. · avg +1.4% · Bytecode: 🔴 7, 1 unch. · avg -10.3%
float16array.js — Interp: 🟢 16, 16 unch. · avg +2.4% · Bytecode: 🟢 1, 🔴 25, 6 unch. · avg -10.0%
for-of.js — Interp: 🟢 3, 4 unch. · avg +3.1% · Bytecode: 🟢 1, 🔴 3, 3 unch. · avg -4.2%
generators.js — Interp: 🟢 2, 2 unch. · avg +3.4% · Bytecode: 🔴 2, 2 unch. · avg -6.9%
iterators.js — Interp: 🟢 39, 3 unch. · avg +5.6% · Bytecode: 🟢 5, 🔴 21, 16 unch. · avg -3.2%
json.js — Interp: 🟢 4, 16 unch. · avg +2.2% · Bytecode: 🔴 19, 1 unch. · avg -13.4%
jsx.jsx — Interp: 🟢 3, 18 unch. · avg +1.8% · Bytecode: 🔴 21 · avg -9.5%
modules.js — Interp: 🟢 3, 🔴 1, 5 unch. · avg +2.0% · Bytecode: 🔴 9 · avg -16.7%
numbers.js — Interp: 🟢 4, 7 unch. · avg +2.1% · Bytecode: 🔴 11 · avg -7.4%
objects.js — Interp: 7 unch. · avg -0.5% · Bytecode: 🔴 7 · avg -12.8%
promises.js — Interp: 🟢 3, 🔴 2, 7 unch. · avg -0.2% · Bytecode: 🔴 12 · avg -11.3%
regexp.js — Interp: 🟢 1, 🔴 2, 8 unch. · avg -1.2% · Bytecode: 🟢 6, 🔴 5 · avg -1.2%
strings.js — Interp: 🟢 3, 16 unch. · avg +1.1% · Bytecode: 🔴 16, 3 unch. · avg -8.3%
tsv.js — Interp: 🔴 4, 5 unch. · avg -5.1% · Bytecode: 🔴 9 · avg -14.4%
typed-arrays.js — Interp: 🟢 15, 7 unch. · avg +12.4% · Bytecode: 🟢 5, 🔴 14, 3 unch. · avg -1.8%
uint8array-encoding.js — Interp: 🟢 10, 8 unch. · avg +13.4% · Bytecode: 🔴 16, 2 unch. · avg -12.0%
weak-collections.js — Interp: 🟢 2, 🔴 6, 7 unch. · avg -8.9% · Bytecode: 🟢 4, 🔴 7, 4 unch. · avg +6.3%
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. |
Suite TimingTest Runner (interpreted: 9,814 passed; bytecode: 9,814 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. |
test262 Conformance
Areas closest to 100%
Per-test deltas (+23 / -0)Newly passing (23):
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 |
Align Intl.NumberFormat format/formatToParts with ToNumber(undefined) semantics and Intl.DateTimeFormat format/formatToParts with the Date.now default for omitted or undefined dates.
Summary
Intl.NumberFormat.prototype.format,Intl.DateTimeFormat.prototype.format, andIntl.Collator.prototype.compareas accessor properties with undefined setters.format/compareproperties.NumberFormatformats omitted/undefinedasNaN, whileDateTimeFormatformats omitted/undefineddates using the current time.Testing
./build.pas testrunner && ./build/GocciaTestRunner tests./build/GocciaTestRunner tests/built-ins/Intl./build/GocciaTestRunner tests/built-ins/Intl/NumberFormat/prototype/format.js./build/GocciaTestRunner tests/built-ins/Intl/NumberFormat/prototype/formatToParts.js./build/GocciaTestRunner tests/built-ins/Intl/DateTimeFormat/prototype/format.js./build/GocciaTestRunner tests/built-ins/Intl/DateTimeFormat/prototype/formatToParts.js./format.pas --check