diff options
Diffstat (limited to 'src/dotty/runtime/LazyVals.scala')
-rw-r--r-- | src/dotty/runtime/LazyVals.scala | 6 |
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 |