Parents: #475, #479 Related: #461, #493, #603
Problem
IntlNumberFormatData retains several resolved choices as byte slices even though constructor processing has already validated each against a finite ECMA-402 set. Intl.NumberFormat.prototype.resolvedOptions() currently allocates a managed StringCell again for each of those fields on every call.
The four existing NumberFormat constructor rows each execute 3,200 constructor + resolvedOptions() operations per 100 jobs. Current-main (10ac2f3d) exact invocation baselines are:
- default: 41,607 managed cells / 73,623 backing allocations / checksum 56,000
- fraction: 44,808 / 73,624 / checksum 59,200
- locale: 44,809 / 73,625 / checksum 59,200
- uncommon: 80,016 / 131,230 / checksum 107,200
Scope
- Project only constructor-validated finite fields through immutable static StringCells: style, currencyDisplay, currencySign, unitDisplay, notation, compactDisplay, signDisplay, roundingMode, roundingPriority, and trailingZeroDisplay.
- Keep locale, numberingSystem, currency code, unit identifier, and all other dynamically owned values on their current allocation paths.
- Make the allowed spelling set explicit at each projection site and fail internal invariant violations rather than silently misprojecting bytes.
- Preserve ECMA-402 field presence/order, significant-vs-fraction digit rules, grouping booleans/strings, option-observation order, OOM atomicity, and every formatter result.
No-workaround rules
- Do not cache/reuse observable resolved-options objects, skip unread properties, recognize benchmark source/name, globally intern attacker-controlled strings, or turn dynamic option data into process-global state.
- Do not touch Promise, microtask, Worker, Thread lifecycle, stacks, queues, or jobs code.
Acceptance
- Every finite resolved field is the exact unmanaged static cell for its validated spelling; dynamic strings remain managed/owned as before.
- Exact allocation reductions match the emitted fixed-field count in all four existing rows, with identical execution, Shape requests, and checksums.
- Exact test262 NumberFormat coverage has zero flips/regressions.
- Focused normal/TSan, bounded/moving GC, OOM, and full sharded unit gates pass.
- Order-balanced timing is reported for all four rows; only stable attributable results are claimed.
Security boundary
Options and call frequency are attacker-controlled. Static projection is permitted only after the existing validation and native-state publication boundary; unexpected internal bytes must not fall through to a wrong public value or mutable global cache.