603 |
|
private static final long BLOCKER; |
604 |
|
private static final int ABASE; |
605 |
|
static { |
606 |
– |
int s; |
606 |
|
try { |
607 |
|
U = sun.misc.Unsafe.getUnsafe(); |
608 |
|
Class<?> ek = Exchanger.class; |
617 |
|
(nk.getDeclaredField("match")); |
618 |
|
BLOCKER = U.objectFieldOffset |
619 |
|
(tk.getDeclaredField("parkBlocker")); |
620 |
< |
s = U.arrayIndexScale(ak); |
620 |
> |
int scale = U.arrayIndexScale(ak); |
621 |
> |
if ((scale & (scale - 1)) != 0 || scale > (1 << ASHIFT)) |
622 |
> |
throw new Error("Unsupported array scale"); |
623 |
|
// ABASE absorbs padding in front of element 0 |
624 |
|
ABASE = U.arrayBaseOffset(ak) + (1 << ASHIFT); |
625 |
|
} catch (ReflectiveOperationException e) { |
626 |
|
throw new Error(e); |
627 |
|
} |
627 |
– |
|
628 |
– |
if ((s & (s-1)) != 0 || s > (1 << ASHIFT)) |
629 |
– |
throw new Error("Unsupported array scale"); |
628 |
|
} |
629 |
|
|
630 |
|
} |