changeset 2612:c9c6b56c7b15

Merge
author mfang
date Wed, 01 Oct 2014 14:37:46 -0700
parents ef53c996e943 31d2a837676f
children 05d50e7f6c95
files
diffstat 4 files changed, 21 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Oct 01 14:19:24 2014 -0700
+++ b/.hgtags	Wed Oct 01 14:37:46 2014 -0700
@@ -319,3 +319,4 @@
 cde557bc48f5cd0c6b6aa70bdbc7563677379347 jdk8u40-b04
 a36fce70b505ec15be8353d40d417d331fcce740 jdk8u40-b05
 7c3d27120b92b6abbd2df910722405dfb02d4399 jdk8u40-b06
+2fa3858a281f9deae15bcc49224efd5b951b745d jdk8u40-b07
--- a/src/share/classes/com/sun/tools/javac/jvm/Code.java	Wed Oct 01 14:19:24 2014 -0700
+++ b/src/share/classes/com/sun/tools/javac/jvm/Code.java	Wed Oct 01 14:37:46 2014 -0700
@@ -2032,12 +2032,11 @@
 
     void adjustAliveRanges(int oldCP, int delta) {
         for (LocalVar localVar: lvar) {
-            if (localVar == null) {
-                return;
-            }
-            for (LocalVar.Range range: localVar.aliveRanges) {
-                if (range.closed() && range.start_pc + range.length >= oldCP) {
-                    range.length += delta;
+            if (localVar != null) {
+                for (LocalVar.Range range: localVar.aliveRanges) {
+                    if (range.closed() && range.start_pc + range.length >= oldCP) {
+                        range.length += delta;
+                    }
                 }
             }
         }
--- a/test/tools/javac/flow/LVTHarness.java	Wed Oct 01 14:19:24 2014 -0700
+++ b/test/tools/javac/flow/LVTHarness.java	Wed Oct 01 14:37:46 2014 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7047734 8027660 8037937 8047719
+ * @bug 7047734 8027660 8037937 8047719 8058708
  * @summary The LVT is not generated correctly during some try/catch scenarios
  *          javac crash while creating LVT entry for a local variable defined in
  *          an inner block
--- a/test/tools/javac/flow/tests/TestCaseIf.java	Wed Oct 01 14:19:24 2014 -0700
+++ b/test/tools/javac/flow/tests/TestCaseIf.java	Wed Oct 01 14:37:46 2014 -0700
@@ -58,4 +58,18 @@
         }
         o = "";
     }
+
+    @AliveRange(varName="finalLocal", bytecodeStart=11, bytecodeLength=6)
+    @AliveRange(varName="used", bytecodeStart=13, bytecodeLength=4)
+    void m5(Object o) {
+        if (o != null) {
+            Object notUsed;
+            Object used;
+            if (o != null) {
+                final Object finalLocal = null;
+                used = null;
+                if (o == null) {}
+            }
+        }
+    }
 }