[JAEGER] Added JSOP_GETDSLOT, JSOP_CALLDSLOT.
authorDavid Anderson <danderson@mozilla.com>
Sat, 05 Jun 2010 14:48:26 -0700
changeset 52716 41651aabced9872c26dc3e1597a87550069868a9
parent 52715 8655c6dde6076e4080a1e7123247e00b2636429e
child 52717 5d4331d3edb69bc618522218d6d043c5c344a2cc
push idunknown
push userunknown
push dateunknown
milestone1.9.3a5pre
[JAEGER] Added JSOP_GETDSLOT, JSOP_CALLDSLOT.
js/src/methodjit/Compiler.cpp
--- a/js/src/methodjit/Compiler.cpp
+++ b/js/src/methodjit/Compiler.cpp
@@ -653,16 +653,31 @@ mjit::Compiler::generateMethod()
           END_CASE(JSOP_SETNAME)
 
           BEGIN_CASE(JSOP_DEFFUN)
             JS_ASSERT(frame.stackDepth() == 0);
             masm.move(Imm32(fullAtomIndex(PC)), Registers::ArgReg1);
             stubCall(stubs::DefFun, Uses(0), Defs(0));
           END_CASE(JSOP_DEFFUN)
 
+          BEGIN_CASE(JSOP_GETDSLOT)
+          BEGIN_CASE(JSOP_CALLDSLOT)
+          {
+            // :FIXME: x64
+            RegisterID reg = frame.allocReg();
+            masm.loadPtr(Address(Assembler::FpReg, offsetof(JSStackFrame, argv)), reg);
+            masm.loadData32(Address(reg, int32(sizeof(Value)) * -2), reg);
+            masm.loadPtr(Address(reg, offsetof(JSObject, dslots)), reg);
+            frame.freeReg(reg);
+            frame.push(Address(reg, GET_UINT16(PC) * sizeof(Value)));
+            if (op == JSOP_CALLDSLOT)
+                frame.push(NullTag());
+          }
+          END_CASE(JSOP_CALLDSLOT)
+
           BEGIN_CASE(JSOP_UINT24)
             frame.push(Value(Int32Tag((int32_t) GET_UINT24(PC))));
           END_CASE(JSOP_UINT24)
 
           BEGIN_CASE(JSOP_STOP)
             /* Safe point! */
             emitReturn();
             goto done;