summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-08-17 18:53:25 +0200
committerGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2012-08-20 08:11:10 +0100
commit5f3e2ce75c1223efc2bbacdb3e546f7d2628880a (patch)
tree9975fb024bfad69a9c2ade4a1a86b649fd2acc45 /src/compiler/scala/tools/nsc/typechecker/Analyzer.scala
parent5978a523149f30b3d31b2ce34ad199eaf253f035 (diff)
downloadscala-5f3e2ce75c1223efc2bbacdb3e546f7d2628880a.tar.gz
scala-5f3e2ce75c1223efc2bbacdb3e546f7d2628880a.tar.bz2
scala-5f3e2ce75c1223efc2bbacdb3e546f7d2628880a.zip
Made all statistic code disappear unless built with Statistics.canEnable = true
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Analyzer.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Analyzer.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala b/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala
index 7f4f61bf80..ab8836f339 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Analyzer.scala
@@ -85,13 +85,13 @@ trait Analyzer extends AnyRef
// compiler run). This is good enough for the resident compiler, which was the most affected.
undoLog.clear()
override def run() {
- val start = Statistics.startTimer(typerNanos)
+ val start = if (Statistics.canEnable) Statistics.startTimer(typerNanos) else null
global.echoPhaseSummary(this)
currentRun.units foreach applyPhase
undoLog.clear()
// need to clear it after as well or 10K+ accumulated entries are
// uncollectable the rest of the way.
- Statistics.stopTimer(typerNanos, start)
+ if (Statistics.canEnable) Statistics.stopTimer(typerNanos, start)
}
def apply(unit: CompilationUnit) {
try {