-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Milestone
Description
Turning _enabled into a compile-time constant with:
diff --git a/src/reflect/scala/reflect/internal/util/Statistics.scala b/src/reflect/scala/reflect/internal/util/Statistics.scala
index 81500e0792..9f96135fc5 100644
--- a/src/reflect/scala/reflect/internal/util/Statistics.scala
+++ b/src/reflect/scala/reflect/internal/util/Statistics.scala
@@ -254,7 +254,7 @@ quant)
}
}
- private final val _enabled = false
+ private final val _enabled = true
private val qs = new mutable.HashMap[String, Quantity]creates the following error: https://scala-ci.typesafe.com/view/scala-bench/job/bootstrap-benchmark/258/console.
From looking at the code, it looks like this line is the responsible:
val startByType = if (Statistics.canEnable) Statistics.pushTimer(byTypeStack, byTypeNanos(tree.getClass)) else nullwhere byTypeNanos at some point returns null for tree.getClass, causing pushTimer not to push the timer and popTimer in finally if (Statistics.canEnable) Statistics.popTimer(byTypeStack, startByType) to fail because the invariant that a timer must be pushed before we pop it is violated.
This is as far as I have got since I cannot investigate deeper.
This happened when playing around with the statistics.
Reactions are currently unavailable