SandMark version 2.1


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
protected  Graph container
           
 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.
 
Method Summary
 java.util.ArrayList getPredessors()
          Returns the predessor nodes of this node.
 java.util.ArrayList getSuccessors()
          Returns the successor nodes of this node.
 Graph graph()
           
(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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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

container

protected Graph container

sBlockNum

static int sBlockNum

mBlockNum

public int mBlockNum
Constructor Detail

GraphNode

public GraphNode()
Constructor.

Method Detail

graph

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

setGraph

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


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.ArrayList getSuccessors()
Returns the successor nodes of this node.


getPredessors

public java.util.ArrayList getPredessors()
Returns the predessor nodes of this node.


SandMark version 2.1

Wed Jul 3 17:27:43 MST 2002