changeset 22454:045c31f9f133

Truffle/SL: remove some obsolete/unworkable demo code from SLLanguage
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Wed, 11 Nov 2015 16:11:23 -0800
parents 3edc03012975
children 35daf21e71c3
files truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java
diffstat 1 files changed, 0 insertions(+), 53 deletions(-) [+]
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java	Wed Nov 11 16:10:49 2015 -0800
+++ b/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java	Wed Nov 11 16:11:23 2015 -0800
@@ -184,17 +184,6 @@
  * with the new version.
  * </ul>
  */
-
-/*
- * 
- * <p> <b>Tools:</b><br> The use of some of Truffle's support for developer tools (based on the
- * Truffle {@linkplain Instrumenter Instrumentation Framework}) are demonstrated in this file, for
- * example: <ul> <li>a {@linkplain NodeExecCounter counter for node executions}, tabulated by node
- * type; and</li> <li>a simple {@linkplain CoverageTracker code coverage engine}.</li> </ul> In each
- * case, the tool is enabled if a corresponding local boolean variable in this file is set to {@code
- * true}. Results are printed at the end of the execution using each tool's <em>default
- * printer</em>.
- */
 @TruffleLanguage.Registration(name = "SL", version = "0.5", mimeType = "application/x-sl")
 public final class SLLanguage extends TruffleLanguage<SLContext> {
     public static final String builtinKind = "SL builtin";
@@ -218,11 +207,6 @@
         return context;
     }
 
-    /* Small tools that can be installed for demonstration */
-    // 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.
      */
@@ -230,8 +214,6 @@
         PolyglotEngine vm = PolyglotEngine.newBuilder().build();
         assert vm.getLanguages().containsKey("application/x-sl");
 
-        setupToolDemos();
-
         int repeats = 1;
         if (args.length >= 2) {
             repeats = Integer.parseInt(args[1]);
@@ -251,7 +233,6 @@
         while (repeats-- > 0) {
             main.invoke(null);
         }
-        reportToolDemos();
     }
 
     /**
@@ -501,38 +482,4 @@
     public SLContext findContext0(Node contextNode) {
         return findContext(contextNode);
     }
-
-    // TODO (mlvdv) remove the static hack when we no longer have the static demo variables
-    private static void setupToolDemos() {
-        // 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();
-        // }
-    }
-
 }