mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1004363 - IonMonkey: Add a toControlInstruction helper function. r=mjrosenb
This commit is contained in:
parent
d4e734cb37
commit
6adeaa8fb4
@ -105,6 +105,7 @@ class MNode;
|
||||
class MUse;
|
||||
class MIRGraph;
|
||||
class MResumePoint;
|
||||
class MControlInstruction;
|
||||
|
||||
// Represents a use of a node.
|
||||
class MUse : public TempObject, public InlineListNode<MUse>
|
||||
@ -619,10 +620,6 @@ class MDefinition : public MNode
|
||||
return !uses_.empty();
|
||||
}
|
||||
|
||||
virtual bool isControlInstruction() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
void addUse(MUse *use) {
|
||||
uses_.pushFront(use);
|
||||
}
|
||||
@ -663,6 +660,11 @@ class MDefinition : public MNode
|
||||
return !isPhi();
|
||||
}
|
||||
|
||||
virtual bool isControlInstruction() const {
|
||||
return false;
|
||||
}
|
||||
inline MControlInstruction *toControlInstruction();
|
||||
|
||||
void setResultType(MIRType type) {
|
||||
resultType_ = type;
|
||||
}
|
||||
@ -10240,6 +10242,11 @@ const MInstruction *MDefinition::toInstruction() const
|
||||
return (const MInstruction *)this;
|
||||
}
|
||||
|
||||
MControlInstruction *MDefinition::toControlInstruction() {
|
||||
JS_ASSERT(isControlInstruction());
|
||||
return (MControlInstruction *)this;
|
||||
}
|
||||
|
||||
typedef Vector<MDefinition *, 8, IonAllocPolicy> MDefinitionVector;
|
||||
|
||||
// Helper functions used to decide how to build MIR.
|
||||
|
@ -101,8 +101,8 @@ ValueNumberer::simplifyControlInstruction(MControlInstruction *def)
|
||||
repl->setInWorklist();
|
||||
|
||||
block->discardLastIns();
|
||||
block->end((MControlInstruction *)repl);
|
||||
return (MControlInstruction *)repl;
|
||||
block->end(repl->toControlInstruction());
|
||||
return repl->toControlInstruction();
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user