[JAEGER] Add fast-path for JSOP_THIS.

This commit is contained in:
David Anderson
2010-06-16 18:15:23 -07:00
parent 1dab1fe273
commit 7b0c789413

View File

@@ -1754,9 +1754,19 @@ mjit::Compiler::jsop_this()
* :FIXME: We don't know whether it's a funobj or not... but we
* DO know it's an object! This can help downstream opcodes.
*/
prepareStubCall();
stubCall(stubs::This, Uses(0), Defs(1));
frame.pushSynced();
RegisterID reg = frame.allocReg();
masm.load32(Address(JSFrameReg, offsetof(JSStackFrame, flags)), reg);
masm.and32(Imm32(JSFRAME_COMPUTED_THIS), reg);
Jump j = masm.branchTest32(Assembler::Zero, reg, reg);
stubcc.linkExit(j);
stubcc.leave();
stubcc.call(stubs::This);
frame.freeReg(reg);
frame.push(Address(JSFrameReg, offsetof(JSStackFrame, thisv)));
stubcc.rejoin(0);
}
void