|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectharpoon.IR.Bytecode.Instr
public abstract class Instr
Bytecode.Instr is the base type for the specific
bytecode instruction classes. It provides standard methods
for accessing the opcode of a specific instruction and for
determining which instructions may preceed or follow it.
As with all HCodeElements, Instrs are
traceable to an original source file and line number, and have
a unique numeric identifier.
InGen,
InCti,
InMerge,
InSwitch,
Code| Field Summary | |
|---|---|
static ArrayFactory<Instr> |
arrayFactory
Array Factory: makes Instr[]s. |
| Constructor Summary | |
|---|---|
protected |
Instr(String sourcefile,
int linenumber)
Constructor. |
| Method Summary | |
|---|---|
int |
compareTo(Instr o)
Natural ordering on Instrs. |
List<harpoon.IR.Bytecode.InstrEdge> |
edgeC()
Returns a List of all the edges to and from
this HCodeElement. |
harpoon.IR.Bytecode.InstrEdge[] |
edges()
Returns an array of all the edges to and from this CFGraphable. |
boolean |
equals(Object o)
|
int |
getID()
Returns a unique numeric identifier for this element. |
int |
getLineNumber()
Returns the line in the original source file that this bytecode instruction can be traced to. |
abstract byte |
getOpcode()
Returns the java bytecode of this instruction. |
String |
getSourceFile()
Returns the original source file name that this bytecode instruction is derived from. |
int |
hashCode()
|
boolean |
isPred(Instr i)
Return true iff the given node is a predecessor of this node. |
boolean |
isSucc(Instr i)
Return true iff the given node is a successor of this node. |
harpoon.IR.Bytecode.InstrEdge |
newEdge(Instr from,
Instr to)
|
Instr[] |
next()
Return a list of all the possible Instrs that may
succeed this one. |
Instr |
next(int i)
Return the specified successor of this Instr. |
harpoon.IR.Bytecode.InstrEdge[] |
pred()
Returns an array of all the edges entering this CFGraphable. |
List<harpoon.IR.Bytecode.InstrEdge> |
predC()
Returns a List of all the edges to
this HCodeElement. |
Instr[] |
prev()
Return a list of all the Instrs that can precede
this one. |
Instr |
prev(int i)
Return the specified predecessor of this Instr. |
harpoon.IR.Bytecode.InstrEdge[] |
succ()
Returns an array of all the edges leaving this CFGraphable. |
List<harpoon.IR.Bytecode.InstrEdge> |
succC()
Returns a List of all the edges from
this HCodeElement. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ArrayFactory<Instr> arrayFactory
Instr[]s.
| Constructor Detail |
|---|
protected Instr(String sourcefile,
int linenumber)
| Method Detail |
|---|
public String getSourceFile()
getSourceFile in interface HCodeElementpublic int getLineNumber()
getLineNumber in interface HCodeElementpublic int getID()
getID in interface HCodeElementpublic abstract byte getOpcode()
public int compareTo(Instr o)
Instrs.
compareTo in interface Comparable<Instr>public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic Instr[] prev()
Instrs that can precede
this one.
public Instr[] next()
Instrs that may
succeed this one.
public Instr next(int i)
Instr.
public Instr prev(int i)
Instr.
public harpoon.IR.Bytecode.InstrEdge newEdge(Instr from,
Instr to)
public harpoon.IR.Bytecode.InstrEdge[] succ()
CFGraphableCFGraphable.
succ in interface CFGraphable<Instr,harpoon.IR.Bytecode.InstrEdge>public harpoon.IR.Bytecode.InstrEdge[] pred()
CFGraphableCFGraphable.
pred in interface CFGraphable<Instr,harpoon.IR.Bytecode.InstrEdge>public harpoon.IR.Bytecode.InstrEdge[] edges()
CFGraphableCFGraphable.
edges in interface CFGraphable<Instr,harpoon.IR.Bytecode.InstrEdge>public List<harpoon.IR.Bytecode.InstrEdge> edgeC()
CFGraphableList of all the edges to and from
this HCodeElement.
edgeC in interface CFGraphable<Instr,harpoon.IR.Bytecode.InstrEdge>public List<harpoon.IR.Bytecode.InstrEdge> predC()
CFGraphableList of all the edges to
this HCodeElement.
Each CFGEdge returned is guaranteed to return
this in response to a call to to();
the actual predecessor will be returned from
from().
predC in interface CFGraphable<Instr,harpoon.IR.Bytecode.InstrEdge>predC in interface Graph.Node<Instr,harpoon.IR.Bytecode.InstrEdge>public List<harpoon.IR.Bytecode.InstrEdge> succC()
CFGraphableList of all the edges from
this HCodeElement.
Each CFGEdge returned is guaranteed to return
this in response to a call to
from(); the actual successor to this
will be returned from to().
succC in interface CFGraphable<Instr,harpoon.IR.Bytecode.InstrEdge>succC in interface Graph.Node<Instr,harpoon.IR.Bytecode.InstrEdge>public boolean isSucc(Instr i)
Graph.Node
isSucc in interface Graph.Node<Instr,harpoon.IR.Bytecode.InstrEdge>public boolean isPred(Instr i)
Graph.Node
isPred in interface Graph.Node<Instr,harpoon.IR.Bytecode.InstrEdge>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||