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
-
Code(HMethod, MethodInfo)
- Constructor.
-
clone(HMethod)
- Clone this code representation.
-
convertFrom(HCode)
- Convert from a different code view, by way of intermediates.
-
getConstant(int)
- Look up a constant in the appropriate constant_pool.
-
getElements()
- Return an ordered list of the
Bytecode.Instr
s
making up this code view.
-
getElementsE()
- Return an Enumeration of the component objects making up this
code view.
-
getLeafElements()
- Return the 'leaves' of this code view; that is,
the elements with no successors.
-
getMaxLocals()
- Get the number of local variables used in this method, including
the parameters passed to the method on invocation.
-
getMaxStack()
- Get the maximum number of words on the operand stack at any point
during execution of this method.
-
getMethod()
- Return the
HMethod
this codeview
belongs to.
-
getName()
- Return the name of this code view,
"bytecode"
.
-
getTryBlocks()
- Get an array with the try-catch blocks/handlers for this bytecode.
Code
public Code(HMethod parent,
MethodInfo methodinfo)
- Constructor.
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
getMethod
public HMethod getMethod()
- Return the
HMethod
this codeview
belongs to.
- Overrides:
- getMethod in class HCode
getName
public String getName()
- Return the name of this code view,
"bytecode"
.
- Returns:
- the string
"bytecode"
.
- Overrides:
- getName in class HCode
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.
getElements
public HCodeElement[] getElements()
- Return an ordered list of the
Bytecode.Instr
s
making up this code view. The first instruction to be
executed is in element 0 of the array.
- Overrides:
- getElements in class HCode
getElementsE
public Enumeration getElementsE()
- Return an Enumeration of the component objects making up this
code view.
- Overrides:
- getElementsE in class HCode
getLeafElements
public HCodeElement[] getLeafElements()
- Return the 'leaves' of this code view; that is,
the elements with no successors.
- Overrides:
- getLeafElements in class HCode
getMaxLocals
public int getMaxLocals()
- Get the number of local variables used in this method, including
the parameters passed to the method on invocation.
getMaxStack
public int getMaxStack()
- Get the maximum number of words on the operand stack at any point
during execution of this method.
getTryBlocks
public Code. ExceptionEntry[] getTryBlocks()
- Get an array with the try-catch blocks/handlers for this bytecode.
getConstant
public Constant getConstant(int index)
- Look up a constant in the appropriate constant_pool.
All Packages Class Hierarchy This Package Previous Next Index