Linus Groh
b7e5f08e56
LibJS: Convert Object::get() to ThrowCompletionOr
...
To no one's surprise, this patch is pretty big - this is possibly the
most used AO of all of them. Definitely worth it though.
2021-10-03 20:14:03 +01:00
Linus Groh
4d5bd092ea
LibJS: Use MUST() where applicable
2021-10-03 20:14:03 +01:00
Linus Groh
ea7cc70118
LibJS: Convert Duration AOs to ThrowCompletionOr
2021-09-17 08:25:12 +01:00
Linus Groh
f86fa12deb
LibJS: Convert parse_temporal_duration_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Idan Horowitz
5a4c90fcb1
LibJS: Convert ordinary_create_from_constructor<T> to ThrowCompletionOr
2021-09-16 13:53:37 +01:00
Linus Groh
77a18392ff
LibJS: Make to_temporal_duration_record() time like Object a const&
...
This only calls Object::get() or some Duration getters on the
temporal_duration_like Object, both of which are const-qualified.
2021-09-09 23:46:45 +01:00
Linus Groh
e4c07c5b8f
LibJS: Make new_target parameter of all Temporal AOs a const*
...
These are passed to ordinary_create_from_constructor() in each case,
which takes the parameter as a const&, so these can also be const.
2021-09-09 23:46:45 +01:00
Linus Groh
33f76f88bb
LibJS: Add and use the CreateNegatedTemporalDuration AO
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/6178ed3
2021-09-08 00:07:18 +01:00
Idan Horowitz
24b78fff7d
LibJS: Add a bunch of Temporal Abstract Operations
...
These will allow us to (partially) implement
Temporal.Instant.prototype.{until, since}
2021-09-06 22:15:39 +01:00
Linus Groh
3492fbf9cf
LibJS: Account for negative numbers in ToTemporalDurationRecord
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/fa9d547
2021-09-02 20:16:44 +01:00
Linus Groh
0e6d503317
LibJS: Throw RangeError for non-integral values in ToPartialDuration
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/895c8e5
2021-09-02 20:16:44 +01:00
Linus Groh
38bef3e28e
LibJS: Handle undefined, NaN, and Infinity in ToTemporalDurationRecord
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/d4b9bcf
2021-09-01 15:11:35 +01:00
Linus Groh
0cdad283c0
LibJS: Reflect Record wording editorial change in the Temporal spec
...
See: https://github.com/tc39/proposal-temporal/commit/c8f14d0
2021-08-17 21:59:35 +01:00
Linus Groh
16c38788c3
LibJS: Add missing spec links
2021-08-08 11:04:30 +01:00
Linus Groh
b38f1fb071
LibJS: Implement Temporal.Instant.prototype.add()
2021-08-07 13:10:35 +01:00
Linus Groh
5c77885873
LibJS: Implement Temporal.Duration.from()
...
...with ParseTemporalDurationString currently TODO()'d.
2021-07-19 00:34:28 +01:00
Linus Groh
7355c23e17
LibJS: Fix TemporalDurationLike property order
...
The table is sorted alphabetically and supposed to be iterated in that
oder. Also move this to a templated lambda for later re-use with
different target structs and value types.
2021-07-19 00:34:28 +01:00
Linus Groh
9aa1e4b885
LibJS: Implement Temporal.Duration.prototype.with()
2021-07-16 21:59:13 +01:00
Linus Groh
7921d8ba91
LibJS: Start implementing Temporal.Duration
...
This patch adds the Duration object itself, its constructor and
prototype (currently empty), and three required abstract operations.
2021-07-16 01:07:01 +01:00