mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
[JAEGER] Fixed PROPINC etc using the property cache (bug 589115, r=dmandelin).
--HG-- extra : rebase_source : 6a58de4b3044c6ce4afa160e1fb497df4a6d290b
This commit is contained in:
parent
b5c0841ea3
commit
4101030c9e
@ -2612,8 +2612,21 @@ mjit::Compiler::jsop_setprop(JSAtom *atom)
|
||||
pic.typeCheck = stubcc.masm.label();
|
||||
stubcc.linkExit(j, Uses(2));
|
||||
stubcc.leave();
|
||||
stubcc.masm.move(ImmPtr(atom), Registers::ArgReg1);
|
||||
stubcc.call(stubs::SetName);
|
||||
|
||||
/*
|
||||
* This gets called from PROPINC/PROPDEC which aren't compatible with
|
||||
* the normal SETNAME property cache logic.
|
||||
*/
|
||||
JSOp op = JSOp(*PC);
|
||||
if (op == JSOP_SETNAME || op == JSOP_SETPROP || op == JSOP_SETGNAME || op ==
|
||||
JSOP_SETMETHOD) {
|
||||
stubcc.masm.move(ImmPtr(atom), Registers::ArgReg1);
|
||||
stubcc.call(stubs::SetName);
|
||||
} else {
|
||||
stubcc.masm.move(Imm32(pics.length()), Registers::ArgReg1);
|
||||
stubcc.call(ic::SetPropDumb);
|
||||
}
|
||||
|
||||
typeCheck = stubcc.masm.jump();
|
||||
pic.hasTypeCheck = true;
|
||||
} else {
|
||||
|
@ -1901,8 +1901,8 @@ ic::GetElem(VMFrame &f, uint32 picIndex)
|
||||
f.regs.sp[-2] = v;
|
||||
}
|
||||
|
||||
static void JS_FASTCALL
|
||||
SetPropDumb(VMFrame &f, uint32 index)
|
||||
void JS_FASTCALL
|
||||
ic::SetPropDumb(VMFrame &f, uint32 index)
|
||||
{
|
||||
JSScript *script = f.fp()->getScript();
|
||||
ic::PICInfo &pic = script->pics[index];
|
||||
|
@ -353,6 +353,7 @@ void JS_FASTCALL SetProp(VMFrame &f, uint32 index);
|
||||
void JS_FASTCALL CallProp(VMFrame &f, uint32 index);
|
||||
void JS_FASTCALL Name(VMFrame &f, uint32 index);
|
||||
void JS_FASTCALL BindName(VMFrame &f, uint32 index);
|
||||
void JS_FASTCALL SetPropDumb(VMFrame &f, uint32 index);
|
||||
|
||||
} /* namespace ic */
|
||||
} /* namespace mjit */
|
||||
|
6
js/src/trace-test/tests/jaeger/bug589115.js
Normal file
6
js/src/trace-test/tests/jaeger/bug589115.js
Normal file
@ -0,0 +1,6 @@
|
||||
for each(y in ['', 0, '']) {
|
||||
y.lastIndexOf--
|
||||
}
|
||||
|
||||
/* Don't assert/crash. */
|
||||
|
Loading…
Reference in New Issue
Block a user