Loosen tail call check

Check that any source of ARETURN is inside a suspension point, not all
of them.
 #KT-27190 Fixed
This commit is contained in:
Ilmir Usmanov
2019-02-13 16:27:30 +03:00
parent cc62c971e7
commit 440cccae73
5 changed files with 40 additions and 2 deletions
@@ -498,6 +498,16 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/tailcall"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("tailCallIfReturnUnit.kt")
public void testTailCallIfReturnUnit_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/tailcall/tailCallIfReturnUnit.kt", "kotlin.coroutines.experimental");
}
@TestMetadata("tailCallIfReturnUnit.kt")
public void testTailCallIfReturnUnit_1_3() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/tailcall/tailCallIfReturnUnit.kt", "kotlin.coroutines");
}
@TestMetadata("tailCallIntrinsics.kt")
public void testTailCallIntrinsics_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/tailcall/tailCallIntrinsics.kt", "kotlin.coroutines.experimental");