Commit caccea8d authored by Frank Tang's avatar Frank Tang Committed by V8 LUCI CQ

[Temporal] Add PlainMonthDay.from

Also add AOs: ParseTemporalMonthDayString, MonthDayFromFields,
ToTemporalMonthDay
Spec Text:
https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.from
https://tc39.es/proposal-temporal/#sec-temporal-totemporalmonthday
https://tc39.es/proposal-temporal/#sec-temporal-parsetemporalmonthdaystring
https://tc39.es/proposal-temporal/#sec-temporal-monthdayfromfields

Bug: v8:11544
Change-Id: I971b5a0f43b9dbeefe38ebe28035f7c9b1a617ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3538664Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80676}
parent c6833625
......@@ -258,12 +258,8 @@ TO_BE_IMPLEMENTED(TemporalPlainYearMonthPrototypeEquals)
TO_BE_IMPLEMENTED(TemporalPlainYearMonthPrototypeToPlainDate)
/* Temporal.PlainMonthDay */
/* Temporal #sec-temporal.plainmonthday.from */
TO_BE_IMPLEMENTED(TemporalPlainMonthDayFrom)
/* There is no compare for PlainMonthDay. See
* https://github.com/tc39/proposal-temporal/issues/1547 */
/* Temporal #sec-temporal.plainmonthday.prototype.with */
TO_BE_IMPLEMENTED(TemporalPlainMonthDayPrototypeWith)
/* Temporal #sec-temporal.plainmonthday.prototype.equals */
......@@ -588,6 +584,7 @@ BUILTIN(TemporalPlainMonthDayConstructor) {
TEMPORAL_GET(PlainMonthDay, Calendar, calendar)
TEMPORAL_GET_BY_FORWARD_CALENDAR(PlainMonthDay, MonthCode, monthCode)
TEMPORAL_GET_BY_FORWARD_CALENDAR(PlainMonthDay, Day, day)
TEMPORAL_METHOD2(PlainMonthDay, From)
TEMPORAL_PROTOTYPE_METHOD0(PlainMonthDay, GetISOFields, getISOFields)
TEMPORAL_VALUE_OF(PlainMonthDay)
TEMPORAL_PROTOTYPE_METHOD0(PlainMonthDay, ToJSON, toJSON)
......
This diff is collapsed.
......@@ -345,6 +345,10 @@ class JSTemporalPlainMonthDay
Handle<Object> iso_day, Handle<Object> calendar_like,
Handle<Object> reference_iso_year);
// #sec-temporal.plainmonthday.from
V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalPlainMonthDay> From(
Isolate* isolate, Handle<Object> item, Handle<Object> options);
// #sec-temporal.plainmonthday.prototype.getisofields
V8_WARN_UNUSED_RESULT static MaybeHandle<JSReceiver> GetISOFields(
Isolate* isolate, Handle<JSTemporalPlainMonthDay> month_day);
......
......@@ -1114,24 +1114,7 @@
'built-ins/Temporal/PlainDateTime/prototype/withPlainTime/time-undefined': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/with/read-time-fields-before-datefromfields': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/with/subclassing-ignored': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/argument-string-with-utc-designator': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/calendar-fields-iterable': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/calendar-monthdayfromfields-called-with-options-undefined': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/calendar-temporal-object': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/fields-leap-day': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/fields-missing-properties': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/fields-object': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/fields-plainmonthday': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/fields-string': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/infinity-throws-rangeerror': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/options-invalid': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/options-undefined': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/order-of-operations': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/overflow': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/overflow-invalid-string': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/overflow-undefined': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/overflow-wrong-type': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/subclassing-ignored': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/equals/argument-string-with-utc-designator': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/equals/argument-wrong-type': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/equals/basic': [FAIL],
......@@ -1148,7 +1131,6 @@
'built-ins/Temporal/PlainMonthDay/prototype/toPlainDate/copies-merge-fields-object': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/toPlainDate/infinity-throws-rangeerror': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/toPlainDate/limits': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/valueOf/basic': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/with/basic': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/with/branding': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/with/calendar-arguments': [FAIL],
......@@ -2331,7 +2313,6 @@
'built-ins/Temporal/PlainDateTime/prototype/withPlainTime/no-argument-default-to-midnight': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/with/string-throws': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/with/timezone-throws': [FAIL],
'built-ins/Temporal/PlainMonthDay/calendar-always': [FAIL],
'built-ins/Temporal/PlainTime/prototype/toPlainDateTime/argument-string-invalid': [FAIL],
'built-ins/Temporal/PlainTime/prototype/toZonedDateTime/argument-string-invalid': [FAIL],
'built-ins/Temporal/PlainYearMonth/calendar-always': [FAIL],
......@@ -2445,7 +2426,6 @@
'built-ins/Temporal/PlainDateTime/prototype/withPlainDate/argument-plaindate-calendar-noniso': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/withPlainDate/argument-plaindate-calendar-same-id': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/withPlainDate/argument-plaindate-calendar-same-object': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/options-wrong-type': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/with/options-wrong-type': [FAIL],
'built-ins/Temporal/PlainTime/prototype/round/options-wrong-type': [FAIL],
'built-ins/Temporal/PlainTime/prototype/round/roundto-invalid-string': [FAIL],
......@@ -2484,7 +2464,6 @@
'built-ins/Temporal/Calendar/prototype/dateAdd/argument-propertybag-calendar-number': [FAIL],
'built-ins/Temporal/Calendar/prototype/dateUntil/argument-propertybag-calendar-number': [FAIL],
'built-ins/Temporal/Calendar/prototype/day/argument-propertybag-calendar-number': [FAIL],
'built-ins/Temporal/Calendar/prototype/day/basic': [FAIL],
'built-ins/Temporal/Calendar/prototype/dayOfWeek/argument-propertybag-calendar-number': [FAIL],
'built-ins/Temporal/Calendar/prototype/dayOfYear/argument-propertybag-calendar-number': [FAIL],
'built-ins/Temporal/Calendar/prototype/daysInMonth/argument-propertybag-calendar-number': [FAIL],
......@@ -2603,10 +2582,7 @@
'built-ins/Temporal/PlainDateTime/prototype/withPlainTime/argument-number': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/withPlainTime/argument-wrong-type': [FAIL],
'built-ins/Temporal/PlainMonthDay/calendar-number': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/argument-number': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/argument-propertybag-calendar-number': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/argument-propertybag-calendar-wrong-type': [FAIL],
'built-ins/Temporal/PlainMonthDay/from/argument-wrong-type': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/equals/argument-number': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/equals/argument-propertybag-calendar-number': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/equals/argument-propertybag-calendar-wrong-type': [FAIL],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment