Stanse  -1
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
cz.muni.stanse.codestructures.CFGNode Class Reference
Inheritance diagram for cz.muni.stanse.codestructures.CFGNode:
Inheritance graph
[legend]
Collaboration diagram for cz.muni.stanse.codestructures.CFGNode:
Collaboration graph
[legend]

Classes

class  EdgeLabel
 
class  Operand
 
enum  OperandType
 

Public Member Functions

 CFGNode ()
 
 CFGNode (Element e, String code)
 
 CFGNode (Element e)
 
int getNumber ()
 
String getCode ()
 
Element getElement ()
 
void setLocation (File file, int line, int column)
 
boolean hasLocation ()
 
File getFile ()
 
final int getColumn ()
 
final int getLine ()
 
boolean isVisible ()
 
void setVisible (boolean value)
 
Set< String > getDependentVars ()
 
List< CFGNodegetPredecessors ()
 
List< CFGNodegetSuccessors ()
 
List< CFGNodegetOptPredecessors ()
 
List< CFGNodegetOptSuccessors ()
 
List< Operand > getOperands ()
 
void setOperands (List< Operand > operands)
 
void addOperand (OperandType type, Object id)
 
String getNodeType ()
 
void setNodeType (String nodeType)
 
void addEdge (CFGNode to)
 
void addEdge (CFGNode to, Object label)
 
void addEdge (CFGNode to, int edgeIndex, Object label)
 
Object getEdgeLabel (int edge)
 
void addOptEdge (CFGNode to)
 
void replaceEdge (CFGNode oldTo, CFGNode newTo)
 
void replaceOptEdge (CFGNode oldTo, CFGNode newTo)
 
void drop ()
 
boolean equals (Object obj)
 
int hashCode ()
 
String toString ()
 

Static Public Member Functions

static Set< String > getDependentVars (Operand op)
 

Protected Member Functions

void addPred (CFGNode pred)
 
void removeSucc (int index)
 

Detailed Description

Represents a node in control-flow graph (class ControlFlowGraph in this package)

Constructor & Destructor Documentation

cz.muni.stanse.codestructures.CFGNode.CFGNode ( )
inline

Creates a new instance of CFGNode

cz.muni.stanse.codestructures.CFGNode.CFGNode ( Element  e,
String  code 
)
inline

Creates a new instance of CFGNode

Parameters
eelement to assign to this node
codecorresponding (original) code
cz.muni.stanse.codestructures.CFGNode.CFGNode ( Element  e)
inline

Creates a new instance of CFGNode

Parameters
eelement to assign to this node

Member Function Documentation

void cz.muni.stanse.codestructures.CFGNode.addEdge ( CFGNode  to)
inline

Adds an edge between two nodes

Parameters
towhich node to add the edge to
void cz.muni.stanse.codestructures.CFGNode.addEdge ( CFGNode  to,
Object  label 
)
inline

Adds an edge between two nodes

Parameters
towhich node to add the edge to
void cz.muni.stanse.codestructures.CFGNode.addEdge ( CFGNode  to,
int  edgeIndex,
Object  label 
)
inline

Adds an edge between two nodes

Parameters
towhich node to add the edge to
void cz.muni.stanse.codestructures.CFGNode.addOperand ( OperandType  type,
Object  id 
)
inline
void cz.muni.stanse.codestructures.CFGNode.addOptEdge ( CFGNode  to)
inline

Adds an optimized edge between two nodes (is in code, not in CFG)

Parameters
towhich node to add the edge to
void cz.muni.stanse.codestructures.CFGNode.addPred ( CFGNode  pred)
inlineprotected

Adds the node to the predecessors

Parameters
prednew predecessor
void cz.muni.stanse.codestructures.CFGNode.drop ( )
inline
boolean cz.muni.stanse.codestructures.CFGNode.equals ( Object  obj)
inline
String cz.muni.stanse.codestructures.CFGNode.getCode ( )
inline

Get element corresponding to this node

Returns
element
final int cz.muni.stanse.codestructures.CFGNode.getColumn ( )
inline
static Set<String> cz.muni.stanse.codestructures.CFGNode.getDependentVars ( Operand  op)
inlinestatic
Set<String> cz.muni.stanse.codestructures.CFGNode.getDependentVars ( )
inline
Object cz.muni.stanse.codestructures.CFGNode.getEdgeLabel ( int  edge)
inline

Get label of a branch edge indexed from 0

Parameters
edgeedge index
Returns
element which is the label
Element cz.muni.stanse.codestructures.CFGNode.getElement ( )
inline

Get element corresponding to this node

Returns
element
File cz.muni.stanse.codestructures.CFGNode.getFile ( )
inline
final int cz.muni.stanse.codestructures.CFGNode.getLine ( )
inline
String cz.muni.stanse.codestructures.CFGNode.getNodeType ( )
inline
int cz.muni.stanse.codestructures.CFGNode.getNumber ( )
inline

Get unique node number

Returns
unique node number
List<Operand> cz.muni.stanse.codestructures.CFGNode.getOperands ( )
inline
List<CFGNode> cz.muni.stanse.codestructures.CFGNode.getOptPredecessors ( )
inline

Get all predecessors of the node

Returns
(read only) set of this node's predecessors
List<CFGNode> cz.muni.stanse.codestructures.CFGNode.getOptSuccessors ( )
inline

Get all successors of the node

Returns
(read only) set of this node's successors
List<CFGNode> cz.muni.stanse.codestructures.CFGNode.getPredecessors ( )
inline

Get all predecessors of the node

Returns
(read only) set of this node's predecessors
List<CFGNode> cz.muni.stanse.codestructures.CFGNode.getSuccessors ( )
inline

Get all successors of the node

Returns
(read only) set of this node's successors
int cz.muni.stanse.codestructures.CFGNode.hashCode ( )
inline
boolean cz.muni.stanse.codestructures.CFGNode.hasLocation ( )
inline
boolean cz.muni.stanse.codestructures.CFGNode.isVisible ( )
inline
void cz.muni.stanse.codestructures.CFGNode.removeSucc ( int  index)
inlineprotected

Removes the node from the successors

Parameters
indexthe index of the element to be removed
void cz.muni.stanse.codestructures.CFGNode.replaceEdge ( CFGNode  oldTo,
CFGNode  newTo 
)
inline

Replaces an edge between two nodes with a new edge

Parameters
oldTowhich node to replace
newTowhich node use as a replacement
void cz.muni.stanse.codestructures.CFGNode.replaceOptEdge ( CFGNode  oldTo,
CFGNode  newTo 
)
inline

Replaces an edge between two nodes with a new edge

Parameters
oldTowhich node to replace
newTowhich node use as a replacement
void cz.muni.stanse.codestructures.CFGNode.setLocation ( File  file,
int  line,
int  column 
)
inline
void cz.muni.stanse.codestructures.CFGNode.setNodeType ( String  nodeType)
inline
void cz.muni.stanse.codestructures.CFGNode.setOperands ( List< Operand >  operands)
inline
void cz.muni.stanse.codestructures.CFGNode.setVisible ( boolean  value)
inline
String cz.muni.stanse.codestructures.CFGNode.toString ( )
inline

The documentation for this class was generated from the following file: