ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/FinalLongTest.java
(Generate patch)

Comparing jsr166/src/test/loops/FinalLongTest.java (file contents):
Revision 1.3 by jsr166, Thu Oct 29 23:09:07 2009 UTC vs.
Revision 1.8 by jsr166, Thu Jan 15 18:34:19 2015 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7   public class FinalLongTest {
8      static int npairs = 2;
9      static int iters = 10000000;
10 <    static  int LEN = 2;
10 >    static int LEN = 2;
11      static final Long[] nums = new Long[LEN];
12      static volatile boolean done;
13      static volatile long total;
# Line 16 | Line 16 | public class FinalLongTest {
16      static Long n2 = new Long(23);
17      static Long n3 = new Long(23);
18  
19
19      public static void main(String[] args) {
20          for (int i = 0; i < LEN; ++i)
21              nums[i] = new Long(i+1);
# Line 47 | Line 46 | public class FinalLongTest {
46              Long[] ns = nums;
47  
48              while (n-- > 0) {
49 <                //                int k = (int)(s & (LEN-1));
49 >                //                int k = (int) (s & (LEN-1));
50                  //                if (k < 0 || k >= LEN) k = 1;
51                  //                int l = (k+1) & (LEN-1);
52                  //                if (l < 0 || l >= LEN) l = 0;
53 <                //                int k = (s & 1) == 0? 0 : 1;
54 <                //                int l = (k == 0)? 1 : 0;
53 >                //                int k = (s & 1) == 0 ? 0 : 1;
54 >                //                int l = (k == 0) ? 1 : 0;
55                  if ((s & (LEN-1)) == 0) {
56                      n3 = n1;
57                      n0 = new Long(s);
# Line 78 | Line 77 | public class FinalLongTest {
77              int n = iters;
78              long s = initialSeed(this);
79              while (s != 0 && n > 0) {
80 <                long nexts; // = nums[(int)(s & (LEN-1))].longValue();
80 >                long nexts; // = nums[(int) (s & (LEN-1))].longValue();
81                  if ((s & (LEN-1)) == 0)
82                      nexts = n0.longValue();
83                  else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines