@Test public void switch_with_case_using_same_block_as_default() throws Exception { ControlFlowGraph g = build("switch(b0) { case b1: default: b2; break; case b3: b4; }", 5); assertBlock(g, 0).hasElements("b0").hasSuccessors(1); assertBlock(g, 1).hasElements("b1").hasSuccessors(2, 3); assertBlock(g, 2).hasElements("b2", "break;").hasSuccessors(END); assertBlock(g, 3).hasElements("b3").hasSuccessors(4, 2); assertBlock(g, 4).hasElements("b4").hasSuccessors(END); }
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);  }