public abstract class SSAInstruction extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
SSAInstruction.IVisitor
This interface is used by Instruction.visit to dispatch based on the instruction type.
|
static class |
SSAInstruction.Visitor
A base visitor implementation that does nothing.
|
Modifier | Constructor and Description |
---|---|
protected |
SSAInstruction(int iindex)
prevent instantiation by the outside
|
Modifier and Type | Method and Description |
---|---|
abstract SSAInstruction |
copyForSSA(SSAInstructionFactory insts,
int[] defs,
int[] uses)
This method is meant to be used during SSA conversion for an IR that is not in SSA form.
|
boolean |
equals(Object obj)
We assume these instructions are canonical and managed by a governing IR object.
|
int |
getDef() |
int |
getDef(int i)
Return the ith def
|
Collection<TypeReference> |
getExceptionTypes()
This method should never return null.
|
int |
getNumberOfDefs() |
int |
getNumberOfUses() |
int |
getUse(int j) |
protected String |
getValueString(SymbolTable symbolTable,
int valueNumber) |
boolean |
hasDef()
Does this instruction define a normal value, as distinct from a set of exceptions possibly thrown by it (e.g.
|
abstract int |
hashCode() |
abstract boolean |
isFallThrough() |
boolean |
isPEI() |
String |
toString() |
abstract String |
toString(SymbolTable symbolTable) |
abstract void |
visit(SSAInstruction.IVisitor v)
Apply an IVisitor to this instruction.
|
public static final int NO_INDEX
public final int iindex
protected SSAInstruction(int iindex)
public abstract SSAInstruction copyForSSA(SSAInstructionFactory insts, int[] defs, int[] uses)
public abstract String toString(SymbolTable symbolTable)
protected String getValueString(SymbolTable symbolTable, int valueNumber)
public abstract void visit(SSAInstruction.IVisitor v)
public boolean hasDef()
public int getDef()
public int getDef(int i)
i
- number of the def, starting at 0.public int getNumberOfDefs()
public int getNumberOfUses()
public int getUse(int j) throws UnsupportedOperationException
UnsupportedOperationException
public boolean isPEI()
public Collection<TypeReference> getExceptionTypes()
public abstract boolean isFallThrough()
public final boolean equals(Object obj)
SSACache
), the governing IR may be deleted
to reclaim memory and recomputed as needed. When an IR is recomputed, it also creates fresh SSAInstruction
objects that will not equal old ones. Thus, do not compare for identity SSAInstructions obtained from
distinct calls that retrieve cached values (e.g. distinct CGNode.getIR() calls).
See the github issue for details.equals
in class Object
Object.equals(java.lang.Object)