@Test public void switch_with_no_break() throws Exception { ControlFlowGraph g = build("b0; switch(b0b) { case b1: b2; case b3: b4; default: b5; }", 6); assertBlock(g, 0).hasSuccessors(1).hasElements("b0", "b0b"); assertBlock(g, 1).hasSuccessors(2, 3).hasElements("b1").hasBranchingTree(Kind.CASE_CLAUSE); assertBlock(g, 2).hasSuccessors(4).hasElements("b2"); assertBlock(g, 3).hasSuccessors(4, 5).hasElements("b3").hasBranchingTree(Kind.CASE_CLAUSE); assertBlock(g, 4).hasSuccessors(5).hasElements("b4"); assertBlock(g, 5).hasSuccessors(END).hasElements("b5"); }
public static ControlFlowGraph build(ScriptTree tree) { return new ControlFlowGraphBuilder().createGraph(tree); }
ControlFlowGraph { public static ControlFlowGraph build(ScriptTree tree) { return new ControlFlowGraphBuilder().createGraph(tree); } }
ControlFlowGraph { public static ControlFlowGraph build(ScriptTree tree) { return new ControlFlowGraphBuilder().createGraph(tree); } ControlFlowGraph(Set<JsCfgBlock> blocks, CfgBlock start, JsCfgEndBlock end); }
ControlFlowGraph { public static ControlFlowGraph build(ScriptTree tree) { return new ControlFlowGraphBuilder().createGraph(tree); } ControlFlowGraph(Set<JsCfgBlock> blocks, CfgBlock start, JsCfgEndBlock end); static ControlFlowGraph build(ScriptTree tree); static ControlFlowGraph build(BlockTree body); CfgBlock start(); CfgBlock end(); Set<CfgBlock> blocks(); Set<CfgBlock> unreachableBlocks(); Set<SyntaxToken> disconnectingJumps(CfgBlock block); }
ControlFlowGraph { public static ControlFlowGraph build(ScriptTree tree) { return new ControlFlowGraphBuilder().createGraph(tree); } ControlFlowGraph(Set<JsCfgBlock> blocks, CfgBlock start, JsCfgEndBlock end); static ControlFlowGraph build(ScriptTree tree); static ControlFlowGraph build(BlockTree body); CfgBlock start(); CfgBlock end(); Set<CfgBlock> blocks(); Set<CfgBlock> unreachableBlocks(); Set<SyntaxToken> disconnectingJumps(CfgBlock block);  }