ladybird/Libraries/LibJS/Runtime/Temporal
Timothy Flynn d1ed361239 LibJS: Cache the result of parsing time zone identifiers
The result of parsing an identifier cannot change. It is not cheap to do
so, so let's cache the result.

This is hammered in a few test262 tests. On my machine, this reduces the
runtime of each test/staging/sm/Date/dst-offset-caching-{N}-of-8.js by
0.3 to 0.5 seconds. For example:

dst-offset-caching-1-of-8.js: Reduces from 1.2s -> 0.9s
dst-offset-caching-3-of-8.js: Reduces from 1.5s -> 1.1s
2026-02-19 09:20:15 +01:00
..
AbstractOperations.cpp LibJS: Use infallible time zone parser in a couple more locations 2026-02-19 09:20:15 +01:00
AbstractOperations.h LibJS: Use "either" / "one of" when comparing multiple items in Temporal 2026-02-14 19:47:29 +01:00
Calendar.cpp LibJS: Use single-line if/else steps in Temporal operations 2026-02-14 19:47:29 +01:00
Calendar.h LibJS: Introduce ParseMonthCode and CreateMonthCode Temporal AOs 2025-08-14 11:35:28 -04:00
DateEquations.cpp LibJS: Implement Temporal.PlainYearMonth.prototype.until/since 2024-11-22 19:55:24 +01:00
DateEquations.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
Duration.cpp LibJS: Pass time zone strings around as String more regularly 2026-02-19 09:20:15 +01:00
Duration.h LibJS: Pass time zone strings around as String more regularly 2026-02-19 09:20:15 +01:00
DurationConstructor.cpp LibJS: Use "either" / "one of" when comparing multiple items in Temporal 2026-02-14 19:47:29 +01:00
DurationConstructor.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
DurationPrototype.cpp LibJS: Use single-line if/else steps in Temporal operations 2026-02-14 19:47:29 +01:00
DurationPrototype.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
Instant.cpp LibJS: Pass time zone strings around as String more regularly 2026-02-19 09:20:15 +01:00
Instant.h LibJS: Pass time zone strings around as String more regularly 2026-02-19 09:20:15 +01:00
InstantConstructor.cpp LibJS: Use consistent wording around NewTarget in Temporal constructors 2025-07-23 22:05:15 +02:00
InstantConstructor.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
InstantPrototype.cpp LibJS: Pass time zone strings around as String more regularly 2026-02-19 09:20:15 +01:00
InstantPrototype.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
ISO8601.cpp Revert "LibJS: Move ambiguous time string handling to a separate parser" 2026-01-30 08:01:45 +01:00
ISO8601.h Revert "LibJS: Move ambiguous time string handling to a separate parser" 2026-01-30 08:01:45 +01:00
ISORecords.h LibJS: Introduce Time Zone Identifier Parse Records to Temporal 2025-11-12 16:20:04 -05:00
Now.cpp LibJS: Use Temporal for the Date constructor and Date.now() 2024-11-26 15:02:07 -05:00
Now.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainDate.cpp LibJS: Use single-line if/else steps in Temporal operations 2026-02-14 19:47:29 +01:00
PlainDate.h LibJS: Split ISODateSurpasses into a couple of AOs 2026-01-30 08:01:45 +01:00
PlainDateConstructor.cpp LibJS: Implement the Temporal.PlainDate constructor 2024-11-23 14:46:00 +01:00
PlainDateConstructor.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainDatePrototype.cpp LibJS: Update spec numbers for Intl Temporal operations 2026-02-14 19:47:29 +01:00
PlainDatePrototype.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainDateTime.cpp LibJS: Use single-line if/else steps in Temporal operations 2026-02-14 19:47:29 +01:00
PlainDateTime.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainDateTimeConstructor.cpp LibJS: Use consistent wording around NewTarget in Temporal constructors 2025-07-23 22:05:15 +02:00
PlainDateTimeConstructor.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainDateTimePrototype.cpp LibJS: Use single-line if/else steps in Temporal operations 2026-02-14 19:47:29 +01:00
PlainDateTimePrototype.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainMonthDay.cpp LibJS: Avoid "or if" in if-clauses in Temporal 2026-02-14 19:47:29 +01:00
PlainMonthDay.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainMonthDayConstructor.cpp LibJS: Implement the Temporal.PlainMonthDay constructor 2024-11-21 19:24:25 -05:00
PlainMonthDayConstructor.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainMonthDayPrototype.cpp LibJS: Use single-line if/else steps in Temporal operations 2026-02-14 19:47:29 +01:00
PlainMonthDayPrototype.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainTime.cpp LibJS: Use single-line if/else steps in Temporal operations 2026-02-14 19:47:29 +01:00
PlainTime.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainTimeConstructor.cpp LibJS: Use consistent wording around NewTarget in Temporal constructors 2025-07-23 22:05:15 +02:00
PlainTimeConstructor.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainTimePrototype.cpp LibJS: Use single-line if/else steps in Temporal operations 2026-02-14 19:47:29 +01:00
PlainTimePrototype.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainYearMonth.cpp LibJS: Use single-line if/else steps in Temporal operations 2026-02-14 19:47:29 +01:00
PlainYearMonth.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainYearMonthConstructor.cpp LibJS: Use consistent wording around NewTarget in Temporal constructors 2025-07-23 22:05:15 +02:00
PlainYearMonthConstructor.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
PlainYearMonthPrototype.cpp LibJS: Use single-line if/else steps in Temporal operations 2026-02-14 19:47:29 +01:00
PlainYearMonthPrototype.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
Temporal.cpp LibJS: Implement the Temporal.ZonedDateTime constructor 2024-11-26 11:00:56 +01:00
Temporal.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
TimeZone.cpp LibJS: Cache the result of parsing time zone identifiers 2026-02-19 09:20:15 +01:00
TimeZone.h LibJS: Cache the result of parsing time zone identifiers 2026-02-19 09:20:15 +01:00
ZonedDateTime.cpp LibJS: Pass time zone strings around as String more regularly 2026-02-19 09:20:15 +01:00
ZonedDateTime.h LibJS: Pass time zone strings around as String more regularly 2026-02-19 09:20:15 +01:00
ZonedDateTimeConstructor.cpp LibJS: Pass time zone strings around as String more regularly 2026-02-19 09:20:15 +01:00
ZonedDateTimeConstructor.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00
ZonedDateTimePrototype.cpp LibJS: Use single-line if/else steps in Temporal operations 2026-02-14 19:47:29 +01:00
ZonedDateTimePrototype.h LibJS: Revert Enable EXPLICIT_SYMBOL_EXPORT 2025-07-22 11:51:29 -04:00