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: 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: 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
Linus Groh
5b12542d39
LibJS: Fix Vector<Value> => MarkedValueList in calendar_fields()
...
We need to ensure the temporary PrimitiveString cells don't get GC'd.
2021-08-08 17:45:06 +01:00
Linus Groh
16c38788c3
LibJS: Add missing spec links
2021-08-08 11:04:30 +01:00
Linus Groh
e036f4a786
LibJS: Make regulate_iso_date() and iso_date_from_fields() use ISODate
...
No need for TemporalDate, we don't use the calendar field here anyway.
2021-08-05 19:19:40 +02:00
Linus Groh
fa0d6d1045
LibJS: Handle ZonedDateTime in GetTemporalCalendarWithISODefault
2021-08-01 20:31:31 +01:00
Linus Groh
14e7eff43f
LibJS: Handle ZonedDateTime in ToTemporalCalendar
2021-08-01 20:31:31 +01:00
Idan Horowitz
010761aff4
LibJS: Implement Temporal.PlainDateTime.prototype.withPlainDate
2021-07-31 00:16:41 +01:00
Linus Groh
4e4d8d6905
LibJS: Reflect infallibility editorial changes in the Temporal spec
...
See:
- 3c0671f
- fe28b86
2021-07-28 23:48:56 +01:00
Linus Groh
817be1b292
LibJS: Handle PlainTime objects in GetTemporalCalendarWithISODefault
2021-07-28 21:57:30 +01:00
Linus Groh
c2d45e5a83
LibJS: Handle PlainTime objects in ToTemporalCalendar
2021-07-28 21:57:30 +01:00
Linus Groh
d84fd3ad5c
LibJS: Reflect infallibility editorial change in ToTemporalCalendar
...
See: 3437106
2021-07-28 21:57:30 +01:00
Idan Horowitz
2c6bd3a61b
LibJS: Use narrower types in Temporal PlainDate/PlainDateTime/Calendar
...
These are bounds-checked during construction of PlainDate/PlainDateTime
and as such theres no need to widen them in these internal AO calls.
2021-07-26 16:15:31 +01:00
Linus Groh
d428787e18
LibJS: Handle PlainDateTime objects in GetTemporalCalendarWithISODefault
2021-07-25 23:44:36 +01:00
Linus Groh
c1005dbb0a
LibJS: Handle PlainDateTime objects ToTemporalCalendar
2021-07-25 23:44:36 +01:00
Idan Horowitz
1d76be97f5
LibJS: Implement Temporal.PlainDate.prototype.inLeapYear
2021-07-23 22:00:23 +01:00
Idan Horowitz
dd15fc471c
LibJS: Implement Temporal.PlainDate.prototype.monthsInYear
2021-07-23 22:00:23 +01:00
Idan Horowitz
b1dd09840b
LibJS: Implement Temporal.PlainDate.prototype.daysInYear
2021-07-23 22:00:23 +01:00