Commit graph

17 commits

Author SHA1 Message Date
Timothy Flynn
2e74b91ca1 LibJS: Pass calendar strings around as String more regularly
Same as commit f9fa548d43.

These are String from the outset, so this patch is almost entirely just
changing function parameter types. This will allow us to cache calendar
objects in ICU without invoking any extra allocations.
2026-03-09 11:40:59 +01:00
Shannon Booth
502ae99102 LibJS: Make more use of Value::is and Value::as_if 2026-02-28 10:24:37 -05:00
Timothy Flynn
cadba4c0e7 LibJS: Make more use of Value::is and Value::as_if in Temporal 2026-02-27 17:19:33 +01:00
Timothy Flynn
f9fa548d43 LibJS: Pass time zone strings around as String more regularly
These are String from the outset, so this patch is almost entirely just
changing function parameter types. This will allow us to cache time zone
parse results without invoking any extra allocations.
2026-02-19 09:20:15 +01:00
Timothy Flynn
206a18acd4 LibJS: Use single-line if/else steps in Temporal operations
This is an editorial change in the Temporal proposal. See:
978311d
2026-02-14 19:47:29 +01:00
Timothy Flynn
8c5fd82da9 LibJS: Replace "otherwise" with "else" in Temporal operations
This is an editorial change in the Temporal proposal. See:
1ae3e42
2026-02-14 19:47:29 +01:00
Timothy Flynn
0e81092685 LibJS: Make CombineDateAndTimeDuration infallible
This is an editorial change in the Temporal proposal. See:
794960c
2024-12-05 15:29:08 -05:00
Timothy Flynn
3e6133cc09 LibJS: Handle ZonedDateTime in the various Temporal factories 2024-11-26 11:00:56 +01:00
Timothy Flynn
477f00aced LibJS: Implement Temporal.Instant.prototype.until/since 2024-11-25 13:32:58 +01:00
Timothy Flynn
1d67f28e72 LibJS: Implement Temporal.Instant.prototype.add/subtract/equals 2024-11-25 13:32:58 +01:00
Timothy Flynn
615ad70030 LibJS: Implement stringification Temporal.Instant prototypes 2024-11-25 13:32:58 +01:00
Timothy Flynn
90820873a2 LibJS: Implement the Temporal.Instant constructor
And the simple Temporal.Instant.prototype getters, so that the
constructed Temporal.Instant may actually be validated.
2024-11-25 13:32:58 +01:00
Timothy Flynn
cb5d1b5086 LibJS: Implement Temporal.PlainYearMonth.prototype.until/since 2024-11-22 19:55:24 +01:00
Timothy Flynn
eca378a7a3 LibJS: Restore some Temporal numeric constants
And add few ad-hoc constants for convenience.
2024-11-20 19:04:30 -05:00
Timothy Flynn
f7517c5b8d LibJS: Remove our existing Temporal implementation
Our Temporal implementation is woefully out of date. The spec has been
so vastly rewritten that it is unfortunately not practical to update our
implementation in-place. Even just removing Temporal objects that were
removed from the spec, or updating any of the simpler remaining objects,
has proven to be a mess in previous attempts.

So, this removes our Temporal implementation. AOs used by other specs
are left intact.
2024-11-20 19:04:30 -05:00
Shannon Booth
f87041bf3a LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the
namespace change, we now have the following names:

 * JS::NonnullGCPtr -> GC::Ref
 * JS::GCPtr -> GC::Ptr
 * JS::HeapFunction -> GC::Function
 * JS::CellImpl -> GC::Cell
 * JS::Handle -> GC::Root
2024-11-15 14:49:20 +01:00
Timothy Flynn
93712b24bf Everywhere: Hoist the Libraries folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Libraries/LibJS/Runtime/Temporal/Instant.cpp (Browse further)