[INFER] Fix rejoin point for JSOP_DEFLOCALFUN* and JSOP_IN, bug 653397. r=bhackett

This commit is contained in:
Jan de Mooij 2011-05-05 10:04:31 +02:00
parent 9b9d0b4696
commit c97bd188d2
2 changed files with 28 additions and 6 deletions

View File

@ -0,0 +1,16 @@
try {
function testSlowArrayPopMultiFrame() {
a = undefined;
function parent(a, i) { i };
function gramps(a, i) {
return parent;
}
var last;
for (var i = 0; ; gramps++) {
last = gramps(a, i)
}
}(testSlowArrayPopMultiFrame(), 23);
assertEq(0, 1);
} catch(e) {
assertEq(e instanceof TypeError, true);
}

View File

@ -2416,9 +2416,11 @@ mjit::Compiler::generateMethod()
BEGIN_CASE(JSOP_IN)
{
REJOIN_SITE_ANY();
prepareStubCall(Uses(2));
INLINE_STUBCALL(stubs::In);
{
REJOIN_SITE_ANY();
INLINE_STUBCALL(stubs::In);
}
frame.popn(2);
frame.takeReg(Registers::ReturnReg);
frame.pushTypedPayload(JSVAL_TYPE_BOOLEAN, Registers::ReturnReg);
@ -2521,13 +2523,15 @@ mjit::Compiler::generateMethod()
BEGIN_CASE(JSOP_DEFLOCALFUN_FC)
{
REJOIN_SITE_ANY();
updateVarType();
uint32 slot = GET_SLOTNO(PC);
JSFunction *fun = script->getFunction(fullAtomIndex(&PC[SLOTNO_LEN]));
prepareStubCall(Uses(frame.frameSlots()));
masm.move(ImmPtr(fun), Registers::ArgReg1);
INLINE_STUBCALL(stubs::DefLocalFun_FC);
{
REJOIN_SITE_ANY();
INLINE_STUBCALL(stubs::DefLocalFun_FC);
}
frame.takeReg(Registers::ReturnReg);
frame.pushTypedPayload(JSVAL_TYPE_OBJECT, Registers::ReturnReg);
frame.storeLocal(slot, JSVAL_TYPE_OBJECT, true);
@ -2624,13 +2628,15 @@ mjit::Compiler::generateMethod()
BEGIN_CASE(JSOP_DEFLOCALFUN)
{
REJOIN_SITE_ANY();
updateVarType();
uint32 slot = GET_SLOTNO(PC);
JSFunction *fun = script->getFunction(fullAtomIndex(&PC[SLOTNO_LEN]));
prepareStubCall(Uses(0));
masm.move(ImmPtr(fun), Registers::ArgReg1);
INLINE_STUBCALL(stubs::DefLocalFun);
{
REJOIN_SITE_ANY();
INLINE_STUBCALL(stubs::DefLocalFun);
}
frame.takeReg(Registers::ReturnReg);
frame.pushTypedPayload(JSVAL_TYPE_OBJECT, Registers::ReturnReg);
frame.storeLocal(slot, JSVAL_TYPE_OBJECT, true);