diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/ExecutionContext.java @ 15279:0c6d8a08e31b

Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Sun, 20 Apr 2014 20:37:27 -0700
parents 3f27e57439ed
children be0c151d912b
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/ExecutionContext.java	Thu Mar 27 16:38:39 2014 -0700
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/ExecutionContext.java	Sun Apr 20 20:37:27 2014 -0700
@@ -24,11 +24,12 @@
  */
 package com.oracle.truffle.api;
 
-import com.oracle.truffle.api.debug.*;
+import com.oracle.truffle.api.instrument.*;
 import com.oracle.truffle.api.source.*;
 
 /**
- * Information about the runtime context of a Truffle program.
+ * Access to information and basic services in the runtime context for a Truffle-implemented guest
+ * language.
  * <p>
  * <strong>Disclaimer:</strong> this interface is under development and will change.
  */
@@ -46,8 +47,20 @@
     SourceManager getSourceManager();
 
     /**
-     * Gets access to debugging services. Returns an inert instance if no services installed.
+     * Gets access to AST instrumentation services.
+     */
+    Instrumentation instrumentation();
+
+    /**
+     * Access to information visualization services for the specific language.
      */
-    DebugContext getDebugContext();
+    Visualizer visualizer();
 
+    /**
+     * Add instrumentation to subsequently constructed Truffle ASTs for the guest language; every
+     * one added will have the opportunity to add instrumentation.
+     *
+     * @throws IllegalArgumentException if prober not usable for the guest language.
+     */
+    void addNodeProber(ASTNodeProber nodeProber);
 }