comparison truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/instrument/InstrumentationTestNodes.java @ 22003:5bc7f7b867ab

Making debugger always on for each TruffleVM execution. Introducing EventConsumer to process such debugger events. Requesting each RootNode to be associated with a TruffleLanguage, so debugger can find out proper context for each Node where executions gets suspended.
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Sat, 18 Jul 2015 18:03:36 +0200
parents 9c8c0937da41
children dc83cc1f94f2 3aad794eec0e
comparison
equal deleted inserted replaced
22002:324997830dc9 22003:5bc7f7b867ab
25 import com.oracle.truffle.api.*; 25 import com.oracle.truffle.api.*;
26 import com.oracle.truffle.api.frame.*; 26 import com.oracle.truffle.api.frame.*;
27 import com.oracle.truffle.api.instrument.*; 27 import com.oracle.truffle.api.instrument.*;
28 import com.oracle.truffle.api.instrument.ProbeNode.WrapperNode; 28 import com.oracle.truffle.api.instrument.ProbeNode.WrapperNode;
29 import com.oracle.truffle.api.nodes.*; 29 import com.oracle.truffle.api.nodes.*;
30 import com.oracle.truffle.api.test.TestingLanguage;
30 31
31 /** 32 /**
32 * Tests instrumentation where a client can attach a node that gets attached into the AST. 33 * Tests instrumentation where a client can attach a node that gets attached into the AST.
33 */ 34 */
34 class InstrumentationTestNodes { 35 class InstrumentationTestNodes {
145 * This constructor emulates the global machinery that applies registered probers to every 146 * This constructor emulates the global machinery that applies registered probers to every
146 * newly created AST. Global registry is not used, since that would interfere with other 147 * newly created AST. Global registry is not used, since that would interfere with other
147 * tests run in the same environment. 148 * tests run in the same environment.
148 */ 149 */
149 public TestRootNode(TestLanguageNode body) { 150 public TestRootNode(TestLanguageNode body) {
150 super(null); 151 super(TestingLanguage.class, null, null);
151 this.body = body; 152 this.body = body;
152 } 153 }
153 154
154 @Override 155 @Override
155 public Object execute(VirtualFrame vFrame) { 156 public Object execute(VirtualFrame vFrame) {