use of org.eclipse.n4js.flowgraphs.analysis.DirectPathAnalyses in project n4js by eclipse.
the class N4JSFlowAnalyser method createGraphs.
/**
* Creates the control flow graphs for all {@link ControlFlowElement}s in the given {@link Script}.
* <p/>
* Never completes abruptly, i.e. throws an exception.
*/
public void createGraphs(Script script) {
Objects.requireNonNull(script);
String uriString = script.eResource().getURI().toString();
try (ClosableMeasurement m1 = dcFlowGraphs.getClosableMeasurement("flowGraphs_" + uriString);
ClosableMeasurement m2 = dcCreateGraph.getClosableMeasurement("createGraph_" + uriString)) {
symbolFactory = new SymbolFactory();
cfg = ControlFlowGraphFactory.build(script);
dpa = new DirectPathAnalyses(cfg);
gva = new GraphVisitorAnalysis(this, cfg);
spa = new SuccessorPredecessorAnalysis(cfg);
}
}
Aggregations