|
1 /* /nodynamiccopyright/ */ |
|
2 |
|
3 public class TestCaseIfElse { |
|
4 |
|
5 @AliveRange(varName="o", bytecodeStart=9, bytecodeLength=8) |
|
6 @AliveRange(varName="o", bytecodeStart=20, bytecodeLength=9) |
|
7 void m0(String[] args) { |
|
8 Object o; |
|
9 if (args[0] != null) { |
|
10 o = "then"; |
|
11 o.hashCode(); |
|
12 } else { |
|
13 o = "else"; |
|
14 o.hashCode(); |
|
15 } |
|
16 o = "finish"; |
|
17 } |
|
18 |
|
19 @AliveRange(varName="o", bytecodeStart=10, bytecodeLength=8) |
|
20 @AliveRange(varName="o", bytecodeStart=21, bytecodeLength=9) |
|
21 void m1() { |
|
22 Object o; |
|
23 int i = 5; |
|
24 if (i == 5) { |
|
25 o = "then"; |
|
26 o.hashCode(); |
|
27 } else { |
|
28 o = "else"; |
|
29 o.hashCode(); |
|
30 } |
|
31 o = "finish"; |
|
32 } |
|
33 |
|
34 @AliveRange(varName="o", bytecodeStart=10, bytecodeLength=8) |
|
35 @AliveRange(varName="o", bytecodeStart=21, bytecodeLength=9) |
|
36 void m2(String[] args) { |
|
37 Object o; |
|
38 int i = 5; |
|
39 if (i != 5) { |
|
40 o = "then"; |
|
41 o.hashCode(); |
|
42 } else { |
|
43 o = "else"; |
|
44 o.hashCode(); |
|
45 } |
|
46 o = "finish"; |
|
47 } |
|
48 } |