mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-25 11:15:34 +00:00
Bug 865635 - Use MMonitorTypes instead of MTypeBarrier for type write barriers, r=dvander.
This commit is contained in:
parent
fe68a570a8
commit
b30b9eb3fe
@ -1730,7 +1730,7 @@ LIRGenerator::visitMonitorTypes(MMonitorTypes *ins)
|
||||
LMonitorTypes *lir = new LMonitorTypes(temp());
|
||||
if (!useBox(lir, LMonitorTypes::Input, ins->input()))
|
||||
return false;
|
||||
return assignSnapshot(lir, Bailout_Monitor) && add(lir, ins);
|
||||
return assignSnapshot(lir, Bailout_Normal) && add(lir, ins);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -2473,9 +2473,8 @@ TryAddTypeBarrierForWrite(JSContext *cx, MBasicBlock *current, types::StackTypeS
|
||||
if (!types)
|
||||
return false;
|
||||
|
||||
MInstruction *ins = MTypeBarrier::New(*pvalue, types, Bailout_Normal);
|
||||
MInstruction *ins = MMonitorTypes::New(*pvalue, types);
|
||||
current->add(ins);
|
||||
*pvalue = ins;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -6878,8 +6878,8 @@ class MTypeBarrier
|
||||
};
|
||||
|
||||
// Like MTypeBarrier, guard that the value is in the given type set. This is
|
||||
// used after some VM calls (like GetElement) to avoid the slower calls to
|
||||
// TypeScript::Monitor inside these stubs.
|
||||
// used before property writes to ensure the value being written is represented
|
||||
// in the property types for the object.
|
||||
class MMonitorTypes : public MUnaryInstruction
|
||||
{
|
||||
const types::StackTypeSet *typeSet_;
|
||||
@ -6888,7 +6888,6 @@ class MMonitorTypes : public MUnaryInstruction
|
||||
: MUnaryInstruction(def),
|
||||
typeSet_(types)
|
||||
{
|
||||
setResultType(MIRType_Value);
|
||||
setGuard();
|
||||
JS_ASSERT(!types->unknown());
|
||||
}
|
||||
|
@ -401,9 +401,6 @@ LIRGeneratorShared::add(T *ins, MInstruction *mir)
|
||||
static inline uint32_t
|
||||
VirtualRegisterOfPayload(MDefinition *mir)
|
||||
{
|
||||
// Type barriers may have box inputs, and pass through their input's vreg.
|
||||
while (mir->isTypeBarrier())
|
||||
mir = mir->getOperand(0);
|
||||
if (mir->isBox()) {
|
||||
MDefinition *inner = mir->toBox()->getOperand(0);
|
||||
if (!inner->isConstant() && inner->type() != MIRType_Double)
|
||||
|
Loading…
Reference in New Issue
Block a user