From 58c8662b7b992c2bb3866497e2ea7c6851068301 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 5 Jun 2010 18:01:06 -0700 Subject: [PATCH] [JAEGER] Added JSOP_SETARG. --- js/src/methodjit/Compiler.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/js/src/methodjit/Compiler.cpp b/js/src/methodjit/Compiler.cpp index 4b20c77e057..a765130bc7c 100644 --- a/js/src/methodjit/Compiler.cpp +++ b/js/src/methodjit/Compiler.cpp @@ -646,6 +646,21 @@ mjit::Compiler::generateMethod() } END_CASE(JSOP_GETARG) + BEGIN_CASE(JSOP_SETARG) + { + uint32 slot = GET_SLOTNO(PC); + FrameEntry *top = frame.peek(-1); + + bool popped = PC[JSOP_SETARG_LENGTH] == JSOP_POP; + + RegisterID reg = frame.allocReg(); + masm.loadPtr(Address(Assembler::FpReg, offsetof(JSStackFrame, argv)), reg); + Address address = Address(reg, slot * sizeof(Value)); + frame.storeTo(top, address, popped); + frame.freeReg(reg); + } + END_CASE(JSOP_SETARG) + BEGIN_CASE(JSOP_GETLOCAL) { uint32 slot = GET_SLOTNO(PC);