Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java Mon Sep 21 11:30:33 2015 +0200 +++ b/truffle/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLLanguage.java Mon Sep 21 12:36:30 2015 +0200 @@ -208,7 +208,9 @@ @Override protected SLContext createContext(Env env) { - SLContext context = new SLContext(this, new BufferedReader(env.stdIn()), new PrintWriter(env.stdOut(), true)); + final BufferedReader in = new BufferedReader(new InputStreamReader(env.in())); + final PrintWriter out = new PrintWriter(env.out(), true); + SLContext context = new SLContext(this, in, out); for (NodeFactory<? extends SLBuiltinNode> builtin : builtins) { context.installBuiltin(builtin, true); }