Mercurial > hg > truffle
diff truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/processor/LanguageRegistrationTest.java @ 22046:e7c2d36daf72
TruffleLanguage.parse method to convert a source to CallTarget. Basic caching to make sure the code is shared among tenants in one JVM.
author | Jaroslav Tulach <jaroslav.tulach@oracle.com> |
---|---|
date | Thu, 30 Jul 2015 17:36:34 +0200 |
parents | 9c8c0937da41 |
children | 78c3d3d8d86e |
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/processor/LanguageRegistrationTest.java Thu Jul 30 17:16:59 2015 +0200 +++ b/truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/processor/LanguageRegistrationTest.java Thu Jul 30 17:36:34 2015 +0200 @@ -28,6 +28,7 @@ import com.oracle.truffle.api.debug.*; import com.oracle.truffle.api.dsl.test.*; import com.oracle.truffle.api.instrument.*; +import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.source.*; public class LanguageRegistrationTest { @@ -55,8 +56,8 @@ } @Override - protected Object eval(Source code) throws IOException { - return null; + protected CallTarget parse(Source code, Node context, String... argumentNames) throws IOException { + throw new IOException(); } @Override @@ -94,8 +95,8 @@ } @Override - protected Object eval(Source code) throws IOException { - return null; + protected CallTarget parse(Source code, Node context, String... argumentNames) throws IOException { + throw new IOException(); } @Override @@ -132,11 +133,6 @@ } @Override - protected Object eval(Source code) throws IOException { - return null; - } - - @Override protected Object findExportedSymbol(String globalName, boolean onlyExplicit) { return null; } @@ -161,5 +157,10 @@ return null; } + @Override + protected CallTarget parse(Source code, Node context, String... argumentNames) throws IOException { + throw new IOException(); + } + } }