JVM: Break infinite loop in finding meaningful instruction

during tail-call optimization.

There can be code, where all next instructions are non-meaningful and
there is a back-edge, for example, while(true){}. Previously, analyzer
incorrectly assumed, that this cannot happen. Now, it keeps track of
visited instructions and says, that there is no meaningful instruction
in such case.
 #KT-56815 Fixed
This commit is contained in:
Ilmir Usmanov
2023-02-21 18:34:23 +01:00
committed by Space Team
parent 550b4f1f11
commit b3890885c4
14 changed files with 109 additions and 5 deletions
@@ -7927,6 +7927,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/coroutines/indirectInlineUsedAsNonInline.kt");
}
@TestMetadata("infiniteLoopInNextMeaningful.kt")
public void testInfiniteLoopInNextMeaningful() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/infiniteLoopInNextMeaningful.kt");
}
@TestMetadata("inlineFunInGenericClass.kt")
public void testInlineFunInGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/inlineFunInGenericClass.kt");