All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class harpoon.IR.Bytecode.Code

java.lang.Object
   |
   +----harpoon.ClassFile.HCode
           |
           +----harpoon.IR.Bytecode.Code

public class Code
extends HCode
Bytecode.Code is a code view that exposes the raw java classfile bytecodes.

Version:
$Id: Code.java,v 1.9 1998/11/10 03:32:19 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
HCode

Constructor Index

 o Code(HMethod, MethodInfo)
Constructor.

Method Index

 o clone(HMethod)
Clone this code representation.
 o convertFrom(HCode)
Convert from a different code view, by way of intermediates.
 o getConstant(int)
Look up a constant in the appropriate constant_pool.
 o getElements()
Return an ordered list of the Bytecode.Instrs making up this code view.
 o getElementsE()
Return an Enumeration of the component objects making up this code view.
 o getLeafElements()
Return the 'leaves' of this code view; that is, the elements with no successors.
 o getMaxLocals()
Get the number of local variables used in this method, including the parameters passed to the method on invocation.
 o getMaxStack()
Get the maximum number of words on the operand stack at any point during execution of this method.
 o getMethod()
Return the HMethod this codeview belongs to.
 o getName()
Return the name of this code view, "bytecode".
 o getTryBlocks()
Get an array with the try-catch blocks/handlers for this bytecode.

Constructors

 o Code
 public Code(HMethod parent,
             MethodInfo methodinfo)
Constructor.

Methods

 o clone
 public HCode clone(HMethod newMethod)
Clone this code representation. The clone has its own copy of the bytecode graph.

Overrides:
clone in class HCode
 o getMethod
 public HMethod getMethod()
Return the HMethod this codeview belongs to.

Overrides:
getMethod in class HCode
 o getName
 public String getName()
Return the name of this code view, "bytecode".

Returns:
the string "bytecode".
Overrides:
getName in class HCode
 o convertFrom
 public static HCode convertFrom(HCode codeview)
Convert from a different code view, by way of intermediates. Bytecode is the basic codeview; no conversion functions are implemented.

Returns:
null, always.
 o getElements
 public HCodeElement[] getElements()
Return an ordered list of the Bytecode.Instrs making up this code view. The first instruction to be executed is in element 0 of the array.

Overrides:
getElements in class HCode
 o getElementsE
 public Enumeration getElementsE()
Return an Enumeration of the component objects making up this code view.

Overrides:
getElementsE in class HCode
 o getLeafElements
 public HCodeElement[] getLeafElements()
Return the 'leaves' of this code view; that is, the elements with no successors.

Overrides:
getLeafElements in class HCode
 o getMaxLocals
 public int getMaxLocals()
Get the number of local variables used in this method, including the parameters passed to the method on invocation.

 o getMaxStack
 public int getMaxStack()
Get the maximum number of words on the operand stack at any point during execution of this method.

 o getTryBlocks
 public Code. ExceptionEntry[] getTryBlocks()
Get an array with the try-catch blocks/handlers for this bytecode.

 o getConstant
 public Constant getConstant(int index)
Look up a constant in the appropriate constant_pool.


All Packages  Class Hierarchy  This Package  Previous  Next  Index