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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user