|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.IR.Bytecode.Instr
harpoon.IR.Bytecode.InGen
public class InGen
InGen
is used for non-branching instructions.
An InGen
has an opcode and optional operands.
An InGen
has exactly one predecessor and exactly
one successor.
Note that InGen
contain Operand
objects
for all relevant, explicit or implicit operands of the
bytecode instruction. This means that, for example, an
iload_0
will be given an OpLocalVariable
operand corresponding to the implicit '0', and conversely that
invokeinterface
will not contain operands for
the nargs
operand (which is obvious from the method
signature) nor for the dummy placeholder value which trails the
opcode in the raw bytecode array.
Field Summary |
---|
Fields inherited from class harpoon.IR.Bytecode.Instr |
---|
arrayFactory |
Constructor Summary | |
---|---|
InGen(String sourcefile,
int linenumber,
byte[] code,
int pc,
Code parent)
Create an InGen from a chunk of bytecode starting at
offset pc . |
Method Summary | |
---|---|
byte |
getOpcode()
Return the bytecode opcode of this instruction. |
Operand |
getOperand(int i)
Return a specific operand of this instruction. |
Operand[] |
getOperands()
Get all the operands of this instruction. |
String |
toString()
Return human-readable instruction string. |
Methods inherited from class harpoon.IR.Bytecode.Instr |
---|
compareTo, edgeC, edges, equals, getID, getLineNumber, getSourceFile, hashCode, isPred, isSucc, newEdge, next, next, pred, predC, prev, prev, succ, succC |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InGen(String sourcefile, int linenumber, byte[] code, int pc, Code parent)
InGen
from a chunk of bytecode starting at
offset pc
. parent
is used to lookup
constant_pool
references.
Method Detail |
---|
public byte getOpcode()
getOpcode
in class Instr
Op
public Operand getOperand(int i)
public Operand[] getOperands()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |