Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/TestingLanguage.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 | |
children | e7c2d36daf72 |
comparison
equal
deleted
inserted
replaced
22002:324997830dc9 | 22003:5bc7f7b867ab |
---|---|
1 /* | |
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. | |
8 * | |
9 * This code is distributed in the hope that it will be useful, but WITHOUT | |
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 * version 2 for more details (a copy is included in the LICENSE file that | |
13 * accompanied this code). | |
14 * | |
15 * You should have received a copy of the GNU General Public License version | |
16 * 2 along with this work; if not, write to the Free Software Foundation, | |
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 * | |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
20 * or visit www.oracle.com if you need additional information or have any | |
21 * questions. | |
22 */ | |
23 package com.oracle.truffle.api.dsl.test; | |
24 | |
25 import com.oracle.truffle.api.TruffleLanguage; | |
26 import com.oracle.truffle.api.debug.DebugSupportProvider; | |
27 import com.oracle.truffle.api.instrument.ToolSupportProvider; | |
28 import com.oracle.truffle.api.source.Source; | |
29 import java.io.IOException; | |
30 | |
31 public final class TestingLanguage extends TruffleLanguage { | |
32 public static final TruffleLanguage INSTANCE = new TestingLanguage(); | |
33 | |
34 private TestingLanguage() { | |
35 super(null); | |
36 } | |
37 | |
38 @Override | |
39 protected Object eval(Source code) throws IOException { | |
40 throw new IOException(); | |
41 } | |
42 | |
43 @Override | |
44 protected Object findExportedSymbol(String globalName, boolean onlyExplicit) { | |
45 return null; | |
46 } | |
47 | |
48 @Override | |
49 protected Object getLanguageGlobal() { | |
50 return null; | |
51 } | |
52 | |
53 @Override | |
54 protected boolean isObjectOfLanguage(Object object) { | |
55 return false; | |
56 } | |
57 | |
58 @Override | |
59 protected ToolSupportProvider getToolSupport() { | |
60 return null; | |
61 } | |
62 | |
63 @Override | |
64 protected DebugSupportProvider getDebugSupport() { | |
65 return null; | |
66 } | |
67 | |
68 } |