Simplify tail-call optimisation check

Check, that all suspension points are immediately followed by ARETURN
and do not check that all these ARETURNs are immediately preceded by
suspension points.
 #KT-27190 Fixed
This commit is contained in:
Ilmir Usmanov
2018-10-11 18:56:48 +03:00
parent d11fbac511
commit a5bcd3495e
4 changed files with 28 additions and 7 deletions
@@ -493,6 +493,11 @@ 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() throws Exception {
runTest("compiler/testData/codegen/bytecodeListing/tailcall/tailCallIfReturnUnit.kt");
}
@TestMetadata("tailCallIntrinsics.kt")
public void testTailCallIntrinsics_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/bytecodeListing/tailcall/tailCallIntrinsics.kt", "kotlin.coroutines.experimental");