comparison truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java @ 22165:67f75f61c974

Certain languages (like FastR) prefer access to raw byte streams. Offering it. One always has an option to wrap Input and Output Streams into character based Readers and Writers
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Mon, 21 Sep 2015 12:36:30 +0200
parents dc83cc1f94f2
children 0bcfe8c6088f 526de3af756d
comparison
equal deleted inserted replaced
22164:567d324c306c 22165:67f75f61c974
206 206
207 public static final SLLanguage INSTANCE = new SLLanguage(); 207 public static final SLLanguage INSTANCE = new SLLanguage();
208 208
209 @Override 209 @Override
210 protected SLContext createContext(Env env) { 210 protected SLContext createContext(Env env) {
211 SLContext context = new SLContext(this, new BufferedReader(env.stdIn()), new PrintWriter(env.stdOut(), true)); 211 final BufferedReader in = new BufferedReader(new InputStreamReader(env.in()));
212 final PrintWriter out = new PrintWriter(env.out(), true);
213 SLContext context = new SLContext(this, in, out);
212 for (NodeFactory<? extends SLBuiltinNode> builtin : builtins) { 214 for (NodeFactory<? extends SLBuiltinNode> builtin : builtins) {
213 context.installBuiltin(builtin, true); 215 context.installBuiltin(builtin, true);
214 } 216 }
215 return context; 217 return context;
216 } 218 }