mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
Issue #1240 - Part 5e - BigInt bitwise operators. https://bugzilla.mozilla.org/show_bug.cgi?id=1490387
This commit is contained in:
parent
20b52c9e2e
commit
03734326e8
8 changed files with 197 additions and 130 deletions
|
|
@ -2849,6 +2849,7 @@ MBinaryBitwiseInstruction::infer(BaselineInspector*, jsbytecode*)
|
|||
getOperand(1)->mightBeType(MIRType::Object) || getOperand(1)->mightBeType(MIRType::Symbol))
|
||||
{
|
||||
specialization_ = MIRType::None;
|
||||
setResultType(MIRType::Value);
|
||||
} else {
|
||||
specializeAs(MIRType::Int32);
|
||||
}
|
||||
|
|
@ -2858,9 +2859,10 @@ void
|
|||
MBinaryBitwiseInstruction::specializeAs(MIRType type)
|
||||
{
|
||||
MOZ_ASSERT(type == MIRType::Int32 || type == MIRType::Int64);
|
||||
MOZ_ASSERT(this->type() == type);
|
||||
MOZ_ASSERT(this->type() == MIRType::Value || this->type() == type);
|
||||
|
||||
specialization_ = type;
|
||||
setResultType(type);
|
||||
|
||||
if (isBitOr() || isBitAnd() || isBitXor())
|
||||
setCommutative();
|
||||
|
|
@ -2871,9 +2873,13 @@ MShiftInstruction::infer(BaselineInspector*, jsbytecode*)
|
|||
{
|
||||
if (getOperand(0)->mightBeType(MIRType::Object) || getOperand(1)->mightBeType(MIRType::Object) ||
|
||||
getOperand(0)->mightBeType(MIRType::Symbol) || getOperand(1)->mightBeType(MIRType::Symbol))
|
||||
{
|
||||
specialization_ = MIRType::None;
|
||||
else
|
||||
setResultType(MIRType::Value);
|
||||
} else {
|
||||
specialization_ = MIRType::Int32;
|
||||
setResultType(MIRType::Int32);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -3828,7 +3834,7 @@ MBitNot::NewInt32(TempAllocator& alloc, MDefinition* input)
|
|||
{
|
||||
MBitNot* ins = new(alloc) MBitNot(input);
|
||||
ins->specialization_ = MIRType::Int32;
|
||||
MOZ_ASSERT(ins->type() == MIRType::Int32);
|
||||
ins->setResultType(MIRType::Int32);
|
||||
return ins;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue