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

◆ CFGNode() [1/3]

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

Creates a new instance of CFGNode

◆ CFGNode() [2/3]

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

◆ CFGNode() [3/3]

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

◆ addEdge() [1/3]

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

Adds an edge between two nodes

Parameters
towhich node to add the edge to

◆ addEdge() [2/3]

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

◆ addEdge() [3/3]

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

◆ addOperand()

void cz.muni.stanse.codestructures.CFGNode.addOperand ( OperandType  type,
Object  id 
)
inline

◆ addOptEdge()

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

◆ addPred()

void cz.muni.stanse.codestructures.CFGNode.addPred ( CFGNode  pred)
inlineprotected

Adds the node to the predecessors

Parameters
prednew predecessor

◆ drop()

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

◆ equals()

boolean cz.muni.stanse.codestructures.CFGNode.equals ( Object  obj)
inline

◆ getCode()

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

Get element corresponding to this node

Returns
element

◆ getColumn()

final int cz.muni.stanse.codestructures.CFGNode.getColumn ( )
inline

◆ getDependentVars() [1/2]

static Set<String> cz.muni.stanse.codestructures.CFGNode.getDependentVars ( Operand  op)
inlinestatic

◆ getDependentVars() [2/2]

Set<String> cz.muni.stanse.codestructures.CFGNode.getDependentVars ( )
inline

◆ getEdgeLabel()

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

◆ getElement()

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

Get element corresponding to this node

Returns
element

◆ getFile()

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

◆ getLine()

final int cz.muni.stanse.codestructures.CFGNode.getLine ( )
inline

◆ getNodeType()

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

◆ getNumber()

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

Get unique node number

Returns
unique node number

◆ getOperands()

List<Operand> cz.muni.stanse.codestructures.CFGNode.getOperands ( )
inline

◆ getOptPredecessors()

List<CFGNode> cz.muni.stanse.codestructures.CFGNode.getOptPredecessors ( )
inline

Get all predecessors of the node

Returns
(read only) set of this node's predecessors

◆ getOptSuccessors()

List<CFGNode> cz.muni.stanse.codestructures.CFGNode.getOptSuccessors ( )
inline

Get all successors of the node

Returns
(read only) set of this node's successors

◆ getPredecessors()

List<CFGNode> cz.muni.stanse.codestructures.CFGNode.getPredecessors ( )
inline

Get all predecessors of the node

Returns
(read only) set of this node's predecessors

◆ getSuccessors()

List<CFGNode> cz.muni.stanse.codestructures.CFGNode.getSuccessors ( )
inline

Get all successors of the node

Returns
(read only) set of this node's successors

◆ hashCode()

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

◆ hasLocation()

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

◆ isVisible()

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

◆ removeSucc()

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

◆ replaceEdge()

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

◆ replaceOptEdge()

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

◆ setLocation()

void cz.muni.stanse.codestructures.CFGNode.setLocation ( File  file,
int  line,
int  column 
)
inline

◆ setNodeType()

void cz.muni.stanse.codestructures.CFGNode.setNodeType ( String  nodeType)
inline

◆ setOperands()

void cz.muni.stanse.codestructures.CFGNode.setOperands ( List< Operand >  operands)
inline

◆ setVisible()

void cz.muni.stanse.codestructures.CFGNode.setVisible ( boolean  value)
inline

◆ toString()

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

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