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

Revert "[Temporal] Add add/subtract to Duration"

This reverts commit a10194cf.

Reason for revert: Merge conflict break build

Original change's description:
> [Temporal] Add add/subtract to Duration
>
> Also implement AOs: ToRelativeTemporalObject, AddDuration, AddDurationToOrSubtractDurationFromDuration,
>  ParseTemporalRelativeToString, DefaultTemporalLargestUnit,
> DifferenceZonedDateTime
>
> Spec Text:
> https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.add
> https://tc39.es/proposal-temporal/#sec-temporal.duration.prototype.subtract
> https://tc39.es/proposal-temporal/#sec-temporal-adddurationtoorsubtractdurationfromduration
> https://tc39.es/proposal-temporal/#sec-temporal-addduration
> https://tc39.es/proposal-temporal/#sec-temporal-torelativetemporalobject
> https://tc39.es/proposal-temporal/#sec-temporal-parsetemporalrelativetostring
> https://tc39.es/proposal-temporal/#sec-temporal-defaulttemporallargestunit
> https://tc39.es/proposal-temporal/#sec-temporal-differencezoneddatetime
>
> Bug: v8:11544
> Change-Id: Id2eff50d7f810042e1b7c53c49a09f9e489d5460
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3699301
> Commit-Queue: Frank Tang <ftang@chromium.org>
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#81650}

Bug: v8:11544
Change-Id: Ia40c6f47d7cf6255b0ad6f2f70571b79c7e2d7af
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3756742
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: 's avatarAdam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#81651}
parent a10194cf
......@@ -64,6 +64,10 @@ TO_BE_IMPLEMENTED(TemporalZonedDateTimePrototypeSince)
/* Temporal.Duration */
/* Temporal #sec-temporal.duration.compare */
TO_BE_IMPLEMENTED(TemporalDurationCompare)
/* Temporal #sec-temporal.duration.prototype.add */
TO_BE_IMPLEMENTED(TemporalDurationPrototypeAdd)
/* Temporal #sec-temporal.duration.prototype.subtract */
TO_BE_IMPLEMENTED(TemporalDurationPrototypeSubtract)
/* Temporal #sec-temporal.duration.prototype.round */
TO_BE_IMPLEMENTED(TemporalDurationPrototypeRound)
/* Temporal #sec-temporal.duration.prototype.total */
......@@ -226,8 +230,8 @@ TO_BE_IMPLEMENTED(TemporalCalendarPrototypeWeekOfYear)
#define TEMPORAL_GET_BY_INVOKE_CALENDAR_METHOD(T, METHOD, name) \
BUILTIN(Temporal##T##Prototype##METHOD) { \
HandleScope scope(isolate); \
/* 2. Perform ? RequireInternalSlot(temporalDate, */ \
/* [[InitializedTemporal#T]]). */ \
/* 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporal \
* #T]]). */ \
CHECK_RECEIVER(JSTemporal##T, date_like, \
"get Temporal." #T ".prototype." #name); \
/* 3. Let calendar be temporalDate.[[Calendar]]. */ \
......@@ -589,8 +593,6 @@ TEMPORAL_PROTOTYPE_METHOD0(Duration, Sign, sign)
TEMPORAL_PROTOTYPE_METHOD0(Duration, Blank, blank)
TEMPORAL_PROTOTYPE_METHOD0(Duration, Negated, negated)
TEMPORAL_PROTOTYPE_METHOD0(Duration, Abs, abs)
TEMPORAL_PROTOTYPE_METHOD2(Duration, Add, add)
TEMPORAL_PROTOTYPE_METHOD2(Duration, Subtract, subtract)
TEMPORAL_VALUE_OF(Duration)
TEMPORAL_PROTOTYPE_METHOD0(Duration, ToJSON, toJSON)
TEMPORAL_PROTOTYPE_METHOD2(Duration, ToLocaleString, toLocaleString)
......
This diff is collapsed.
......@@ -193,16 +193,6 @@ class JSTemporalDuration
V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalDuration> Abs(
Isolate* isolate, Handle<JSTemporalDuration> duration);
// #sec-temporal.duration.prototype.add
V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalDuration> Add(
Isolate* isolate, Handle<JSTemporalDuration> duration,
Handle<Object> other, Handle<Object> options);
// #sec-temporal.duration.prototype.subtract
V8_WARN_UNUSED_RESULT static MaybeHandle<JSTemporalDuration> Subtract(
Isolate* isolate, Handle<JSTemporalDuration> duration,
Handle<Object> other, Handle<Object> options);
// #sec-temporal.duration.prototype.tojson
V8_WARN_UNUSED_RESULT static MaybeHandle<String> ToJSON(
Isolate* isolate, Handle<JSTemporalDuration> duration);
......
This diff is collapsed.
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