- 
    Bug 
- 
    Resolution: Fixed
- 
     P2 P2
- 
    8, 8-repo-lambda
- 
        b82
- 
        Verified
                    The following code:
class Test {
void test(int[] ary, int p, int inc) {
ary[p]+= inc;
}
}
Used to generate this bytecode:
void test(int[], int, int);
Code:
Stack=4, Locals=4, Args_size=4
0: aload_1
1: iload_2
2: dup2
3: iaload
4: iload_3
5: iadd
6: iastore
7: return
Now it generates this:
void test(int[], int, int);
Code:
Stack=4, Locals=6, Args_size=4
0: aload_1
1: astore 4
3: iload_2
4: istore 5
6: aload 4
8: iload 5
10: aload 4
12: iload 5
14: iaload
15: iload_3
16: iadd
17: dup_x2
18: iastore
19: pop
20: return
            
class Test {
void test(int[] ary, int p, int inc) {
ary[p]+= inc;
}
}
Used to generate this bytecode:
void test(int[], int, int);
Code:
Stack=4, Locals=4, Args_size=4
0: aload_1
1: iload_2
2: dup2
3: iaload
4: iload_3
5: iadd
6: iastore
7: return
Now it generates this:
void test(int[], int, int);
Code:
Stack=4, Locals=6, Args_size=4
0: aload_1
1: astore 4
3: iload_2
4: istore 5
6: aload 4
8: iload 5
10: aload 4
12: iload 5
14: iaload
15: iload_3
16: iadd
17: dup_x2
18: iastore
19: pop
20: return
- relates to
- 
                    JDK-7167125 Two variables after the same operation in a inner class return different results -           
- Closed
 
-