diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/instrument/SLInstrumenter.java @ 16958:997899955e72

Instrumentation: removed ExecutionContext parameter from probe method in Instrumentable SL/Instrumentation: SLRootNode's now store SLContext. New method added to SLStatementNode to find the root node and get its SLContext
author David Piorkowski <david.piorkowski@oracle.com>
date Tue, 26 Aug 2014 11:00:30 -0700
parents 54696f15ac93
children f0c3de09f12a
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/instrument/SLInstrumenter.java	Tue Aug 26 09:35:08 2014 -0700
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/instrument/SLInstrumenter.java	Tue Aug 26 11:00:30 2014 -0700
@@ -29,7 +29,6 @@
 import com.oracle.truffle.sl.nodes.*;
 import com.oracle.truffle.sl.nodes.controlflow.*;
 import com.oracle.truffle.sl.nodes.local.*;
-import com.oracle.truffle.sl.runtime.*;
 
 /**
  * This is a general purpose visitor which traverses a completely parsed Simple AST and instruments
@@ -39,10 +38,7 @@
  */
 public class SLInstrumenter implements NodeVisitor {
 
-    private final SLContext context;
-
-    public SLInstrumenter(SLContext context) {
-        this.context = context;
+    public SLInstrumenter() {
     }
 
     /**
@@ -57,7 +53,7 @@
         if (node instanceof SLExpressionNode && node.getParent() != null) {
             SLExpressionNode expressionNode = (SLExpressionNode) node;
             if (expressionNode.getSourceSection() != null) {
-                Probe probe = expressionNode.probe(context);
+                Probe probe = expressionNode.probe();
                 // probe.tagAs(STATEMENT);
 
                 if (node instanceof SLWriteLocalVariableNode)
@@ -67,7 +63,7 @@
 
             SLStatementNode statementNode = (SLStatementNode) node;
             if (statementNode.getSourceSection() != null) {
-                Probe probe = statementNode.probe(context);
+                Probe probe = statementNode.probe();
                 probe.tagAs(STATEMENT);
 
                 if (node instanceof SLWhileNode)