Remove variables with empty ranges from local vars table

As their ranges may intersect after dead code elimination that leads to VerifyError
This commit is contained in:
Denis Zharkov
2015-06-03 15:02:54 +03:00
parent 310babefdf
commit 9802931a90
9 changed files with 54 additions and 2 deletions
@@ -51,7 +51,7 @@ fun MethodNode.prepareForEmitting() {
// local variables with live ranges starting after last meaningful instruction lead to VerifyError
localVariables = localVariables.filter { lv ->
InsnSequence(lv.start, instructions.getLast()).any { insn ->
InsnSequence(lv.start, lv.end).any { insn ->
insn.isMeaningful
}
}