public class VerifyCFG extends TreeVisitor
FORWARD, REVERSE| Constructor and Description |
|---|
VerifyCFG()
Constructor.
|
VerifyCFG(boolean checkValueNumbers)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
visitBlock(Block block)
First make sure that the Block indeed is in the CFG.
|
void |
visitDefExpr(DefExpr expr)
Keep track of all the uses of the expression defined by the
DefExpr.
|
void |
visitExpr(Expr expr)
If desired, make sure that the value number of the Expr is not
-1.
|
void |
visitFlowGraph(FlowGraph cfg)
Visit the blocks and expression trees in a control flow graph.
|
void |
visitGotoStmt(GotoStmt stmt)
Make sure that the target of goto is valid.
|
void |
visitIfStmt(IfStmt stmt)
Make sure that the targets of the if statement are valid.
|
void |
visitJsrStmt(JsrStmt stmt)
Make sure that all of the targets of the jsr are valid.
|
void |
visitNode(Node node)
Make sure that the Node resides in the block that we expect it
to and that it has the expected parent expression tree Node.
|
void |
visitRetStmt(RetStmt stmt)
Make sure that all of targets of the ret are valid.
|
void |
visitStoreExpr(StoreExpr node)
If desired, makes sure that the store expression's value number is not
-1.
|
void |
visitSwitchStmt(SwitchStmt stmt)
Make sure that that all of the targets of the switch are valid.
|
void |
visitVarExpr(VarExpr expr)
Make sure that the VarExpr either defines a local variable, is
defined by another expression, or is the child of a PhiStmt
(therefore making the VarExpr a phi-variable).
|
direction, forward, prune, reverse, setPrune, visitAddressStoreStmt, visitArithExpr, visitArrayLengthExpr, visitArrayRefExpr, visitCallExpr, visitCallMethodExpr, visitCallStaticExpr, visitCastExpr, visitCatchExpr, visitCheckExpr, visitConstantExpr, visitExprStmt, visitFieldExpr, visitIfCmpStmt, visitIfZeroStmt, visitInitStmt, visitInstanceOfExpr, visitLabelStmt, visitLocalExpr, visitMemExpr, visitMemRefExpr, visitMonitorStmt, visitNegExpr, visitNewArrayExpr, visitNewExpr, visitNewMultiArrayExpr, visitPhiCatchStmt, visitPhiJoinStmt, visitPhiStmt, visitRCExpr, visitReturnAddressExpr, visitReturnExprStmt, visitReturnStmt, visitSCStmt, visitShiftExpr, visitSRStmt, visitStackExpr, visitStackManipStmt, visitStaticFieldExpr, visitStmt, visitThrowStmt, visitTree, visitUCExpr, visitZeroCheckExprpublic VerifyCFG()
public VerifyCFG(boolean checkValueNumbers)
checkValueNumbers - Are the value numbers of expressions checked?public void visitFlowGraph(FlowGraph cfg)
visitFlowGraph in class TreeVisitorpublic void visitBlock(Block block)
visitBlock in class TreeVisitorpublic void visitRetStmt(RetStmt stmt)
visitRetStmt in class TreeVisitorpublic void visitJsrStmt(JsrStmt stmt)
visitJsrStmt in class TreeVisitorpublic void visitSwitchStmt(SwitchStmt stmt)
visitSwitchStmt in class TreeVisitorpublic void visitIfStmt(IfStmt stmt)
visitIfStmt in class TreeVisitorpublic void visitGotoStmt(GotoStmt stmt)
visitGotoStmt in class TreeVisitorpublic void visitStoreExpr(StoreExpr node)
visitStoreExpr in class TreeVisitorpublic void visitNode(Node node)
visitNode in class TreeVisitorpublic void visitExpr(Expr expr)
visitExpr in class TreeVisitorpublic void visitDefExpr(DefExpr expr)
visitDefExpr in class TreeVisitorpublic void visitVarExpr(VarExpr expr)
visitVarExpr in class TreeVisitor