harpoon.IR.Quads
Class QuadSSI

java.lang.Object
  |
  +--harpoon.ClassFile.HCode
        |
        +--harpoon.IR.Quads.Code
              |
              +--harpoon.IR.Quads.QuadSSI
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ContCodeSSI, EnvCode, EventDrivenCode

public class QuadSSI
extends Code

Quads.QuadSSI is a code view in SSI form. Quad form exposes the details of the java classfile bytecodes in a pseudo-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 SSI form; that is, every variable has exactly one definition, and PHI and SIGMA functions are used where control flow merges or splits, respectively.

Version:
$Id: QuadSSI.java,v 1.2 2002/02/25 21:05:12 cananian Exp $
Author:
C. Scott Ananian <cananian@alumni.princeton.edu>
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class harpoon.ClassFile.HCode
HCode.PrintCallback
 
Field Summary
static String codename
          The name of this code view.
 
Fields inherited from class harpoon.IR.Quads.Code
ai, parent, qf, quads
 
Constructor Summary
protected QuadSSI(HMethod parent, Quad quads)
          Create a new code object given a quadruple representation of the method instructions.
  QuadSSI(QuadNoSSA qns)
          Creates a Code object from a bytecode object.
 
Method Summary
 HCodeAndMaps clone(HMethod newMethod)
          Clone this code representation.
static HCodeFactory codeFactory()
          Return a code factory for QuadSSI, using the default code factory for QuadNoSSA.
static HCodeFactory codeFactory(HCodeFactory hcf)
          Return a code factory for QuadSSI, given a code factory for QuadNoSSA.
 String getName()
          Return the name of this code view.
 
Methods inherited from class harpoon.IR.Quads.Code
cloneHelper, cloneHelper, elementArrayFactory, getAllocationInformation, getDerivation, getElements, getElementsI, getLeafElements, getMethod, getRootElement, newQF, print, setAllocationInformation
 
Methods inherited from class harpoon.ClassFile.HCode
clone, elementIndexer, getElementsE, getElementsL, print, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

codename

public static final String codename
The name of this code view.

See Also:
Constant Field Values
Constructor Detail

QuadSSI

public QuadSSI(QuadNoSSA qns)
Creates a Code object from a bytecode object.


QuadSSI

protected QuadSSI(HMethod parent,
                  Quad quads)
Create a new code object given a quadruple representation of the method instructions.

Method Detail

clone

public HCodeAndMaps clone(HMethod newMethod)
Clone this code representation. The clone has its own copy of the quad graph.

Specified by:
clone in class Code

getName

public String getName()
Return the name of this code view.

Specified by:
getName in class Code
Returns:
the string "quad-ssi".

codeFactory

public static HCodeFactory codeFactory(HCodeFactory hcf)
Return a code factory for QuadSSI, given a code factory for QuadNoSSA. Given a code factory for Bytecode or QuadWithTry, chain through QuadNoSSA.codeFactory().


codeFactory

public static HCodeFactory codeFactory()
Return a code factory for QuadSSI, using the default code factory for QuadNoSSA.