зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1187511 - IonMonkey: Refine type sets for unbox operations based on unbox type r=jandem
--HG-- extra : rebase_source : 69eabb0389660052fb1775c639872369cf4578ba
This commit is contained in:
Родитель
36e1d5fccf
Коммит
43dd938cba
|
@ -4350,7 +4350,7 @@ class MUnbox final : public MUnaryInstruction, public BoxInputsPolicy::Data
|
|||
Mode mode_;
|
||||
BailoutKind bailoutKind_;
|
||||
|
||||
MUnbox(MDefinition* ins, MIRType type, Mode mode, BailoutKind kind)
|
||||
MUnbox(MDefinition* ins, MIRType type, Mode mode, BailoutKind kind, TempAllocator& alloc)
|
||||
: MUnaryInstruction(ins),
|
||||
mode_(mode)
|
||||
{
|
||||
|
@ -4366,8 +4366,12 @@ class MUnbox final : public MUnaryInstruction, public BoxInputsPolicy::Data
|
|||
type == MIRType_Symbol ||
|
||||
type == MIRType_Object);
|
||||
|
||||
TemporaryTypeSet* resultSet = ins->resultTypeSet();
|
||||
if (resultSet && type == MIRType_Object)
|
||||
resultSet = resultSet->cloneObjectsOnly(alloc.lifoAlloc());
|
||||
|
||||
setResultType(type);
|
||||
setResultTypeSet(ins->resultTypeSet());
|
||||
setResultTypeSet(resultSet);
|
||||
setMovable();
|
||||
|
||||
if (mode_ == TypeBarrier || mode_ == Fallible)
|
||||
|
@ -4405,13 +4409,13 @@ class MUnbox final : public MUnaryInstruction, public BoxInputsPolicy::Data
|
|||
MOZ_CRASH("Given MIRType cannot be unboxed.");
|
||||
}
|
||||
|
||||
return new(alloc) MUnbox(ins, type, mode, kind);
|
||||
return new(alloc) MUnbox(ins, type, mode, kind, alloc);
|
||||
}
|
||||
|
||||
static MUnbox* New(TempAllocator& alloc, MDefinition* ins, MIRType type, Mode mode,
|
||||
BailoutKind kind)
|
||||
{
|
||||
return new(alloc) MUnbox(ins, type, mode, kind);
|
||||
return new(alloc) MUnbox(ins, type, mode, kind, alloc);
|
||||
}
|
||||
|
||||
Mode mode() const {
|
||||
|
|
Загрузка…
Ссылка в новой задаче