Timothy Flynn
e314ca5e9d
LibJS: Introduce ParseMonthCode and CreateMonthCode Temporal AOs
...
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/28357ea
https://github.com/tc39/proposal-temporal/commit/32f4b02
https://github.com/tc39/proposal-temporal/commit/f860ac6
https://github.com/tc39/proposal-temporal/commit/e6f565d
2025-08-14 11:35:28 -04:00
Timothy Flynn
e95f225362
LibJS: Correctly disallow certain calendar-based Temporal strings
...
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/d83241f
2025-07-23 22:05:15 +02:00
Timothy Flynn
3b3ff6f057
LibJS: Split up the GetTemporalUnitValuedOption AO
...
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/fcdb47e
https://github.com/tc39/proposal-temporal/commit/ef04774
https://github.com/tc39/proposal-temporal/commit/2070032
https://github.com/tc39/proposal-temporal/commit/adf50d4
https://github.com/tc39/proposal-temporal/commit/40eaeb7
https://github.com/tc39/proposal-temporal/commit/aab7bee
https://github.com/tc39/proposal-temporal/commit/a10d38d
https://github.com/tc39/proposal-temporal/commit/06ce375
2025-07-23 22:05:15 +02:00
Timothy Flynn
c8b4dc4847
LibJS: Require strict matching with a precise ZonedDateTime offset
...
This is a normative change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/1117eaf
2025-06-03 09:09:21 +12:00
devgianlu
5f1a30197c
LibCrypto: Remove the concept of invalid big integers
...
This concept is rarely used in codebase and very much error-prone
if you forget to check it.
Instead, make it so that operations that would produce invalid integers
return an error instead.
2025-04-28 12:05:26 +02:00
Timothy Flynn
a8d6e5c3db
LibJS: Migrate Temporal updates to ECMA-262 AOs to the main AO file
...
These are going to be included in the ECMA-262 AOs once Temporal reaches
stage 4. There's no need to keep them in the Temporal namespace. Some
upcoming Temporal editorial changes will get awkward without this patch.
2025-03-01 14:49:20 +01:00
Timothy Flynn
ea52952774
LibJS: Update Date AOs to use Temporal
...
Neglected to do this after the Temporal rewrite. This lets us eliminate
the duplicated GetUTCEpochNanoseconds definition in Temporal.
2025-03-01 14:49:20 +01:00
Timothy Flynn
5372d07c5c
LibJS: Simplify ParseTemporalCalendarString
...
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/1b1fd9f
2025-01-28 11:25:42 +00:00
Timothy Flynn
784e872851
LibJS: Remove errant assertion from ParseISODateTime
...
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/728beeb
2024-12-05 15:29:08 -05:00
Timothy Flynn
fe4995b69a
LibJS: Replace invalid reference to an [[Offset]] internal slot
...
This is an editorial change in the Temporal proposal. See:
https://github.com/tc39/proposal-temporal/commit/f1569ef
Here, we also update the struct member name to match the correct slot
name.
2024-12-05 15:29:08 -05:00
Timothy Flynn
ade510fe17
LibJS: Pass ISO types by value vs. const-reference more correctly
...
We were passing types like ISODate by reference so that they could be
used as forward-declarations. But after commit 021a5f4ded , we now have
their full definitions anywhere they're needed. So let's pass ISODate by
value everywhere consistently - it is only 8 bytes.
2024-11-26 11:35:15 -05:00
Timothy Flynn
b95528d7b5
LibJS: Stub out Temporal.ZonedDateTime.prototype.getTimeZoneTransition
...
We will have to add facilities to determine next/previous time zone
transitions. Ideally, ICU can provide this.
2024-11-26 11:00:56 +01:00
Timothy Flynn
4ef21614e9
LibJS: Implement stringification Temporal.ZonedDateTime prototypes
2024-11-26 11:00:56 +01:00
Timothy Flynn
18f95434bc
LibJS: Implement the Temporal.Duration relative-to ZonedDateTime options
2024-11-26 11:00:56 +01:00
Timothy Flynn
8c73cae2b8
LibJS: Implement the Temporal.ZonedDateTime constructor
...
And the simple Temporal.ZonedDateTime.prototype getters, so that the
constructed Temporal.ZonedDateTime may actually be validated.
2024-11-26 11:00:56 +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
029b6ad1a8
LibJS: Implement the Temporal.PlainDateTime constructor
...
And the simple Temporal.PlainDateTime.prototype getters, so that the
constructed Temporal.PlainDateTime may actually be validated.
2024-11-24 11:43:59 +01:00
Timothy Flynn
66365fef57
LibJS: Implement the Temporal.PlainTime constructor
...
And the simple Temporal.PlainTime.prototype getters, so that the
constructed Temporal.PlainTime may actually be validated.
2024-11-23 19:35:36 -05:00
Timothy Flynn
7f3de3be9c
LibJS: Capture sub-second nanoseconds as a u64 in FormatTimeString
...
This is not a plain nanosecond value (which has a range of [0, 999]).
Rather, it is all of the sub-second components added together.
2024-11-23 19:35:36 -05:00
Timothy Flynn
0b59971ef9
LibJS: Reject ambiguous annotated time strings
...
This missing rejection will be caught by an upcoming Temporal.PlainTime
test.
2024-11-23 19:35:36 -05:00
Timothy Flynn
c83a3db542
LibJS: Handle Temporal.PlainDate in dynamic calendar operations
2024-11-23 19:35:36 -05:00
Timothy Flynn
06593b1894
LibJS: Implement most of GetTemporalRelativeToOption
...
Now that we have the Temporal.PlainDate object, we can flesh out this AO
for such relative-to objects.
2024-11-23 14:46:00 +01:00
Timothy Flynn
021a5f4ded
LibJS: Move ISO-related structures to their own file
...
Currently, AbstractOperations.h needs to include Time.h for the Time
structure. Soon, Time.h will need to include AbstractOperations.h for
structures defined there. To avoid a circular include, let's put the
ISO types into their own file, so that AO.h does not need to include
any JS type header.
2024-11-23 14:46:00 +01:00
Timothy Flynn
abc6b679c3
LibJS: Check both the quotient and remainder for rounding negativity
...
Our BigInt implementation can store the negativity of the division
result in either the quotient or the remainder. This is exposed by an
upcoming prototype, which will reach this division with:
-432000000000000 / 86400000000000000000000
Which has the BigInt division result:
quotient = 0
remainder = -432000000000000
(Our old Temporal implementation also had this bug).
2024-11-23 14:46:00 +01:00
Timothy Flynn
cb5d1b5086
LibJS: Implement Temporal.PlainYearMonth.prototype.until/since
2024-11-22 19:55:24 +01:00
Timothy Flynn
b68d67693e
LibJS: Implement the Temporal.PlainYearMonth constructor
...
And the simple Temporal.PlainYearMonth.prototype getters, so that the
constructed Temporal.PlainYearMonth may actually be validated.
2024-11-22 19:55:24 +01:00
Timothy Flynn
c6fccc04e1
LibJS: Use Temporal's ISO8601 parser to parse UTC offset strings
...
We now have the Temporal facilities to implement the Date AOs which
parse UTC offset strings using the ISO8601 parser. This patch updates
those AOs and their callers in accordance with the Temporal spec.
2024-11-21 19:24:25 -05:00
Timothy Flynn
5389acc231
LibJS: Implement Temporal.PlainMonthDay.prototype.with/equals
2024-11-21 19:24:25 -05: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
5689621c2b
LibJS: Implement Temporal.Duration.prototype.round
...
Until we have re-implemented Temporal.PlainDate/ZonedDateTime, some of
Temporal.Duration.prototype.round (and its invoked AOs) are left
unimplemented.
2024-11-20 19:04:30 -05:00
Timothy Flynn
4742775262
LibJS: Implement stringification Temporal.Duration prototypes
2024-11-20 19:04:30 -05:00
Timothy Flynn
a80523be18
LibJS: Implement mathematical Temporal.Duration prototypes
...
Includes:
Temporal.Duration.prototype.negated
Temporal.Duration.prototype.abs
Temporal.Duration.prototype.add
Temporal.Duration.prototype.subtract
2024-11-20 19:04:30 -05:00
Timothy Flynn
5fe0d3352d
LibJS: Implement the Temporal.Duration constructor
...
This also includes a stubbed Temporal.Duration.prototype.
Until we have re-implemented Temporal.PlainDate/ZonedDateTime, some of
Temporal.Duration.compare (and its invoked AOs) are left unimplemented.
2024-11-20 19:04:30 -05:00
Timothy Flynn
e4e05837e1
LibJS: Return a GC::Ref from Temporal::get_options_object
...
The Object returned here is always non-null.
2024-11-20 19:04:30 -05:00
Timothy Flynn
c8d2404230
LibJS: Update spec steps for the few remaining Temporal AOs
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