[JVM] Do not extend local ranges across control-flow merges.
The coroutine method transformer extends the range of locals across code where the local is not live when it is safe to do so. However, it only bailed out for one case of control-flow merging, namely backwards branches for loops. That is not sufficient as there can be control flow merges without loops where the local is only defined on one control-flow path. This change generalizes the bailout to any control-flow merge. ^KT-49834 Fixed
This commit is contained in:
committed by
Alexander Udalov
parent
8ace9e45b9
commit
8255118204
+5
@@ -10121,6 +10121,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt38925.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt49834.kt")
|
||||
public void testKt49834() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/kt49834.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lvtWithInlineOnly.kt")
|
||||
public void testLvtWithInlineOnly() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/varSpilling/lvtWithInlineOnly.kt");
|
||||
|
||||
Reference in New Issue
Block a user