Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 27ac373783f06cf91ea2333fc6f1c9c43253e0dd
https://github.com/WebKit/WebKit/commit/27ac373783f06cf91ea2333fc6f1c9c43253e0dd
Author: Yijia Huang <[email protected]>
Date: 2026-06-04 (Thu, 04 Jun 2026)
Changed paths:
M JSTests/stress/intl-canonical-iana-time-zone.js
A JSTests/stress/temporal-boundary-values.js
A JSTests/stress/temporal-calendar-daymath-weeks.js
A JSTests/stress/temporal-calendar-month-boundary.js
A JSTests/stress/temporal-cross-type.js
A JSTests/stress/temporal-duration-relative-to-era-calendar.js
A JSTests/stress/temporal-duration-relativeto.js
A JSTests/stress/temporal-gc-jit-stress.js
A JSTests/stress/temporal-int32-overflow-duration.js
A JSTests/stress/temporal-month-boundary-arithmetic.js
A JSTests/stress/temporal-month-overflow-truncation.js
A JSTests/stress/temporal-monthday-parsing-timezone.js
A JSTests/stress/temporal-monthday-refyear.js
A JSTests/stress/temporal-non-iso-calendar.js
A JSTests/stress/temporal-plain-date-time-with-era-calendar.js
A JSTests/stress/temporal-plain-date-with-era-calendar.js
A JSTests/stress/temporal-plain-month-day-with-era-calendar.js
A JSTests/stress/temporal-plain-year-month-with-era-calendar.js
A JSTests/stress/temporal-plaindate-to-yearmonth-monthday-calendar.js
A JSTests/stress/temporal-plaindatetime-calendar-propagation.js
A JSTests/stress/temporal-plainmonthday-to-plaindate-calendar.js
A JSTests/stress/temporal-pre-lmt-timezone.js
A JSTests/stress/temporal-rounding-modes.js
A JSTests/stress/temporal-string-parsing-edge.js
A JSTests/stress/temporal-timezone-diversity.js
A JSTests/stress/temporal-timezone-offset-identity.js
A JSTests/stress/temporal-zdt-large-fold-disambiguation.js
A JSTests/stress/temporal-zdt-round-dst-midnight-crossing.js
A JSTests/stress/temporal-zdt-rounding-boundary.js
A JSTests/stress/temporal-zdt-rounding-halfeven.js
A JSTests/stress/temporal-zdt-timezone-canonicalization.js
A JSTests/stress/temporal-zdt-to-locale-string-inherited-options.js
A JSTests/stress/temporal-zdt-with-boundary.js
A JSTests/stress/temporal-zoned-date-time-with-era-calendar.js
A JSTests/stress/temporal-zoned-datetime-difference-day-correction.js
A JSTests/stress/temporal-zoned-datetime-dst-arithmetic.js
A JSTests/stress/temporal-zoned-datetime-dst-fold.js
A JSTests/stress/temporal-zoned-datetime-dst-gap.js
M JSTests/test262/config.yaml
M JSTests/test262/expectations.yaml
M
JSTests/test262/test/intl402/Temporal/PlainMonthDay/prototype/toLocaleString/basic.js
M Source/JavaScriptCore/API/tests/TemporalCoreTest.cpp
M Source/JavaScriptCore/CMakeLists.txt
M Source/JavaScriptCore/DerivedSources-input.xcfilelist
M Source/JavaScriptCore/DerivedSources-output.xcfilelist
M Source/JavaScriptCore/DerivedSources.make
M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
M Source/JavaScriptCore/Sources.txt
M Source/JavaScriptCore/heap/Heap.cpp
M Source/JavaScriptCore/heap/Heap.h
M Source/JavaScriptCore/heap/HeapSubspaceTypes.h
M Source/JavaScriptCore/runtime/ISO8601.cpp
M Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
M Source/JavaScriptCore/runtime/IntlDateTimeFormat.h
M Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp
M Source/JavaScriptCore/runtime/JSGlobalObject.cpp
M Source/JavaScriptCore/runtime/JSGlobalObject.h
M Source/JavaScriptCore/runtime/TemporalCalendar.cpp
M Source/JavaScriptCore/runtime/TemporalCalendar.h
M Source/JavaScriptCore/runtime/TemporalDuration.cpp
M Source/JavaScriptCore/runtime/TemporalInstant.cpp
M Source/JavaScriptCore/runtime/TemporalInstant.h
M Source/JavaScriptCore/runtime/TemporalInstantPrototype.cpp
M Source/JavaScriptCore/runtime/TemporalNow.cpp
M Source/JavaScriptCore/runtime/TemporalObject.cpp
M Source/JavaScriptCore/runtime/TemporalObject.h
M Source/JavaScriptCore/runtime/TemporalPlainDate.cpp
M Source/JavaScriptCore/runtime/TemporalPlainDate.h
M Source/JavaScriptCore/runtime/TemporalPlainDatePrototype.cpp
M Source/JavaScriptCore/runtime/TemporalPlainDateTime.cpp
M Source/JavaScriptCore/runtime/TemporalPlainDateTimePrototype.cpp
M Source/JavaScriptCore/runtime/TemporalPlainMonthDay.cpp
M Source/JavaScriptCore/runtime/TemporalPlainMonthDayPrototype.cpp
M Source/JavaScriptCore/runtime/TemporalPlainTime.cpp
M Source/JavaScriptCore/runtime/TemporalPlainYearMonth.cpp
M Source/JavaScriptCore/runtime/TemporalPlainYearMonthPrototype.cpp
A Source/JavaScriptCore/runtime/TemporalZonedDateTime.cpp
A Source/JavaScriptCore/runtime/TemporalZonedDateTime.h
A Source/JavaScriptCore/runtime/TemporalZonedDateTimeConstructor.cpp
A Source/JavaScriptCore/runtime/TemporalZonedDateTimeConstructor.h
A Source/JavaScriptCore/runtime/TemporalZonedDateTimePrototype.cpp
A Source/JavaScriptCore/runtime/TemporalZonedDateTimePrototype.h
M Source/JavaScriptCore/runtime/temporal/core/CalendarFields.cpp
M Source/JavaScriptCore/runtime/temporal/core/CalendarFields.h
M Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.cpp
M Source/JavaScriptCore/runtime/temporal/core/CalendarICUBridge.h
M Source/JavaScriptCore/runtime/temporal/core/DurationArithmetic.cpp
M Source/JavaScriptCore/runtime/temporal/core/TimeZoneICUBridge.cpp
Log Message:
-----------
[JSC][Temporal] Implement Temporal.ZonedDateTime
https://bugs.webkit.org/show_bug.cgi?id=315939
rdar://178356192
Reviewed by Yusuke Suzuki and Sosuke Suzuki.
Adds the full Temporal.ZonedDateTime JS type: constructor, prototype
(all getters and methods), Temporal.Now.zonedDateTimeISO, and
Duration.round/total/compare with ZonedDateTime relativeTo.
New files: TemporalZonedDateTime.{h,cpp}, constructor, prototype.
Correctness fixes bundled with this change:
- CalendarICUBridge: calendarDateFromFields year param changed to
optional<int32_t>; nullopt = caller has no user-provided year (skip
NonISOResolveFields consistency check), has_value = user-provided
year (era+eraYear+year mismatch throws RangeError). Fixes silent
wrong results and missing error for conflicting year+era+eraYear.
- CalendarFields: new plainDateWith helper (CalendarMergeFields +
CalendarDateFromFields for PlainDate); correctly implements
NonISOFieldKeysToIgnore including Japanese-specific rule that
month/day changes suppress inherited era (not year) from base.
monthCode suppresses inherited base month per spec.
- PlainDate::with(): refactored to readCalendarFieldsFromObject
<Date,Skip> + plainDateWith; era+eraYear now correctly merged.
- PlainDateTime::with(): rewritten for spec-compliant single-pass
alphabetical field reading and era+eraYear support; previously
failed test262 ordering tests.
- TemporalDuration::toRelativeTemporalObject: era+eraYear in property
bags now route through calendarDateFromFields instead of being
silently dropped by isoDateFromFields.
- TemporalCalendar/PlainDateTime/ZonedDateTime: static_cast<int32_t>
(double) UB replaced with clampTo<int32_t> for year/eraYear;
static_cast<uint8_t/uint32_t>(double) UB replaced with
clampTo<uint8_t/uint32_t> for month/day fields. Manual
std::min(x, numeric_limits<T>::max()) patterns replaced with
clampTo<T>. isoDateFromFields signature updated to use uint32_t
for month/day (was unsigned).
- constrainTime: simplified to clampTo<unsigned> directly; the
explicit std::isnan guard was redundant (clampTo returns min for
NaN). Lambda eliminated.
- TemporalZonedDateTime/TemporalTimeZone: switched from
cellHeapCellType to destructibleCellHeapCellType and added
NeedsDestruction so String m_timeZoneId is properly destructed.
Previously the StringImpl leaked on GC.
- DurationArithmetic::computeNudgeWindow: the spec shortcut
"if r1=0, startEpochNs=originEpochNs" was wrong when startDuration
has non-zero larger units (e.g. weeks=1, days=0). Fixed to check
DateDurationSign(startDuration)==0 instead of just r1==0. Fixes
spurious extra-day results for exact multiples in
Duration.round/until/since with ZDT relativeTo.
- IntlDateTimeFormat: ZonedDateTime.toLocaleString support;
options prototype-chain lookup fixed (was own-property-only).
- Various FIXME stubs removed across Instant, PlainDate, PlainDateTime,
PlainTime, TemporalNow; stale ZonedDateTime FIXME blocks enabled
across stress tests.
Tests:
* JSTests/stress/temporal-boundary-values.js
* JSTests/stress/temporal-calendar-daymath-weeks.js
* JSTests/stress/temporal-calendar-month-boundary.js
* JSTests/stress/temporal-cross-type.js
* JSTests/stress/temporal-duration-relative-to-era-calendar.js
* JSTests/stress/temporal-duration-relativeto.js
* JSTests/stress/temporal-gc-jit-stress.js
* JSTests/stress/temporal-int32-overflow-duration.js
* JSTests/stress/temporal-month-boundary-arithmetic.js
* JSTests/stress/temporal-month-overflow-truncation.js
* JSTests/stress/temporal-monthday-parsing-timezone.js
* JSTests/stress/temporal-monthday-refyear.js
* JSTests/stress/temporal-non-iso-calendar.js
* JSTests/stress/temporal-plain-date-time-with-era-calendar.js
* JSTests/stress/temporal-plain-date-with-era-calendar.js
* JSTests/stress/temporal-plain-month-day-with-era-calendar.js
* JSTests/stress/temporal-plain-year-month-with-era-calendar.js
* JSTests/stress/temporal-plaindate-to-yearmonth-monthday-calendar.js
* JSTests/stress/temporal-plaindatetime-calendar-propagation.js
* JSTests/stress/temporal-plainmonthday-to-plaindate-calendar.js
* JSTests/stress/temporal-pre-lmt-timezone.js
* JSTests/stress/temporal-rounding-modes.js
* JSTests/stress/temporal-string-parsing-edge.js
* JSTests/stress/temporal-timezone-diversity.js
* JSTests/stress/temporal-timezone-offset-identity.js
* JSTests/stress/temporal-zdt-large-fold-disambiguation.js
* JSTests/stress/temporal-zdt-round-dst-midnight-crossing.js
* JSTests/stress/temporal-zdt-rounding-boundary.js
* JSTests/stress/temporal-zdt-rounding-halfeven.js
* JSTests/stress/temporal-zdt-timezone-canonicalization.js
* JSTests/stress/temporal-zdt-to-locale-string-inherited-options.js
* JSTests/stress/temporal-zdt-with-boundary.js
* JSTests/stress/temporal-zoned-date-time-with-era-calendar.js
* JSTests/stress/temporal-zoned-datetime-difference-day-correction.js
* JSTests/stress/temporal-zoned-datetime-dst-arithmetic.js
* JSTests/stress/temporal-zoned-datetime-dst-fold.js
* JSTests/stress/temporal-zoned-datetime-dst-gap.js
Canonical link: https://commits.webkit.org/314541@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications