6804 |
|
private static final int ASHIFT; |
6805 |
|
|
6806 |
|
static { |
6807 |
– |
int ss; |
6807 |
|
try { |
6808 |
|
U = getUnsafe(); |
6809 |
|
Class<?> k = ConcurrentHashMapV8.class; |
6822 |
|
(ck.getDeclaredField("value")); |
6823 |
|
Class<?> sc = Node[].class; |
6824 |
|
ABASE = U.arrayBaseOffset(sc); |
6825 |
< |
ss = U.arrayIndexScale(sc); |
6826 |
< |
ASHIFT = 31 - Integer.numberOfLeadingZeros(ss); |
6825 |
> |
int scale = U.arrayIndexScale(sc); |
6826 |
> |
if ((scale & (scale - 1)) != 0) |
6827 |
> |
throw new Error("data type scale not a power of two"); |
6828 |
> |
ASHIFT = 31 - Integer.numberOfLeadingZeros(scale); |
6829 |
|
} catch (Exception e) { |
6830 |
|
throw new Error(e); |
6831 |
|
} |
6831 |
– |
if ((ss & (ss-1)) != 0) |
6832 |
– |
throw new Error("data type scale not a power of two"); |
6832 |
|
} |
6833 |
|
|
6834 |
|
/** |