summaryrefslogtreecommitdiffstats
path: root/js/src/vm/Interpreter.cpp
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-20 12:40:00 +0100
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-03-20 12:40:00 +0100
commit2a57d73c3b5304be3f9be51018a1bbee79f007e2 (patch)
tree90bd70148cd2ee939092d6e70bd618ab5df914b1 /js/src/vm/Interpreter.cpp
parentcaa2a53c402c7b509e9939e9aefe595dc0dbe516 (diff)
downloadUXP-2a57d73c3b5304be3f9be51018a1bbee79f007e2.tar
UXP-2a57d73c3b5304be3f9be51018a1bbee79f007e2.tar.gz
UXP-2a57d73c3b5304be3f9be51018a1bbee79f007e2.tar.lz
UXP-2a57d73c3b5304be3f9be51018a1bbee79f007e2.tar.xz
UXP-2a57d73c3b5304be3f9be51018a1bbee79f007e2.zip
Bug 1204028: Evaluate LHS reference before RHS in destructuring
Issue #73 [Depends on] Bug 1147371: Implement IteratorClose
Diffstat (limited to 'js/src/vm/Interpreter.cpp')
-rw-r--r--js/src/vm/Interpreter.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/js/src/vm/Interpreter.cpp b/js/src/vm/Interpreter.cpp
index 9cba1f4dc..8ae9c43b0 100644
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -1860,7 +1860,6 @@ CASE(EnableInterruptsPseudoOpcode)
/* Various 1-byte no-ops. */
CASE(JSOP_NOP)
CASE(JSOP_NOP_DESTRUCTURING)
-CASE(JSOP_UNUSED183)
CASE(JSOP_UNUSED187)
CASE(JSOP_UNUSED192)
CASE(JSOP_UNUSED209)
@@ -2193,6 +2192,16 @@ CASE(JSOP_PICK)
}
END_CASE(JSOP_PICK)
+CASE(JSOP_UNPICK)
+{
+ int i = GET_UINT8(REGS.pc);
+ MOZ_ASSERT(REGS.stackDepth() >= unsigned(i) + 1);
+ Value lval = REGS.sp[-1];
+ memmove(REGS.sp - i, REGS.sp - (i + 1), sizeof(Value) * i);
+ REGS.sp[-(i + 1)] = lval;
+}
+END_CASE(JSOP_UNPICK)
+
CASE(JSOP_BINDGNAME)
CASE(JSOP_BINDNAME)
{