All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class harpoon.IR.QuadSSA.Code

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

public class Code
extends HCode
QuadSSA.Code is a code view that exposes the details of the java classfile bytecodes in a quadruple format. Implementation details of the stack-based JVM are hidden in favor of a flat consistent temporary-variable based approach. The generated quadruples adhere to an SSA form; that is, every variable has exactly one definition, and PHI functions are used where control flow merges.

Version:
$Id: Code.java,v 1.31 1998/11/10 03:35:09 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>

Constructor Index

 o Code(HMethod, Quad)
Same as above; with addPhi==false.
 o Code(HMethod, Quad, boolean)
Create a new code object given a quadruple representation of the method instructions.

Method Index

 o clone(HMethod)
Clone this code representation.
 o getElements()
Returns an ordered list of the Quads making up this code view.
 o getElementsE()
Returns an enumeration of the Quads making up this code view.
 o getLeafElements()
Returns the leaves of the control flow graph.
 o getMethod()
Return the HMethod this codeview belongs to.
 o getName()
Return the name of this code view.
 o getRootElement()
Returns the root of the control flow graph.
 o register()

Constructors

 o Code
 public Code(HMethod parent,
             Quad quads,
             boolean addPhi)
Create a new code object given a quadruple representation of the method instructions. If addPhi is true, adds phi and sigma functions to the PHI and SIGMA quads in the representations.

 o Code
 public Code(HMethod parent,
             Quad quads)
Same as above; with addPhi==false.

Methods

 o clone
 public HCode clone(HMethod newMethod)
Clone this code representation. The clone has its own copy of the quad 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.

Returns:
the string "quad-ssa".
Overrides:
getName in class HCode
 o register
 public static void register()
 o getRootElement
 public HCodeElement getRootElement()
Returns the root of the control flow graph.

Overrides:
getRootElement in class HCode
 o getLeafElements
 public HCodeElement[] getLeafElements()
Returns the leaves of the control flow graph.

Overrides:
getLeafElements in class HCode
 o getElements
 public HCodeElement[] getElements()
Returns an ordered list of the Quads making up this code view. The root of the graph is in element 0 of the array.

Overrides:
getElements in class HCode
 o getElementsE
 public Enumeration getElementsE()
Returns an enumeration of the Quads making up this code view. The root of the graph is the first element enumerated.

Overrides:
getElementsE in class HCode

All Packages  Class Hierarchy  This Package  Previous  Next  Index