Problem
IntlDateTimeFormatData already stores every closed component/style name as a native enum whose resolvedOptions() projection reuses immutable String values. The effective hourCycle is the remaining closed four-value field stored in object-owned bytes and projected with Value.strAlloc on every call. The current DateTimeFormat construction row invokes resolvedOptions() but does not read or checksum hourCycle, so it cannot attribute or guard this change.
Scope
- Add a benchmark-first fresh-result workload covering
h11,h12,h23,h24, locale-u-hc-resolution,hour12precedence, and no-hour omission; checksum property presence, exact value, key order, result freshness, Shape identity, and unchanged source formatter state. - Represent the resolved effective cycle as a closed native enum after all user-observable option reads and locale resolution complete.
- Project the enum through immutable String values, remove only its redundant bytes from DateTimeFormat-owned storage, and preserve fresh ordinary
resolvedOptions()result objects and exact property creation order. - Measure exact invocation-phase managed cells, backing allocations/bytes, execution attribution, wall/CPU/RSS, and stable checksum against the exact parent before retaining the change.
- Preserve constructor publication rollback, formatter teardown, moving GC, shared no-GIL reads, and every calendar/numbering-system/time-zone ownership boundary.
No-workaround rules
- No intern-table mutation, unbounded cache, locale/time-zone shortcut, omitted option/property, altered getter order, reused result object, generated-table edit, system ICU/JSC dependency, or claim derived from noisy timing.
- No stacks, queues, jobs, Promise/microtask, Worker lifecycle, or Map/Set iterator implementation changes.
Acceptance
- Benchmark-first parent evidence freezes all four hour cycles, extension/override/absence controls, fresh result identity, key order, Shape identity, exact checksum, and allocation replay.
- Candidate removes the per-call
hourCyclemanaged String allocation and redundant owned bytes with identical logical work, execution attribution, and checksum; unrelated locale/calendar/numberingSystem/timeZone allocations remain unchanged. - Option observation,
hour12precedence, locale extension resolution, omission without an hour field, result freshness, and property order remain exact under forced tree-walker and required bytecode execution. - Deterministic OOM at construction and projection boundaries, formatter teardown, moving GC/compaction, no-GIL/TSan shared reads, and allocation-accounting witnesses pass without leaks or partial publication.
- Focused Intl/DateTimeFormat units, full units, exact relevant Test262 accounting, dependency/docs/benchmark validation, and guarded exact-parent evidence pass with zero semantic flips.
- A conventional commit lands directly on
main, cross-links #475 and #460, and records allocation deltas without promoting diagnostic wall time.