Skip to content

Commit

Permalink
Bug 1916260 - Part 6: Evaluate SuperBase before ToPropertyKey. r=spid…
Browse files Browse the repository at this point in the history
…ermonkey-reviewers,jandem

The spec PR reordered the `ToPropertyKey` call to happen in `GetValue` resp.
`PutValue`, which means it has to happen after `GetSuperBase`.

Tests are included in <tc39/test262#4216>.

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

UltraBlame original commit: c4fbbb9b19cc19b8836de939b5561964b4058030
  • Loading branch information
marco-c committed Sep 6, 2024
1 parent 84efcbf commit 38c1c26
Showing 1 changed file with 64 additions and 20 deletions.
84 changes: 64 additions & 20 deletions js/src/frontend/ElemOpEmitter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,7 @@ Key
;
if
(
isIncDec
(
)
|
|
isCompoundAssignment
isSuper
(
)
)
Expand All @@ -216,12 +211,8 @@ if
bce_
-
>
emit1
emitSuperBase
(
JSOp
:
:
ToPropertyKey
)
)
{
Expand All @@ -232,6 +223,18 @@ false
}
if
(
isIncDec
(
)
|
|
isCompoundAssignment
(
)
)
{
if
(
isSuper
(
)
Expand All @@ -243,35 +246,57 @@ if
bce_
-
>
emitSuperBase
emit1
(
JSOp
:
:
Swap
)
)
{
return
false
;
}
}
if
(
isIncDec
(
)
|
|
isCompoundAssignment
!
bce_
-
>
emit1
(
JSOp
:
:
ToPropertyKey
)
)
{
return
false
;
}
if
(
isSuper
!
bce_
-
>
emit1
(
JSOp
:
:
Swap
)
)
{
return
false
;
}
if
(
!
Expand Down Expand Up @@ -303,6 +328,25 @@ emit1
JSOp
:
:
ToPropertyKey
)
)
{
return
false
;
}
if
(
!
bce_
-
>
emit1
(
JSOp
:
:
Dup2
)
)
Expand Down

0 comments on commit 38c1c26

Please sign in to comment.