Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLMain.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 | 99942eac9c6d |
children | bb51b9a142b3 3b8bbf51d320 |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLMain.java Fri May 22 13:41:10 2015 +0200 +++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLMain.java Fri May 22 18:12:01 2015 +0200 @@ -135,7 +135,7 @@ private final SLContext context; public SLMain() { - this.context = SLContextFactory.create(new BufferedReader(new InputStreamReader(System.in)), System.out); + this.context = SLContextFactory.create(new BufferedReader(new InputStreamReader(System.in)), new PrintWriter(System.out)); } /* Demonstrate per-type tabulation of node execution counts */ @@ -170,7 +170,7 @@ * Parse and run the specified SL source. Factored out in a separate method so that it can also * be used by the unit test harness. */ - public static long run(SLContext context, Source source, PrintStream logOutput, int repeats) { + public static long run(SLContext context, Source source, PrintWriter logOutput, int repeats) { if (logOutput != null) { logOutput.println("== running on " + Truffle.getRuntime().getName()); // logOutput.println("Source = " + source.getCode()); @@ -260,7 +260,7 @@ * <p> * When printASTToLog is true: prints the ASTs to the console. */ - private static void printScript(String groupName, SLContext context, PrintStream logOutput, boolean printASTToLog, boolean printSourceAttributionToLog, boolean dumpASTToIGV) { + private static void printScript(String groupName, SLContext context, PrintWriter logOutput, boolean printASTToLog, boolean printSourceAttributionToLog, boolean dumpASTToIGV) { if (dumpASTToIGV) { GraphPrintVisitor graphPrinter = new GraphPrintVisitor(); graphPrinter.beginGroup(groupName);