Tue, 04 Feb 2020 17:57:00 +0800
Merge
1.1 --- a/.hgtags Tue Feb 04 17:38:03 2020 +0800 1.2 +++ b/.hgtags Tue Feb 04 17:57:00 2020 +0800 1.3 @@ -1032,8 +1032,18 @@ 1.4 671c4ba50c6f4f9780d40de2549d91f15fcb88d1 jdk8u232-b03 1.5 3de2732a8241c8c85a85942f7341ad48491976d9 jdk8u232-b04 1.6 415c49110391d46dbb9be24154c2ad1b4157790a jdk8u232-b05 1.7 +2338eb5fa755608b47e12ae1d8baa217cd64ee98 jdk8u242-b00 1.8 dd568d0e5e10a0dfc05ace7f16bbac5ad6eddde5 jdk8u232-b06 1.9 3b3a43588afb9fbdb1b95c475a11d3529a3d9cb5 jdk8u232-b07 1.10 4bc16c3608302128648e92c80f3b396372471383 jdk8u232-b08 1.11 +735048c9f2d6835b76a436beffd29565f28a2a36 jdk8u232-b09 1.12 +735048c9f2d6835b76a436beffd29565f28a2a36 jdk8u232-ga 1.13 1a713bbdb09e84705b56017e58e696efe1973116 mips64el-jdk8u232-b10 1.14 4e460711b506fa038a56a742f9df6a39d07ba6a4 mips64el-jdk8u232-b11 1.15 +92a07f0a1bb101933e1c385b7c9d44e3c593e40d jdk8u242-b01 1.16 +5b0a0cf41fc1243f32ffe5682ac5dde265902daa jdk8u242-b02 1.17 +fbe99e0b4e74edb310cebd774399d80c77be636d jdk8u242-b03 1.18 +764b933d3443949279024afa13db853246c4238e jdk8u242-b04 1.19 +7f8e21b79cceeda47fb986ecbfd738a08cbb0e54 jdk8u242-b05 1.20 +03512b6e35cbe46659ef2568d76836d4fbaa5f25 jdk8u242-b06 1.21 +2b1a419389932f0367ab68ad60c4ec209e1ae417 jdk8u242-b07
2.1 --- a/THIRD_PARTY_README Tue Feb 04 17:38:03 2020 +0800 2.2 +++ b/THIRD_PARTY_README Tue Feb 04 17:57:00 2020 +0800 2.3 @@ -1334,11 +1334,13 @@ 2.4 2.5 -------------------------------------------------------------------------------- 2.6 2.7 -%% This notice is provided with respect to Joni v1.1.9, which may be 2.8 +%% This notice is provided with respect to Joni v2.1.16, which may be 2.9 included with JRE 8, JDK 8, and OpenJDK 8. 2.10 2.11 --- begin of LICENSE --- 2.12 2.13 +Copyright (c) 2017 JRuby Team 2.14 + 2.15 Permission is hereby granted, free of charge, to any person obtaining a copy 2.16 of this software and associated documentation files (the "Software"), to deal 2.17 in the Software without restriction, including without limitation the rights
3.1 --- a/src/share/classes/com/sun/tools/javac/jvm/Gen.java Tue Feb 04 17:38:03 2020 +0800 3.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/Gen.java Tue Feb 04 17:57:00 2020 +0800 3.3 @@ -1222,9 +1222,10 @@ 3.4 code.resolve(c.jumpTrue(), startpc); 3.5 code.resolve(c.falseJumps); 3.6 } 3.7 - code.resolve(loopEnv.info.exit); 3.8 - if (loopEnv.info.exit != null) { 3.9 - loopEnv.info.exit.state.defined.excludeFrom(code.nextreg); 3.10 + Chain exit = loopEnv.info.exit; 3.11 + if (exit != null) { 3.12 + code.resolve(exit); 3.13 + exit.state.defined.excludeFrom(code.nextreg); 3.14 } 3.15 } 3.16 3.17 @@ -1235,7 +1236,11 @@ 3.18 public void visitLabelled(JCLabeledStatement tree) { 3.19 Env<GenContext> localEnv = env.dup(tree, new GenContext()); 3.20 genStat(tree.body, localEnv, CRT_STATEMENT); 3.21 - code.resolve(localEnv.info.exit); 3.22 + Chain exit = localEnv.info.exit; 3.23 + if (exit != null) { 3.24 + code.resolve(exit); 3.25 + exit.state.defined.excludeFrom(code.nextreg); 3.26 + } 3.27 } 3.28 3.29 public void visitSwitch(JCSwitch tree) { 3.30 @@ -1344,7 +1349,11 @@ 3.31 } 3.32 3.33 // Resolve all breaks. 3.34 - code.resolve(switchEnv.info.exit); 3.35 + Chain exit = switchEnv.info.exit; 3.36 + if (exit != null) { 3.37 + code.resolve(exit); 3.38 + exit.state.defined.excludeFrom(code.nextreg); 3.39 + } 3.40 3.41 // If we have not set the default offset, we do so now. 3.42 if (code.get4(tableBase) == -1) {
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/test/tools/javac/BranchToFewerDefines.java Tue Feb 04 17:57:00 2020 +0800 4.3 @@ -0,0 +1,111 @@ 4.4 +/* 4.5 + * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. 4.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4.7 + * 4.8 + * This code is free software; you can redistribute it and/or modify it 4.9 + * under the terms of the GNU General Public License version 2 only, as 4.10 + * published by the Free Software Foundation. 4.11 + * 4.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 4.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 4.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 4.15 + * version 2 for more details (a copy is included in the LICENSE file that 4.16 + * accompanied this code). 4.17 + * 4.18 + * You should have received a copy of the GNU General Public License version 4.19 + * 2 along with this work; if not, write to the Free Software Foundation, 4.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 4.21 + * 4.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 4.23 + * or visit www.oracle.com if you need additional information or have any 4.24 + * questions. 4.25 + */ 4.26 + 4.27 +/* 4.28 + * @test 4.29 + * @bug 8067429 4.30 + * @summary java.lang.VerifyError: Inconsistent stackmap frames at branch target 4.31 + * @author srikanth 4.32 + * 4.33 + * @compile BranchToFewerDefines.java 4.34 + * @run main BranchToFewerDefines 4.35 + */ 4.36 + 4.37 +public class BranchToFewerDefines { 4.38 + public static void main(String[] args) { 4.39 + } 4.40 + private void problematicMethod(int p) { 4.41 + switch (p) { 4.42 + case 3: 4.43 + long n; 4.44 + while (true) { 4.45 + if (false) { 4.46 + break; 4.47 + } 4.48 + } 4.49 + break; 4.50 + case 2: 4.51 + loop: while (true) { 4.52 + while (true) { 4.53 + int i = 4; 4.54 + if (p != 16) { 4.55 + return; 4.56 + } 4.57 + break loop; 4.58 + } 4.59 + } 4.60 + break; 4.61 + default: 4.62 + while (true) { 4.63 + if (false) { 4.64 + break; 4.65 + } 4.66 + } 4.67 + break; 4.68 + } 4.69 + long b; 4.70 + if (p != 7) { 4.71 + switch (p) { 4.72 + case 1: 4.73 + long a = 17; 4.74 + break; 4.75 + case 2: 4.76 + break; 4.77 + default: 4.78 + break; 4.79 + } 4.80 + } 4.81 + } 4.82 + private void problematicMethod2(int p) { 4.83 + switch (p) { 4.84 + case 3: 4.85 + long n; 4.86 + { 4.87 + int i = 4; 4.88 + break; 4.89 + } 4.90 + case 2: 4.91 + { 4.92 + int i = 4; 4.93 + break; 4.94 + } 4.95 + default: 4.96 + { 4.97 + int i = 4; 4.98 + break; 4.99 + } 4.100 + } 4.101 + long b; 4.102 + if (p != 7) { 4.103 + switch (p) { 4.104 + case 1: 4.105 + long a = 17; 4.106 + break; 4.107 + case 2: 4.108 + break; 4.109 + default: 4.110 + break; 4.111 + } 4.112 + } 4.113 + } 4.114 +}