Search in sources :

Example 1 with SymbolFactory

use of org.eclipse.n4js.flowgraphs.dataflow.symbols.SymbolFactory 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);
    }
}
Also used : ClosableMeasurement(org.eclipse.n4js.smith.ClosableMeasurement) GraphVisitorAnalysis(org.eclipse.n4js.flowgraphs.analysis.GraphVisitorAnalysis) SuccessorPredecessorAnalysis(org.eclipse.n4js.flowgraphs.analysis.SuccessorPredecessorAnalysis) SymbolFactory(org.eclipse.n4js.flowgraphs.dataflow.symbols.SymbolFactory) DirectPathAnalyses(org.eclipse.n4js.flowgraphs.analysis.DirectPathAnalyses)

Aggregations

DirectPathAnalyses (org.eclipse.n4js.flowgraphs.analysis.DirectPathAnalyses)1 GraphVisitorAnalysis (org.eclipse.n4js.flowgraphs.analysis.GraphVisitorAnalysis)1 SuccessorPredecessorAnalysis (org.eclipse.n4js.flowgraphs.analysis.SuccessorPredecessorAnalysis)1 SymbolFactory (org.eclipse.n4js.flowgraphs.dataflow.symbols.SymbolFactory)1 ClosableMeasurement (org.eclipse.n4js.smith.ClosableMeasurement)1