Skip to content

Commit

Permalink
Bug 1840374 - Part 5: Remove calendar from PlainTime. r=spidermonkey-…
Browse files Browse the repository at this point in the history
…reviewers,mgaudet

PlainTime objects no longer have an associated calendar slot.

See <tc39/proposal-temporal#2482>.

Depends on D182022

Differential Revision: https://phabricator.services.mozilla.com/D182023

UltraBlame original commit: ece2a09b9b46acf5245b5e04f96a79a3ed3c9c3e
  • Loading branch information
marco-c committed Jul 21, 2023
1 parent de83fa7 commit 7b6784c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 503 deletions.
67 changes: 0 additions & 67 deletions js/src/builtin/temporal/Calendar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2925,70 +2925,6 @@ T
)
)
{
if
constexpr
(
std
:
:
is_same_v
<
T
PlainTimeObject
>
)
{
AutoRealm
ar
(
cx
unwrapped
)
;
Rooted
<
PlainTimeObject
*
>
plainTime
(
cx
unwrapped
)
;
auto
*
calendar
=
PlainTimeObject
:
:
getOrCreateCalendar
(
cx
plainTime
)
;
if
(
!
calendar
)
{
return
false
;
}
result
.
set
(
calendar
)
;
}
else
{
result
.
set
Expand All @@ -3001,7 +2937,6 @@ calendar
)
)
;
}
return
cx
-
Expand Down Expand Up @@ -3160,7 +3095,6 @@ ToTemporalCalendar
PlainDateObject
PlainDateTimeObject
PlainMonthDayObject
PlainTimeObject
PlainYearMonthObject
ZonedDateTimeObject
>
Expand Down Expand Up @@ -3582,7 +3516,6 @@ ToTemporalCalendar
PlainDateObject
PlainDateTimeObject
PlainMonthDayObject
PlainTimeObject
PlainYearMonthObject
ZonedDateTimeObject
>
Expand Down
66 changes: 0 additions & 66 deletions js/src/builtin/temporal/PlainMonthDay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -904,70 +904,6 @@ T
)
)
{
if
constexpr
(
std
:
:
is_same_v
<
T
PlainTimeObject
>
)
{
AutoRealm
ar
(
cx
unwrapped
)
;
Rooted
<
PlainTimeObject
*
>
plainTime
(
cx
unwrapped
)
;
auto
*
calendar
=
PlainTimeObject
:
:
getOrCreateCalendar
(
cx
plainTime
)
;
if
(
!
calendar
)
{
return
false
;
}
result
.
set
(
calendar
)
;
}
else
{
result
.
set
Expand All @@ -980,7 +916,6 @@ calendar
)
)
;
}
return
cx
-
Expand Down Expand Up @@ -1134,7 +1069,6 @@ ToTemporalCalendarForMonthDay
<
PlainDateObject
PlainDateTimeObject
PlainTimeObject
PlainYearMonthObject
ZonedDateTimeObject
>
Expand Down
Loading

0 comments on commit 7b6784c

Please sign in to comment.