harpoon.IR.Tree
Class Stm
java.lang.Object
harpoon.IR.Tree.Tree
harpoon.IR.Tree.Stm
- All Implemented Interfaces:
- HCodeElement
- Direct Known Subclasses:
- ALIGN, CJUMP, DATUM, EXPR, INVOCATION, JUMP, LABEL, METHOD, MOVE, RETURN, SEGMENT, SEQ, THROW
public abstract class Stm
- extends Tree
Stm
objects are statements which perform side effects and
control flow.
- Version:
- $Id: Stm.java,v 1.3 2002/04/10 03:05:45 cananian Exp $
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>, based on
Modern Compiler Implementation in Java by Andrew Appel.
Methods inherited from class harpoon.IR.Tree.Tree |
accept, clone, clone, getChild, getFactory, getFirstChild, getID, getLineNumber, getParent, getSibling, getSourceFile, hashCode, kids, kind, rename, rename, replace, setChild, unlink |
Stm
protected Stm(TreeFactory tf,
HCodeElement source,
int arity)
build
public final Stm build(ExpList kids)
- Build an
Stm
of this type from the given list of
subexpressions.
build
public abstract Stm build(TreeFactory tf,
ExpList kids)
toStm
public static Stm toStm(List<Stm> list)
- Returns a tree-based representation of
list
.
Requires: foreach element, l
, of
list
,
(l != null) && (l instanceof Stm)
.
Modifies:
Effects: returns a tree-based representation of
list
. If list
is null,
returns null.
linearize
public static Stm linearize(Stm stm)
- Returns a
Stm
such that all SEQ
objects
contained within the Stm
object are on the top level.
isNop
public static boolean isNop(Stm stm)
- Returns true if
stm
has no effect.