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
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
Idan Horowitz
c57a78423d
LibJS: Convert PlainYearMonth AOs to ThrowCompletionOr
2021-09-16 13:53:37 +01:00
Idan Horowitz
5a4c90fcb1
LibJS: Convert ordinary_create_from_constructor<T> to ThrowCompletionOr
2021-09-16 13:53:37 +01:00
Brian Gianforcaro
fc1b9288bc
LibJS: Extract exception check duplication in iso_month_day_from_fields
...
Flagged by sonarcloud.
2021-09-13 14:05:22 +00:00
Timothy Flynn
470262c8ab
LibJS: Use ErrorType::NotAnObjectOfType instead of NotA
2021-09-12 00:16:39 +02:00
Linus Groh
4e5becf36e
LibJS: Make default_merge_fields() {additional_,}fields Object a const&
...
This only calls Object::{get,enumerable_own_property_names}() on the
fields and additional_fields Objects, both of which are const-qualified.
2021-09-09 23:46:45 +01:00
Linus Groh
4bba61fd59
LibJS: Make resolve_iso_month() 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
1f99538185
LibJS: Make Temporal foo_from_fields() AO field/options Object a const*
...
This is a bit of a lie as the Value(Object const*) ctor will const_cast
them in invoke(), but at least it ensures that nothing else in the
function relies on getting non-const Objects.
Perhaps we can have an actual Object const* Value in the future as well.
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
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
418c22f9b3
LibJS: Implement Temporal.PlainDate.prototype.eraYear
2021-08-27 23:36:52 +01:00
Linus Groh
6f7d6d917e
LibJS: Implement Temporal.PlainDate.prototype.era
2021-08-27 23:36:52 +01:00
Linus Groh
402f04c2fc
LibJS: Implement Temporal.PlainDate.prototype.toString()
2021-08-19 00:14:17 +02: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
1292d80b93
LibJS: Implement Temporal.Calendar.prototype.mergeFields()
2021-08-17 00:26:19 +01:00
Linus Groh
cbe7015c0c
LibJS: Add missing spec link to YearMonthFromFields
2021-08-16 20:40:21 +01:00
Linus Groh
795e077eb8
LibJS: Implement Temporal.PlainDate.prototype.toPlainMonthDay()
2021-08-16 20:40:21 +01:00
Linus Groh
31f65b8c50
LibJS: Implement Temporal.Calendar.prototype.monthDayFromFields()
2021-08-16 20:40:21 +01:00
Linus Groh
6709c915aa
LibJS: Implement Temporal.PlainDate.prototype.toPlainYearMonth()
2021-08-16 14:10:41 +01:00
Linus Groh
ed9d37bd40
LibJS: Implement Temporal.Calendar.prototype.yearMonthFromFields()
2021-08-16 14:10:41 +01:00
Linus Groh
b76bae13fd
LibJS: Handle PlainMonthDay in ISO{Year,Month,MonthCode,Day}
2021-08-15 10:36:36 +01:00
Linus Groh
ec00d4729a
LibJS: Handle PlainMonthDay in GetTemporalCalendarWithISODefault
2021-08-15 10:36:36 +01:00
Linus Groh
1e54e37228
LibJS: Handle PlainMonthDay in ToTemporalCalendar
2021-08-15 10:36:36 +01:00
davidot
151447bdf7
LibJS: Move Object::invoke to Value::invoke and fix it for primitives
...
This is a tiny difference and only changes anything for primitives in
strict mode. However this is tested in test262 and can be noticed by
overriding toString of primitive values.
This does now require one to wrap an object in a Value to call invoke
but all code using invoke has been migrated.
2021-08-09 17:33:14 +01:00
Linus Groh
e2f016dc81
LibJS: Handle PlainYearMonth in ISO{Year,Month,MonthCode,Day}
2021-08-08 17:45:06 +01:00
Linus Groh
4ba5df7145
LibJS: Handle PlainYearMonth in GetTemporalCalendarWithISODefault
2021-08-08 17:45:06 +01:00
Linus Groh
2aec6653c4
LibJS: Handle PlainYearMonth in ToTemporalCalendar
2021-08-08 17:45:06 +01:00