aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/runtime/LazyVals.scala
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2016-06-07 15:20:58 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2016-06-07 15:20:58 +0200
commitc428e746ff8031271ad5c170b88177f091138ef1 (patch)
tree6b0996002cc2030ea639e769646dceff4de7136d /src/dotty/runtime/LazyVals.scala
parent9899a062a4ed47f48da8d00f828d00051f01f1b8 (diff)
downloaddotty-c428e746ff8031271ad5c170b88177f091138ef1.tar.gz
dotty-c428e746ff8031271ad5c170b88177f091138ef1.tar.bz2
dotty-c428e746ff8031271ad5c170b88177f091138ef1.zip
LazyVals: do even more verbose debugging.
Diffstat (limited to 'src/dotty/runtime/LazyVals.scala')
-rw-r--r--src/dotty/runtime/LazyVals.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dotty/runtime/LazyVals.scala b/src/dotty/runtime/LazyVals.scala
index e42532ce0..4dea0d34d 100644
--- a/src/dotty/runtime/LazyVals.scala
+++ b/src/dotty/runtime/LazyVals.scala
@@ -63,7 +63,11 @@ object LazyVals {
}
@inline def compareAndSet(t: Object, off: Long, e: Long, v: Long) = unsafe.compareAndSwapLong(t, off, e, v)
- @inline def get(t: Object, off: Long) = unsafe.getLongVolatile(t, off)
+ @inline def get(t: Object, off: Long) = {
+ if (debug)
+ println(s"get($t, $off)")
+ unsafe.getLongVolatile(t, off)
+ }
val processors: Int = java.lang.Runtime.getRuntime.availableProcessors()
val base: Int = 8 * processors * processors