|
|||||||||
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 HCodeElement
s, Instr
s 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 Instr s. |
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 Instr s 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 Instr s 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 HCodeElement
public int getLineNumber()
getLineNumber
in interface HCodeElement
public int getID()
getID
in interface HCodeElement
public abstract byte getOpcode()
public int compareTo(Instr o)
Instr
s.
compareTo
in interface Comparable<Instr>
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public Instr[] prev()
Instr
s that can precede
this one.
public Instr[] next()
Instr
s 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()
CFGraphable
CFGraphable
.
succ
in interface CFGraphable<Instr,harpoon.IR.Bytecode.InstrEdge>
public harpoon.IR.Bytecode.InstrEdge[] pred()
CFGraphable
CFGraphable
.
pred
in interface CFGraphable<Instr,harpoon.IR.Bytecode.InstrEdge>
public harpoon.IR.Bytecode.InstrEdge[] edges()
CFGraphable
CFGraphable
.
edges
in interface CFGraphable<Instr,harpoon.IR.Bytecode.InstrEdge>
public List<harpoon.IR.Bytecode.InstrEdge> edgeC()
CFGraphable
List
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()
CFGraphable
List
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()
CFGraphable
List
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 |