|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.dfsolver.DF_AbstractCell
public abstract class DF_AbstractCell
Represents a single lattice cell in a dataflow system.
Field Summary | |
---|---|
private HashSet<DF_Equation> |
defs
Set of DF_Equations which define this lattice cell. |
private int |
index
Field used for GraphNode interface. |
private int |
scratch
|
private HashSet<DF_Equation> |
uses
Set of DF_Equations which use this lattice cell. |
Constructor Summary | |
---|---|
DF_AbstractCell()
Default Constructor |
|
DF_AbstractCell(int capacity)
This constructor bounds the initial capacity to save space. |
Method Summary | |
---|---|
void |
addDef(DF_Equation eq)
Note that this variable appears on the LHS of an equation |
void |
addUse(DF_Equation eq)
Note that this variable appears on the RHS of an equation |
Iterator<DF_Equation> |
getDefs()
Returns an enumeration of the equations in which this lattice cell is defined. |
int |
getIndex()
The index of this node in its graph. |
int |
getScratch()
read the scratch field of int type |
Iterator<DF_Equation> |
getUses()
Returns an enumeration of the equations in which this lattice cell is used. |
Enumeration<GraphNode> |
inNodes()
Get an enumeration of all the edges at which edges that point to this node are sourced. |
Enumeration<GraphNode> |
outNodes()
Get an enumeration of all the edges to which edges sourced at this node point. |
void |
setIndex(int i)
Implementation of GraphNode interface. |
int |
setScratch(int o)
set the scratch field of int type |
abstract String |
toString()
Return a string representation of the cell |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final HashSet<DF_Equation> uses
private final HashSet<DF_Equation> defs
private int index
private int scratch
Constructor Detail |
---|
public DF_AbstractCell()
public DF_AbstractCell(int capacity)
capacity
- the initial capacity of the "uses" setMethod Detail |
---|
public Iterator<DF_Equation> getUses()
DF_LatticeCell
getUses
in interface DF_LatticeCell
public Iterator<DF_Equation> getDefs()
DF_LatticeCell
getDefs
in interface DF_LatticeCell
public abstract String toString()
DF_LatticeCell
toString
in interface DF_LatticeCell
toString
in class Object
public void addUse(DF_Equation eq)
DF_LatticeCell
addUse
in interface DF_LatticeCell
eq
- the equationpublic void addDef(DF_Equation eq)
DF_LatticeCell
addDef
in interface DF_LatticeCell
eq
- the equationpublic Enumeration<GraphNode> inNodes()
GraphNode
inNodes
in interface GraphNode
public Enumeration<GraphNode> outNodes()
GraphNode
outNodes
in interface GraphNode
public void setIndex(int i)
setIndex
in interface GraphNode
public int getIndex()
GraphNode
Graph.compactNodeNumbering
the nodes of a graph should be
numbered 0 thru (# of nodes in graph - 1).
getIndex
in interface GraphNode
public int getScratch()
GraphElement
getScratch
in interface GraphElement
public int setScratch(int o)
GraphElement
setScratch
in interface GraphElement
o
- the new contents of the int scratch field
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |