Skip to content

Commit c428e74

Browse files
committed
LazyVals: do even more verbose debugging.
1 parent 9899a06 commit c428e74

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/dotty/runtime/LazyVals.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ object LazyVals {
6363
}
6464

6565
@inline def compareAndSet(t: Object, off: Long, e: Long, v: Long) = unsafe.compareAndSwapLong(t, off, e, v)
66-
@inline def get(t: Object, off: Long) = unsafe.getLongVolatile(t, off)
66+
@inline def get(t: Object, off: Long) = {
67+
if (debug)
68+
println(s"get($t, $off)")
69+
unsafe.getLongVolatile(t, off)
70+
}
6771

6872
val processors: Int = java.lang.Runtime.getRuntime.availableProcessors()
6973
val base: Int = 8 * processors * processors

0 commit comments

Comments
 (0)