diff options
author | Paul Phillips <paulp@improving.org> | 2010-12-18 02:13:07 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-12-18 02:13:07 +0000 |
commit | e911fdab94900bea85645201311f5ec2dc758fcd (patch) | |
tree | b54f4b2a9cf4d8e6a55e93640ca26a3f796391b9 /src/compiler/scala/tools/nsc/plugins/Plugins.scala | |
parent | 9cbadc4d7cb11a303e500cc47af9e050b5adb96d (diff) | |
download | scala-e911fdab94900bea85645201311f5ec2dc758fcd.tar.gz scala-e911fdab94900bea85645201311f5ec2dc758fcd.tar.bz2 scala-e911fdab94900bea85645201311f5ec2dc758fcd.zip |
Added some infrastructure for tracking and disp...
Added some infrastructure for tracking and displaying information. Used
it to generate phase timing tables. Couldn't bring myself to add another
option so it's temporarily behind a system property until I sort out the
output options.
% scalac -Dscala.timings foo.scala
// or: ant -Djvm.opts="-Dscala.timings"
[...]
phase id ms share
-------------- -- ---- -----
typer 4 5816 44.94
mixin 20 1220 9.43
specialize 13 1179 9.11
erasure 15 916 7.08
...etc. No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/plugins/Plugins.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/plugins/Plugins.scala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/plugins/Plugins.scala b/src/compiler/scala/tools/nsc/plugins/Plugins.scala index 24962ee085..e2f4806c01 100644 --- a/src/compiler/scala/tools/nsc/plugins/Plugins.scala +++ b/src/compiler/scala/tools/nsc/plugins/Plugins.scala @@ -105,8 +105,12 @@ trait Plugins { * Extract all phases supplied by plugins and add them to the phasesSet. * @see phasesSet */ - protected def computePluginPhases(): Unit = - phasesSet ++= (plugins flatMap (_.components)) + protected def computePluginPhases(): Unit = { + // For reasons not yet apparent to me, plugins started appearing + // as null when I added phaseTimings to global. + if (plugins != null) + phasesSet ++= (plugins flatMap (_.components)) + } /** Summary of the options for all loaded plugins */ def pluginOptionsHelp: String = |