All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class harpoon.IR.Bytecode.InGen

java.lang.Object
   |
   +----harpoon.IR.Bytecode.Instr
           |
           +----harpoon.IR.Bytecode.InGen

public class InGen
extends Instr
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.

Version:
$Id: InGen.java,v 1.3 1998/10/11 23:36:49 cananian Exp $
Author:
C. Scott Ananian

Constructor Index

 o InGen(String, int, byte[], int, Code)
Create an InGen from a chunk of bytecode starting at offset pc.

Method Index

 o getOpcode()
Return the bytecode opcode of this instruction.
 o getOperand(int)
Return a specific operand of this instruction.
 o getOperands()
Get all the operands of this instruction.
 o toString()
Return human-readable instruction string.

Constructors

 o InGen
 public InGen(String sourcefile,
              int linenumber,
              byte code[],
              int pc,
              Code parent)
Create an InGen from a chunk of bytecode starting at offset pc. parent is used to lookup constant_pool references.

Methods

 o getOpcode
 public byte getOpcode()
Return the bytecode opcode of this instruction.

Overrides:
getOpcode in class Instr
See Also:
Op
 o getOperand
 public Operand getOperand(int i)
Return a specific operand of this instruction.

 o getOperands
 public Operand[] getOperands()
Get all the operands of this instruction.

 o toString
 public String toString()
Return human-readable instruction string.

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index