Bug 708303 - Back out 1deb23332fb5 for orange

This commit is contained in:
Bill McCloskey 2011-12-15 10:30:09 -08:00
parent e21b12503c
commit bc4234efe8
2 changed files with 7 additions and 11 deletions

View File

@ -5449,13 +5449,11 @@ mjit::Compiler::jsop_setprop(JSAtom *atom, bool usePropCache, bool popGuaranteed
#ifdef JSGC_INCREMENTAL_MJ
/* Write barrier. */
if (cx->compartment->needsBarrier()) {
frame.pinReg(address.base);
stubcc.linkExit(masm.jump(), Uses(0));
stubcc.leave();
stubcc.masm.addPtr(Imm32(address.offset), address.base, Registers::ArgReg1);
OOL_STUBCALL(stubs::WriteBarrier, REJOIN_NONE);
stubcc.rejoin(Changes(0));
frame.unpinReg(address.base);
}
#endif
@ -5492,9 +5490,9 @@ mjit::Compiler::jsop_setprop(JSAtom *atom, bool usePropCache, bool popGuaranteed
if (!isObject)
notObject = frame.testObject(Assembler::NotEqual, lhs);
#ifdef JSGC_INCREMENTAL_MJ
frame.pinReg(reg);
if (cx->compartment->needsBarrier() && propertyTypes->needsBarrier(cx)) {
/* Write barrier. */
frame.pinReg(reg);
Jump j = masm.testGCThing(Address(reg, JSObject::getFixedSlotOffset(slot)));
stubcc.linkExit(j, Uses(0));
stubcc.leave();
@ -5502,8 +5500,8 @@ mjit::Compiler::jsop_setprop(JSAtom *atom, bool usePropCache, bool popGuaranteed
reg, Registers::ArgReg1);
OOL_STUBCALL(stubs::GCThingWriteBarrier, REJOIN_NONE);
stubcc.rejoin(Changes(0));
frame.unpinReg(reg);
}
frame.unpinReg(reg);
#endif
if (!isObject) {
stubcc.linkExit(notObject.get(), Uses(2));

View File

@ -1172,19 +1172,17 @@ mjit::Compiler::jsop_setelem_dense()
/*
* The sync call below can potentially clobber key.reg() and slotsReg.
* We pin them to avoid this. Additionally, the WriteBarrier stub can
* So we save and restore them. Additionally, the WriteBarrier stub can
* clobber both registers. The rejoin call will restore key.reg() but
* not slotsReg. So we save slotsReg in the frame and restore it after
* the stub call.
* not slotsReg. So we restore it again after the stub call.
*/
stubcc.masm.storePtr(slotsReg, FrameAddress(offsetof(VMFrame, scratch)));
frame.pinReg(slotsReg);
if (!key.isConstant())
frame.pinReg(key.reg());
stubcc.masm.push(key.reg());
frame.sync(stubcc.masm, Uses(3));
if (!key.isConstant())
frame.unpinReg(key.reg());
frame.unpinReg(slotsReg);
stubcc.masm.pop(key.reg());
stubcc.masm.loadPtr(FrameAddress(offsetof(VMFrame, scratch)), slotsReg);
if (key.isConstant())
stubcc.masm.lea(Address(slotsReg, key.index() * sizeof(Value)), Registers::ArgReg1);