size: gate Date toLocale* + Intl subclass-super behind intl-namespace (hello −99 KB, crosses under 4.1 MB) - #7009
Conversation
|
Warning Review limit reached
Next review available in: 14 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fourth slice, and the largest single win of the series. #6959 gated the
Intlnamespace/instanceof/subclass paths, but 164 KB of the Intl web survived —ld64 -why_livepointed at two always-live references that #6959 didn't cover:Date.prototype.toLocale{,Date,Time}String→date_to_locale_opts_impl→intl::temporal_locale_string. The Date prototype is installed in every binary, so its locale thunks pinned the Intl formatting machinery unconditionally.class X extends Intl.<Ctor>super probe infetch_globals' construct path.Both now sit behind the existing
intl-namespacefeature — no new feature, no new detection, because the compiler's detection already fires on everytoLocale*/localeCompare/Intltoken. With the feature off, the Date thunks defer to the non-locale formatter (unreachable in practice, since reaching them requires atoLocale*token that would have enabled the feature) and the Intl subclass probe can never match (no Intl constructor value can exist).Measured: hello world 4,344,464 → 4,245,216 (−99 KB).
rt::intldrops from 164 KB to near-zero for programs with no locale API.Verification: a 9-case
toLocale*probe —Date.toLocaleDateString/TimeString/Stringwith and without options, Invalid Date,Number.toLocaleString,BigInt.toLocaleString,localeCompare,Array.prototype.toLocaleString— matches Node exactly, except German collation ("ä".localeCompare("z", "de")), which reproduces identically on released perry 0.5.1220 → pre-existing (Perry'slocaleComparedoesn't do CLDR collation; noted in #6960's family). Serial runtime suite 1509/1509; both feature states compile.Series total: 4,461,216 → 4,245,216 (−216 KB, −4.8%) across #6980, #6985, #7008 and this PR.