ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/extra166y/CustomConcurrentHashMap.java
(Generate patch)

Comparing jsr166/src/extra166y/CustomConcurrentHashMap.java (file contents):
Revision 1.27 by jsr166, Fri Jan 18 04:23:27 2013 UTC vs.
Revision 1.28 by jsr166, Sat Jan 19 20:39:43 2013 UTC

# Line 3007 | Line 3007 | public class CustomConcurrentHashMap<K,
3007          try {
3008              UNSAFE = getUnsafe();
3009              tableBase = UNSAFE.arrayBaseOffset(Node[].class);
3010 <            int s = UNSAFE.arrayIndexScale(Node[].class);
3011 <            if ((s & (s-1)) != 0)
3010 >            int scale = UNSAFE.arrayIndexScale(Node[].class);
3011 >            if ((scale & (scale - 1)) != 0)
3012                  throw new Error("data type scale not a power of two");
3013 <            tableShift = 31 - Integer.numberOfLeadingZeros(s);
3013 >            tableShift = 31 - Integer.numberOfLeadingZeros(scale);
3014              segmentsBase = UNSAFE.arrayBaseOffset(Segment[].class);
3015 <            s = UNSAFE.arrayIndexScale(Segment[].class);
3016 <            if ((s & (s-1)) != 0)
3015 >            scale = UNSAFE.arrayIndexScale(Segment[].class);
3016 >            if ((scale & (scale - 1)) != 0)
3017                  throw new Error("data type scale not a power of two");
3018 <            segmentsShift = 31 - Integer.numberOfLeadingZeros(s);
3018 >            segmentsShift = 31 - Integer.numberOfLeadingZeros(scale);
3019          } catch (Throwable e) {
3020              throw new RuntimeException("Could not initialize intrinsics", e);
3021          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines