Support inline suspend functions
A lot of additional work was required to support them: - Suspension points are being identified by two markers instead of one pointing to suspend function call - Approach with replacing return type of suspend function does not work anymore. So we decode suspension return type as an argument for begin marker - It became necessary to perform variables liveness analysis (see comment in org.jetbrains.kotlin.codegen.coroutines.CoroutineTransformerMethodVisitor.spillVariables)
This commit is contained in:
@@ -4159,6 +4159,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlineSuspendFunction.kt")
|
||||
public void testInlineSuspendFunction() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlineSuspendFunction.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("inlinedTryCatchFinally.kt")
|
||||
public void testInlinedTryCatchFinally() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/coroutines/inlinedTryCatchFinally.kt");
|
||||
|
||||
Reference in New Issue
Block a user