зеркало из https://github.com/mozilla/gecko-dev.git
Bug 998155 - IonMonkey: Constify congruentTo and mightAlias. r=h4writer
This commit is contained in:
Родитель
061965db8b
Коммит
0fddf7bc81
|
@ -158,7 +158,7 @@ MDefinition::valueHash() const
|
|||
}
|
||||
|
||||
bool
|
||||
MDefinition::congruentIfOperandsEqual(MDefinition *ins) const
|
||||
MDefinition::congruentIfOperandsEqual(const MDefinition *ins) const
|
||||
{
|
||||
if (op() != ins->op())
|
||||
return false;
|
||||
|
@ -491,7 +491,7 @@ MConstant::valueHash() const
|
|||
return (HashNumber)JSVAL_TO_IMPL(value_).asBits;
|
||||
}
|
||||
bool
|
||||
MConstant::congruentTo(MDefinition *ins) const
|
||||
MConstant::congruentTo(const MDefinition *ins) const
|
||||
{
|
||||
if (!ins->isConstant())
|
||||
return false;
|
||||
|
@ -674,7 +674,7 @@ MParameter::valueHash() const
|
|||
}
|
||||
|
||||
bool
|
||||
MParameter::congruentTo(MDefinition *ins) const
|
||||
MParameter::congruentTo(const MDefinition *ins) const
|
||||
{
|
||||
if (!ins->isParameter())
|
||||
return false;
|
||||
|
@ -760,7 +760,7 @@ MCallDOMNative::computeMovable()
|
|||
}
|
||||
|
||||
bool
|
||||
MCallDOMNative::congruentTo(MDefinition *ins) const
|
||||
MCallDOMNative::congruentTo(const MDefinition *ins) const
|
||||
{
|
||||
if (!isMovable())
|
||||
return false;
|
||||
|
@ -768,7 +768,7 @@ MCallDOMNative::congruentTo(MDefinition *ins) const
|
|||
if (!ins->isCall())
|
||||
return false;
|
||||
|
||||
MCall *call = ins->toCall();
|
||||
const MCall *call = ins->toCall();
|
||||
|
||||
if (!call->isCallDOMNative())
|
||||
return false;
|
||||
|
@ -981,7 +981,7 @@ MPhi::foldsTo(TempAllocator &alloc, bool useValueNumbers)
|
|||
}
|
||||
|
||||
bool
|
||||
MPhi::congruentTo(MDefinition *ins) const
|
||||
MPhi::congruentTo(const MDefinition *ins) const
|
||||
{
|
||||
if (!ins->isPhi())
|
||||
return false;
|
||||
|
@ -2717,7 +2717,7 @@ MNewArray::shouldUseVM() const
|
|||
}
|
||||
|
||||
bool
|
||||
MLoadFixedSlot::mightAlias(MDefinition *store)
|
||||
MLoadFixedSlot::mightAlias(const MDefinition *store) const
|
||||
{
|
||||
if (store->isStoreFixedSlot() && store->toStoreFixedSlot()->slot() != slot())
|
||||
return false;
|
||||
|
@ -2725,51 +2725,51 @@ MLoadFixedSlot::mightAlias(MDefinition *store)
|
|||
}
|
||||
|
||||
bool
|
||||
MAsmJSLoadHeap::mightAlias(MDefinition *def)
|
||||
MAsmJSLoadHeap::mightAlias(const MDefinition *def) const
|
||||
{
|
||||
if (def->isAsmJSStoreHeap()) {
|
||||
MAsmJSStoreHeap *store = def->toAsmJSStoreHeap();
|
||||
const MAsmJSStoreHeap *store = def->toAsmJSStoreHeap();
|
||||
if (store->viewType() != viewType())
|
||||
return true;
|
||||
if (!ptr()->isConstant() || !store->ptr()->isConstant())
|
||||
return true;
|
||||
MConstant *otherPtr = store->ptr()->toConstant();
|
||||
const MConstant *otherPtr = store->ptr()->toConstant();
|
||||
return ptr()->toConstant()->value() == otherPtr->value();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
MAsmJSLoadHeap::congruentTo(MDefinition *ins) const
|
||||
MAsmJSLoadHeap::congruentTo(const MDefinition *ins) const
|
||||
{
|
||||
if (!ins->isAsmJSLoadHeap())
|
||||
return false;
|
||||
MAsmJSLoadHeap *load = ins->toAsmJSLoadHeap();
|
||||
const MAsmJSLoadHeap *load = ins->toAsmJSLoadHeap();
|
||||
return load->viewType() == viewType() && congruentIfOperandsEqual(load);
|
||||
}
|
||||
|
||||
bool
|
||||
MAsmJSLoadGlobalVar::mightAlias(MDefinition *def)
|
||||
MAsmJSLoadGlobalVar::mightAlias(const MDefinition *def) const
|
||||
{
|
||||
if (def->isAsmJSStoreGlobalVar()) {
|
||||
MAsmJSStoreGlobalVar *store = def->toAsmJSStoreGlobalVar();
|
||||
const MAsmJSStoreGlobalVar *store = def->toAsmJSStoreGlobalVar();
|
||||
return store->globalDataOffset() == globalDataOffset_;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
MAsmJSLoadGlobalVar::congruentTo(MDefinition *ins) const
|
||||
MAsmJSLoadGlobalVar::congruentTo(const MDefinition *ins) const
|
||||
{
|
||||
if (ins->isAsmJSLoadGlobalVar()) {
|
||||
MAsmJSLoadGlobalVar *load = ins->toAsmJSLoadGlobalVar();
|
||||
const MAsmJSLoadGlobalVar *load = ins->toAsmJSLoadGlobalVar();
|
||||
return globalDataOffset_ == load->globalDataOffset_;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
MLoadSlot::mightAlias(MDefinition *store)
|
||||
MLoadSlot::mightAlias(const MDefinition *store) const
|
||||
{
|
||||
if (store->isStoreSlot() && store->toStoreSlot()->slot() != slot())
|
||||
return false;
|
||||
|
@ -2880,7 +2880,7 @@ MStoreTypedArrayElementStatic::length() const
|
|||
}
|
||||
|
||||
bool
|
||||
MGetPropertyPolymorphic::mightAlias(MDefinition *store)
|
||||
MGetPropertyPolymorphic::mightAlias(const MDefinition *store) const
|
||||
{
|
||||
// Allow hoisting this instruction if the store does not write to a
|
||||
// slot read by this instruction.
|
||||
|
@ -2889,7 +2889,7 @@ MGetPropertyPolymorphic::mightAlias(MDefinition *store)
|
|||
return true;
|
||||
|
||||
for (size_t i = 0; i < numShapes(); i++) {
|
||||
Shape *shape = this->shape(i);
|
||||
const Shape *shape = this->shape(i);
|
||||
if (shape->slot() < shape->numFixedSlots()) {
|
||||
// Fixed slot.
|
||||
uint32_t slot = shape->slot();
|
||||
|
|
184
js/src/jit/MIR.h
184
js/src/jit/MIR.h
|
@ -376,10 +376,10 @@ class MDefinition : public MNode
|
|||
}
|
||||
|
||||
virtual HashNumber valueHash() const;
|
||||
virtual bool congruentTo(MDefinition *ins) const {
|
||||
virtual bool congruentTo(const MDefinition *ins) const {
|
||||
return false;
|
||||
}
|
||||
bool congruentIfOperandsEqual(MDefinition *ins) const;
|
||||
bool congruentIfOperandsEqual(const MDefinition *ins) const;
|
||||
virtual MDefinition *foldsTo(TempAllocator &alloc, bool useValueNumbers);
|
||||
virtual void analyzeEdgeCasesForward();
|
||||
virtual void analyzeEdgeCasesBackward();
|
||||
|
@ -584,7 +584,7 @@ class MDefinition : public MNode
|
|||
bool isEffectful() const {
|
||||
return getAliasSet().isStore();
|
||||
}
|
||||
virtual bool mightAlias(MDefinition *store) {
|
||||
virtual bool mightAlias(const MDefinition *store) const {
|
||||
// Return whether this load may depend on the specified store, given
|
||||
// that the alias sets intersect. This may be refined to exclude
|
||||
// possible aliasing in cases where alias set flags are too imprecise.
|
||||
|
@ -745,7 +745,7 @@ class MBinaryInstruction : public MAryInstruction<2>
|
|||
replaceOperand(1, temp);
|
||||
}
|
||||
|
||||
bool binaryCongruentTo(MDefinition *ins) const
|
||||
bool binaryCongruentTo(const MDefinition *ins) const
|
||||
{
|
||||
if (op() != ins->op())
|
||||
return false;
|
||||
|
@ -756,9 +756,9 @@ class MBinaryInstruction : public MAryInstruction<2>
|
|||
if (isEffectful() || ins->isEffectful())
|
||||
return false;
|
||||
|
||||
MDefinition *left = getOperand(0);
|
||||
MDefinition *right = getOperand(1);
|
||||
MDefinition *tmp;
|
||||
const MDefinition *left = getOperand(0);
|
||||
const MDefinition *right = getOperand(1);
|
||||
const MDefinition *tmp;
|
||||
|
||||
if (isCommutative() && left->valueNumber() > right->valueNumber()) {
|
||||
tmp = right;
|
||||
|
@ -766,9 +766,9 @@ class MBinaryInstruction : public MAryInstruction<2>
|
|||
left = tmp;
|
||||
}
|
||||
|
||||
MBinaryInstruction *bi = static_cast<MBinaryInstruction *>(ins);
|
||||
MDefinition *insLeft = bi->getOperand(0);
|
||||
MDefinition *insRight = bi->getOperand(1);
|
||||
const MBinaryInstruction *bi = static_cast<const MBinaryInstruction *>(ins);
|
||||
const MDefinition *insLeft = bi->getOperand(0);
|
||||
const MDefinition *insRight = bi->getOperand(1);
|
||||
if (isCommutative() && insLeft->valueNumber() > insRight->valueNumber()) {
|
||||
tmp = insRight;
|
||||
insRight = insLeft;
|
||||
|
@ -923,7 +923,7 @@ class MConstant : public MNullaryInstruction
|
|||
void printOpcode(FILE *fp) const;
|
||||
|
||||
HashNumber valueHash() const;
|
||||
bool congruentTo(MDefinition *ins) const;
|
||||
bool congruentTo(const MDefinition *ins) const;
|
||||
|
||||
AliasSet getAliasSet() const {
|
||||
return AliasSet::None();
|
||||
|
@ -991,7 +991,7 @@ class MParameter : public MNullaryInstruction
|
|||
void printOpcode(FILE *fp) const;
|
||||
|
||||
HashNumber valueHash() const;
|
||||
bool congruentTo(MDefinition *ins) const;
|
||||
bool congruentTo(const MDefinition *ins) const;
|
||||
};
|
||||
|
||||
class MCallee : public MNullaryInstruction
|
||||
|
@ -1006,7 +1006,7 @@ class MCallee : public MNullaryInstruction
|
|||
public:
|
||||
INSTRUCTION_HEADER(Callee)
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
|
||||
|
@ -1920,7 +1920,7 @@ class MCallDOMNative : public MCall
|
|||
public:
|
||||
virtual AliasSet getAliasSet() const MOZ_OVERRIDE;
|
||||
|
||||
virtual bool congruentTo(MDefinition *ins) const MOZ_OVERRIDE;
|
||||
virtual bool congruentTo(const MDefinition *ins) const MOZ_OVERRIDE;
|
||||
|
||||
virtual bool isCallDOMNative() const MOZ_OVERRIDE {
|
||||
return true;
|
||||
|
@ -2299,7 +2299,7 @@ class MCompare
|
|||
# endif
|
||||
|
||||
protected:
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!binaryCongruentTo(ins))
|
||||
return false;
|
||||
return compareType() == ins->toCompare()->compareType() &&
|
||||
|
@ -2335,7 +2335,7 @@ class MBox : public MUnaryInstruction
|
|||
return new(alloc) MBox(alloc, ins);
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -2417,7 +2417,7 @@ class MUnbox : public MUnaryInstruction, public BoxInputsPolicy
|
|||
bool fallible() const {
|
||||
return mode() != Infallible;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isUnbox() || ins->toUnbox()->mode() != mode())
|
||||
return false;
|
||||
return congruentIfOperandsEqual(ins);
|
||||
|
@ -2845,7 +2845,7 @@ class MToDouble
|
|||
}
|
||||
|
||||
MDefinition *foldsTo(TempAllocator &alloc, bool useValueNumbers);
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isToDouble() || ins->toToDouble()->conversion() != conversion())
|
||||
return false;
|
||||
return congruentIfOperandsEqual(ins);
|
||||
|
@ -2907,7 +2907,7 @@ class MToFloat32
|
|||
}
|
||||
|
||||
virtual MDefinition *foldsTo(TempAllocator &alloc, bool useValueNumbers);
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isToFloat32() || ins->toToFloat32()->conversion() != conversion())
|
||||
return false;
|
||||
return congruentIfOperandsEqual(ins);
|
||||
|
@ -2940,7 +2940,7 @@ class MAsmJSUnsignedToDouble
|
|||
}
|
||||
|
||||
MDefinition *foldsTo(TempAllocator &alloc, bool useValueNumbers);
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -2966,7 +2966,7 @@ class MAsmJSUnsignedToFloat32
|
|||
}
|
||||
|
||||
MDefinition *foldsTo(TempAllocator &alloc, bool useValueNumbers);
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -3024,7 +3024,7 @@ class MToInt32
|
|||
return conversion_;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
|
||||
|
@ -3060,7 +3060,7 @@ class MTruncateToInt32 : public MUnaryInstruction
|
|||
|
||||
MDefinition *foldsTo(TempAllocator &alloc, bool useValueNumbers);
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -3101,7 +3101,7 @@ class MToString : public MUnaryInstruction
|
|||
|
||||
MDefinition *foldsTo(TempAllocator &alloc, bool useValueNumbers);
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -3134,7 +3134,7 @@ class MBitNot
|
|||
MDefinition *foldsTo(TempAllocator &alloc, bool useValueNumbers);
|
||||
void infer();
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -3237,7 +3237,7 @@ class MBinaryBitwiseInstruction
|
|||
virtual MDefinition *foldIfEqual() = 0;
|
||||
virtual void infer(BaselineInspector *inspector, jsbytecode *pc);
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return binaryCongruentTo(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -3453,7 +3453,7 @@ class MBinaryArithInstruction
|
|||
|
||||
virtual void trySpecializeFloat32(TempAllocator &alloc);
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return binaryCongruentTo(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -3504,7 +3504,7 @@ class MMinMax
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isMinMax())
|
||||
return false;
|
||||
if (isMax() != ins->toMinMax()->isMax())
|
||||
|
@ -3551,7 +3551,7 @@ class MAbs
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
bool fallible() const;
|
||||
|
@ -3592,7 +3592,7 @@ class MSqrt
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
|
||||
|
@ -3635,7 +3635,7 @@ class MAtan2
|
|||
return this;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
|
||||
|
@ -3678,7 +3678,7 @@ class MHypot
|
|||
return this;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
|
||||
|
@ -3719,7 +3719,7 @@ class MPow
|
|||
MDefinition *power() const {
|
||||
return rhs();
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
TypePolicy *typePolicy() {
|
||||
|
@ -3757,7 +3757,7 @@ class MPowHalf
|
|||
static MPowHalf *New(TempAllocator &alloc, MDefinition *input) {
|
||||
return new(alloc) MPowHalf(input);
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
bool operandIsNeverNegativeInfinity() const {
|
||||
|
@ -3865,7 +3865,7 @@ class MMathFunction
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isMathFunction())
|
||||
return false;
|
||||
if (ins->toMathFunction()->function() != function())
|
||||
|
@ -4021,11 +4021,11 @@ class MMul : public MBinaryArithInstruction
|
|||
return 1;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isMul())
|
||||
return false;
|
||||
|
||||
MMul *mul = ins->toMul();
|
||||
const MMul *mul = ins->toMul();
|
||||
if (canBeNegativeZero_ != mul->canBeNegativeZero())
|
||||
return false;
|
||||
|
||||
|
@ -4060,7 +4060,7 @@ class MMul : public MBinaryArithInstruction
|
|||
bool truncate();
|
||||
bool isOperandTruncated(size_t index) const;
|
||||
|
||||
Mode mode() { return mode_; }
|
||||
Mode mode() const { return mode_; }
|
||||
};
|
||||
|
||||
class MDiv : public MBinaryArithInstruction
|
||||
|
@ -4257,7 +4257,7 @@ class MConcat
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -4296,7 +4296,7 @@ class MConcatPar
|
|||
return getOperand(2);
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -4326,7 +4326,7 @@ class MCharCodeAt
|
|||
return this;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
|
||||
|
@ -4464,7 +4464,7 @@ class MLoadArrowThis
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -4570,7 +4570,7 @@ class MPhi MOZ_FINAL : public MDefinition, public InlineForwardListNode<MPhi>
|
|||
|
||||
MDefinition *foldsTo(TempAllocator &alloc, bool useValueNumbers);
|
||||
|
||||
bool congruentTo(MDefinition *ins) const;
|
||||
bool congruentTo(const MDefinition *ins) const;
|
||||
|
||||
bool isIterator() const {
|
||||
return isIterator_;
|
||||
|
@ -5055,7 +5055,7 @@ class MStringReplace
|
|||
return new(alloc) MStringReplace(string, pattern, replacement);
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -5254,7 +5254,7 @@ class MSlots
|
|||
MDefinition *object() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -5287,7 +5287,7 @@ class MElements
|
|||
MDefinition *object() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -5324,7 +5324,7 @@ class MConstantElements : public MNullaryInstruction
|
|||
return (HashNumber)(size_t) value_;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return ins->isConstantElements() && ins->toConstantElements()->value() == value();
|
||||
}
|
||||
|
||||
|
@ -5355,7 +5355,7 @@ class MConvertElementsToDoubles
|
|||
MDefinition *elements() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -5403,7 +5403,7 @@ class MMaybeToDoubleElement
|
|||
MDefinition *value() const {
|
||||
return getOperand(1);
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -5432,7 +5432,7 @@ class MInitializedLength
|
|||
MDefinition *elements() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -5491,7 +5491,7 @@ class MArrayLength
|
|||
MDefinition *elements() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -5554,7 +5554,7 @@ class MTypedArrayLength
|
|||
MDefinition *object() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -5591,7 +5591,7 @@ class MTypedArrayElements
|
|||
MDefinition *object() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -5625,7 +5625,7 @@ class MNeuterCheck
|
|||
return getOperand(0);
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
|
||||
|
@ -5662,7 +5662,7 @@ class MTypedObjectElements
|
|||
MDefinition *object() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -5817,10 +5817,10 @@ class MBoundsCheck
|
|||
void setMaximum(int32_t n) {
|
||||
maximum_ = n;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isBoundsCheck())
|
||||
return false;
|
||||
MBoundsCheck *other = ins->toBoundsCheck();
|
||||
const MBoundsCheck *other = ins->toBoundsCheck();
|
||||
if (minimum() != other->minimum() || maximum() != other->maximum())
|
||||
return false;
|
||||
return congruentIfOperandsEqual(other);
|
||||
|
@ -5923,10 +5923,10 @@ class MLoadElement
|
|||
bool fallible() const {
|
||||
return needsHoleCheck();
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isLoadElement())
|
||||
return false;
|
||||
MLoadElement *other = ins->toLoadElement();
|
||||
const MLoadElement *other = ins->toLoadElement();
|
||||
if (needsHoleCheck() != other->needsHoleCheck())
|
||||
return false;
|
||||
if (loadDoubles() != other->loadDoubles())
|
||||
|
@ -5986,10 +5986,10 @@ class MLoadElementHole
|
|||
bool needsHoleCheck() const {
|
||||
return needsHoleCheck_;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isLoadElementHole())
|
||||
return false;
|
||||
MLoadElementHole *other = ins->toLoadElementHole();
|
||||
const MLoadElementHole *other = ins->toLoadElementHole();
|
||||
if (needsHoleCheck() != other->needsHoleCheck())
|
||||
return false;
|
||||
if (needsNegativeIntCheck() != other->needsNegativeIntCheck())
|
||||
|
@ -6305,10 +6305,10 @@ class MLoadTypedArrayElement
|
|||
return AliasSet::Load(AliasSet::TypedArrayElement);
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isLoadTypedArrayElement())
|
||||
return false;
|
||||
MLoadTypedArrayElement *other = ins->toLoadTypedArrayElement();
|
||||
const MLoadTypedArrayElement *other = ins->toLoadTypedArrayElement();
|
||||
if (arrayType_ != other->arrayType_)
|
||||
return false;
|
||||
return congruentIfOperandsEqual(other);
|
||||
|
@ -6366,10 +6366,10 @@ class MLoadTypedArrayElementHole
|
|||
MDefinition *index() const {
|
||||
return getOperand(1);
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isLoadTypedArrayElementHole())
|
||||
return false;
|
||||
MLoadTypedArrayElementHole *other = ins->toLoadTypedArrayElementHole();
|
||||
const MLoadTypedArrayElementHole *other = ins->toLoadTypedArrayElementHole();
|
||||
if (arrayType() != other->arrayType())
|
||||
return false;
|
||||
if (allowDouble() != other->allowDouble())
|
||||
|
@ -6684,7 +6684,7 @@ class MClampToUint8
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -6724,7 +6724,7 @@ class MLoadFixedSlot
|
|||
size_t slot() const {
|
||||
return slot_;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isLoadFixedSlot())
|
||||
return false;
|
||||
if (slot() != ins->toLoadFixedSlot()->slot())
|
||||
|
@ -6736,7 +6736,7 @@ class MLoadFixedSlot
|
|||
return AliasSet::Load(AliasSet::FixedSlot);
|
||||
}
|
||||
|
||||
bool mightAlias(MDefinition *store);
|
||||
bool mightAlias(const MDefinition *store) const;
|
||||
};
|
||||
|
||||
class MStoreFixedSlot
|
||||
|
@ -6938,7 +6938,7 @@ class MGetPropertyCache
|
|||
}
|
||||
TypePolicy *typePolicy() { return this; }
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!idempotent_)
|
||||
return false;
|
||||
if (!ins->isGetPropertyCache())
|
||||
|
@ -6998,7 +6998,7 @@ class MGetPropertyPolymorphic
|
|||
return new(alloc) MGetPropertyPolymorphic(alloc, obj, name);
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isGetPropertyPolymorphic())
|
||||
return false;
|
||||
if (name() != ins->toGetPropertyPolymorphic()->name())
|
||||
|
@ -7031,7 +7031,7 @@ class MGetPropertyPolymorphic
|
|||
return AliasSet::Load(AliasSet::ObjectFields | AliasSet::FixedSlot | AliasSet::DynamicSlot);
|
||||
}
|
||||
|
||||
bool mightAlias(MDefinition *store);
|
||||
bool mightAlias(const MDefinition *store) const;
|
||||
};
|
||||
|
||||
// Emit code to store a value to an object's slots if its shape matches
|
||||
|
@ -7362,7 +7362,7 @@ class MGuardShape
|
|||
BailoutKind bailoutKind() const {
|
||||
return bailoutKind_;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isGuardShape())
|
||||
return false;
|
||||
if (shape() != ins->toGuardShape()->shape())
|
||||
|
@ -7414,7 +7414,7 @@ class MGuardObjectType
|
|||
bool bailOnEquality() const {
|
||||
return bailOnEquality_;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isGuardObjectType())
|
||||
return false;
|
||||
if (typeObject() != ins->toGuardObjectType()->typeObject())
|
||||
|
@ -7466,7 +7466,7 @@ class MGuardObjectIdentity
|
|||
bool bailOnEquality() const {
|
||||
return bailOnEquality_;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isGuardObjectIdentity())
|
||||
return false;
|
||||
if (singleObject() != ins->toGuardObjectIdentity()->singleObject())
|
||||
|
@ -7511,7 +7511,7 @@ class MGuardClass
|
|||
const Class *getClass() const {
|
||||
return class_;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isGuardClass())
|
||||
return false;
|
||||
if (getClass() != ins->toGuardClass()->getClass())
|
||||
|
@ -7556,7 +7556,7 @@ class MLoadSlot
|
|||
return slot_;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isLoadSlot())
|
||||
return false;
|
||||
if (slot() != ins->toLoadSlot()->slot())
|
||||
|
@ -7567,7 +7567,7 @@ class MLoadSlot
|
|||
JS_ASSERT(slots()->type() == MIRType_Slots);
|
||||
return AliasSet::Load(AliasSet::DynamicSlot);
|
||||
}
|
||||
bool mightAlias(MDefinition *store);
|
||||
bool mightAlias(const MDefinition *store) const;
|
||||
};
|
||||
|
||||
// Inline call to access a function's environment (scope chain).
|
||||
|
@ -8297,7 +8297,7 @@ class MGetDOMProperty
|
|||
return this;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!isDomMovable())
|
||||
return false;
|
||||
|
||||
|
@ -8374,7 +8374,7 @@ class MStringLength
|
|||
MDefinition *string() const {
|
||||
return getOperand(0);
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -8651,10 +8651,10 @@ class MInArray
|
|||
AliasSet getAliasSet() const {
|
||||
return AliasSet::Load(AliasSet::Element);
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
if (!ins->isInArray())
|
||||
return false;
|
||||
MInArray *other = ins->toInArray();
|
||||
const MInArray *other = ins->toInArray();
|
||||
if (needsHoleCheck() != other->needsHoleCheck())
|
||||
return false;
|
||||
if (needsNegativeIntCheck() != other->needsNegativeIntCheck())
|
||||
|
@ -8735,7 +8735,7 @@ class MArgumentsLength : public MNullaryInstruction
|
|||
return new(alloc) MArgumentsLength();
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -8775,7 +8775,7 @@ class MGetFrameArgument
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -8816,7 +8816,7 @@ class MSetFrameArgument
|
|||
return getOperand(0);
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return false;
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -8954,7 +8954,7 @@ class MGuardThreadExclusive
|
|||
BailoutKind bailoutKind() const {
|
||||
return Bailout_Normal;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -8985,7 +8985,7 @@ class MFilterTypeSet
|
|||
return new(alloc) MFilterTypeSet(def, types);
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *def) const {
|
||||
bool congruentTo(const MDefinition *def) const {
|
||||
return false;
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -9028,7 +9028,7 @@ class MTypeBarrier
|
|||
return this;
|
||||
}
|
||||
|
||||
bool congruentTo(MDefinition *def) const {
|
||||
bool congruentTo(const MDefinition *def) const {
|
||||
return false;
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -9559,7 +9559,7 @@ class MHaveSameClass
|
|||
TypePolicy *typePolicy() {
|
||||
return this;
|
||||
}
|
||||
bool congruentTo(MDefinition *ins) const {
|
||||
bool congruentTo(const MDefinition *ins) const {
|
||||
return congruentIfOperandsEqual(ins);
|
||||
}
|
||||
AliasSet getAliasSet() const {
|
||||
|
@ -9689,11 +9689,11 @@ class MAsmJSLoadHeap : public MUnaryInstruction, public MAsmJSHeapAccess
|
|||
|
||||
MDefinition *ptr() const { return getOperand(0); }
|
||||
|
||||
bool congruentTo(MDefinition *ins) const;
|
||||
bool congruentTo(const MDefinition *ins) const;
|
||||
AliasSet getAliasSet() const {
|
||||
return AliasSet::Load(AliasSet::AsmJSHeap);
|
||||
}
|
||||
bool mightAlias(MDefinition *def);
|
||||
bool mightAlias(const MDefinition *def) const;
|
||||
};
|
||||
|
||||
class MAsmJSStoreHeap : public MBinaryInstruction, public MAsmJSHeapAccess
|
||||
|
@ -9743,13 +9743,13 @@ class MAsmJSLoadGlobalVar : public MNullaryInstruction
|
|||
|
||||
unsigned globalDataOffset() const { return globalDataOffset_; }
|
||||
|
||||
bool congruentTo(MDefinition *ins) const;
|
||||
bool congruentTo(const MDefinition *ins) const;
|
||||
|
||||
AliasSet getAliasSet() const {
|
||||
return isConstant_ ? AliasSet::None() : AliasSet::Load(AliasSet::AsmJSGlobalVar);
|
||||
}
|
||||
|
||||
bool mightAlias(MDefinition *def);
|
||||
bool mightAlias(const MDefinition *def) const;
|
||||
};
|
||||
|
||||
class MAsmJSStoreGlobalVar : public MUnaryInstruction
|
||||
|
|
Загрузка…
Ссылка в новой задаче