Make start label of LVT record the point where variable becomes alive
Otherwise, there will be overlapping LVT records, which leads to removal of the whole LVT by R8. #KT-44714 Fixed
This commit is contained in:
+1
-2
@@ -1252,8 +1252,7 @@ private fun updateLvtAccordingToLiveness(method: MethodNode, isForNamedFunction:
|
||||
for (insnIndex in 0 until (method.instructions.size() - 1)) {
|
||||
val insn = method.instructions[insnIndex]
|
||||
if (!isAlive(insnIndex, variableIndex) && isAlive(insnIndex + 1, variableIndex)) {
|
||||
val lvtRecord = oldLvt.findRecord(insnIndex, variableIndex) ?: continue
|
||||
startLabel = max(lvtRecord.start, previousSuspensionPointLabel(insn))
|
||||
startLabel = insn as? LabelNode ?: insn.findNextOrNull { it is LabelNode } as? LabelNode
|
||||
}
|
||||
if (isAlive(insnIndex, variableIndex) && !isAlive(insnIndex + 1, variableIndex)) {
|
||||
// No variable in LVT -> do not add one
|
||||
|
||||
Reference in New Issue
Block a user