Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/runtime/SLContext.java @ 21469:286aef83a9a7
Replacing PrintStream with PrintWriter in the simple language
author | Jaroslav Tulach <jaroslav.tulach@oracle.com> |
---|---|
date | Fri, 22 May 2015 18:12:01 +0200 |
parents | 0ef23ff7d5a1 |
children | 2405d3b983cc |
comparison
equal
deleted
inserted
replaced
21468:99942eac9c6d | 21469:286aef83a9a7 |
---|---|
48 */ | 48 */ |
49 public final class SLContext extends ExecutionContext { | 49 public final class SLContext extends ExecutionContext { |
50 private static final Layout LAYOUT = Layout.createLayout(); | 50 private static final Layout LAYOUT = Layout.createLayout(); |
51 | 51 |
52 private final BufferedReader input; | 52 private final BufferedReader input; |
53 private final PrintStream output; | 53 private final PrintWriter output; |
54 private final SLFunctionRegistry functionRegistry; | 54 private final SLFunctionRegistry functionRegistry; |
55 private final Shape emptyShape; | 55 private final Shape emptyShape; |
56 | 56 |
57 public SLContext(BufferedReader input, PrintStream output) { | 57 public SLContext(BufferedReader input, PrintWriter output) { |
58 this.input = input; | 58 this.input = input; |
59 this.output = output; | 59 this.output = output; |
60 this.functionRegistry = new SLFunctionRegistry(); | 60 this.functionRegistry = new SLFunctionRegistry(); |
61 installBuiltins(); | 61 installBuiltins(); |
62 | 62 |
78 | 78 |
79 /** | 79 /** |
80 * The default default, i.e., the output for the {@link SLPrintlnBuiltin}. To allow unit | 80 * The default default, i.e., the output for the {@link SLPrintlnBuiltin}. To allow unit |
81 * testing, we do not use {@link System#out} directly. | 81 * testing, we do not use {@link System#out} directly. |
82 */ | 82 */ |
83 public PrintStream getOutput() { | 83 public PrintWriter getOutput() { |
84 return output; | 84 return output; |
85 } | 85 } |
86 | 86 |
87 /** | 87 /** |
88 * Returns the registry of all functions that are currently defined. | 88 * Returns the registry of all functions that are currently defined. |