Bug 1204028: Evaluate LHS reference before RHS in destructuring

Issue #73
[Depends on] Bug 1147371: Implement IteratorClose
This commit is contained in:
janekptacijarabaci 2018-03-20 12:40:00 +01:00 committed by Roy Tam
commit 2f27d8433c
11 changed files with 1743 additions and 97 deletions

View file

@ -789,6 +789,19 @@ MBasicBlock::pick(int32_t depth)
swapAt(depth);
}
void
MBasicBlock::unpick(int32_t depth)
{
// unpick take the top of the stack element and move it under the depth-th
// element;
// unpick(-2):
// A B C D E
// A B C E D [ swapAt(-1) ]
// A B E C D [ swapAt(-2) ]
for (int32_t n = -1; n >= depth; n--)
swapAt(n);
}
void
MBasicBlock::swapAt(int32_t depth)
{