comparison truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/processor/LanguageRegistrationTest.java @ 22219:1c0f490984d5

Merge with f47b601edbc626dcfe8b3636933b4834c89f7779
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Wed, 16 Sep 2015 15:36:22 -0700
parents dc83cc1f94f2 d3bdaa91bc82
children 20380d1d41f2
comparison
equal deleted inserted replaced
22160:0599e2df6a9f 22219:1c0f490984d5
20 * or visit www.oracle.com if you need additional information or have any 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 */ 22 */
23 package com.oracle.truffle.api.dsl.test.processor; 23 package com.oracle.truffle.api.dsl.test.processor;
24 24
25 import java.io.IOException;
26
25 import com.oracle.truffle.api.CallTarget; 27 import com.oracle.truffle.api.CallTarget;
26 import com.oracle.truffle.api.TruffleLanguage; 28 import com.oracle.truffle.api.TruffleLanguage;
27 import com.oracle.truffle.api.debug.DebugSupportProvider; 29 import com.oracle.truffle.api.debug.DebugSupportProvider;
28 import com.oracle.truffle.api.dsl.test.ExpectError; 30 import com.oracle.truffle.api.dsl.test.ExpectError;
31 import com.oracle.truffle.api.frame.MaterializedFrame;
32 import com.oracle.truffle.api.instrument.ASTProber;
33 import com.oracle.truffle.api.instrument.AdvancedInstrumentResultListener;
34 import com.oracle.truffle.api.instrument.AdvancedInstrumentRootFactory;
29 import com.oracle.truffle.api.instrument.ToolSupportProvider; 35 import com.oracle.truffle.api.instrument.ToolSupportProvider;
36 import com.oracle.truffle.api.instrument.Visualizer;
30 import com.oracle.truffle.api.nodes.Node; 37 import com.oracle.truffle.api.nodes.Node;
31 import com.oracle.truffle.api.source.Source; 38 import com.oracle.truffle.api.source.Source;
32 import java.io.IOException;
33 39
34 public class LanguageRegistrationTest { 40 public class LanguageRegistrationTest {
35 41
36 @ExpectError("Registered language class must be public") 42 @ExpectError("Registered language class must be public")
37 @TruffleLanguage.Registration(name = "myLang", version = "0", mimeType = "text/x-my") 43 @TruffleLanguage.Registration(name = "myLang", version = "0", mimeType = "text/x-my")
74 protected boolean isObjectOfLanguage(Object object) { 80 protected boolean isObjectOfLanguage(Object object) {
75 return false; 81 return false;
76 } 82 }
77 83
78 @Override 84 @Override
85 protected Visualizer getVisualizer() {
86 return null;
87 }
88
89 @Override
90 protected ASTProber getDefaultASTProber() {
91 return null;
92 }
93
94 @Override
95 protected Object evalInContext(Source source, Node node, MaterializedFrame mFrame) throws IOException {
96 return null;
97 }
98
99 @Override
100 protected AdvancedInstrumentRootFactory createAdvancedInstrumentRootFactory(String expr, AdvancedInstrumentResultListener resultListener) throws IOException {
101 return null;
102 }
103
104 @SuppressWarnings("deprecation")
105 @Override
79 protected ToolSupportProvider getToolSupport() { 106 protected ToolSupportProvider getToolSupport() {
80 return null; 107 throw new UnsupportedOperationException();
81 } 108 }
82 109
110 @SuppressWarnings("deprecation")
83 @Override 111 @Override
84 protected DebugSupportProvider getDebugSupport() { 112 protected DebugSupportProvider getDebugSupport() {
85 return null; 113 throw new UnsupportedOperationException();
114 }
115
116 @SuppressWarnings("deprecation")
117 @Override
118 protected void enableASTProbing(ASTProber astProber) {
119 throw new UnsupportedOperationException();
86 } 120 }
87 121
88 @Override 122 @Override
89 protected Object createContext(Env env) { 123 protected Object createContext(Env env) {
90 throw new UnsupportedOperationException(); 124 throw new UnsupportedOperationException();
118 protected boolean isObjectOfLanguage(Object object) { 152 protected boolean isObjectOfLanguage(Object object) {
119 return false; 153 return false;
120 } 154 }
121 155
122 @Override 156 @Override
157 protected Visualizer getVisualizer() {
158 return null;
159 }
160
161 @Override
162 protected ASTProber getDefaultASTProber() {
163 return null;
164 }
165
166 @Override
167 protected Object evalInContext(Source source, Node node, MaterializedFrame mFrame) throws IOException {
168 return null;
169 }
170
171 @Override
172 protected AdvancedInstrumentRootFactory createAdvancedInstrumentRootFactory(String expr, AdvancedInstrumentResultListener resultListener) throws IOException {
173 return null;
174 }
175
176 @SuppressWarnings("deprecation")
177 @Override
123 protected ToolSupportProvider getToolSupport() { 178 protected ToolSupportProvider getToolSupport() {
124 return null; 179 throw new UnsupportedOperationException();
125 } 180 }
126 181
182 @SuppressWarnings("deprecation")
127 @Override 183 @Override
128 protected DebugSupportProvider getDebugSupport() { 184 protected DebugSupportProvider getDebugSupport() {
129 return null; 185 throw new UnsupportedOperationException();
186 }
187
188 @SuppressWarnings("deprecation")
189 @Override
190 protected void enableASTProbing(ASTProber astProber) {
191 throw new UnsupportedOperationException();
130 } 192 }
131 193
132 @Override 194 @Override
133 protected Object createContext(Env env) { 195 protected Object createContext(Env env) {
134 throw new UnsupportedOperationException(); 196 throw new UnsupportedOperationException();
158 protected boolean isObjectOfLanguage(Object object) { 220 protected boolean isObjectOfLanguage(Object object) {
159 return false; 221 return false;
160 } 222 }
161 223
162 @Override 224 @Override
225 protected Visualizer getVisualizer() {
226 return null;
227 }
228
229 @Override
230 protected ASTProber getDefaultASTProber() {
231 return null;
232 }
233
234 @Override
235 protected Object evalInContext(Source source, Node node, MaterializedFrame mFrame) throws IOException {
236 return null;
237 }
238
239 @Override
240 protected AdvancedInstrumentRootFactory createAdvancedInstrumentRootFactory(String expr, AdvancedInstrumentResultListener resultListener) throws IOException {
241 return null;
242 }
243
244 @SuppressWarnings("deprecation")
245 @Override
163 protected ToolSupportProvider getToolSupport() { 246 protected ToolSupportProvider getToolSupport() {
164 return null; 247 throw new UnsupportedOperationException();
165 } 248 }
166 249
250 @SuppressWarnings("deprecation")
167 @Override 251 @Override
168 protected DebugSupportProvider getDebugSupport() { 252 protected DebugSupportProvider getDebugSupport() {
169 return null; 253 throw new UnsupportedOperationException();
254 }
255
256 @SuppressWarnings("deprecation")
257 @Override
258 protected void enableASTProbing(ASTProber astProber) {
259 throw new UnsupportedOperationException();
170 } 260 }
171 261
172 @Override 262 @Override
173 protected CallTarget parse(Source code, Node context, String... argumentNames) throws IOException { 263 protected CallTarget parse(Source code, Node context, String... argumentNames) throws IOException {
174 throw new IOException(); 264 throw new IOException();