summaryrefslogtreecommitdiffstats
path: root/js/src/vm
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-03-27 13:21:13 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-03-27 13:21:13 +0200
commit72721d1d032db2099593076bf96f274623af3c26 (patch)
tree33db746920d307db8270ab90ba12fc0c30850b96 /js/src/vm
parent2b7f231ca7f64c9750f65922d92e3b98a3351f79 (diff)
parent2a57d73c3b5304be3f9be51018a1bbee79f007e2 (diff)
downloadUXP-72721d1d032db2099593076bf96f274623af3c26.tar
UXP-72721d1d032db2099593076bf96f274623af3c26.tar.gz
UXP-72721d1d032db2099593076bf96f274623af3c26.tar.lz
UXP-72721d1d032db2099593076bf96f274623af3c26.tar.xz
UXP-72721d1d032db2099593076bf96f274623af3c26.zip
Merge remote-tracking branch 'janek/js_lhs-before-rhs_1'
Diffstat (limited to 'js/src/vm')
-rw-r--r--js/src/vm/Interpreter.cpp11
-rw-r--r--js/src/vm/Opcodes.h10
2 files changed, 18 insertions, 3 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)
{
diff --git a/js/src/vm/Opcodes.h b/js/src/vm/Opcodes.h
index f6636004d..b59b9388c 100644
--- a/js/src/vm/Opcodes.h
+++ b/js/src/vm/Opcodes.h
@@ -1880,8 +1880,14 @@
* Stack: fun, name => fun
*/ \
macro(JSOP_SETFUNNAME, 182,"setfunname", NULL, 2, 2, 1, JOF_UINT8) \
- macro(JSOP_UNUSED183, 183,"unused183", NULL, 1, 0, 0, JOF_BYTE) \
- \
+ /*
+ * Moves the top of the stack value under the nth element of the stack.
+ * Category: Operators
+ * Type: Stack Operations
+ * Operands: uint8_t n
+ * Stack: v[n], v[n-1], ..., v[1], v[0] => v[0], v[n], v[n-1], ..., v[1]
+ */ \
+ macro(JSOP_UNPICK, 183,"unpick", NULL, 2, 0, 0, JOF_UINT8) \
/*
* Pops the top of stack value, pushes property of it onto the stack.
*