diff options
author | Paul Phillips <paulp@improving.org> | 2011-06-13 18:04:20 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-06-13 18:04:20 +0000 |
commit | 21584ed38ea6cbb8932206608ce47d975a127d8d (patch) | |
tree | 8a63b78349e3668ea21c8b6afb66a1260b40c5f6 /src/compiler/scala/tools/nsc/Global.scala | |
parent | f44c01eab212e3ab518880500953f485b49a2eee (diff) | |
download | scala-21584ed38ea6cbb8932206608ce47d975a127d8d.tar.gz scala-21584ed38ea6cbb8932206608ce47d975a127d8d.tar.bz2 scala-21584ed38ea6cbb8932206608ce47d975a127d8d.zip |
Marked some more by-name-argument-using methods...
Marked some more by-name-argument-using methods with final @inline to
make possible and then encourage their inlining. Knocked almost 300 more
classfiles and 200K off the compiler jar. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index 177bd8dbbd..d322ce8382 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -172,7 +172,10 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb def informTime(msg: String, start: Long) = informProgress(elapsedMessage(msg, start)) def logError(msg: String, t: Throwable): Unit = () - def log(msg: => AnyRef): Unit = if (opt.logPhase) inform("[log " + phase + "] " + msg) + // Over 200 closure objects are eliminated by inlining this. + @inline final def log(msg: => AnyRef): Unit = + if (settings.log containsPhase globalPhase) + inform("[log " + phase + "] " + msg) def logThrowable(t: Throwable): Unit = globalError(throwableAsString(t)) def throwableAsString(t: Throwable): String = |