Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/SLExpressionNode.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 | 7661cc464239 |
children | f0c3de09f12a |
comparison
equal
deleted
inserted
replaced
16955:7ef0a2355540 | 16958:997899955e72 |
---|---|
22 */ | 22 */ |
23 package com.oracle.truffle.sl.nodes; | 23 package com.oracle.truffle.sl.nodes; |
24 | 24 |
25 import java.math.*; | 25 import java.math.*; |
26 | 26 |
27 import com.oracle.truffle.api.*; | |
28 import com.oracle.truffle.api.dsl.*; | 27 import com.oracle.truffle.api.dsl.*; |
29 import com.oracle.truffle.api.frame.*; | 28 import com.oracle.truffle.api.frame.*; |
30 import com.oracle.truffle.api.instrument.*; | 29 import com.oracle.truffle.api.instrument.*; |
31 import com.oracle.truffle.api.nodes.*; | 30 import com.oracle.truffle.api.nodes.*; |
32 import com.oracle.truffle.api.source.*; | 31 import com.oracle.truffle.api.source.*; |
90 public SLNull executeNull(VirtualFrame frame) throws UnexpectedResultException { | 89 public SLNull executeNull(VirtualFrame frame) throws UnexpectedResultException { |
91 return SLTypesGen.SLTYPES.expectSLNull(executeGeneric(frame)); | 90 return SLTypesGen.SLTYPES.expectSLNull(executeGeneric(frame)); |
92 } | 91 } |
93 | 92 |
94 @Override | 93 @Override |
95 public Probe probe(ExecutionContext context) { | 94 public Probe probe() { |
96 Node parent = getParent(); | 95 Node parent = getParent(); |
97 | 96 |
98 if (parent == null) | 97 if (parent == null) |
99 throw new IllegalStateException("Cannot probe a node without a parent"); | 98 throw new IllegalStateException("Cannot probe a node without a parent"); |
100 | 99 |
101 if (parent instanceof SLExpressionWrapper) | 100 if (parent instanceof SLExpressionWrapper) |
102 return ((SLExpressionWrapper) parent).getProbe(); | 101 return ((SLExpressionWrapper) parent).getProbe(); |
103 | 102 |
104 SLExpressionWrapper wrapper = new SLExpressionWrapper((SLContext) context, this); | 103 SLExpressionWrapper wrapper = new SLExpressionWrapper(getRootNodeSLContext(this), this); |
105 this.replace(wrapper); | 104 this.replace(wrapper); |
106 wrapper.insertChild(); | 105 wrapper.insertChild(); |
107 return wrapper.getProbe(); | 106 return wrapper.getProbe(); |
108 } | 107 } |
109 } | 108 } |