mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 20:47:44 +00:00
Bug 1134638: 9. Drive-by cleanup: FloatingTypePolicy can just have SPECIALIZATION_DATA; r=nbp
--HG-- extra : rebase_source : 9d181f69a8bc8a1122232b57a2292053a6b1bb30
This commit is contained in:
parent
53caeb1a31
commit
740fff1c0f
@ -1359,7 +1359,7 @@ MFloor::trySpecializeFloat32(TempAllocator &alloc)
|
||||
{
|
||||
MOZ_ASSERT(type() == MIRType_Int32);
|
||||
if (EnsureFloatInputOrConvert(this, alloc))
|
||||
setPolicyType(MIRType_Float32);
|
||||
specialization_ = MIRType_Float32;
|
||||
}
|
||||
|
||||
void
|
||||
@ -1367,7 +1367,7 @@ MCeil::trySpecializeFloat32(TempAllocator &alloc)
|
||||
{
|
||||
MOZ_ASSERT(type() == MIRType_Int32);
|
||||
if (EnsureFloatInputOrConvert(this, alloc))
|
||||
setPolicyType(MIRType_Float32);
|
||||
specialization_ = MIRType_Float32;
|
||||
}
|
||||
|
||||
void
|
||||
@ -1375,7 +1375,7 @@ MRound::trySpecializeFloat32(TempAllocator &alloc)
|
||||
{
|
||||
MOZ_ASSERT(type() == MIRType_Int32);
|
||||
if (EnsureFloatInputOrConvert(this, alloc))
|
||||
setPolicyType(MIRType_Float32);
|
||||
specialization_ = MIRType_Float32;
|
||||
}
|
||||
|
||||
MCompare *
|
||||
@ -2308,7 +2308,7 @@ MMathFunction::trySpecializeFloat32(TempAllocator &alloc)
|
||||
}
|
||||
|
||||
setResultType(MIRType_Float32);
|
||||
setPolicyType(MIRType_Float32);
|
||||
specialization_ = MIRType_Float32;
|
||||
}
|
||||
|
||||
MHypot *MHypot::New(TempAllocator &alloc, const MDefinitionVector & vector)
|
||||
@ -4330,7 +4330,7 @@ MSqrt::trySpecializeFloat32(TempAllocator &alloc) {
|
||||
}
|
||||
|
||||
setResultType(MIRType_Float32);
|
||||
setPolicyType(MIRType_Float32);
|
||||
specialization_ = MIRType_Float32;
|
||||
}
|
||||
|
||||
MDefinition *
|
||||
|
@ -5533,7 +5533,7 @@ class MSqrt
|
||||
: MUnaryInstruction(num)
|
||||
{
|
||||
setResultType(type);
|
||||
setPolicyType(type);
|
||||
specialization_ = type;
|
||||
setMovable();
|
||||
}
|
||||
|
||||
@ -5814,7 +5814,7 @@ class MMathFunction
|
||||
: MUnaryInstruction(input), function_(function), cache_(cache)
|
||||
{
|
||||
setResultType(MIRType_Double);
|
||||
setPolicyType(MIRType_Double);
|
||||
specialization_ = MIRType_Double;
|
||||
setMovable();
|
||||
}
|
||||
|
||||
@ -10942,7 +10942,7 @@ class MFloor
|
||||
: MUnaryInstruction(num)
|
||||
{
|
||||
setResultType(MIRType_Int32);
|
||||
setPolicyType(MIRType_Double);
|
||||
specialization_ = MIRType_Double;
|
||||
setMovable();
|
||||
}
|
||||
|
||||
@ -10986,7 +10986,7 @@ class MCeil
|
||||
: MUnaryInstruction(num)
|
||||
{
|
||||
setResultType(MIRType_Int32);
|
||||
setPolicyType(MIRType_Double);
|
||||
specialization_ = MIRType_Double;
|
||||
setMovable();
|
||||
}
|
||||
|
||||
@ -11030,7 +11030,7 @@ class MRound
|
||||
: MUnaryInstruction(num)
|
||||
{
|
||||
setResultType(MIRType_Int32);
|
||||
setPolicyType(MIRType_Double);
|
||||
specialization_ = MIRType_Double;
|
||||
setMovable();
|
||||
}
|
||||
|
||||
|
@ -221,24 +221,8 @@ class Float32Policy MOZ_FINAL : public TypePolicy
|
||||
template <unsigned Op>
|
||||
class FloatingPointPolicy MOZ_FINAL : public TypePolicy
|
||||
{
|
||||
|
||||
public:
|
||||
struct PolicyTypeData
|
||||
{
|
||||
MIRType policyType_;
|
||||
|
||||
void setPolicyType(MIRType type) {
|
||||
policyType_ = type;
|
||||
}
|
||||
|
||||
protected:
|
||||
MIRType &thisTypeSpecialization() {
|
||||
return policyType_;
|
||||
}
|
||||
};
|
||||
|
||||
INHERIT_DATA_(PolicyTypeData);
|
||||
|
||||
SPECIALIZATION_DATA_;
|
||||
virtual bool adjustInputs(TempAllocator &alloc, MInstruction *def) MOZ_OVERRIDE;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user