Linus Groh
a5c41aa905
LibJS: Use required fields argument in ISOYearMonthFromFields
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/ff02f87
2022-05-17 21:16:56 +01:00
Linus Groh
d2c1dd5454
LibJS: Introduce ISO Date Records
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/d264341
2022-05-16 20:46:46 +01:00
Linus Groh
fc6cf3cb9d
LibJS: Remove ToISODayOfWeek
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/3eab7e4
2022-05-08 00:07:58 +02:00
Linus Groh
cabcdd838b
LibJS: Remove ToISODayOfYear
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/6117d90
2022-05-08 00:07:58 +02:00
Linus Groh
a216c0b6df
LibJS: Remove IsISOLeapYear
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/a36bdd4
2022-05-08 00:07:58 +02:00
Linus Groh
6d0d7c8fd0
LibJS: Remove ISODaysInYear
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/f62e737
2022-05-08 00:07:58 +02:00
Linus Groh
aac457755d
LibJS: Define IsBuiltinCalendar in terms of AvailableCalendars
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/896b72d
2022-04-29 22:40:46 +02:00
Linus Groh
2499911898
LibJS: Rename DateFromFields to CalendarDateFromFields, etc
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/fd27b54
2022-04-29 22:40:46 +02:00
Linus Groh
5397278bfc
LibJS: Update spec comments to use ToZeroPaddedDecimalString AO
...
This is an editorial change in the ECMA-262 and Temporal specs.
See:
- https://github.com/tc39/ecma262/commit/843d8b8
- https://github.com/tc39/proposal-temporal/commit/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.
2022-04-12 23:43:29 +01:00
Linus Groh
151eb8606d
LibJS: Consistently call observable Temporal AOs with undefined options
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/6fa5b9d
2022-04-07 12:58:39 +01:00
Linus Groh
cfb04765fa
LibJS: Correct PlainYearMonth arithmetic for non-ISO calendars
...
This is a normative change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/61e8dd0
2022-03-31 17:09:10 +01:00
Linus Groh
0c22a7f822
LibJS: Assume Get() on the result of PrepareTemporalFields can't fail
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/980e168
2022-03-16 21:49:38 +00:00
Linus Groh
251f5e8885
LibJS: Use CreateTemporalCalendar in GetBuiltinCalendar
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/f6b3a10
2022-03-10 23:20:39 +01:00
Linus Groh
68af8649fb
LibJS: Follow rules for consuming completion records
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/1c19b96
2022-03-10 23:20:39 +01:00
Linus Groh
bc183dbbcb
LibJS: Replace uses of MarkedValueList with MarkedVector<Value>
...
This is effectively a drop-in replacement.
2022-02-09 12:25:27 +00:00
Linus Groh
6f20f49b21
Everywhere: Rename JS::PropertyKey variables from property_{name => key}
...
PropertyKey used to be called PropertyName, but got renamed. Let's
update all the variables of this type as well.
2022-02-06 22:02:45 +00:00
Linus Groh
e087cd574e
LibJS: Rename variables to 'calendarLike' in a couple of places
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/9af2d35
2022-02-04 20:00:34 +00:00
Timothy Flynn
59ca435172
LibJS: Use new construct AO overload where easily applicable
2022-01-25 22:09:13 +00:00
mjz19910
1ef633472b
Everywhere: Convert VM::call() to JS::call()
2022-01-23 15:24:45 +00:00
Linus Groh
29e96eceeb
LibJS: Convert PropertyKey::from_value() to ThrowCompletionOr
...
Lots of MUST() - perhaps we'll eventually come up with a better API for
the common case where it can't fail.
2022-01-04 23:37:26 +00:00
Luke Wilde
4f3c283f24
LibJS: Move calendar validation out of parse_temporal_calendar_string
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/7207a1c
2021-12-08 19:11:50 +00:00
Linus Groh
a20b189eab
LibJS: Fix incorrectly formatted section comments
...
A couple of missing URLs, spaces, and a stray comma.
2021-11-24 17:37:27 +00:00
Nico Weber
a164e6ecbb
LibJS: Unbreak to_iso_day_of_week
...
481f7d6afa
tried to use `modulo()` here, but missed that the
code used `<=` instead of `<`.
Keep using `modulo()` and add an explicit conditional, which is
arguably clearer.
2021-11-16 00:41:45 +00:00
Nico Weber
481f7d6afa
LibJS: Use modulo() function in to_iso_day_of_week
...
No behavior change.
2021-11-15 23:54:41 +00:00
Linus Groh
a757f3f421
LibJS: Fix leap year check in to_iso_week_of_year() for week < 1
...
When the resulting week is in the previous year, we need to check if the
previous year is a leap year and can potentially have 53 weeks, instead
of the given year.
Also added a comment to briefly explain what's going on, as it took me a
while to figure out.
2021-11-15 21:33:26 +00:00
Luke Wilde
29072f4b09
LibJS: Implement the required AOs for Temporal.Duration.compare
2021-11-11 21:06:54 +00:00
Linus Groh
36b51276d5
LibJS: Change calendar_date_add() date parameter from PlainDate to Value
...
Turns out use of this AO is a bit more flexible than I anticipated.
2021-11-07 15:31:28 +01:00
Linus Groh
d49bbb1da3
LibJS: Implement TODO()'d parts of balance_duration()
...
Massive :yakstack:, so I understand why it was skipped in the first
place :^)
2021-11-02 09:24:35 +01:00
Linus Groh
97f6c6029f
LibJS: Implement Temporal.TimeZone.prototype.getInstantFor()
2021-11-01 21:39:45 +01:00
Linus Groh
09d1db5afd
LibJS: Clarify mathematical types in Temporal AOs and functions
...
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/e480d40
2021-10-26 23:10:11 +02:00
Andreas Kling
398c181c79
LibJS: Rename PropertyName to PropertyKey
...
Let's use the same name as the spec. :^)
2021-10-24 17:18:07 +02:00
Idan Horowitz
e26d9f419b
LibJS: Remove vm.construct and it's usages
2021-10-23 02:49:41 +03:00
Linus Groh
be28a6142b
LibJS: Convert to_integer_or_infinity() to ThrowCompletionOr
2021-10-18 21:24:30 +01:00
Linus Groh
52976bfac6
LibJS: Convert to_object() to ThrowCompletionOr
2021-10-13 09:55:10 +01:00
Linus Groh
4d8912a92b
LibJS: Convert to_string() to ThrowCompletionOr
...
Also update get_function_name() to use ThrowCompletionOr, but this is
not a standard AO and should be refactored out of existence eventually.
2021-10-13 09:55:10 +01:00
Linus Groh
2c222ba40b
LibJS: Implement Temporal.PlainYearMonth.prototype.toPlainDate()
2021-10-11 08:31:39 +01:00
Linus Groh
e5b8544762
LibJS: Convert enumerable_own_property_names() to ThrowCompletionOr
2021-10-03 20:14:03 +01:00
Linus Groh
f38a5957bf
LibJS: Convert has_property() to ThrowCompletionOr
2021-10-03 20:14:03 +01:00
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
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
Idan Horowitz
ee825d6d9e
LibJS: Convert get_method to ThrowCompletionOr
2021-09-23 23:59:13 +03:00
Idan Horowitz
ab594e5f2f
LibJS: Convert Value::invoke and VM::call to ThrowCompletionOr
2021-09-23 23:59:13 +03:00
Linus Groh
35bba1c98d
LibJS: Convert PlainDate AOs to ThrowCompletionOr
2021-09-17 23:43:01 +02:00
Linus Groh
f8d92232c8
LibJS: Convert Calendar AOs to ThrowCompletionOr
2021-09-17 08:25:12 +01: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
2e28f0b371
LibJS: Convert parse_temporal_calendar_string() 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