зеркало из https://github.com/mozilla/gecko-dev.git
Bug 744727 - Fix methodjit register alloc bug (r=bhackett)
This commit is contained in:
Родитель
73a7ef8824
Коммит
c2770ba780
|
@ -5352,12 +5352,12 @@ mjit::Compiler::jsop_setprop(PropertyName *name, bool popGuaranteed)
|
||||||
types->addFreeze(cx);
|
types->addFreeze(cx);
|
||||||
uint32_t slot = propertyTypes->definiteSlot();
|
uint32_t slot = propertyTypes->definiteSlot();
|
||||||
RegisterID reg = frame.tempRegForData(lhs);
|
RegisterID reg = frame.tempRegForData(lhs);
|
||||||
|
frame.pinReg(reg);
|
||||||
bool isObject = lhs->isTypeKnown();
|
bool isObject = lhs->isTypeKnown();
|
||||||
MaybeJump notObject;
|
MaybeJump notObject;
|
||||||
if (!isObject)
|
if (!isObject)
|
||||||
notObject = frame.testObject(Assembler::NotEqual, lhs);
|
notObject = frame.testObject(Assembler::NotEqual, lhs);
|
||||||
#ifdef JSGC_INCREMENTAL_MJ
|
#ifdef JSGC_INCREMENTAL_MJ
|
||||||
frame.pinReg(reg);
|
|
||||||
if (cx->compartment->needsBarrier() && propertyTypes->needsBarrier(cx)) {
|
if (cx->compartment->needsBarrier() && propertyTypes->needsBarrier(cx)) {
|
||||||
/* Write barrier. */
|
/* Write barrier. */
|
||||||
Jump j = masm.testGCThing(Address(reg, JSObject::getFixedSlotOffset(slot)));
|
Jump j = masm.testGCThing(Address(reg, JSObject::getFixedSlotOffset(slot)));
|
||||||
|
@ -5368,7 +5368,6 @@ mjit::Compiler::jsop_setprop(PropertyName *name, bool popGuaranteed)
|
||||||
OOL_STUBCALL(stubs::GCThingWriteBarrier, REJOIN_NONE);
|
OOL_STUBCALL(stubs::GCThingWriteBarrier, REJOIN_NONE);
|
||||||
stubcc.rejoin(Changes(0));
|
stubcc.rejoin(Changes(0));
|
||||||
}
|
}
|
||||||
frame.unpinReg(reg);
|
|
||||||
#endif
|
#endif
|
||||||
if (!isObject) {
|
if (!isObject) {
|
||||||
stubcc.linkExit(notObject.get(), Uses(2));
|
stubcc.linkExit(notObject.get(), Uses(2));
|
||||||
|
@ -5377,6 +5376,7 @@ mjit::Compiler::jsop_setprop(PropertyName *name, bool popGuaranteed)
|
||||||
OOL_STUBCALL(STRICT_VARIANT(stubs::SetName), REJOIN_FALLTHROUGH);
|
OOL_STUBCALL(STRICT_VARIANT(stubs::SetName), REJOIN_FALLTHROUGH);
|
||||||
}
|
}
|
||||||
frame.storeTo(rhs, Address(reg, JSObject::getFixedSlotOffset(slot)), popGuaranteed);
|
frame.storeTo(rhs, Address(reg, JSObject::getFixedSlotOffset(slot)), popGuaranteed);
|
||||||
|
frame.unpinReg(reg);
|
||||||
frame.shimmy(1);
|
frame.shimmy(1);
|
||||||
if (!isObject)
|
if (!isObject)
|
||||||
stubcc.rejoin(Changes(1));
|
stubcc.rejoin(Changes(1));
|
||||||
|
|
Загрузка…
Ссылка в новой задаче