Mercurial > hg > truffle
comparison truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/TestingLanguage.java @ 22424:fec62e298245
Rename package truffle.api.test to truffle.api to enable package-protected API access for testing.
author | Christian Humer <christian.humer@oracle.com> |
---|---|
date | Wed, 02 Dec 2015 15:16:27 +0100 |
parents | truffle/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/TestingLanguage.java@260e3cdf11ec |
children | b39b603e2a1e |
comparison
equal
deleted
inserted
replaced
22423:70a10a9f28ad | 22424:fec62e298245 |
---|---|
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; | |
24 | |
25 import java.io.IOException; | |
26 | |
27 import com.oracle.truffle.api.CallTarget; | |
28 import com.oracle.truffle.api.TruffleLanguage; | |
29 import com.oracle.truffle.api.frame.MaterializedFrame; | |
30 import com.oracle.truffle.api.instrument.Visualizer; | |
31 import com.oracle.truffle.api.instrument.WrapperNode; | |
32 import com.oracle.truffle.api.nodes.Node; | |
33 import com.oracle.truffle.api.source.Source; | |
34 | |
35 public final class TestingLanguage extends TruffleLanguage<Object> { | |
36 public static final TestingLanguage INSTANCE = new TestingLanguage(); | |
37 | |
38 private TestingLanguage() { | |
39 } | |
40 | |
41 @Override | |
42 protected CallTarget parse(Source code, Node context, String... argumentNames) throws IOException { | |
43 throw new IOException(); | |
44 } | |
45 | |
46 @Override | |
47 protected Object findExportedSymbol(Object context, String globalName, boolean onlyExplicit) { | |
48 return null; | |
49 } | |
50 | |
51 @Override | |
52 protected Object getLanguageGlobal(Object context) { | |
53 return null; | |
54 } | |
55 | |
56 @Override | |
57 protected boolean isObjectOfLanguage(Object object) { | |
58 return false; | |
59 } | |
60 | |
61 @Override | |
62 protected Visualizer getVisualizer() { | |
63 return null; | |
64 } | |
65 | |
66 @Override | |
67 protected boolean isInstrumentable(Node node) { | |
68 return false; | |
69 } | |
70 | |
71 @Override | |
72 protected WrapperNode createWrapperNode(Node node) { | |
73 return null; | |
74 } | |
75 | |
76 @Override | |
77 protected Object evalInContext(Source source, Node node, MaterializedFrame mFrame) throws IOException { | |
78 return null; | |
79 } | |
80 | |
81 @Override | |
82 protected Object createContext(Env env) { | |
83 return null; | |
84 } | |
85 | |
86 } |