Linus Groh
364dd42fc8
LibJS: Convert create_data_property_or_throw() to ThrowCompletionOr
2021-10-03 20:14:03 +01:00
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
Nico Weber
de72332920
Libraries: Fix typos
2021-10-01 01:06:40 +01:00
Idan Horowitz
5ce468338e
LibJS: Drop the Temporal prefix from TemporalMissingRequiredProperty
...
This allows us to use it for other exposed JS APIs that accept options
objects.
2021-09-29 10:09:33 +03:00
Linus Groh
6b4777c558
LibJS: Convert prepare_temporal_fields() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
9ac426c906
LibJS: Convert to_positive_integer() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
2f56fd48ca
LibJS: Convert parse_temporal_year_month_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
14f16d9ed4
LibJS: Convert parse_temporal_time_zone_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
0ccd11ba5f
LibJS: Convert parse_temporal_time_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
f86fa12deb
LibJS: Convert parse_temporal_duration_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
3c530dec5a
LibJS: Convert parse_temporal_date_time_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
4cb6eaf588
LibJS: Convert parse_temporal_date_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
2e28f0b371
LibJS: Convert parse_temporal_calendar_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
4f487266b4
LibJS: Convert parse_temporal_instant_string() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
3112de6f35
LibJS: Convert parse_iso_date_time() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
8792fdfdf6
LibJS: Convert reject_temporal_calendar_type() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
8dd45a1ba2
LibJS: Convert validate_temporal_unit_range() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
448a364210
LibJS: Convert to_smallest_temporal_unit() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
92187591dd
LibJS: Convert to_largest_temporal_unit() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
dd483d84f8
LibJS: Convert to_seconds_string_precision() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
f8f074f8a9
LibJS: Convert to_temporal_rounding_increment() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
65d26dd25e
LibJS: Convert to_show_calendar_option() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
509d13cf67
LibJS: Convert to_temporal_rounding_mode() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
9f03647f1f
LibJS: Convert to_temporal_overflow() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
b1e7e62657
LibJS: Convert get_string_or_number_option() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
8d6ac267dc
LibJS: Convert Temporal::get_option() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
08dd1c3e2d
LibJS: Convert get_options_object() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
f2b5ddd167
LibJS: Convert iterable_to_list_of_type() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
683e31e1ff
LibJS: Convert to_integer_throw_on_infinity() to ThrowCompletionOr
2021-09-16 22:34:24 +01:00
Linus Groh
88a31f3bac
LibJS: Fix [[TimeZoneOffsetString]] value in ParseTemporalInstantString
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/78c3b8b
2021-09-15 00:23:11 +01:00
Linus Groh
4be2aeca00
LibJS: Make prepare_temporal_fields() fields Object a const&
...
This only calls Object::get() on the fields Object, which is
const-qualified.
2021-09-09 23:46:45 +01:00
Linus Groh
1d24699ca8
LibJS: Make Temporal to_foo() AO normalized_options Object a const&
...
These only pass the normalized_options Object directly or indirectly to
get_option(), which now takes a const reference.
2021-09-09 23:46:45 +01:00
Linus Groh
a422ea8792
LibJS: Make get_string_or_number_option() options Object a const&
...
This only passes the options Object to get_option(), which now takes a
const reference.
2021-09-09 23:46:45 +01:00
Linus Groh
c099b1b8a5
LibJS: Make get_option() options Object a const&
...
This only calls Object::get() on the options Object, which is
const-qualified.
2021-09-09 23:46:45 +01:00
Luke Wilde
ff0b01a505
LibJS: Implement ToTemporalYearMonth AO
2021-09-09 09:06:23 +01:00
Linus Groh
81aaa9ccd5
LibJS: Replace String const& with StringView in various Temporal AOs
...
This is especially helpful where we already pass StringView literals
and only compare them with others, e.g. overflow and largest/smallest
unit, in which case there's no need to actually allocate a string.
2021-09-08 23:42:26 +01:00
Luke Wilde
d943b8f100
LibJS: Implement Temporal.PlainTime.prototype.with
...
Ticks off one box in #8982 and fixes one test262 case.
2021-09-08 19:57:29 +01:00
Idan Horowitz
456938add0
LibJS: Use StringViews in Round{NumberToIncrement, TemporalInstant}
2021-09-06 22:15:39 +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
7acd174c85
LibJS: Reflect normative changes in ParseTemporalInstantString
...
Most of it doesn't affect us yet as the parsing code and additional AOs
are not implemented yet.
See: https://github.com/tc39/proposal-temporal/commit/f6ac475
2021-09-02 20:16:44 +01:00
Linus Groh
ed98c1afc7
LibJS: Throw RangeError in PrepareTemporalFields for +/-∞
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/499282a
2021-09-01 15:11:35 +01:00
Linus Groh
576be0f8e7
LibJS: Implement Temporal.Instant.prototype.toString()
2021-08-31 16:35:51 +02:00
Idan Horowitz
f6370fe3f7
LibJS: Add the ToTemporalTime AO and stub the ParseTemporalTimeString AO
...
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`.
2021-08-27 19:01:30 +01:00
Linus Groh
ad427f85ca
LibJS: Implement Temporal.PlainDateTime.from()
2021-08-23 20:54:52 +01:00
Linus Groh
969aee2022
LibJS: Add missing builtin calendar check to ParseTemporalCalendarString
...
See: https://github.com/tc39/proposal-temporal/commit/48b11d6
2021-08-22 21:20:00 +01:00
Linus Groh
402f04c2fc
LibJS: Implement Temporal.PlainDate.prototype.toString()
2021-08-19 00:14:17 +02:00
Linus Groh
310192f918
LibJS: Make Temporal's get_option() take a PropertyName directly
...
Instead of constructing a String and converting that to a PropertyName
on the fly, we can just leverage CommonPropertyNames, add a couple more
and directly pass ready-to-use PropertyNames with pre-allocated Strings.
2021-08-19 00:14:17 +02:00
Linus Groh
b2badd6333
LibJS: Update some Temporal spec section numbers
...
These shifted due to the addition of the ParseTemporalRelativeToString
AO in https://github.com/tc39/proposal-temporal/commit/ad06578 .
2021-08-18 19:26:08 +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