mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 23:38:38 +09:00
Issue #2308 & #1240 Follow-up - Replace JSOP_POS in ++/-- with JSOP_TONUMERIC. https://bugzilla.mozilla.org/show_bug.cgi?id=1519135
This commit is contained in:
parent
2b637c564f
commit
209d714434
28 changed files with 251 additions and 77 deletions
|
|
@ -4172,6 +4172,23 @@ MResumePoint::isRecoverableOperand(MUse* u) const
|
|||
return block()->info().isRecoverableOperand(indexOf(u));
|
||||
}
|
||||
|
||||
MDefinition*
|
||||
MToNumeric::foldsTo(TempAllocator& alloc)
|
||||
{
|
||||
MDefinition* input = getOperand(0);
|
||||
|
||||
if (input->isBox()) {
|
||||
MDefinition* unboxed = input->getOperand(0);
|
||||
if (IsNumericType(unboxed->type())) {
|
||||
// If the argument is an MBox and we can see that it boxes a numeric
|
||||
// value, ToNumeric can be elided.
|
||||
return input;
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
MDefinition*
|
||||
MToInt32::foldsTo(TempAllocator& alloc)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue