--- jsr166/src/extra166y/PAS.java 2010/05/25 20:31:48 1.8 +++ jsr166/src/extra166y/PAS.java 2010/10/22 05:18:30 1.12 @@ -26,7 +26,7 @@ class PAS { static ForkJoinPool defaultExecutor() { ForkJoinPool p = defaultExecutor; // double-check if (p == null) { - synchronized(poolLock) { + synchronized (poolLock) { p = defaultExecutor; if (p == null) { // use ceil(7/8 * ncpus) @@ -1491,7 +1491,7 @@ class PAS { if ((filtered && !pap.isSelected(k)) || (x = src[k]) == null) continue; - int hc = byIdentity? System.identityHashCode(x): x.hashCode(); + int hc = byIdentity ? System.identityHashCode(x) : x.hashCode(); int hash = hash(hc); long entry = (((long)hash) << 32) + (k + 1); int idx = hash & mask; @@ -1657,7 +1657,7 @@ class PAS { this.gran = gran; } - public void compute() { + public void compute() { int l = origin; int g = gran; if (n > g) { @@ -1693,7 +1693,7 @@ class PAS { this.a = a; this.w = w; this.origin = origin; this.n = n; this.gran = gran; } - public void compute() { + public void compute() { int l = origin; int g = gran; if (n > g) { @@ -1730,7 +1730,7 @@ class PAS { this.a = a; this.w = w; this.origin = origin; this.n = n; this.gran = gran; } - public void compute() { + public void compute() { int l = origin; int g = gran; if (n > g) { @@ -1766,7 +1766,7 @@ class PAS { this.a = a; this.w = w; this.origin = origin; this.n = n; this.gran = gran; } - public void compute() { + public void compute() { int l = origin; int g = gran; if (n > g) { @@ -1804,7 +1804,7 @@ class PAS { this.gran = gran; } - public void compute() { + public void compute() { int l = origin; int g = gran; if (n > g) { @@ -1840,7 +1840,7 @@ class PAS { this.a = a; this.w = w; this.origin = origin; this.n = n; this.gran = gran; } - public void compute() { + public void compute() { int l = origin; int g = gran; if (n > g) { @@ -2341,7 +2341,8 @@ class PAS { while (cmp.compare(pivot, a[right]) < 0) --right; int c; - while (left < right && (c = cmp.compare(pivot, a[left])) >= 0){ + while (left < right && + (c = cmp.compare(pivot, a[left])) >= 0) { if (c != 0) sameLefts = false; ++left; @@ -2352,7 +2353,7 @@ class PAS { } else break; } - + if (sameLefts && right == hi - 1) return; if (left - lo <= hi - right) { @@ -2459,7 +2460,8 @@ class PAS { while (cmp.compare(pivot, a[right]) < 0) --right; int c; - while (left < right && (c = cmp.compare(pivot, a[left])) >= 0){ + while (left < right && + (c = cmp.compare(pivot, a[left])) >= 0) { if (c != 0) sameLefts = false; ++left; @@ -2518,7 +2520,8 @@ class PAS { while (cmp.compare(pivot, a[right]) < 0) --right; int c; - while (left < right && (c = cmp.compare(pivot, a[left])) >= 0){ + while (left < right && + (c = cmp.compare(pivot, a[left])) >= 0) { if (c != 0) sameLefts = false; ++left; @@ -2529,7 +2532,7 @@ class PAS { } else break; } - + if (sameLefts && right == hi - 1) return; if (left - lo <= hi - right) { @@ -2670,7 +2673,7 @@ class PAS { op.pushUp(par, par.left, par.right); int refork = ((pb & CUMULATE) == 0 && - par.lo == op.origin)? CUMULATE : 0; + par.lo == op.origin) ? CUMULATE : 0; int nextPhase = pb|cb|refork; if (pb == nextPhase || phaseUpdater.compareAndSet(par, pb, nextPhase)) {