mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
[js] Don't improve TypeSets containing the magic-args type.
JIT optimizations involving the Javascript 'arguments' object could potentially confuse later optimizations, so we simply disable these optimizations as a DiD measure.
This commit is contained in:
parent
7a37234be2
commit
ecf4aecd21
1 changed files with 4 additions and 4 deletions
|
|
@ -3823,7 +3823,7 @@ IonBuilder::improveTypesAtTypeOfCompare(MCompare* ins, bool trueBranch, MTest* t
|
||||||
tmp.addType(TypeSet::PrimitiveType(ValueTypeFromMIRType(subject->type())), alloc_->lifoAlloc());
|
tmp.addType(TypeSet::PrimitiveType(ValueTypeFromMIRType(subject->type())), alloc_->lifoAlloc());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputTypes->unknown())
|
if (inputTypes->unknown() || inputTypes->hasType(TypeSet::MagicArgType()))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Note: we cannot remove the AnyObject type in the false branch,
|
// Note: we cannot remove the AnyObject type in the false branch,
|
||||||
|
|
@ -3905,7 +3905,7 @@ IonBuilder::improveTypesAtNullOrUndefinedCompare(MCompare* ins, bool trueBranch,
|
||||||
tmp.addType(TypeSet::PrimitiveType(ValueTypeFromMIRType(subject->type())), alloc_->lifoAlloc());
|
tmp.addType(TypeSet::PrimitiveType(ValueTypeFromMIRType(subject->type())), alloc_->lifoAlloc());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inputTypes->unknown())
|
if (inputTypes->unknown() || inputTypes->hasType(TypeSet::MagicArgType()))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
TemporaryTypeSet* type;
|
TemporaryTypeSet* type;
|
||||||
|
|
@ -3969,7 +3969,7 @@ IonBuilder::improveTypesAtTest(MDefinition* ins, bool trueBranch, MTest* test)
|
||||||
tmp.addType(TypeSet::PrimitiveType(ValueTypeFromMIRType(subject->type())), alloc_->lifoAlloc());
|
tmp.addType(TypeSet::PrimitiveType(ValueTypeFromMIRType(subject->type())), alloc_->lifoAlloc());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldType->unknown())
|
if (oldType->unknown() || oldType->hasType(TypeSet::MagicArgType()))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
TemporaryTypeSet* type = nullptr;
|
TemporaryTypeSet* type = nullptr;
|
||||||
|
|
@ -4049,7 +4049,7 @@ IonBuilder::improveTypesAtTest(MDefinition* ins, bool trueBranch, MTest* test)
|
||||||
}
|
}
|
||||||
|
|
||||||
// If ins does not have a typeset we return as we cannot optimize.
|
// If ins does not have a typeset we return as we cannot optimize.
|
||||||
if (oldType->unknown())
|
if (oldType->unknown() || oldType->hasType(TypeSet::MagicArgType()))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Decide either to set or remove.
|
// Decide either to set or remove.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue