Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8d261de036d46e2f57473eb3c8c65f43bbf77324
https://github.com/WebKit/WebKit/commit/8d261de036d46e2f57473eb3c8c65f43bbf77324
Author: Justin Michaud <[email protected]>
Date: 2026-07-21 (Tue, 21 Jul 2026)
Changed paths:
A JSTests/microbenchmarks/date-time-complex.js
A JSTests/stress/intl-datetimeformat-cache-observability.js
A JSTests/stress/intl-datetimeformat-cache-tz-watcher.js
A JSTests/stress/intl-datetimeformat-cache-undefined-locales.js
A JSTests/stress/intl-datetimeformat-cache-zoneddatetime-tolocalestring.js
A JSTests/stress/intl-datetimeformat-cross-instance.js
A JSTests/stress/intl-datetimeformat-cross-realm.js
A
JSTests/stress/intl-datetimeformat-default-formatter-stale-across-language-change.js
A
JSTests/stress/intl-datetimeformat-default-formatter-stale-across-tz-change.js
A JSTests/stress/intl-datetimeformat-failure-not-cached.js
A JSTests/stress/intl-datetimeformat-language-change-mid-construction.js
A JSTests/stress/intl-datetimeformat-language-change.js
A JSTests/stress/intl-datetimeformat-tz-change-consistency.js
A JSTests/stress/intl-datetimeformat-tz-change.js
A JSTests/stress/intl-datetimeformat-worker-smoke.js
M JSTests/stress/intl-default-locale.js
A JSTests/stress/intl-having-a-bad-time.js
M Source/JavaScriptCore/runtime/InitializeThreading.cpp
M Source/JavaScriptCore/runtime/IntlCache.cpp
M Source/JavaScriptCore/runtime/IntlCache.h
M Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
M Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
M Source/JavaScriptCore/runtime/IntlListFormat.cpp
M Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
M Source/JavaScriptCore/runtime/IntlObject.cpp
M Source/JavaScriptCore/runtime/IntlRelativeTimeFormat.cpp
M Source/JavaScriptCore/runtime/VM.cpp
M Source/JavaScriptCore/runtime/VM.h
M Source/JavaScriptCore/runtime/VMEntryScope.cpp
M Source/WTF/wtf/Language.cpp
Log Message:
-----------
Cache Intl.DateTimeFormat
https://bugs.webkit.org/show_bug.cgi?id=314337
Reviewed by Keith Miller.
We cache new Intl.DateTimeFormat like other engines. A LRU cache keeps
the underlying const impl object cached, and JS wrappers share a reference
to it now.
We also register a new language change observer to invalidate our cache.
We restructure the resetting code a bit so that it is clear when
we are resetting due to TZ or language, even if the actual reset
logic is the same.
date-time-complex.js goes 200-1000x faster (simple vs complex case).
While touching this code, we also fix a related bug: canonicalizeLocaleList
should defineOwnProperty on the resulting array, we shouldn't observe
this. I added a test for this case too, and now we match v8's behaviour
with and without this new cache.
Finally, I have included some llm-generated tests to make sure we hit
a bunch of these edge cases. They are a bit verbose for my tastes,
but I figured that including them could still be useful for the fuzzer.
Canonical link: https://commits.webkit.org/317628@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications