# HG changeset patch # User Jaroslav Tulach # Date 1441269040 -7200 # Node ID ff7b5334d725c9cfd740d815b13f8b4e0cf4d90b # Parent 329fe954f6f221278954156f788379e1ff3048ed tools cannot be in Truffle API and thus SL cannot depend on tools right now diff -r 329fe954f6f2 -r ff7b5334d725 truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java --- a/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java Wed Sep 02 13:15:51 2015 +0200 +++ b/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java Thu Sep 03 10:30:40 2015 +0200 @@ -63,7 +63,6 @@ import com.oracle.truffle.sl.nodes.local.*; import com.oracle.truffle.sl.parser.*; import com.oracle.truffle.sl.runtime.*; -import com.oracle.truffle.tools.*; import java.nio.file.Path; /** @@ -182,9 +181,9 @@ private static boolean coverage = false; /* Small tools that can be installed for demonstration */ - private static NodeExecCounter nodeExecCounter = null; - private static NodeExecCounter statementExecCounter = null; - private static CoverageTracker coverageTracker = null; +// private static NodeExecCounter nodeExecCounter = null; +// private static NodeExecCounter statementExecCounter = null; +// private static CoverageTracker coverageTracker = null; /** * The main entry point. Use the mx command "mx sl" to run it with the correct class path setup. @@ -456,43 +455,43 @@ // TODO (mlvdv) remove the static hack when we no longer have the static demo variables private static void setupToolDemos() { - if (statementCounts || coverage) { - if (registeredASTProber == null) { - final ASTProber newProber = new SLStandardASTProber(); - // This should be registered on the TruffleVM - Probe.registerASTProber(newProber); - registeredASTProber = newProber; - } - } - if (nodeExecCounts) { - nodeExecCounter = new NodeExecCounter(); - nodeExecCounter.install(); - } - - if (statementCounts) { - statementExecCounter = new NodeExecCounter(StandardSyntaxTag.STATEMENT); - statementExecCounter.install(); - } - - if (coverage) { - coverageTracker = new CoverageTracker(); - coverageTracker.install(); - } +// if (statementCounts || coverage) { +// if (registeredASTProber == null) { +// final ASTProber newProber = new SLStandardASTProber(); +// // This should be registered on the TruffleVM +// Probe.registerASTProber(newProber); +// registeredASTProber = newProber; +// } +// } +// if (nodeExecCounts) { +// nodeExecCounter = new NodeExecCounter(); +// nodeExecCounter.install(); +// } +// +// if (statementCounts) { +// statementExecCounter = new NodeExecCounter(StandardSyntaxTag.STATEMENT); +// statementExecCounter.install(); +// } +// +// if (coverage) { +// coverageTracker = new CoverageTracker(); +// coverageTracker.install(); +// } } private static void reportToolDemos() { - if (nodeExecCounter != null) { - nodeExecCounter.print(System.out); - nodeExecCounter.dispose(); - } - if (statementExecCounter != null) { - statementExecCounter.print(System.out); - statementExecCounter.dispose(); - } - if (coverageTracker != null) { - coverageTracker.print(System.out); - coverageTracker.dispose(); - } +// if (nodeExecCounter != null) { +// nodeExecCounter.print(System.out); +// nodeExecCounter.dispose(); +// } +// if (statementExecCounter != null) { +// statementExecCounter.print(System.out); +// statementExecCounter.dispose(); +// } +// if (coverageTracker != null) { +// coverageTracker.print(System.out); +// coverageTracker.dispose(); +// } } public Node createFindContextNode0() {