From 484af96c6d4a8684a4a1927693fd2485dd64e9ce Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 16 Jan 2012 03:25:43 -0800 Subject: Made a couple programmer functions more available. --- src/compiler/scala/reflect/internal/SymbolTable.scala | 9 +++++++++ src/compiler/scala/tools/nsc/Global.scala | 4 ---- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/reflect/internal/SymbolTable.scala b/src/compiler/scala/reflect/internal/SymbolTable.scala index 5be69e06ad..032bf670b3 100644 --- a/src/compiler/scala/reflect/internal/SymbolTable.scala +++ b/src/compiler/scala/reflect/internal/SymbolTable.scala @@ -40,6 +40,15 @@ abstract class SymbolTable extends api.Universe def debuglog(msg: => String): Unit = if (settings.debug.value) log(msg) def debugwarn(msg: => String): Unit = if (settings.debug.value) Console.err.println(msg) + private[scala] def printResult[T](msg: String)(result: T) = { + Console.err.println(msg + ": " + result) + result + } + private[scala] def logResult[T](msg: String)(result: T): T = { + log(msg + ": " + result) + result + } + /** Are we compiling for Java SE? */ // def forJVM: Boolean diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index c388a62644..c8db996de2 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -193,10 +193,6 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb def inform[T](msg: String, value: T): T = returning(value)(x => inform(msg + x)) def informTime(msg: String, start: Long) = informProgress(elapsedMessage(msg, start)) - def logResult[T](msg: String)(result: T): T = { - log(msg + ": " + result) - result - } def logError(msg: String, t: Throwable): Unit = () // Over 200 closure objects are eliminated by inlining this. @inline final def log(msg: => AnyRef): Unit = -- cgit v1.2.3