SandMark version 3.0


sandmark.util.controlflowgraph
Class GraphNode

java.lang.Object
  |
  +--sandmark.util.controlflowgraph.GraphNode
Direct Known Subclasses:
BasicBlock, RegisterAllocator.IGNode

public class GraphNode
extends java.lang.Object

GraphNode represents a node in a Graph.


Field Summary
 int mBlockNum
           
protected  int postIndex
           
protected  java.util.ArrayList predecessors
           
protected  int preIndex
           
(package private) static int sBlockNum
           
protected  java.util.ArrayList successors
           
 
Constructor Summary
GraphNode()
          Constructor.
GraphNode(Graph g)
           
 
Method Summary
 java.util.List getPredecessors()
          Returns the predessor nodes of this node.
 java.util.List getSuccessors()
          Returns the successor nodes of this node.
 Graph graph()
           
protected  void onRemoveFromGraph()
           
(package private)  int postOrderIndex()
           
(package private)  int preOrderIndex()
           
 void setGraph(Graph g)
          Set the graph that contains this node
(package private)  void setPostOrderIndex(int index)
           
(package private)  void setPreOrderIndex(int index)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

successors

protected java.util.ArrayList successors

predecessors

protected java.util.ArrayList predecessors

preIndex

protected int preIndex

postIndex

protected int postIndex

sBlockNum

static int sBlockNum

mBlockNum

public int mBlockNum
Constructor Detail

GraphNode

public GraphNode()
Constructor.


GraphNode

public GraphNode(Graph g)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

graph

public Graph graph()
Returns:
The Graph that contains this node

setGraph

public void setGraph(Graph g)
Set the graph that contains this node


onRemoveFromGraph

protected void onRemoveFromGraph()

preOrderIndex

int preOrderIndex()
Returns:
The index of this node in a pre-order traversal of the graph.

postOrderIndex

int postOrderIndex()
Returns:
The index of this node in a post-order traversal of the graph.

setPreOrderIndex

void setPreOrderIndex(int index)

setPostOrderIndex

void setPostOrderIndex(int index)

getSuccessors

public java.util.List getSuccessors()
Returns the successor nodes of this node.


getPredecessors

public java.util.List getPredecessors()
Returns the predessor nodes of this node.


SandMark version 3.0

Wed Jan 29 10:30:05 MST 2003