mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[INFER] Fix rejoin point for JSOP_DEFLOCALFUN* and JSOP_IN, bug 653397. r=bhackett
This commit is contained in:
parent
9b9d0b4696
commit
c97bd188d2
16
js/src/jit-test/tests/jaeger/bug653397.js
Normal file
16
js/src/jit-test/tests/jaeger/bug653397.js
Normal 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);
|
||||
}
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user