Package harpoon.IR.Tree

An expression-tree oriented low-level IR, intended to facilitate machine-specific pattern-matching code-generation.

See:
          Description

Interface Summary
OptimizedTreeCode.TreeOptimizer  
PreciselyTyped The PreciselyTyped interface allows access to type information for expressions which have a type which cannot be expressed by the standard types in the Typed interface.
Tree.CloneCallback Callback interface to tree cloning code to allow you to update type and other annotations as the tree is cloned.
TreeDerivation TreeDerivation provides a means to access type and derivation information for any Tree.Exp in a code representation.
Typed The Typed interface allows access to type information for Exps (including TEMP, MEM, CONST, OPER, and UNOP) and the Stms THROW, RETURN, and MOVE.
 

Class Summary
ALIGN ALIGN statements are used to enforce a given alignment on the following data items.
BINOP BINOP objects are expressions which stand for result of applying some binary operator o to a pair of subexpressions.
Bop Bop is an enumerated type for BINOPs.
CALL CALL objects are statements which stand for java method invocations, using our runtime's calling convention.
CanonicalTreeCode The CanonicalTreeCode codeview is the same as the TreeCode codeview, except for the fact that it does not allow ESEQ objects to be part of its representation.
CJUMP CJUMP objects are statements which stand for conditional branches.
Code Tree.Code is an abstract superclass of codeviews using the components in IR.Tree.
CONST CONST objects are expressions which stand for a constant value.
Data Data is an abstract implementation of HData for IR.Tree form.
DATUM DATUM objects are statements which write a value to memory at the time when a program is loaded.
DerivationGenerator DerivationGenerator takes a partial map of Tree.Exps-to-type/derivations and answers type/derivation queries as if the complete map were present.
ESEQ ESEQ objects are expressions which chain a statement and an expression together.
Exp Exp objects are expressions which stand for the computation of some value (possibly with side effects).
ExpList ExpLists form singly-linked lists of Exps.
EXPR EXPR objects evaluate an expression (for side-effects) and then throw away the result.
INVOCATION INVOCATION objects are statements which stand for procedure calls.
JUMP JUMP objects are statements which stand for unconditional computed branches.
LABEL LABEL objects define the constant value of the given label to be the current machine code address.
MEM MEM objects are expressions which stand for the contents of a value in memory starting at the address specified by the subexpression.
METHOD Tree.METHOD objects encode method-specific information: the mapping of method formals to temporary variables, and links to the exception handlers for the method.
MOVE MOVE statements assign a value to a location.
NAME NAME objects are expressions which stand for symbolic constants.
NATIVECALL NATIVECALL objects are statements which stand for function calls using standard C calling convention.
OPER OPER objects are expressions which stand for the result of applying some operator to subexpressions.
OptimizedTreeCode The OptimizedTreeCode codeview is an optimized, canonical representation of Tree form.
Print Print pretty-prints Trees.
RETURN RETURN objects are used to represent a return from a method body.
SEGMENT The SEGMENT class is used to mark the beginning of a new section of memory.
SEQ SEQ evaluates the left statement followed by the right statement.
Stm Stm objects are statements which perform side effects and control flow.
StmList StmLists for singly-linked lists of Stms.
TEMP TEMP objects are expressions which stand for a value in a virtual register.
THROW THROW objects are used to represent a thrown exception.
ToCanonicalTree The ToCanonicalTree class translates tree code to canonical tree code (no ESEQ).
Translation Translation is an empty class wrapper for various special context-sensitive Tree.Exp wrappers.
Translation.Cx The Translation.Cx abstract class specifies how to evaluate a conditional as an expression or as a side-effects-only statement.
Translation.Ex The Translation.Ex class is a Translation.Exp representing a value expression.
Translation.Exp The Translation.Exp class represents an expression that might be used in several different ways: as a value, as a branch condition, or as code to be executed for side-effects only.
Translation.Nx The Translation.Nx class is a Translation.Exp representing a statement.
Tree Tree is the base class for the tree representation.
TreeCode  
TreeFactory A TreeFactory is responsible for assigning unique numbers to the Tree Exps and Stms in a method, and for maintaining method-wide information (a pointer to the parent HCode, a pointer to a harpoon.Backend.Generic.Frame, etc.).
TreeKind TreeKind is an enumerated type for the various kinds of Trees.
TreeUseDefer TreeUseDefer implements the Properties.UseDefer interface for non-SEQ Stms of a tree.
TreeVerifyingVisitor TreeVerifyingVisitor is a generic Tree Visitor for verifying particular properties about the Tree Intermediate Representation for a given Tree.
TreeVerifyingVisitor.NoRepeats  
TreeVisitor TreeVisitor is a Design Pattern, courtesy of Martin.
Type Type enumerates the possible Tree expression types.
UNOP UNOP objects are expressions which stand for result of applying some unary operator o to a subexpression.
Uop Uop is an enumerated type for UNOPs.
 

Package harpoon.IR.Tree Description

An expression-tree oriented low-level IR, intended to facilitate machine-specific pattern-matching code-generation. Tree form is our "portable assembly language"; a loosely-typed non-register-allocated fine-grain representation that exposes all the details of object representation, method invocation, and runtime interfacing, which can easily be translated to the machine-specific Instrs of harpoon.IR.Assem for register allocation and scheduling before output.

The details of run-time organization and datatype representation are abstracted away by the machine-specific Frame, conforming to the interface in harpoon.Backend.Generic.Frame. Frames are not entirely machine-specific; all machines with roughly the same datatypes (for example, 32-bit words) which use the same runtime implementation will be able to share large parts of a Frame implementation. See harpoon.Backend.Generic.Frame for more details.

Author:
C. Scott Ananian <cananian@alumni.princeton.edu>, Duncan Bryce <duncan@lcs.mit.edu>