提交 2819dbeb 编写于 作者: V vromero

8059710: javac, the same approach used in fix for JDK-8058708 should be...

8059710: javac, the same approach used in fix for JDK-8058708 should be applied to Code.closeAliveRanges
Reviewed-by: jjg
上级 ff4d3619
...@@ -2017,13 +2017,12 @@ public class Code { ...@@ -2017,13 +2017,12 @@ public class Code {
List<VarSymbol> locals = lvtRanges.getVars(meth, tree); List<VarSymbol> locals = lvtRanges.getVars(meth, tree);
for (LocalVar localVar: lvar) { for (LocalVar localVar: lvar) {
for (VarSymbol aliveLocal : locals) { for (VarSymbol aliveLocal : locals) {
if (localVar == null) { if (localVar != null) {
return; if (localVar.sym == aliveLocal && localVar.lastRange() != null) {
} char length = (char)(closingCP - localVar.lastRange().start_pc);
if (localVar.sym == aliveLocal && localVar.lastRange() != null) { if (length < Character.MAX_VALUE) {
char length = (char)(closingCP - localVar.lastRange().start_pc); localVar.closeRange(length);
if (length < Character.MAX_VALUE) { }
localVar.closeRange(length);
} }
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册