Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/factory/SLContextFactory.java @ 18485:e3c95cbbb50c
Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Sun, 23 Nov 2014 16:07:23 -0800 |
parents | 7661cc464239 |
children | 286aef83a9a7 |
comparison
equal
deleted
inserted
replaced
18484:e97e1f07a3d6 | 18485:e3c95cbbb50c |
---|---|
28 import com.oracle.truffle.sl.runtime.*; | 28 import com.oracle.truffle.sl.runtime.*; |
29 | 29 |
30 public final class SLContextFactory { | 30 public final class SLContextFactory { |
31 | 31 |
32 private SLContextFactory() { | 32 private SLContextFactory() { |
33 | |
34 } | 33 } |
35 | 34 |
36 public static SLContext create() { | 35 public static SLContext create() { |
37 final SLContext slContext = new SLContext(new BufferedReader(new InputStreamReader(System.in)), System.out); | 36 return create(new BufferedReader(new InputStreamReader(System.in)), System.out); |
38 slContext.initialize(); | 37 } |
38 | |
39 public static SLContext create(BufferedReader input, PrintStream output) { | |
40 final SLContext slContext = new SLContext(input, output); | |
39 slContext.setVisualizer(new SLDefaultVisualizer()); | 41 slContext.setVisualizer(new SLDefaultVisualizer()); |
40 return slContext; | 42 return slContext; |
41 } | 43 } |
42 } | 44 } |