class documentation
A node in a control flow graph.
Corresponds to a single Instruction contained in a single BasicBlock.
Method | __init__ |
Undocumented |
Method | get |
Returns the branch options available at the end of this node. |
Method | get |
Gets the value of a label on the Instruction. |
Method | has |
Returns whether this Instruction has the specified label. |
Method | set |
Sets the value of a label on the Instruction. |
Instance Variable | block |
The BasicBlock in which this node's instruction resides. |
Instance Variable | graph |
The ControlFlowGraph which this node is a part of. |
Instance Variable | instruction |
The Instruction corresponding to this node. |
Instance Variable | labels |
Metadata attached to this node, for example for use by data flow analyses. |
Instance Variable | uuid |
A unique identifier for the ControlFlowNode. |
Property | branches |
Returns the branch options available at the end of this node. |
Property | next |
Returns the set of possible next instructions. |
Property | next |
Returns the set of possible next instructions. |
Property | prev |
Returns the set of possible previous instructions. |
Returns the branch options available at the end of this node.
Returns | |
A dictionary with possible keys True and False, and values given by the node that is reached by taking the True/False branch. An empty dictionary indicates that there are no branches to take, and so self.next gives the next node (in a set of size 1). A value of '<exit>' or '<raise>' indicates that taking that branch leads to the exit or raise block, since there are no exit ControlFlowNodes in a ControlFlowGraph. |
Returns the branch options available at the end of this node.
Returns | |
A dictionary with possible keys True and False, and values given by the node that is reached by taking the True/False branch. An empty dictionary indicates that there are no branches to take, and so self.next gives the next node (in a set of size 1). A value of None indicates that taking that branch leads to the exit, since there are no exit ControlFlowNodes in a ControlFlowGraph. |
Returns the set of possible next instructions.
This allows for taking exits from the middle (exceptions).