comparison truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java @ 22325:414e82b9fc35

Release 0.9 is out, let's remove deprecated elements from the API
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Fri, 23 Oct 2015 20:23:00 +0200
parents 260e3cdf11ec
children 906a5f6e07cc
comparison
equal deleted inserted replaced
22324:ad67d348e361 22325:414e82b9fc35
252 } 252 }
253 reportToolDemos(); 253 reportToolDemos();
254 } 254 }
255 255
256 /** 256 /**
257 * Temporary method during API evolution, supports debugger integration.
258 */
259 @Deprecated
260 public static void run(Source source) throws IOException {
261 PolyglotEngine vm = PolyglotEngine.buildNew().build();
262 assert vm.getLanguages().containsKey("application/x-sl");
263 vm.eval(source);
264 Value main = vm.findGlobalSymbol("main");
265 if (main == null) {
266 throw new SLException("No function main() defined in SL source file.");
267 }
268 main.invoke(null);
269 }
270
271 /**
272 * Parse and run the specified SL source. Factored out in a separate method so that it can also 257 * Parse and run the specified SL source. Factored out in a separate method so that it can also
273 * be used by the unit test harness. 258 * be used by the unit test harness.
274 */ 259 */
275 public static long run(PolyglotEngine context, Path path, PrintWriter logOutput, PrintWriter out, int repeats, List<NodeFactory<? extends SLBuiltinNode>> currentBuiltins) throws IOException { 260 public static long run(PolyglotEngine context, Path path, PrintWriter logOutput, PrintWriter out, int repeats, List<NodeFactory<? extends SLBuiltinNode>> currentBuiltins) throws IOException {
276 builtins = currentBuiltins; 261 builtins = currentBuiltins;