Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/examples/ExampleNode.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 |
comparison
equal
deleted
inserted
replaced
22002:324997830dc9 | 22003:5bc7f7b867ab |
---|---|
23 package com.oracle.truffle.api.dsl.test.examples; | 23 package com.oracle.truffle.api.dsl.test.examples; |
24 | 24 |
25 import com.oracle.truffle.api.*; | 25 import com.oracle.truffle.api.*; |
26 import com.oracle.truffle.api.dsl.*; | 26 import com.oracle.truffle.api.dsl.*; |
27 import com.oracle.truffle.api.dsl.internal.*; | 27 import com.oracle.truffle.api.dsl.internal.*; |
28 import com.oracle.truffle.api.dsl.test.TestingLanguage; | |
28 import com.oracle.truffle.api.frame.*; | 29 import com.oracle.truffle.api.frame.*; |
29 import com.oracle.truffle.api.nodes.*; | 30 import com.oracle.truffle.api.nodes.*; |
30 | 31 |
31 @TypeSystemReference(ExampleTypes.class) | 32 @TypeSystemReference(ExampleTypes.class) |
32 @NodeChild(value = "args", type = ExampleNode[].class) | 33 @NodeChild(value = "args", type = ExampleNode[].class) |
66 private static class ExampleRootNode extends RootNode { | 67 private static class ExampleRootNode extends RootNode { |
67 | 68 |
68 @Child ExampleNode child; | 69 @Child ExampleNode child; |
69 | 70 |
70 public ExampleRootNode(ExampleNode child) { | 71 public ExampleRootNode(ExampleNode child) { |
72 super(TestingLanguage.class, null, null); | |
71 this.child = child; | 73 this.child = child; |
72 } | 74 } |
73 | 75 |
74 @Override | 76 @Override |
75 public Object execute(VirtualFrame frame) { | 77 public Object execute(VirtualFrame frame) { |
103 private static class DummyCallRootNode extends RootNode { | 105 private static class DummyCallRootNode extends RootNode { |
104 | 106 |
105 private final int argumentIndex; | 107 private final int argumentIndex; |
106 | 108 |
107 public DummyCallRootNode(int argumentIndex) { | 109 public DummyCallRootNode(int argumentIndex) { |
110 super(TestingLanguage.class, null, null); | |
108 this.argumentIndex = argumentIndex; | 111 this.argumentIndex = argumentIndex; |
109 } | 112 } |
110 | 113 |
111 @Override | 114 @Override |
112 public Object execute(VirtualFrame frame) { | 115 public Object execute(VirtualFrame frame) { |