From 80958c3267334bcce9fbcf5174882d9f8266c5e3 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Tue, 7 Mar 2023 20:25:28 -0800 Subject: [PATCH] Temporal: Avoid reconverting Zoned- to PlainDateTime in AddZonedDateTime --- .../Temporal/Duration/prototype/add/order-of-operations.js | 4 ---- .../Temporal/Duration/prototype/round/order-of-operations.js | 2 -- .../Duration/prototype/subtract/order-of-operations.js | 4 ---- .../Temporal/Duration/prototype/total/order-of-operations.js | 2 -- .../ZonedDateTime/prototype/round/order-of-operations.js | 2 -- .../ZonedDateTime/prototype/since/order-of-operations.js | 4 ---- .../ZonedDateTime/prototype/until/order-of-operations.js | 4 ---- 7 files changed, 22 deletions(-) diff --git a/test/built-ins/Temporal/Duration/prototype/add/order-of-operations.js b/test/built-ins/Temporal/Duration/prototype/add/order-of-operations.js index 691357750e..34e68d90a9 100644 --- a/test/built-ins/Temporal/Duration/prototype/add/order-of-operations.js +++ b/test/built-ins/Temporal/Duration/prototype/add/order-of-operations.js @@ -249,8 +249,6 @@ const expectedOpsForZonedRelativeTo = expected.concat([ "get options.relativeTo.calendar.dateUntil", "call options.relativeTo.calendar.dateUntil", // AddDuration → DifferenceZonedDateTime → AddZonedDateTime - "get options.relativeTo.timeZone.getOffsetNanosecondsFor", - "call options.relativeTo.timeZone.getOffsetNanosecondsFor", "get options.relativeTo.calendar.dateAdd", "call options.relativeTo.calendar.dateAdd", "get options.relativeTo.timeZone.getPossibleInstantsFor", @@ -264,8 +262,6 @@ const expectedOpsForZonedRelativeTo = expected.concat([ "get options.relativeTo.calendar.dateUntil", "call options.relativeTo.calendar.dateUntil", // AddDuration → DifferenceZonedDateTime → NanosecondsToDays → AddZonedDateTime 1 - "get options.relativeTo.timeZone.getOffsetNanosecondsFor", - "call options.relativeTo.timeZone.getOffsetNanosecondsFor", "get options.relativeTo.calendar.dateAdd", "call options.relativeTo.calendar.dateAdd", "get options.relativeTo.timeZone.getPossibleInstantsFor", diff --git a/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js b/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js index 6384ab1548..5efd530adc 100644 --- a/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js +++ b/test/built-ins/Temporal/Duration/prototype/round/order-of-operations.js @@ -363,8 +363,6 @@ const expectedOpsForYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([ "get options.relativeTo.calendar.dateUntil", // 12. DifferenceISODateTime "call options.relativeTo.calendar.dateUntil", // NanosecondsToDays → AddZonedDateTime - "get options.relativeTo.timeZone.getOffsetNanosecondsFor", // 5. GetPlainDateTimeFor - "call options.relativeTo.timeZone.getOffsetNanosecondsFor", "get options.relativeTo.calendar.dateAdd", // 8. "call options.relativeTo.calendar.dateAdd", "get options.relativeTo.timeZone.getPossibleInstantsFor", // 10. GetInstantFor diff --git a/test/built-ins/Temporal/Duration/prototype/subtract/order-of-operations.js b/test/built-ins/Temporal/Duration/prototype/subtract/order-of-operations.js index 5b9dcf3dd2..4bbe933f86 100644 --- a/test/built-ins/Temporal/Duration/prototype/subtract/order-of-operations.js +++ b/test/built-ins/Temporal/Duration/prototype/subtract/order-of-operations.js @@ -249,8 +249,6 @@ const expectedOpsForZonedRelativeTo = expected.concat([ "get options.relativeTo.calendar.dateUntil", "call options.relativeTo.calendar.dateUntil", // AddDuration → DifferenceZonedDateTime → AddZonedDateTime - "get options.relativeTo.timeZone.getOffsetNanosecondsFor", - "call options.relativeTo.timeZone.getOffsetNanosecondsFor", "get options.relativeTo.calendar.dateAdd", "call options.relativeTo.calendar.dateAdd", "get options.relativeTo.timeZone.getPossibleInstantsFor", @@ -264,8 +262,6 @@ const expectedOpsForZonedRelativeTo = expected.concat([ "get options.relativeTo.calendar.dateUntil", "call options.relativeTo.calendar.dateUntil", // AddDuration → DifferenceZonedDateTime → NanosecondsToDays → AddZonedDateTime 1 - "get options.relativeTo.timeZone.getOffsetNanosecondsFor", - "call options.relativeTo.timeZone.getOffsetNanosecondsFor", "get options.relativeTo.calendar.dateAdd", "call options.relativeTo.calendar.dateAdd", "get options.relativeTo.timeZone.getPossibleInstantsFor", diff --git a/test/built-ins/Temporal/Duration/prototype/total/order-of-operations.js b/test/built-ins/Temporal/Duration/prototype/total/order-of-operations.js index 636a92378a..27d1264d20 100644 --- a/test/built-ins/Temporal/Duration/prototype/total/order-of-operations.js +++ b/test/built-ins/Temporal/Duration/prototype/total/order-of-operations.js @@ -270,8 +270,6 @@ const expectedOpsForYearRoundingZoned = expectedOpsForZonedRelativeTo.concat([ "get options.relativeTo.calendar.dateUntil", // 12. DifferenceISODateTime "call options.relativeTo.calendar.dateUntil", // BalancePossiblyInfiniteDuration → NanosecondsToDays → AddZonedDateTime - "get options.relativeTo.timeZone.getOffsetNanosecondsFor", // 5. GetPlainDateTimeFor - "call options.relativeTo.timeZone.getOffsetNanosecondsFor", "get options.relativeTo.calendar.dateAdd", // 8. "call options.relativeTo.calendar.dateAdd", "get options.relativeTo.timeZone.getPossibleInstantsFor", // 10. GetInstantFor diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/round/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/round/order-of-operations.js index 121f8fe514..602c280e6a 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/round/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/round/order-of-operations.js @@ -25,8 +25,6 @@ const expected = [ "get this.timeZone.getPossibleInstantsFor", "call this.timeZone.getPossibleInstantsFor", // AddZonedDateTime - "get this.timeZone.getOffsetNanosecondsFor", - "call this.timeZone.getOffsetNanosecondsFor", "get this.calendar.dateAdd", "call this.calendar.dateAdd", "get this.timeZone.getPossibleInstantsFor", diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/since/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/since/order-of-operations.js index 76184d2423..c80541eb2a 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/since/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/since/order-of-operations.js @@ -158,8 +158,6 @@ const expectedOpsForCalendarDifference = [ "get this.calendar.dateUntil", "call this.calendar.dateUntil", // AddZonedDateTime - "get this.timeZone.getOffsetNanosecondsFor", - "call this.timeZone.getOffsetNanosecondsFor", "get this.calendar.dateAdd", "call this.calendar.dateAdd", "get this.timeZone.getPossibleInstantsFor", @@ -173,8 +171,6 @@ const expectedOpsForCalendarDifference = [ "get this.calendar.dateUntil", "call this.calendar.dateUntil", // NanosecondsToDays → AddZonedDateTime - "get this.timeZone.getOffsetNanosecondsFor", - "call this.timeZone.getOffsetNanosecondsFor", "get this.calendar.dateAdd", "call this.calendar.dateAdd", "get this.timeZone.getPossibleInstantsFor", diff --git a/test/built-ins/Temporal/ZonedDateTime/prototype/until/order-of-operations.js b/test/built-ins/Temporal/ZonedDateTime/prototype/until/order-of-operations.js index 0b33ed46cf..e6ff4417a7 100644 --- a/test/built-ins/Temporal/ZonedDateTime/prototype/until/order-of-operations.js +++ b/test/built-ins/Temporal/ZonedDateTime/prototype/until/order-of-operations.js @@ -158,8 +158,6 @@ const expectedOpsForCalendarDifference = [ "get this.calendar.dateUntil", "call this.calendar.dateUntil", // AddZonedDateTime - "get this.timeZone.getOffsetNanosecondsFor", - "call this.timeZone.getOffsetNanosecondsFor", "get this.calendar.dateAdd", "call this.calendar.dateAdd", "get this.timeZone.getPossibleInstantsFor", @@ -173,8 +171,6 @@ const expectedOpsForCalendarDifference = [ "get this.calendar.dateUntil", "call this.calendar.dateUntil", // NanosecondsToDays → AddZonedDateTime - "get this.timeZone.getOffsetNanosecondsFor", - "call this.timeZone.getOffsetNanosecondsFor", "get this.calendar.dateAdd", "call this.calendar.dateAdd", "get this.timeZone.getPossibleInstantsFor",