This is an editorial change in the ECMA-262 and Temporal specs.
See:
- 843d8b8
- f9211d9
Note that we don't actually need to implement the AO as we already have
String::formatted() for this, and use unified format strings instead of
zero-padding in individual steps in many cases anyway.
This is an editorial change in the Temporal spec.
See:
- 7fbdd28
- f666243
- 8c7d066
- 307d108
- d9ca402
In practical terms this means we can now get rid of a couple of awkward
assertion steps that were no-ops anyway, since the types are enforced
by the compiler.
This is an editorial change in the Temporal spec.
See: 983902e
We already had these defined as structs, but now they're properly
defined in the spec (opposed to the previous anonymous records), and we
don't have to make up our own names anymore :^)
Note that while we're usually not including 'record' in the name, in
this case the 'Duration Record' has a name clash with the Duration
object. Additionally, later editorial changes introduce CreateFooRecord
AOs, so let's just go with FooRecord structs here.
It's a bit annoying having to add '.0' to y given that it's an integral
number in most cases.
This turns the single template parameter T into T and U to permit that.
...and change the parameter types from i64 to double, as predicted by
a FIXME. The issue here is that integer division with a negative
dividend doesn't yield the same result as floating point division
wrapped in floor().
Additionally, the `days` variable needs to be signed.
Userland/Libraries/LibJS/Runtime/Temporal/PlainTime.cpp:283:24:
note: deduced conflicting types for parameter 'T' ('long long int'
and 'long int')
283 | nanosecond = modulo(nanosecond, 1000l);
| ~~~~~~^~~~~~~~~~~~~~~~~~~
Worked fine on x86_84 :yakshrug:
This AO is required for a bunch of PlainTime related methods.
As part of this change the `TemporalTime` record was renamed to
`UnregulatedTemporalTime` and a new `TemporalTime` record that matches
the other Temporal parse result records was added. This also has the
added benefit of getting rid of a would be round-trip cast from integer
to double and back in `ParseTemporalTimeString`.
When overriding visit_edges() in a JS::Object subclass, we must make
sure to call the base class visit_edges(), or the object's Shape (and
any properties) will not get marked.
This is Abstract Operation is required for the majority of
InstantConstructor's and InstantPrototype's methods.
The implementation is not entirely complete, (specifically 2 of the
underlying required abstract operations, ParseTemporalTimeZoneString
and ParseISODateTime are missing the required lexing, and as such are
TODO()-ed) but the majority of it is done.