Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Instruction Class Reference

Inheritance diagram for Instruction:
[legend]
Collaboration diagram for Instruction:
[legend]
List of all members.

Public Methods

 Instruction (short tag, short length)
int consumeStack ()
int consumeStack (ConstantPoolGen cpg)
Instruction copy ()
void dump (DataOutputStream out) throws IOException
boolean examine (SystemState ss, KernelState ks, ThreadInfo th)
InstructionHandle execute (SystemState ss, KernelState ks, ThreadInfo th)
int getLength ()
short getTag ()
boolean isExecutable (SystemState ss, KernelState ks, ThreadInfo th)
int produceStack ()
int produceStack (ConstantPoolGen cpg)
String toString ()
String toString (ConstantPool cp)
String toString (boolean verbose)
boolean examine (SystemState ss, KernelState ks, ThreadInfo th)
InstructionHandle execute (SystemState ss, KernelState ks, ThreadInfo th)
boolean isExecutable (SystemState ss, KernelState ks, ThreadInfo th)
void setPeer (de.fub.bytecode.generic.Instruction i)
 Instruction (byte c)
Instruction[] branchpoints (Instruction next)
abstract int compile (byte bc[], int index)
boolean equals (Instruction i)
int hashCode ()
void markCPRefs (boolean[] refs)
int nextOffset (int curr)
void offsetToPointer (ByteCode bc)
abstract int parse (byte bc[], int index)
void redirectCPRefs (short redirect[])
String toString ()
String toString (cp_info constant_pool[])
 Instruction (short tag, short length)
abstract void accept (Visitor v)
int consumeStack ()
int consumeStack (ConstantPoolGen cpg)
Instruction copy ()
void dump (DataOutputStream out) throws IOException
int getLength ()
short getTag ()
int produceStack ()
int produceStack (ConstantPoolGen cpg)
String toString ()
String toString (ConstantPool cp)
String toString (boolean verbose)
boolean examine (SystemState ss, KernelState ks, ThreadInfo th)
abstract Instruction execute (SystemState ss, KernelState ks, ThreadInfo th)
Instruction getNext ()
int getOffset ()
int getPosition ()
boolean isExecutable (SystemState ss, KernelState ks, ThreadInfo th)
boolean isObservable ()
void setObservable ()
String toString ()

Static Public Methods

int getInt (byte bc[], int index)
short getShort (byte bc[], int index)
int intToBytes (int s, byte bc[], int index)
int shortToBytes (short s, byte bc[], int index)
final Instruction readInstruction (ByteSequence bytes) throws IOException
Instruction create (InstructionHandle h, int o, MethodInfo m, ConstantPool cp)

Public Attributes

byte code
int label
String name
Instruction next
boolean labelled
boolean branches
boolean calls
boolean returns

Static Public Attributes

final String argsep = " "
final String LOCALPREFIX = "local_"

Protected Methods

void initFromFile (ByteSequence bytes, boolean wide) throws IOException
Object clone () throws CloneNotSupportedException
void initFromFile (ByteSequence bytes, boolean wide) throws IOException
void init (InstructionHandle h, int o, MethodInfo m, ConstantPool cp)
abstract void setPeer (de.fub.bytecode.generic.Instruction i, ConstantPool cp)

Protected Attributes

short length = 1
short tag = -1
int position
int offset
MethodInfo mi
String asString
boolean isObservable

Private Methods

 Instruction ()
void createPeer ()
void dispose ()
void setTag (short tag)
 Instruction ()
void dispose ()
void setTag (short tag)

Static Private Methods

final String className (short tag)
final Instruction readInstruction (ByteSequence bytes) throws IOException
final String className (short tag)

Private Attributes

gov nasa arc ase jpf jvm bytecode
Instruction 
peer
int originalIndex

Static Private Attributes

List Unimplemented = new ArrayList()

Detailed Description

This abstract class is the super class for all java byte codes.

Version:
Id:
Instruction.java,v 1.1.1.1 2002/01/24 03:44:05 pserver Exp
Author:
M. Dahm

Definition at line 20 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.


Constructor & Destructor Documentation

Instruction::Instruction   [inline, private]
 

Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction(). Not to be used otherwise.

Definition at line 35 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

Instruction::Instruction byte   c [inline]
 

Constructs a new Instruction for this bytecode.

Parameters:
c   bytecode of the instruction.

Definition at line 183 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

Instruction::Instruction   [inline, private]
 

Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction(). Not to be used otherwise.

Definition at line 24 of file src/de/fub/bytecode/generic/Instruction.java.


Member Function Documentation

abstract void Instruction::accept Visitor   v [pure virtual]
 

Call corresponding visitor method(s). The order is: Call visitor methods of implemented interfaces first, then call methods according to the class hierarchy in descending order, i.e., the most specific visitXXX() call comes last.

Parameters:
v   Visitor object

Reimplemented in Field, Method, Field, Method, AALOAD, AASTORE, ACONST_NULL, ALOAD, ANEWARRAY, ARETURN, ARRAYLENGTH, ASTORE, ATHROW, BALOAD, BASTORE, BIPUSH, CALOAD, CASTORE, CHECKCAST, D2F, D2I, D2L, DADD, DALOAD, DASTORE, DCMPG, DCMPL, DCONST, DDIV, DLOAD, DMUL, DNEG, DREM, DRETURN, DSTORE, DSUB, DUP, DUP2, DUP2_X1, DUP2_X2, DUP_X1, DUP_X2, F2D, F2I, F2L, FADD, FALOAD, FASTORE, FCMPG, FCMPL, FCONST, FDIV, FLOAD, FMUL, FNEG, FREM, FRETURN, FSTORE, FSUB, GETFIELD, GETSTATIC, GOTO, GOTO_W, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IALOAD, IAND, IASTORE, ICONST, IDIV, IF_ACMPEQ, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE, IFEQ, IFGE, IFGT, IFLE, IFLT, IFNE, IFNONNULL, IFNULL, IINC, ILOAD, IMPDEP1, IMPDEP2, IMUL, INEG, INSTANCEOF, INVOKEINTERFACE, INVOKESPECIAL, INVOKESTATIC, INVOKEVIRTUAL, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE, ISUB, IUSHR, IXOR, JSR, JSR_W, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST, LDC, LDC2_W, LDIV, LLOAD, LMUL, LNEG, LOOKUPSWITCH, LOR, LREM, LRETURN, LSHL, LSHR, LSTORE, LSUB, LUSHR, LXOR, MONITORENTER, MONITOREXIT, MULTIANEWARRAY, NEW, NEWARRAY, NOP, POP, POP2, PUTFIELD, PUTSTATIC, RET, RETURN, SALOAD, SASTORE, SIPUSH, SWAP, and TABLESWITCH.

Referenced by InstructionHandle::accept().

Instruction [] Instruction::branchpoints Instruction   next [inline]
 

Returns an array of the instructions to which this instruction might branch (only valid if branches==true; default action is to return null).

Parameters:
next   the instruction following this one, in case of default flow through.
Returns:
array of instructions which may be targets of this instruction.
See also:
Instruction::branches

Reimplemented in Instruction_Athrow, Instruction_Goto, Instruction_Goto_w, Instruction_intbranch, Instruction_Jsr, Instruction_Jsr_w, Instruction_longbranch, Instruction_Lookupswitch, Instruction_New, and Instruction_Tableswitch.

Definition at line 197 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

abstract int Instruction::compile byte   bc[],
int   index
[pure virtual]
 

Writes out the sequence of bytecodes represented by this instruction, including any arguments.

Parameters:
bc   complete array of bytecode.
index   offset of remaining bytecode at which to start writing.
Returns:
offset of the next available bytecode.
See also:
ClassFile::unparseMethod , Instruction::parse

Reimplemented in Instruction_byte, Instruction_byteindex, Instruction_bytevar, Instruction_Iinc, Instruction_int, Instruction_intbranch, Instruction_intindex, Instruction_intvar, Instruction_Invokeinterface, Instruction_longbranch, Instruction_Lookupswitch, Instruction_Multianewarray, Instruction_Newarray, Instruction_noargs, and Instruction_Tableswitch.

Referenced by ClassFile::unparseMethod().

int Instruction::consumeStack ConstantPoolGen   cpg [inline]
 

Also works for instructions whose stack effect depends on the constant pool entry they reference.

Returns:
Number of words consumed from stack by this instruction

Reimplemented in InvokeInstruction, INVOKEINTERFACE, MULTIANEWARRAY, PUTFIELD, PUTSTATIC, InvokeInstruction, INVOKEINTERFACE, MULTIANEWARRAY, PUTFIELD, and PUTSTATIC.

Definition at line 66 of file src/de/fub/bytecode/generic/Instruction.java.

int Instruction::consumeStack   [inline]
 

Returns:
Number of words consumed from stack by this instruction

Definition at line 60 of file src/de/fub/bytecode/generic/Instruction.java.

int Instruction::consumeStack ConstantPoolGen   cpg [inline]
 

Also works for instructions whose stack effect depends on the constant pool entry they reference.

Returns:
Number of words consumed from stack by this instruction

Reimplemented in InvokeInstruction, INVOKEINTERFACE, MULTIANEWARRAY, PUTFIELD, PUTSTATIC, InvokeInstruction, INVOKEINTERFACE, MULTIANEWARRAY, PUTFIELD, and PUTSTATIC.

Definition at line 75 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

int Instruction::consumeStack   [inline]
 

Returns:
Number of words consumed from stack by this instruction

Definition at line 69 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

Referenced by MethodGen::getMaxStack().

Instruction Instruction::copy   [inline]
 

Use with caution, since `BranchInstruction's have a `target' reference which is not copied correctly (only basic types are). This also applies for `Select' instructions with their multiple branch targets.

See also:
BranchInstruction
Returns:
(shallow) copy of an instruction

Definition at line 77 of file src/de/fub/bytecode/generic/Instruction.java.

Instruction Instruction::copy   [inline]
 

Use with caution, since `BranchInstruction's have a `target' reference which is not copied correctly (only basic types are). This also applies for `Select' instructions with their multiple branch targets.

See also:
BranchInstruction
Returns:
(shallow) copy of an instruction

Definition at line 86 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

Referenced by JavaClass::copy().

void Instruction::dispose   [inline, private]
 

Some instructions may be reused, so don't do anything by default.

Reimplemented in BranchInstruction, Select, BranchInstruction, and Select.

Definition at line 90 of file src/de/fub/bytecode/generic/Instruction.java.

void Instruction::dispose   [inline, private]
 

Some instructions may be reused, so don't do anything by default.

Reimplemented in BranchInstruction, Select, BranchInstruction, and Select.

Definition at line 129 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

Referenced by InstructionHandle::dispose(), and InstructionHandle::setInstruction().

void Instruction::dump DataOutputStream   out [inline]
 

Dump instruction as byte code to stream out.

Parameters:
out   Output stream

Reimplemented in FieldOrMethod, BIPUSH, BranchInstruction, CPInstruction, GOTO, GOTO_W, IINC, INVOKEINTERFACE, JSR, JSR_W, LDC, LocalVariableInstruction, LOOKUPSWITCH, MULTIANEWARRAY, NEWARRAY, RET, Select, SIPUSH, TABLESWITCH, FieldOrMethod, BIPUSH, BranchInstruction, CPInstruction, GOTO, GOTO_W, IINC, INVOKEINTERFACE, JSR, JSR_W, LDC, LocalVariableInstruction, LOOKUPSWITCH, MULTIANEWARRAY, NEWARRAY, RET, Select, SIPUSH, and TABLESWITCH.

Definition at line 95 of file src/de/fub/bytecode/generic/Instruction.java.

void Instruction::dump DataOutputStream   out [inline]
 

Dump instruction as byte code to stream out.

Parameters:
out   Output stream

Reimplemented in FieldOrMethod, BIPUSH, BranchInstruction, CPInstruction, GOTO, GOTO_W, IINC, INVOKEINTERFACE, JSR, JSR_W, LDC, LocalVariableInstruction, LOOKUPSWITCH, MULTIANEWARRAY, NEWARRAY, RET, Select, SIPUSH, TABLESWITCH, FieldOrMethod, BIPUSH, BranchInstruction, CPInstruction, GOTO, GOTO_W, IINC, INVOKEINTERFACE, JSR, JSR_W, LDC, LocalVariableInstruction, LOOKUPSWITCH, MULTIANEWARRAY, NEWARRAY, RET, Select, SIPUSH, and TABLESWITCH.

Definition at line 136 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

Referenced by InstructionList::getByteCode().

boolean Instruction::equals Instruction   i [inline]
 

For storing in a Hashtable.

Parameters:
i   the Instruction to which this is compared.
Returns:
true if i is the same, false otherwise.

Definition at line 216 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

int Instruction::getInt byte   bc[],
int   index
[inline, static]
 

Utility routines, used mostly by the parse routines of various Instruction subclasses; this method converts four bytes into an int.

Parameters:
bc   complete array of bytecode.
index   offset of data in bc.
Returns:
the int constructed from the four bytes.
See also:
Instruction::parse , Instruction::intToBytes

Definition at line 229 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

Referenced by Instruction_Tableswitch::parse(), Instruction_Lookupswitch::parse(), and Instruction_longbranch::parse().

int Instruction::getLength   [inline]
 

Returns:
length (in bytes) of instruction

Definition at line 101 of file src/de/fub/bytecode/generic/Instruction.java.

int Instruction::getLength   [inline]
 

Returns:
length (in bytes) of instruction

Definition at line 162 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

Referenced by InstructionList::setPositions().

short Instruction::getShort byte   bc[],
int   index
[inline, static]
 

Utility routines, used mostly by the parse routines of various Instruction subclasses; this method converts two bytes into a short.

Parameters:
bc   complete array of bytecode.
index   offset of data in bc.
Returns:
the short constructed from the two bytes.
See also:
Instruction::parse , Instruction::shortToBytes

Definition at line 247 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

Referenced by Instruction_intvar::parse(), Instruction_intindex::parse(), Instruction_intbranch::parse(), and Instruction_int::parse().

short Instruction::getTag   [inline]
 

Returns:
opcode number

Definition at line 105 of file src/de/fub/bytecode/generic/Instruction.java.

short Instruction::getTag   [inline]
 

Returns:
opcode number

Definition at line 166 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

Referenced by MethodGen::getMaxStack(), and InstructionList::setPositions().

int Instruction::hashCode   [inline]
 

For storing in a Hashtable.

Returns:
unique hash code for this instruction, assuming labels are unique.

Reimplemented in Field.

Definition at line 257 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

void Instruction::initFromFile ByteSequence   bytes,
boolean   wide
[inline, protected]
 

Read needed data (e.g. index) from file.

Parameters:
bytes   byte sequence to read from
wide   "wide" instruction flag

Reimplemented in BIPUSH, BranchInstruction, CPInstruction, GOTO_W, IINC, INVOKEINTERFACE, JSR_W, LDC, LDC_W, LocalVariableInstruction, LOOKUPSWITCH, MULTIANEWARRAY, NEWARRAY, RET, Select, SIPUSH, TABLESWITCH, BIPUSH, BranchInstruction, CPInstruction, GOTO_W, IINC, INVOKEINTERFACE, JSR_W, LDC, LDC_W, LocalVariableInstruction, LOOKUPSWITCH, MULTIANEWARRAY, NEWARRAY, RET, Select, SIPUSH, and TABLESWITCH.

Definition at line 112 of file src/de/fub/bytecode/generic/Instruction.java.

void Instruction::initFromFile ByteSequence   bytes,
boolean   wide
[inline, protected]
 

Read needed data (e.g. index) from file.

Reimplemented in BIPUSH, BranchInstruction, CPInstruction, GOTO_W, IINC, INVOKEINTERFACE, JSR_W, LDC, LDC_W, LocalVariableInstruction, LOOKUPSWITCH, MULTIANEWARRAY, NEWARRAY, RET, Select, SIPUSH, TABLESWITCH, BIPUSH, BranchInstruction, CPInstruction, GOTO_W, IINC, INVOKEINTERFACE, JSR_W, LDC, LDC_W, LocalVariableInstruction, LOOKUPSWITCH, MULTIANEWARRAY, NEWARRAY, RET, Select, SIPUSH, and TABLESWITCH.

Definition at line 170 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

Referenced by readInstruction().

int Instruction::intToBytes int   s,
byte   bc[],
int   index
[inline, static]
 

Utility routines, used mostly by the compile routines of various Instruction subclasses; this method converts an int into four bytes.

Parameters:
bc   complete array of bytecode in which to store the int.
index   next available offset in bc.
Returns:
the next available offset in bc
See also:
Instruction::compile , Instruction::getInt

Definition at line 269 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

Referenced by Instruction_Tableswitch::compile(), and Instruction_Lookupswitch::compile().

void Instruction::markCPRefs boolean   refs[] [inline]
 

Marks the appropriate spot if that constant_pool entry is used by this instr. For every constant pool entry used (referenced) by this instruction, the corresponding boolean in the given array is set to true.

Parameters:
refs   array of booleans the same size as the constant pool array.
See also:
ClassFile::constant_pool

Reimplemented in Instruction_byteindex, and Instruction_intindex.

Definition at line 282 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

int Instruction::nextOffset int   curr [inline]
 

Returns the next available offset assuming this instruction begins on the indicated offset; default assumes no arguments.

Parameters:
curr   offset this instruction would be on.
Returns:
next available offset.
See also:
ClassFile::relabel

Reimplemented in Instruction_byte, Instruction_byteindex, Instruction_bytevar, Instruction_Iinc, Instruction_int, Instruction_intbranch, Instruction_intindex, Instruction_intvar, Instruction_Invokeinterface, Instruction_longbranch, Instruction_Lookupswitch, Instruction_Multianewarray, Instruction_Newarray, and Instruction_Tableswitch.

Definition at line 289 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

Referenced by ClassFile::parseMethod(), ClassFile::relabel(), and ByteCode::showCode().

void Instruction::offsetToPointer ByteCode   bc [inline]
 

Changes offset values in this instruction to Instruction references; default behaviour is to do nothing.

Parameters:
bc   complete array of bytecode.
See also:
ByteCode::build

Reimplemented in Instruction_intbranch, Instruction_longbranch, Instruction_Lookupswitch, and Instruction_Tableswitch.

Definition at line 295 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

Referenced by ByteCode::build().

abstract int Instruction::parse byte   bc[],
int   index
[pure virtual]
 

Assuming the actual bytecode for this instruction has been extracted already, and index is the offset of the next byte, this method parses whatever arguments the instruction requires and return the offset of the next available byte.

Parameters:
bc   complete array of bytecode.
index   offset of remaining bytecode after this instruction's bytecode was parsed.
Returns:
offset of the next available bytecode.
See also:
ByteCode::disassemble_bytecode , Instruction::compile

Reimplemented in Instruction_byte, Instruction_byteindex, Instruction_bytevar, Instruction_Iinc, Instruction_int, Instruction_intbranch, Instruction_intindex, Instruction_intvar, Instruction_Invokeinterface, Instruction_longbranch, Instruction_Lookupswitch, Instruction_Multianewarray, Instruction_Newarray, Instruction_noargs, and Instruction_Tableswitch.

Referenced by ByteCode::disassemble_bytecode().

int Instruction::produceStack ConstantPoolGen   cpg [inline]
 

Also works for instructions whose stack effect depends on the constant pool entry they reference.

Returns:
Number of words produced onto stack by this instruction

Reimplemented in GETFIELD, GETSTATIC, InvokeInstruction, GETFIELD, GETSTATIC, and InvokeInstruction.

Definition at line 124 of file src/de/fub/bytecode/generic/Instruction.java.

int Instruction::produceStack   [inline]
 

Returns:
Number of words produced onto stack by this instruction

Definition at line 118 of file src/de/fub/bytecode/generic/Instruction.java.

int Instruction::produceStack ConstantPoolGen   cpg [inline]
 

Also works for instructions whose stack effect depends on the constant pool entry they reference.

Returns:
Number of words produced onto stack by this instruction

Reimplemented in GETFIELD, GETSTATIC, InvokeInstruction, GETFIELD, GETSTATIC, and InvokeInstruction.

Definition at line 191 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

int Instruction::produceStack   [inline]
 

Returns:
Number of words produced onto stack by this instruction

Definition at line 185 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

Referenced by MethodGen::getMaxStack().

final Instruction Instruction::readInstruction ByteSequence   bytes [inline, static]
 

Read an instruction from (byte code) input stream and return the appropiate object.

Parameters:
file   file to read from
Returns:
instruction object being read

Definition at line 134 of file src/de/fub/bytecode/generic/Instruction.java.

final Instruction Instruction::readInstruction ByteSequence   bytes [inline, static, private]
 

Read an instruction from (byte code) input stream and return the appropiate object.

Parameters:
file   file to read from
Returns:
instruction object being read

Definition at line 201 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

void Instruction::redirectCPRefs short   redirect[] [inline]
 

Updates all constant pool references within this instruction to use new indices, based on the given redirection array.

Parameters:
redirect   array of new indices of constant pool entries.
See also:
ClassFile::constant_pool

Reimplemented in Instruction_byteindex, and Instruction_intindex.

Definition at line 313 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

void Instruction::setTag short   tag [inline, private]
 

Needed in readInstruction.

Definition at line 170 of file src/de/fub/bytecode/generic/Instruction.java.

void Instruction::setTag short   tag [inline, private]
 

Needed in readInstruction.

Definition at line 244 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

Referenced by readInstruction().

int Instruction::shortToBytes short   s,
byte   bc[],
int   index
[inline, static]
 

Utility routines, used mostly by the compile routines of various Instruction subclasses; this method converts a short into two bytes.

Parameters:
bc   complete array of bytecode in which to store the short.
index   next available offset in bc.
Returns:
the next available offset in bc
See also:
Instruction::compile , Instruction::getShort

Definition at line 323 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

Referenced by Instruction_longbranch::compile(), Instruction_intvar::compile(), Instruction_intindex::compile(), Instruction_intbranch::compile(), and Instruction_int::compile().

String Instruction::toString boolean   verbose [inline]
 

Long output format:

<name of opcode> "["<opcode number>"]" "("<length of instruction>")"

Parameters:
verbose   long/short format switch
Returns:
mnemonic for instruction

Reimplemented in BIPUSH, BranchInstruction, CPInstruction, IINC, LocalVariableInstruction, MULTIANEWARRAY, NEWARRAY, RET, Select, SIPUSH, BIPUSH, BranchInstruction, CPInstruction, IINC, LocalVariableInstruction, MULTIANEWARRAY, NEWARRAY, RET, Select, and SIPUSH.

Definition at line 192 of file src/de/fub/bytecode/generic/Instruction.java.

String Instruction::toString ConstantPool   cp [inline]
 

Returns:
mnemonic for instruction with sumbolic references resolved

Reimplemented in CPInstruction, FieldInstruction, InvokeInstruction, INVOKEINTERFACE, MULTIANEWARRAY, CPInstruction, FieldInstruction, InvokeInstruction, INVOKEINTERFACE, and MULTIANEWARRAY.

Definition at line 180 of file src/de/fub/bytecode/generic/Instruction.java.

String Instruction::toString   [inline]
 

Returns:
mnemonic for instruction in verbose format

Reimplemented in Field, Method, Field, Method, Field, Field, and Method.

Definition at line 174 of file src/de/fub/bytecode/generic/Instruction.java.

String Instruction::toString cp_info   constant_pool[] [inline]
 

For displaying instructions.

Parameters:
constant_pool   constant pool of associated ClassFile
Returns:
String representation of this instruction.

Reimplemented in Instruction_byte, Instruction_byteindex, Instruction_bytevar, Instruction_Iinc, Instruction_int, Instruction_intbranch, Instruction_intindex, Instruction_intvar, Instruction_Invokeinterface, Instruction_longbranch, Instruction_Lookupswitch, Instruction_Multianewarray, Instruction_Newarray, and Instruction_Tableswitch.

Definition at line 336 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

String Instruction::toString boolean   verbose [inline]
 

Long output format:

<name of opcode> "["<opcode number>"]" "("<length of instruction>")"

Parameters:
verbose   long/short format switch
Returns:
mnemonic for instruction

Reimplemented in BIPUSH, BranchInstruction, CPInstruction, IINC, LocalVariableInstruction, MULTIANEWARRAY, NEWARRAY, RET, Select, SIPUSH, BIPUSH, BranchInstruction, CPInstruction, IINC, LocalVariableInstruction, MULTIANEWARRAY, NEWARRAY, RET, Select, and SIPUSH.

Definition at line 269 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

String Instruction::toString ConstantPool   cp [inline]
 

Returns:
mnemonic for instruction with sumbolic references resolved

Reimplemented in CPInstruction, FieldInstruction, InvokeInstruction, INVOKEINTERFACE, MULTIANEWARRAY, CPInstruction, FieldInstruction, InvokeInstruction, INVOKEINTERFACE, and MULTIANEWARRAY.

Definition at line 257 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

String Instruction::toString   [inline]
 

Returns:
mnemonic for instruction in verbose format

Reimplemented in Field, Method, Field, Method, Field, Field, and Method.

Definition at line 251 of file lib/jpf/de/fub/bytecode/generic/Instruction.java.

Referenced by ByteCode::showCode(), and InstructionHandle::toString().


Member Data Documentation

final String Instruction::LOCALPREFIX = "local_" [static]
 

String used to construct names for local variables.

Definition at line 153 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

final String Instruction::argsep = " " [static]
 

String used to separate arguments in printing.

Definition at line 151 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

boolean Instruction::branches
 

Whether this instruction branches.

Definition at line 172 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

boolean Instruction::calls
 

Whether this instruction is a method invocation.

Definition at line 174 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

byte Instruction::code
 

Actual byte code of this instruction.

Definition at line 157 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

int Instruction::label
 

Offset of this instruction from the start of code.

See also:
ClassFile::relabel

Definition at line 161 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

boolean Instruction::labelled
 

Whether this instruction is the target of a branch.

Definition at line 170 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

String Instruction::name
 

Name of this instruction.

See also:
Instruction::toString

Reimplemented in Method.

Definition at line 165 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

Instruction Instruction::next
 

Reference for chaining.

Definition at line 168 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.

boolean Instruction::returns
 

Whether this instruction is a return.

Definition at line 176 of file src/ca/mcgill/sable/soot/coffi/Instruction.java.


The documentation for this class was generated from the following files:
Generated at Thu Feb 7 07:14:09 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001