Parent: #475 Follow-up to: #568
Problem
Intl.NumberFormat.prototype.formatRange() and formatRangeToParts() still use engine-wide separator and suffix-sharing heuristics. Locale interval syntax and compact-affix collapse are data-driven behaviors: JavaScriptCore uses 1.2M – 2.3M for English short compact, 1235万 ~ 2346万 for Japanese, 1235万 - 2346万 for Simplified Chinese, and 1235만 ~ 2346만 for Korean. The current engine can instead share an equal compact suffix and emit a generic en dash.
This is independent of the compact magnitude/plural patterns generated by #568. It affects both rendered text and the source attribution of formatRangeToParts().
Requirements
- Generate the supported locales range separator/interval data from the repository-pinned CLDR revision.
- Implement locale- and pattern-sensitive compact affix collapse/repetition for equal and unequal plural forms.
- Keep text and parts on one structural path, preserving exact BigInt inputs, numbering-system digits, approximation behavior, and
startRange/endRange/sharedsources. - Store the generated tables as immutable engine data shared safely by realms and threads.
- Cover short and long compact notation across English, German, French, Hindi, Japanese, Chinese, Korean, Russian, Arabic, and Hebrew.
Acceptance
- Differential controls match JavaScriptCore for range text, part types/values, and sources across the supported locale matrix.
- Focused normal, OOM, moving-GC, no-GIL, and TSan tests pass.
- Relevant Intl402 range corpora and the full unit suite have no regressions.
Non-goals
- No hand-written locale switch.
- No system ICU/runtime locale dependency.
- No copied expected-output fixture used as implementation data.