diff options
author | Paul Phillips <paulp@improving.org> | 2012-03-01 22:02:02 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-03-01 22:03:16 -0800 |
commit | ee4fa5449e25bae11891f23907114ff5ea5e12b8 (patch) | |
tree | a46fab5ac4196481b3728a1321cf5bde0bd60319 /src | |
parent | d6dfddfaffd2d6a09b9a8d852a0b44c4bc7555b4 (diff) | |
download | scala-ee4fa5449e25bae11891f23907114ff5ea5e12b8.tar.gz scala-ee4fa5449e25bae11891f23907114ff5ea5e12b8.tar.bz2 scala-ee4fa5449e25bae11891f23907114ff5ea5e12b8.zip |
Another try to quiet the inliner.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index 1676efef5d..f0f53ec315 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -213,17 +213,17 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb def logAfterEveryPhase[T](msg: String)(op: => T) { log("Running operation '%s' after every phase.\n".format(msg) + describeAfterEveryPhase(op)) } + + def shouldLogAtThisPhase = ( + (settings.log.isSetByUser) + && ((settings.log containsPhase globalPhase) || (settings.log containsPhase phase)) + ) + def atPhaseStackMessage = atPhaseStack match { + case Nil => "" + case ps => ps.reverseMap("->" + _).mkString("(", " ", ")") + } // Over 200 closure objects are eliminated by inlining this. - @inline final def log(msg: => AnyRef): Unit = { - def shouldLogAtThisPhase = ( - (settings.log.isSetByUser) - && ((settings.log containsPhase globalPhase) || (settings.log containsPhase phase)) - ) - def atPhaseStackMessage = atPhaseStack match { - case Nil => "" - case ps => ps.reverseMap("->" + _).mkString("(", " ", ")") - } - + @inline final def log(msg: => AnyRef) { if (shouldLogAtThisPhase) inform("[log %s%s] %s".format(globalPhase, atPhaseStackMessage, msg)) } |