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
@@ -8136,6 +8136,12 @@ public class K2NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTes
|
||||
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
@@ -8047,6 +8047,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
||||
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