Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: e165fd1fce9a07e76b7a711c065b6ada222fdae6
https://github.com/WebKit/WebKit/commit/e165fd1fce9a07e76b7a711c065b6ada222fdae6
Author: Yijia Huang <[email protected]>
Date: 2026-08-14 (Fri, 14 Aug 2026)
Changed paths:
M Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.cpp
M Source/JavaScriptCore/runtime/temporal/core/TemporalEnums.h
Log Message:
-----------
[JSC][Temporal] Delete constrainMonthCodeInternal and inline
constrainMonthCodeGivenContainment
https://bugs.webkit.org/show_bug.cgi?id=321685
rdar://184829841
Reviewed by Sosuke Suzuki.
constrainMonthCodeInternal re-checked ConstrainMonthCode via a live ICU cursor
for its only caller,
positionCursorAtConstrainedMonthCode. That caller is only reached for
non-lunisolar calendars, and a
leap monthCode is only ever valid for chinese/dangi/hebrew — exactly the
lunisolar set — so the check
always resolved to "contained" and the whole call reduced to one wasted ICU
read plus returning its
input unchanged. Deleted; the invariant is now an ASSERT instead of a runtime
check, along with an
unreachable calendarIsLunisolar branch in the same function and its now-unused
overflow parameter.
constrainMonthCodeGivenContainment loses its second caller in the same change,
so it's inlined into
the one left (constrainMonthCode).
Also deletes two TemporalEnums.h constants with zero references tree-wide.
No behavior change.
Canonical link: https://commits.webkit.org/319162@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications