[JVM] Fix shrinking of local range for dead variables.
Coroutine transform would occasionally *extend* the range of a local instead of shrinking it (if the next suspension point is after the end point for the local). That leads to the local variable table having a local that covers code where it is not defined. That is invalid and leads to D8 removing the locals table from the code.
This commit is contained in:
committed by
TeamCityServer
parent
ebdbcbb7b6
commit
b27a109a1e
+5
@@ -8630,6 +8630,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/sameIconst1ManyVars.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unusedCatchVar.kt")
|
||||
public void testUnusedCatchVar() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/unusedCatchVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("usedInArrayStore.kt")
|
||||
public void testUsedInArrayStore() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/intLikeVarSpilling/usedInArrayStore.kt");
|
||||
|
||||
Reference in New Issue
Block a user