Commit Graph

13 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
a8345693aa LibJS: Avoid "or if" in if-clauses in Temporal
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/e85b20b
2026-02-14 19:47:29 +01:00
Timothy Flynn
1d8e03b236 LibJS: Remove redundant "the value of x" in Temporal operations
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/09e36d3
2026-02-14 19:47:29 +01:00
Timothy Flynn
1fdcb5cfe5 LibJS: Fix typo in ToTemporalMonthDay
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/56828a2
2026-02-14 19:47:29 +01:00
Timothy Flynn
29c8e7c203 LibJS: Disallow large dates in ToTemporalMonthDay
This is a normative change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/bd5ac12

Note: No test added here because this only affects non-ISO-8601
calendars, which we do not yet support.
2025-03-01 14:49:20 +01:00
Timothy Flynn
521638642f LibJS: Capture CalendarFields by reference in Calendar*FromFields AOs
These fields are modified by an invocation to CalendarResolveFields. All
callers currently don't care about these modifications, so they move the
CalendarFields struct into the AO. But it turns out that at least one AO
will care (InterpretTemporalDateTimeFields), thus we will need to take
by reference here.
2024-11-23 14:46:00 +01:00
Timothy Flynn
5bccb36a6f LibJS: Implement stringification Temporal.PlainMonthDay prototypes 2024-11-21 19:24:25 -05:00
Timothy Flynn
1a386e78c3 LibJS: Implement the Temporal.PlainMonthDay constructor
And the simple Temporal.PlainMonthDay.prototype getters, so that the
constructed Temporal.PlainMonthDay may actually be validated.
2024-11-21 19:24:25 -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