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

Instruction_longbranch Class Reference

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

Public Methods

 Instruction_longbranch (byte c)
Instruction[] branchpoints (Instruction next)
int compile (byte bc[], int index)
int nextOffset (int curr)
void offsetToPointer (ByteCode bc)
int parse (byte bc[], int index)
String toString (cp_info constant_pool[])

Public Attributes

int arg_i
Instruction target

Detailed Description

Instruction subclasses are used to represent parsed bytecode; each bytecode operation has a corresponding subclass of Instruction.

Each subclass is derived from one of

Author:
Clark Verbrugge
See also:
Instruction , Instruction_noargs , Instruction_byte , Instruction_bytevar , Instruction_byteindex , Instruction_int , Instruction_intvar , Instruction_intindex , Instruction_intbranch , Instruction_longbranch , Instruction_Unknown

Definition at line 138 of file Instruction_longbranch.java.


Member Function Documentation

Instruction [] Instruction_longbranch::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 from Instruction.

Reimplemented in Instruction_Goto_w, and Instruction_Jsr_w.

Definition at line 142 of file Instruction_longbranch.java.

int Instruction_longbranch::compile byte   bc[],
int   index
[inline, 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 from Instruction.

Definition at line 147 of file Instruction_longbranch.java.

int Instruction_longbranch::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 from Instruction.

Definition at line 155 of file Instruction_longbranch.java.

void Instruction_longbranch::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 from Instruction.

Definition at line 156 of file Instruction_longbranch.java.

int Instruction_longbranch::parse byte   bc[],
int   index
[inline, 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 from Instruction.

Definition at line 164 of file Instruction_longbranch.java.

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

For displaying instructions.

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

Reimplemented from Instruction.

Definition at line 168 of file Instruction_longbranch.java.


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