JVM_IR: Add more local variable tests for finally code.
This commit is contained in:
committed by
Mikhael Bogdanov
parent
6095d8a7fa
commit
0c77565104
+2
-2
@@ -423,7 +423,7 @@ class ExpressionCodegen(
|
||||
}
|
||||
}
|
||||
|
||||
private fun addLocalVariableGapsForFinallyBlocks(
|
||||
private fun splitLocalVariableRangesByFinallyBlocks(
|
||||
info: BlockInfo,
|
||||
tryWithFinallyInfo: TryWithFinallyInfo,
|
||||
gapStart: Label,
|
||||
@@ -1276,7 +1276,7 @@ class ExpressionCodegen(
|
||||
// Split the local variables for the blocks on the way to the finally. Variables introduced in these blocks do not
|
||||
// cover the finally block code.
|
||||
val endOfFinallyCode = markNewLinkedLabel()
|
||||
addLocalVariableGapsForFinallyBlocks(data, tryWithFinallyInfo, gapStart, endOfFinallyCode)
|
||||
splitLocalVariableRangesByFinallyBlocks(data, tryWithFinallyInfo, gapStart, endOfFinallyCode)
|
||||
|
||||
val gapEnd = afterJumpLabel ?: endOfFinallyCode
|
||||
tryWithFinallyInfo.gaps.add(gapStart to gapEnd)
|
||||
|
||||
Reference in New Issue
Block a user