Class AstTranslator.IncipientCFG
java.lang.Object
com.ibm.wala.util.graph.AbstractGraph<AstTranslator.PreBasicBlock>
com.ibm.wala.util.graph.AbstractNumberedGraph<AstTranslator.PreBasicBlock>
com.ibm.wala.util.graph.impl.SparseNumberedGraph<AstTranslator.PreBasicBlock>
com.ibm.wala.cast.ir.translator.AstTranslator.IncipientCFG
- All Implemented Interfaces:
EdgeManager<AstTranslator.PreBasicBlock>
,Graph<AstTranslator.PreBasicBlock>
,NodeManager<AstTranslator.PreBasicBlock>
,NumberedEdgeManager<AstTranslator.PreBasicBlock>
,NumberedGraph<AstTranslator.PreBasicBlock>
,NumberedNodeManager<AstTranslator.PreBasicBlock>
,Iterable<AstTranslator.PreBasicBlock>
- Enclosing class:
AstTranslator
public final class AstTranslator.IncipientCFG
extends SparseNumberedGraph<AstTranslator.PreBasicBlock>
holds the control-flow graph as it is being constructed. When construction is complete,
information is stored in an
AstTranslator.AstCFG
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
addPreEdge
(AstTranslator.PreBasicBlock src, CAstNode dst, boolean exception) if dst is associated with a basic block b, add an edge from src to b.void
addPreEdge
(CAstNode src, CAstNode dst, boolean exception) void
addPreEdgeToExit
(AstTranslator.PreBasicBlock src, boolean exception) void
addPreEdgeToExit
(CAstNode src, boolean exception) void
void
addPreNode
(CAstNode n, AstTranslator.UnwindState context) associate n with the current block, and update the current unwind stateint
boolean
newBlock
(boolean fallThruFromPrior) create a new basic block, and set it as the current block.void
noteOperands
(int instruction, CAstSourcePositionMap.Position... operands) void
toString()
void
Methods inherited from class com.ibm.wala.util.graph.impl.SparseNumberedGraph
getEdgeManager, getNodeManager
Methods inherited from class com.ibm.wala.util.graph.AbstractNumberedGraph
getMaxNumber, getNode, getNumber, getPredNodeNumbers, getSuccNodeNumbers, iterateNodes
Methods inherited from class com.ibm.wala.util.graph.AbstractGraph
addNode, containsNode, edgeString, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, nodeString, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, stream
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.ibm.wala.util.graph.EdgeManager
getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdges
Methods inherited from interface com.ibm.wala.util.graph.Graph
removeNodeAndEdges
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface com.ibm.wala.util.graph.NodeManager
addNode, containsNode, getNumberOfNodes, iterator, removeNode, stream
-
Constructor Details
-
IncipientCFG
public IncipientCFG()
-
-
Method Details
-
getCurrentInstruction
public int getCurrentInstruction() -
getCurrentBlock
-
newBlock
create a new basic block, and set it as the current block.- Parameters:
fallThruFromPrior
- should a fall-through edge be added from the previous block (value of currentBlock at entry)? if false, the newly created block is marked as a dead block, as it has no incoming edges.- Returns:
- the new block
-
setCurrentBlockAsHandler
public void setCurrentBlockAsHandler() -
addPreNode
-
addPreNode
associate n with the current block, and update the current unwind state -
addPreEdge
-
addPreEdge
if dst is associated with a basic block b, add an edge from src to b. otherwise, record the edge addition as delayed. -
addPreEdgeToExit
-
addPreEdgeToExit
-
addEdge
- Specified by:
addEdge
in interfaceEdgeManager<AstTranslator.PreBasicBlock>
- Overrides:
addEdge
in classAbstractGraph<AstTranslator.PreBasicBlock>
- See Also:
-
isDeadBlock
-
getBlock
-
noteOperands
-
unknownInstructions
-
addInstruction
-
toString
- Overrides:
toString
in classAbstractGraph<AstTranslator.PreBasicBlock>
-
getOperandPositionMap
-