mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
Issue #2308 & #1240 Follow-up - Add BigInt support to JSOP_INC and JSOP_DEC. https://bugzilla.mozilla.org/show_bug.cgi?id=1526309
This commit is contained in:
parent
5c8a6c5bb8
commit
e12e377e51
8 changed files with 283 additions and 127 deletions
|
|
@ -3110,23 +3110,6 @@ MBinaryArithInstruction::New(TempAllocator& alloc, Opcode op,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
MBinaryArithInstruction::setNumberSpecialization(TempAllocator& alloc, BaselineInspector* inspector,
|
||||
jsbytecode* pc)
|
||||
{
|
||||
setSpecialization(MIRType::Double);
|
||||
|
||||
// Try to specialize as int32.
|
||||
if (getOperand(0)->type() == MIRType::Int32 && getOperand(1)->type() == MIRType::Int32) {
|
||||
bool seenDouble = inspector->hasSeenDoubleResult(pc);
|
||||
|
||||
// Use int32 specialization if the operation doesn't overflow on its
|
||||
// constant operands and if the operation has never overflowed.
|
||||
if (!seenDouble && !constantDoubleResult(alloc))
|
||||
setInt32Specialization();
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
MBinaryArithInstruction::constantDoubleResult(TempAllocator& alloc)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue