Bug 988950 - Check whether value is an object after checking whether object is in nursery r=terrence

This commit is contained in:
Jon Coppeard 2014-04-23 13:48:34 +01:00
parent 0ce1ecfb73
commit dbad2cd5f7

View File

@ -1861,9 +1861,6 @@ CodeGenerator::visitPostWriteBarrierV(LPostWriteBarrierV *lir)
if (!addOutOfLineCode(ool))
return false;
ValueOperand value = ToValue(lir, LPostWriteBarrierV::Input);
masm.branchTestObject(Assembler::NotEqual, value, ool->rejoin());
const Nursery &nursery = GetIonContext()->runtime->gcNursery();
if (lir->object()->isConstant()) {
@ -1876,6 +1873,9 @@ CodeGenerator::visitPostWriteBarrierV(LPostWriteBarrierV *lir)
masm.branchPtr(Assembler::Below, temp, Imm32(Nursery::NurserySize), ool->rejoin());
}
ValueOperand value = ToValue(lir, LPostWriteBarrierV::Input);
masm.branchTestObject(Assembler::NotEqual, value, ool->rejoin());
// This section is a little different because we mustn't trash the temp
// register before we use its contents.
Register temp = ToRegister(lir->temp());