-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for Expression Optimization Issue
- Loading branch information
1 parent
d63fc67
commit 7f91028
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package pkg; | ||
|
||
public class TestLVTReassignment { | ||
public void test() { | ||
double one = 1.0;// 5 | ||
one = 0.0;// 7 | ||
if (one > 1.0) {// 8 | ||
} | ||
|
||
this.blackhole(one);// 6 11 | ||
}// 12 | ||
|
||
void blackhole(double value) { | ||
}// 16 | ||
} | ||
|
||
class 'pkg/TestLVTReassignment' { | ||
method 'test ()V' { | ||
0 4 | ||
1 4 | ||
2 9 | ||
4 5 | ||
5 5 | ||
6 6 | ||
7 6 | ||
8 6 | ||
9 6 | ||
a 6 | ||
b 6 | ||
c 9 | ||
d 9 | ||
e 9 | ||
f 9 | ||
10 9 | ||
11 10 | ||
} | ||
|
||
method 'blackhole (D)V' { | ||
0 13 | ||
} | ||
} | ||
|
||
Lines mapping: | ||
5 <-> 5 | ||
6 <-> 10 | ||
7 <-> 6 | ||
8 <-> 7 | ||
11 <-> 10 | ||
12 <-> 11 | ||
16 <-> 14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package pkg; | ||
|
||
public class TestLVTReassignment { | ||
public void test() { | ||
double one = 1; | ||
double shouldBeOne = one; | ||
one = 0; | ||
if (one > 1) { | ||
} | ||
|
||
blackhole(shouldBeOne); | ||
} | ||
|
||
void blackhole(double value) { | ||
|
||
} | ||
} |