Sat, 14 Sep 2013 19:04:47 +0100
7047734: javac, the LVT is not generated correctly in several scenarios
Reviewed-by: jjg, mcimadamore
aoqi@0 | 1 | /* /nodynamiccopyright/ */ |
aoqi@0 | 2 | |
aoqi@0 | 3 | public class TestCaseFor { |
aoqi@0 | 4 | |
aoqi@0 | 5 | @AliveRange(varName="o", bytecodeStart=10, bytecodeLength=8) |
aoqi@0 | 6 | @AliveRange(varName="o", bytecodeStart=24, bytecodeLength=1) |
aoqi@0 | 7 | void m1(String[] args) { |
aoqi@0 | 8 | Object o; |
aoqi@0 | 9 | for (int i = 0; i < 5; i++) { |
aoqi@0 | 10 | o = ""; |
aoqi@0 | 11 | o.hashCode(); |
aoqi@0 | 12 | } |
aoqi@0 | 13 | o = ""; |
aoqi@0 | 14 | } |
aoqi@0 | 15 | |
aoqi@0 | 16 | @AliveRange(varName="o", bytecodeStart=10, bytecodeLength=8) |
aoqi@0 | 17 | @AliveRange(varName="o", bytecodeStart=24, bytecodeLength=1) |
aoqi@0 | 18 | void m2(String[] args) { |
aoqi@0 | 19 | Object o; |
aoqi@0 | 20 | for (int i = 0; i < 5; i++) { |
aoqi@0 | 21 | o = ""; |
aoqi@0 | 22 | o.hashCode(); |
aoqi@0 | 23 | continue; |
aoqi@0 | 24 | } |
aoqi@0 | 25 | o = ""; |
aoqi@0 | 26 | } |
aoqi@0 | 27 | } |