IC & Coroutines: Unbox inline classes of suspend lambdas
inside 'invoke' if 'create' does not override 'create' from BaseContinuationImpl. In other words, when suspend lambda accepts more than one parameter (including receiver). Do that only if we do not generate bridge 'invoke' method, since inline classes are unboxed in the bridge. Use mangled name for 'create' function in this case inside 'invoke'. #KT-43249 In progress #KT-39847 Fixed #KT-38937 Fixed
This commit is contained in:
Generated
+15
@@ -6498,6 +6498,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Int.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("createMangling.kt")
|
||||
public void testCreateMangling() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/createMangling.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericOverrideSuspendFun.kt")
|
||||
public void testGenericOverrideSuspendFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun.kt");
|
||||
@@ -6715,6 +6720,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("createMangling.kt")
|
||||
public void testCreateMangling() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/createMangling.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericOverrideSuspendFun.kt")
|
||||
public void testGenericOverrideSuspendFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt");
|
||||
@@ -6927,6 +6937,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("createMangling.kt")
|
||||
public void testCreateMangling() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/createMangling.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericOverrideSuspendFun.kt")
|
||||
public void testGenericOverrideSuspendFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt");
|
||||
|
||||
Generated
+15
@@ -6498,6 +6498,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Int.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("createMangling.kt")
|
||||
public void testCreateMangling() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/createMangling.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericOverrideSuspendFun.kt")
|
||||
public void testGenericOverrideSuspendFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun.kt");
|
||||
@@ -6715,6 +6720,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("createMangling.kt")
|
||||
public void testCreateMangling() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/createMangling.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericOverrideSuspendFun.kt")
|
||||
public void testGenericOverrideSuspendFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt");
|
||||
@@ -6927,6 +6937,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("createMangling.kt")
|
||||
public void testCreateMangling() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/createMangling.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericOverrideSuspendFun.kt")
|
||||
public void testGenericOverrideSuspendFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt");
|
||||
|
||||
+15
@@ -6498,6 +6498,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/covariantOverrideSuspendFun_Int.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("createMangling.kt")
|
||||
public void testCreateMangling() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/createMangling.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericOverrideSuspendFun.kt")
|
||||
public void testGenericOverrideSuspendFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/direct/genericOverrideSuspendFun.kt");
|
||||
@@ -6715,6 +6720,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/covariantOverrideSuspendFun_Int.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("createMangling.kt")
|
||||
public void testCreateMangling() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/createMangling.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericOverrideSuspendFun.kt")
|
||||
public void testGenericOverrideSuspendFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resume/genericOverrideSuspendFun.kt");
|
||||
@@ -6927,6 +6937,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/covariantOverrideSuspendFun_Int.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("createMangling.kt")
|
||||
public void testCreateMangling() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/createMangling.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericOverrideSuspendFun.kt")
|
||||
public void testGenericOverrideSuspendFun() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/coroutines/inlineClasses/resumeWithException/genericOverrideSuspendFun.kt");
|
||||
|
||||
Reference in New Issue
Block a user