59 |
|
* @param x the value to add |
60 |
|
*/ |
61 |
|
public void add(double x) { |
62 |
< |
Cell[] as; long b, v; HashCode hc; Cell a; int n; |
62 |
> |
Cell[] as; long b, v; int[] hc; Cell a; int n; |
63 |
|
if ((as = cells) != null || |
64 |
|
!casBase(b = base, |
65 |
|
Double.doubleToRawLongBits |
66 |
|
(Double.longBitsToDouble(b) + x))) { |
67 |
|
boolean uncontended = true; |
68 |
< |
int h = (hc = threadHashCode.get()).code; |
69 |
< |
if (as == null || (n = as.length) < 1 || |
70 |
< |
(a = as[(n - 1) & h]) == null || |
68 |
> |
if ((hc = threadHashCode.get()) == null || |
69 |
> |
as == null || (n = as.length) < 1 || |
70 |
> |
(a = as[(n - 1) & hc[0]]) == null || |
71 |
|
!(uncontended = a.cas(v = a.value, |
72 |
|
Double.doubleToRawLongBits |
73 |
|
(Double.longBitsToDouble(v) + x)))) |