@Test public void object_binding_pattern() throws Exception { ControlFlowGraph g = build("var {prop1=1} = obj", 1); assertBlock(g, 0).hasElements("obj", "1", "prop1", "prop1=1", "{prop1=1}", "{prop1=1} = obj", "var {prop1=1} = obj"); g = build("let {prop1=1} = obj", 1); assertBlock(g, 0).hasElements("obj", "1", "prop1", "prop1=1", "{prop1=1}", "{prop1=1} = obj", "let {prop1=1} = obj"); g = build("var {prop1, prop2} = obj", 1); assertBlock(g, 0).hasElements("obj", "prop1", "prop2", "{prop1, prop2}", "{prop1, prop2} = obj", "var {prop1, prop2} = obj"); g = build("var {prop1, ...rest} = obj", 1); assertBlock(g, 0).hasElements("obj", "prop1", "rest", "...rest", "{prop1, ...rest}", "{prop1, ...rest} = obj", "var {prop1, ...rest} = obj"); g = build("var {prop1:p} = obj", 1); assertBlock(g, 0).hasElements("obj", "p", "prop1:p", "{prop1:p}", "{prop1:p} = obj", "var {prop1:p} = obj"); g = build("var {prop1:p=1} = obj", 1); assertBlock(g, 0).hasElements("obj", "1", "p", "p=1", "prop1:p=1", "{prop1:p=1}", "{prop1:p=1} = obj", "var {prop1:p=1} = obj"); }
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);  }