Intl: return all ECMA-402 required fields from resolvedOptions()#631
Intl: return all ECMA-402 required fields from resolvedOptions()#631frostney wants to merge 5 commits into
Conversation
Fix TryReadStringOption using `out` instead of `var`, which cleared constructor defaults when the option was absent. Add missing fields (numberingSystem, roundingIncrement, roundingPriority, trailingZeroDisplay, pluralCategories, calendar) and resolve fraction-digit defaults per spec across NumberFormat, DateTimeFormat, PluralRules, RelativeTimeFormat, and DurationFormat. Closes #595 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
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,328 passed; bytecode: 9,328 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: 🟢 48 improved · 🔴 57 regressed · 302 unchanged · avg +0.5% arraybuffer.js — Interp: 🔴 8, 6 unch. · avg -2.2% · Bytecode: 🔴 12, 2 unch. · avg -8.6%
arrays.js — Interp: 🟢 10, 9 unch. · avg +5.3% · Bytecode: 🔴 19 · avg -9.9%
async-await.js — Interp: 6 unch. · avg +1.2% · Bytecode: 🔴 4, 2 unch. · avg -10.4%
async-generators.js — Interp: 2 unch. · avg +0.3% · Bytecode: 🔴 1, 1 unch. · avg -10.8%
base64.js — Interp: 🟢 1, 9 unch. · avg +0.6% · Bytecode: 🟢 7, 🔴 3 · avg +0.9%
classes.js — Interp: 🟢 1, 30 unch. · avg -0.4% · Bytecode: 🔴 22, 9 unch. · avg -6.4%
closures.js — Interp: 🔴 5, 6 unch. · avg -3.0% · Bytecode: 🔴 11 · avg -12.3%
collections.js — Interp: 🟢 1, 11 unch. · avg +0.5% · Bytecode: 🔴 12 · avg -9.9%
csv.js — Interp: 13 unch. · avg -0.1% · Bytecode: 🔴 13 · avg -11.0%
destructuring.js — Interp: 🟢 2, 🔴 1, 19 unch. · avg -0.6% · Bytecode: 🔴 20, 2 unch. · avg -10.2%
fibonacci.js — Interp: 🔴 2, 6 unch. · avg -0.9% · Bytecode: 🔴 8 · avg -11.0%
float16array.js — Interp: 🟢 3, 🔴 2, 27 unch. · avg +0.2% · Bytecode: 🟢 4, 🔴 27, 1 unch. · avg -5.6%
for-of.js — Interp: 🟢 2, 5 unch. · avg +1.2% · Bytecode: 🔴 7 · avg -9.7%
generators.js — Interp: 4 unch. · avg -1.9% · Bytecode: 🔴 4 · avg -7.7%
iterators.js — Interp: 🟢 14, 🔴 4, 24 unch. · avg +1.8% · Bytecode: 🔴 42 · avg -9.2%
json.js — Interp: 20 unch. · avg +0.4% · Bytecode: 🔴 20 · avg -9.7%
jsx.jsx — Interp: 🟢 1, 🔴 10, 10 unch. · avg -2.9% · Bytecode: 🔴 20, 1 unch. · avg -9.8%
modules.js — Interp: 9 unch. · avg +0.7% · Bytecode: 🔴 9 · avg -13.2%
numbers.js — Interp: 🟢 1, 🔴 2, 8 unch. · avg -1.1% · Bytecode: 🔴 11 · avg -9.1%
objects.js — Interp: 7 unch. · avg -0.9% · Bytecode: 🔴 7 · avg -9.0%
promises.js — Interp: 12 unch. · avg +0.0% · Bytecode: 🔴 12 · avg -9.7%
regexp.js — Interp: 🔴 3, 8 unch. · avg -17.4% · Bytecode: 🟢 6, 🔴 5 · avg -12.8%
strings.js — Interp: 🔴 8, 11 unch. · avg -2.7% · Bytecode: 🔴 15, 4 unch. · avg -7.1%
tsv.js — Interp: 🟢 1, 🔴 1, 7 unch. · avg -0.2% · Bytecode: 🔴 8, 1 unch. · avg -7.6%
typed-arrays.js — Interp: 🟢 5, 🔴 2, 15 unch. · avg +9.7% · Bytecode: 🟢 1, 🔴 20, 1 unch. · avg -12.5%
uint8array-encoding.js — Interp: 🟢 4, 🔴 4, 10 unch. · avg +4.9% · Bytecode: 🟢 10, 🔴 3, 5 unch. · avg +24.2%
weak-collections.js — Interp: 🟢 2, 🔴 5, 8 unch. · avg +5.8% · Bytecode: 🔴 15 · avg -28.7%
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 (+131 / -66)Newly failing (66):
Newly passing (131):
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 |
…crement Configure ICU number formatter with ECMA-402 options by passing minimumIntegerDigits, fraction digits, significant digits, useGrouping, roundingMode, and roundingIncrement through to ICU via unum_setAttribute, unum_applyPattern, and engine-side rounding increment arithmetic. Use unum_applyPattern with '@' notation for significant digits mode, since unum_setAttribute(UNUM_SIGNIFICANT_DIGITS_USED) has no effect on Apple ICU. Implement rounding increment in Pascal using integer-scaled arithmetic to avoid IEEE 754 precision issues and ICU portability gaps. Fix ICU symbol resolution on Linux where libraries export versioned symbols (e.g. unum_open_76). Store the version suffix discovered during library loading and try versioned names when bare lookups fail. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
98bba51 to
48953ca
Compare
The ICU symbol resolution fix causes uset_* functions to load on Linux for the first time. The system ICU may ship a different Unicode version than the embedded tables were generated from, producing mismatches for 52 property-escape tests. Swap the lookup order so embedded data is tried first and ICU is the fallback for properties not in the embedded tables. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This reverts commit 9a0ccfd.
Summary
TryReadStringOptionusingoutinstead ofvarparameter, which cleared constructor defaults (e.g.notation,roundingMode,signDisplay) to empty strings when the option was absent from the user-supplied options object.resolvedOptions()across six Intl constructors:numberingSystem(default"latn"), resolvedminimumFractionDigits/maximumFractionDigits(style-dependent defaults),roundingIncrement,roundingPriority,trailingZeroDisplay, andcompactDisplay(whennotationis"compact").calendar(default"gregory"),numberingSystem(default"latn"),timeZone; default toyear/month/day"numeric"when no dateStyle/timeStyle/components specified; exclude component properties when dateStyle/timeStyle is used.minimumFractionDigits(0) andmaximumFractionDigits(3) defaults; addpluralCategoriesarray from CLDR data.numberingSystem(default"latn").numberingSystem(default"latn").Testing