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:
committed by
Space Team
parent
550b4f1f11
commit
b3890885c4
+6
@@ -10291,6 +10291,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/coroutines/indirectInlineUsedAsNonInline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("infiniteLoopInNextMeaningful.kt")
|
||||
public void testInfiniteLoopInNextMeaningful() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/infiniteLoopInNextMeaningful.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineFunInGenericClass.kt")
|
||||
public void testInlineFunInGenericClass() throws Exception {
|
||||
|
||||
+6
@@ -10291,6 +10291,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
||||
runTest("compiler/testData/codegen/box/coroutines/indirectInlineUsedAsNonInline.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("infiniteLoopInNextMeaningful.kt")
|
||||
public void testInfiniteLoopInNextMeaningful() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/infiniteLoopInNextMeaningful.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("inlineFunInGenericClass.kt")
|
||||
public void testInlineFunInGenericClass() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user