6709 |
|
private static final int ASHIFT; |
6710 |
|
|
6711 |
|
static { |
6712 |
– |
int ss; |
6712 |
|
try { |
6713 |
|
U = sun.misc.Unsafe.getUnsafe(); |
6714 |
|
Class<?> k = ConcurrentHashMap.class; |
6727 |
|
(ck.getDeclaredField("value")); |
6728 |
|
Class<?> sc = Node[].class; |
6729 |
|
ABASE = U.arrayBaseOffset(sc); |
6730 |
< |
ss = U.arrayIndexScale(sc); |
6731 |
< |
ASHIFT = 31 - Integer.numberOfLeadingZeros(ss); |
6730 |
> |
int scale = U.arrayIndexScale(sc); |
6731 |
> |
if ((scale & (scale - 1)) != 0) |
6732 |
> |
throw new Error("data type scale not a power of two"); |
6733 |
> |
ASHIFT = 31 - Integer.numberOfLeadingZeros(scale); |
6734 |
|
} catch (Exception e) { |
6735 |
|
throw new Error(e); |
6736 |
|
} |
6736 |
– |
if ((ss & (ss-1)) != 0) |
6737 |
– |
throw new Error("data type scale not a power of two"); |
6737 |
|
} |
6738 |
|
|
6739 |
|
} |