# HG changeset patch # User Jaroslav Tulach # Date 1442921624 -7200 # Node ID f8f790fc01da8161c626405fc10421e47cc8fa80 # Parent 396c1d17a11a6f9def81cfb53d192be4b02ea994 More compatibility for users of REPL infrastructure: Keep the TruffleVM return type for now. Offer engine() replacement for those who want to migrate to non-deprecated API. diff -r 396c1d17a11a -r f8f790fc01da truffle/com.oracle.truffle.sl.tools/src/com/oracle/truffle/sl/tools/debug/SLREPLHandler.java --- a/truffle/com.oracle.truffle.sl.tools/src/com/oracle/truffle/sl/tools/debug/SLREPLHandler.java Tue Sep 22 13:06:21 2015 +0200 +++ b/truffle/com.oracle.truffle.sl.tools/src/com/oracle/truffle/sl/tools/debug/SLREPLHandler.java Tue Sep 22 13:33:44 2015 +0200 @@ -128,7 +128,7 @@ if (!file.canRead()) { return finishReplyFailed(reply, "can't find file \"" + fileName + "\""); } - final PolyglotEngine vm = serverContext.vm(); + final PolyglotEngine vm = serverContext.engine(); vm.eval(Source.fromFileName(file.getPath())); PolyglotEngine.Value main = vm.findGlobalSymbol("main"); if (main != null) { diff -r 396c1d17a11a -r f8f790fc01da truffle/com.oracle.truffle.sl.tools/src/com/oracle/truffle/sl/tools/debug/SLREPLServer.java --- a/truffle/com.oracle.truffle.sl.tools/src/com/oracle/truffle/sl/tools/debug/SLREPLServer.java Tue Sep 22 13:06:21 2015 +0200 +++ b/truffle/com.oracle.truffle.sl.tools/src/com/oracle/truffle/sl/tools/debug/SLREPLServer.java Tue Sep 22 13:33:44 2015 +0200 @@ -215,8 +215,9 @@ } @Override - public PolyglotEngine vm() { - return vm; + @SuppressWarnings("deprecation") + public com.oracle.truffle.api.vm.TruffleVM vm() { + return (com.oracle.truffle.api.vm.TruffleVM) vm; } @Override diff -r 396c1d17a11a -r f8f790fc01da truffle/com.oracle.truffle.tools.debug.shell/src/com/oracle/truffle/tools/debug/shell/server/REPLServerContext.java --- a/truffle/com.oracle.truffle.tools.debug.shell/src/com/oracle/truffle/tools/debug/shell/server/REPLServerContext.java Tue Sep 22 13:06:21 2015 +0200 +++ b/truffle/com.oracle.truffle.tools.debug.shell/src/com/oracle/truffle/tools/debug/shell/server/REPLServerContext.java Tue Sep 22 13:33:44 2015 +0200 @@ -76,7 +76,16 @@ return new DefaultVisualizer(); } - public abstract PolyglotEngine vm(); + public PolyglotEngine engine() { + return vm(); + } + + /** + * @deprecated use {@link #engine()}. + */ + @SuppressWarnings("deprecation") + @Deprecated + public abstract com.oracle.truffle.api.vm.TruffleVM vm(); protected abstract Debugger db();