@@ -25,20 +25,20 @@ object LazyVals {
2525 final val LAZY_VAL_MASK = 3L
2626 final val debug = false
2727
28- @ inline def STATE (cur : Long , ord : Int ) = {
28+ @ forceInline def STATE (cur : Long , ord : Int ) = {
2929 val r = (cur >> (ord * BITS_PER_LAZY_VAL )) & LAZY_VAL_MASK
3030 if (debug)
3131 println(s " STATE( $cur, $ord) = $r" )
3232 r
3333 }
34- @ inline def CAS (t : Object , offset : Long , e : Long , v : Int , ord : Int ) = {
34+ @ forceInline def CAS (t : Object , offset : Long , e : Long , v : Int , ord : Int ) = {
3535 if (debug)
3636 println(s " CAS( $t, $offset, $e, $v, $ord) " )
3737 val mask = ~ (LAZY_VAL_MASK << ord * BITS_PER_LAZY_VAL )
3838 val n = (e & mask) | (v.toLong << (ord * BITS_PER_LAZY_VAL ))
3939 compareAndSet(t, offset, e, n)
4040 }
41- @ inline def setFlag (t : Object , offset : Long , v : Int , ord : Int ) = {
41+ @ forceInline def setFlag (t : Object , offset : Long , v : Int , ord : Int ) = {
4242 if (debug)
4343 println(s " setFlag( $t, $offset, $v, $ord) " )
4444 var retry = true
@@ -57,7 +57,7 @@ object LazyVals {
5757 }
5858 }
5959 }
60- @ inline def wait4Notification (t : Object , offset : Long , cur : Long , ord : Int ) = {
60+ @ forceInline def wait4Notification (t : Object , offset : Long , cur : Long , ord : Int ) = {
6161 if (debug)
6262 println(s " wait4Notification( $t, $offset, $cur, $ord) " )
6363 var retry = true
@@ -75,8 +75,8 @@ object LazyVals {
7575 }
7676 }
7777
78- @ inline def compareAndSet (t : Object , off : Long , e : Long , v : Long ) = unsafe.compareAndSwapLong(t, off, e, v)
79- @ inline def get (t : Object , off : Long ) = {
78+ @ forceInline def compareAndSet (t : Object , off : Long , e : Long , v : Long ) = unsafe.compareAndSwapLong(t, off, e, v)
79+ @ forceInline def get (t : Object , off : Long ) = {
8080 if (debug)
8181 println(s " get( $t, $off) " )
8282 unsafe.getLongVolatile(t, off)
@@ -88,7 +88,7 @@ object LazyVals {
8888 x => new Object ()
8989 }.toArray
9090
91- @ inline def getMonitor (obj : Object , fieldId : Int = 0 ) = {
91+ @ forceInline def getMonitor (obj : Object , fieldId : Int = 0 ) = {
9292 var id = (
9393 /* java.lang.System.identityHashCode(obj) + */ // should be here, but #548
9494 fieldId) % base
@@ -97,7 +97,7 @@ object LazyVals {
9797 monitors(id)
9898 }
9999
100- @ inline def getOffset (clz : Class [_], name : String ) = {
100+ @ forceInline def getOffset (clz : Class [_], name : String ) = {
101101 val r = unsafe.objectFieldOffset(clz.getDeclaredField(name))
102102 if (debug)
103103 println(s " getOffset( $clz, $name) = $r" )
0 commit comments