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
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidaddPreEdge(AstTranslator.PreBasicBlock src, CAstNode dst, boolean exception) if dst is associated with a basic block b, add an edge from src to b.voidaddPreEdge(CAstNode src, CAstNode dst, boolean exception) voidaddPreEdgeToExit(AstTranslator.PreBasicBlock src, boolean exception) voidaddPreEdgeToExit(CAstNode src, boolean exception) voidvoidaddPreNode(CAstNode n, AstTranslator.UnwindState context) associate n with the current block, and update the current unwind stateintbooleannewBlock(boolean fallThruFromPrior) create a new basic block, and set it as the current block.voidnoteOperands(int instruction, CAstSourcePositionMap.Position... operands) voidtoString()voidMethods inherited from class SparseNumberedGraph
getEdgeManager, getNodeManagerMethods inherited from class AbstractNumberedGraph
getMaxNumber, getNode, getNumber, getPredNodeNumbers, getSuccNodeNumbers, iterateNodesMethods inherited from class AbstractGraph
addNode, containsNode, edgeString, getNumberOfNodes, getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, iterator, nodeString, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeNode, removeNodeAndEdges, removeOutgoingEdges, streamMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface EdgeManager
getPredNodeCount, getPredNodes, getSuccNodeCount, getSuccNodes, hasEdge, removeAllIncidentEdges, removeEdge, removeIncomingEdges, removeOutgoingEdgesMethods inherited from interface Graph
removeNodeAndEdgesMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface 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:
addEdgein interfaceEdgeManager<AstTranslator.PreBasicBlock>- Overrides:
addEdgein classAbstractGraph<AstTranslator.PreBasicBlock>- See Also:
-
isDeadBlock
-
getBlock
-
noteOperands
-
unknownInstructions
-
addInstruction
-
toString
- Overrides:
toStringin classAbstractGraph<AstTranslator.PreBasicBlock>
-
getOperandPositionMap
-