[Temporal] Fix bug in Plain(Date|YearMonth|MonthDay) with()

Correct the wrong parameter passing in the 3rd  PrepareTemporalFields
calls

Spec text:
https://tc39.es/proposal-temporal/#sec-temporal.plaindate.prototype.with
https://tc39.es/proposal-temporal/#sec-temporal.plainyearmonth.prototype.with
https://tc39.es/proposal-temporal/#sec-temporal.plainmonthday.prototype.with

Bug: v8:11544
Change-Id: I8acd7059cedf6924eee36ed5cb7892b636c8c72a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3807905
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82184}
This commit is contained in:
Frank Tang 2022-08-03 13:57:21 -07:00 committed by V8 LUCI CQ
parent 29db563159
commit f4a938e4a6
3 changed files with 4 additions and 33 deletions

View File

@ -11459,9 +11459,8 @@ MaybeHandle<T> PlainDateOrYearMonthOrMonthDayWith(
isolate, fields,
CalendarMergeFields(isolate, calendar, fields, partial_date), T);
// 11. Set fields to ? PrepareTemporalFields(fields, fieldNames, «»).
ASSIGN_RETURN_ON_EXCEPTION(
isolate, fields,
PrepareTemporalFields(isolate, temporal, field_names,
ASSIGN_RETURN_ON_EXCEPTION(isolate, fields,
PrepareTemporalFields(isolate, fields, field_names,
RequiredFields::kNone),
T);
// 12. Return ? XxxFromFields(calendar, fields, options).

View File

@ -52,7 +52,6 @@
'temporal/instant-from-epoch-seconds': [FAIL],
'temporal/plain-date-time-to-json': [FAIL],
'temporal/plain-date-to-plain-date-time': [FAIL],
'temporal/plain-date-with': [FAIL],
##############################################################################
# Open bugs.

View File

@ -483,14 +483,7 @@
'built-ins/Temporal/PlainDate/prototype/toZonedDateTime/timezone-getpossibleinstantsfor-iterable': [SKIP],
'built-ins/Temporal/PlainDate/prototype/toZonedDateTime/timezone-string-multiple-offsets': [FAIL],
'built-ins/Temporal/PlainDate/prototype/weekOfYear/basic': [FAIL],
'built-ins/Temporal/PlainDate/prototype/with/basic': [FAIL],
'built-ins/Temporal/PlainDate/prototype/with/copies-merge-fields-object': [FAIL],
'built-ins/Temporal/PlainDate/prototype/with/options-undefined': [FAIL],
'built-ins/Temporal/PlainDate/prototype/with/order-of-operations': [FAIL],
'built-ins/Temporal/PlainDate/prototype/with/overflow-undefined': [FAIL],
'built-ins/Temporal/PlainDate/prototype/with/overflow-wrong-type': [FAIL],
'built-ins/Temporal/PlainDate/prototype/with/plaindatelike-invalid': [FAIL],
'built-ins/Temporal/PlainDate/prototype/with/subclassing-ignored': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/add/argument-string-negative-fractional-units': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/since/argument-plaindate': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/since/argument-string-with-utc-designator': [FAIL],
@ -575,14 +568,6 @@
'built-ins/Temporal/PlainMonthDay/from/calendar-monthdayfromfields-called-with-options-undefined': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/equals/calendar-monthdayfromfields-called-with-options-undefined': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/toPlainDate/limits': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/with/basic': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/with/calendar-arguments': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/with/copies-merge-fields-object': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/with/options-undefined': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/with/order-of-operations': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/with/overflow-undefined': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/with/overflow-wrong-type': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/with/subclassing-ignored': [FAIL],
'built-ins/Temporal/PlainTime/prototype/add/argument-string-negative-fractional-units': [FAIL],
'built-ins/Temporal/PlainTime/prototype/toZonedDateTime/timezone-getpossibleinstantsfor-iterable': [SKIP],
'built-ins/Temporal/PlainTime/prototype/toZonedDateTime/timezone-string-multiple-offsets': [FAIL],
@ -597,13 +582,6 @@
'built-ins/Temporal/PlainYearMonth/prototype/subtract/overflow-wrong-type': [FAIL],
'built-ins/Temporal/PlainYearMonth/prototype/toPlainDate/limits': [FAIL],
'built-ins/Temporal/PlainYearMonth/prototype/until/calendar-yearmonthfromfields-called-with-options-undefined': [FAIL],
'built-ins/Temporal/PlainYearMonth/prototype/with/calendar-arguments': [FAIL],
'built-ins/Temporal/PlainYearMonth/prototype/with/copies-merge-fields-object': [FAIL],
'built-ins/Temporal/PlainYearMonth/prototype/with/options-undefined': [FAIL],
'built-ins/Temporal/PlainYearMonth/prototype/with/order-of-operations': [FAIL],
'built-ins/Temporal/PlainYearMonth/prototype/with/overflow-undefined': [FAIL],
'built-ins/Temporal/PlainYearMonth/prototype/with/overflow-wrong-type': [FAIL],
'built-ins/Temporal/PlainYearMonth/prototype/with/subclassing-ignored': [FAIL],
'built-ins/Temporal/TimeZone/from/timezone-string-multiple-offsets': [FAIL],
'built-ins/Temporal/TimeZone/prototype/getInstantFor/disambiguation-undefined': [FAIL],
'built-ins/Temporal/TimeZone/prototype/getInstantFor/options-undefined': [FAIL],
@ -756,19 +734,15 @@
'built-ins/Temporal/PlainDate/prototype/toPlainDateTime/argument-string-no-implicit-midnight': [FAIL],
'built-ins/Temporal/PlainDate/prototype/toPlainYearMonth/limits': [FAIL],
'built-ins/Temporal/PlainDate/prototype/toZonedDateTime/argument-string-no-implicit-midnight': [FAIL],
'built-ins/Temporal/PlainDate/prototype/with/copy-properties-not-undefined': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/since/largestunit-smallestunit-mismatch': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/since/year-zero': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/until/largestunit-smallestunit-mismatch': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/until/year-zero': [FAIL],
'built-ins/Temporal/PlainDateTime/prototype/withPlainTime/argument-string-no-implicit-midnight': [FAIL],
'built-ins/Temporal/PlainMonthDay/prototype/with/copy-properties-not-undefined': [FAIL],
'built-ins/Temporal/PlainTime/compare/argument-string-no-implicit-midnight': [FAIL],
'built-ins/Temporal/PlainTime/from/argument-string-no-implicit-midnight': [FAIL],
'built-ins/Temporal/PlainTime/prototype/since/argument-string-no-implicit-midnight': [FAIL],
'built-ins/Temporal/PlainTime/prototype/until/argument-string-no-implicit-midnight': [FAIL],
'built-ins/Temporal/PlainYearMonth/prototype/with/basic': [FAIL],
'built-ins/Temporal/PlainYearMonth/prototype/with/copy-properties-not-undefined': [FAIL],
'built-ins/Temporal/ZonedDateTime/prototype/since/argument-propertybag-offset-not-agreeing-with-timezone': [FAIL],
'built-ins/Temporal/ZonedDateTime/prototype/since/largestunit-smallestunit-mismatch': [FAIL],
'built-ins/Temporal/ZonedDateTime/prototype/since/year-zero': [FAIL],
@ -984,7 +958,6 @@
'built-ins/Temporal/Instant/prototype/equals/instant-string-limits': [FAIL],
'built-ins/Temporal/Instant/prototype/since/instant-string-limits': [FAIL],
'built-ins/Temporal/Instant/prototype/until/instant-string-limits': [FAIL],
'built-ins/Temporal/PlainDate/prototype/with/custom': [FAIL],
'built-ins/Temporal/TimeZone/prototype/getNextTransition/instant-string-limits': [FAIL],
'built-ins/Temporal/TimeZone/prototype/getOffsetNanosecondsFor/instant-string-limits': [FAIL],
'built-ins/Temporal/TimeZone/prototype/getOffsetStringFor/instant-string-limits': [FAIL],