Mercurial > hg > truffle
diff graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/InstrumentationTestNodes.java @ 20910:0b2e4d40b683
Truffle/Instrumentation: test code renaming and cleanup for the new kind of instrument, now known as a SpliceInstrument.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Mon, 13 Apr 2015 16:19:41 -0700 |
parents | 2e3cc2a27711 |
children | 78a4b44420cf |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/InstrumentationTestNodes.java Mon Apr 13 15:33:45 2015 -0700 +++ b/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/InstrumentationTestNodes.java Mon Apr 13 16:19:41 2015 -0700 @@ -86,7 +86,6 @@ public Object execute(VirtualFrame vFrame) { probeNode.enter(child, vFrame); Object result; - try { result = child.execute(vFrame); probeNode.returnValue(child, vFrame, result); @@ -96,7 +95,6 @@ probeNode.returnExceptional(child, vFrame, e); throw (e); } - return result; } } @@ -169,4 +167,17 @@ } } + static class TestSplicedCounterNode extends SplicedNode { + + private long count; + + @Override + public void enter(Node node, VirtualFrame vFrame) { + count++; + } + + public long getCount() { + return count; + } + } }