|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.IR.Tree.Tree
harpoon.IR.Tree.Exp
harpoon.IR.Tree.ESEQ
public class ESEQ
ESEQ
objects are expressions which chain a statement and
an expression together. The statement is evaluated for side effects, then
the expression is evaluated. The value of the expression is the value of
the ESEQ
.
ESEQ
s are PreciselyTyped
because the enclosed
Exp
may be PreciselyTyped
. In contexts such
as MOVE(ESEQ(stm, MEM<small>(e1)), e2)
, the
ESEQ
clearly has the same small type as the MEM
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class harpoon.IR.Tree.Tree |
---|
Tree.CloneCallback |
Field Summary |
---|
Fields inherited from class harpoon.IR.Tree.Tree |
---|
arrayFactory, child |
Fields inherited from interface harpoon.IR.Tree.Typed |
---|
DOUBLE, FLOAT, INT, LONG, POINTER |
Constructor Summary | |
---|---|
ESEQ(Stm stm,
Exp exp)
Convenient constructor: the tree factory and the source arguments are identical to those for the statement and the expression. |
|
ESEQ(TreeFactory tf,
HCodeElement source,
Stm stm,
Exp exp)
Constructor. |
Method Summary | |
---|---|
void |
accept(TreeVisitor v)
Accept a visitor |
int |
bitwidth()
Returns the size of the expression, in bits. |
Exp |
build(TreeFactory tf,
ExpList kids)
|
Exp |
getExp()
Returns the expression whose value is the the value of the ESEQ . |
Stm |
getStm()
Returns the statement to evaluate for side-effects. |
boolean |
isSmall()
Returns true if this expression is a small type,
false otherwise. |
ExpList |
kids()
Return a list of subexpressions of this Tree . |
int |
kind()
Return an integer enumeration of the kind of this Tree . |
Tree |
rename(TreeFactory tf,
TempMap tm,
Tree.CloneCallback cb)
Rename while cloning a subtree. |
void |
setExp(Exp exp)
Sets the expression whose value is the the value of the ESEQ . |
void |
setStm(Stm stm)
Sets the statement to evaluate for side-effects. |
boolean |
signed()
Returns true if this is a signed expression, false otherwise. |
String |
toString()
|
int |
type()
Result type. |
Methods inherited from class harpoon.IR.Tree.Exp |
---|
build, isDoubleWord, isFloatingPoint |
Methods inherited from class harpoon.IR.Tree.Tree |
---|
clone, clone, getChild, getFactory, getFirstChild, getID, getLineNumber, getParent, getSibling, getSourceFile, hashCode, rename, replace, setChild, unlink |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface harpoon.IR.Tree.Typed |
---|
isDoubleWord, isFloatingPoint |
Constructor Detail |
---|
public ESEQ(TreeFactory tf, HCodeElement source, Stm stm, Exp exp)
public ESEQ(Stm stm, Exp exp)
stm
- Statement executed firstexp
- Expression evaluated next; its result is the value
of the entire ESEQ
expression.Method Detail |
---|
public Stm getStm()
public Exp getExp()
ESEQ
.
public void setStm(Stm stm)
public void setExp(Exp exp)
ESEQ
.
public ExpList kids()
Tree
Tree
.
kids
in class Tree
public int kind()
Tree
Tree
. The enumerated values are defined in
TreeKind
.
kind
in class Tree
public Exp build(TreeFactory tf, ExpList kids)
build
in class Exp
public void accept(TreeVisitor v)
accept
in class Tree
public Tree rename(TreeFactory tf, TempMap tm, Tree.CloneCallback cb)
Tree
TEMP
nodes
are renamed according to the supplied TempMap
.
Note that Temp
s not belonging to
this.getFactory().tempFactory()
are not affected.
The callback()
method of the supplied
CloneCallback
is invoked once on each subtree cloned,
starting from the leaves and working back to the root in a
post-order depth-first manner.
rename
in class Tree
public int type()
Exp
type
in interface Typed
type
in class Exp
public boolean isSmall()
PreciselyTyped
true
if this expression is a small type,
false
otherwise.
isSmall
in interface PreciselyTyped
public int bitwidth()
PreciselyTyped
isSmall()==true
.
bitwidth
in interface PreciselyTyped
public boolean signed()
PreciselyTyped
isSmall()==true
.
signed
in interface PreciselyTyped
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |