Issue #2155 - Follow-up: Reorder super-property evaluation order per latest spec change

Fix regression from difference between Interpreter (old) and ElemOpEmitter (new). We don't have
any Ion/IC support for these ops.

Based-on: m-c 1472211
This commit is contained in:
Martok 2023-04-01 17:41:30 +02:00 committed by roytam1
commit 74032644f5
5 changed files with 14 additions and 14 deletions

View file

@ -41,6 +41,8 @@ ElemOpEmitter::prepareForKey()
}
}
if (isCall()) {
// We need a second |this| that will be consumed during computation of
// the property value. (The original |this| is passed to the call.)
if (!bce_->emit1(JSOP_DUP)) { // [Super]
// // THIS THIS
// // [Other]
@ -60,6 +62,8 @@ ElemOpEmitter::emitGet()
{
MOZ_ASSERT(state_ == State::Key);
// We need to convert the key to an object id first, so that we do not do
// it inside both the GETELEM and the SETELEM.
if (isIncDec() || isCompoundAssignment()) {
if (!bce_->emit1(JSOP_TOID)) { // [Super]
// // THIS KEY