|
|||||||||
| 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.MEM
public class MEM
MEM objects are expressions which stand for the contents of
a value in memory starting at the address specified by the
subexpression. Note that when MEM is used as the left child
of a MOVE or CALL, it means "store," but
anywhere else it means "fetch."
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class harpoon.IR.Tree.Tree |
|---|
Tree.CloneCallback |
| Field Summary | |
|---|---|
boolean |
isSmall
|
int |
type
The type of this memory reference expression. |
| 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 | |
|---|---|
MEM(TreeFactory tf,
HCodeElement source,
int bitwidth,
boolean signed,
Exp exp)
Creates a MEM with a precisely defined type. |
|
MEM(TreeFactory tf,
HCodeElement source,
int type,
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 a subexpression evaluating to a memory reference location. |
boolean |
isSmall()
Returns true if this is a sub-integer expression. |
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 memory reference subexpression. |
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, kids, 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 |
| Field Detail |
|---|
public final int type
public final boolean isSmall
| Constructor Detail |
|---|
public MEM(TreeFactory tf,
HCodeElement source,
int type,
Exp exp)
public MEM(TreeFactory tf,
HCodeElement source,
int bitwidth,
boolean signed,
Exp exp)
bitwidth - the width in bits of this MEM's type.
Fails unless 0 <= bitwidth < 32.signed - whether this MEM is signedexp - the location at which to load or store| Method Detail |
|---|
public Exp getExp()
public void setExp(Exp exp)
public int kind()
TreeTree. The enumerated values are defined in
TreeKind.
kind in class Tree
public Exp build(TreeFactory tf,
ExpList kids)
build in class Exppublic int type()
Exp
type in interface Typedtype in class Exppublic boolean isSmall()
isSmall in interface PreciselyTypedpublic int bitwidth()
isSmall()==true.
bitwidth in interface PreciselyTypedpublic boolean signed()
isSmall()==true.
signed in interface PreciselyTypedpublic void accept(TreeVisitor v)
accept in class Tree
public Tree rename(TreeFactory tf,
TempMap tm,
Tree.CloneCallback cb)
TreeTEMP nodes
are renamed according to the supplied TempMap.
Note that Temps 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 Treepublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||