JVM_IR: box bound receiver before calling the reference constructor
This is needed for the inliner: since the information about Kotlin type of the bound receiver is nowhere in the output binary, the inliner will have no clue how to box inline class values. Moving the boxing outside the object means the inliner doesn't need to know about it; from its point of view, the captured value has type `Any`.
This commit is contained in:
+15
@@ -1490,6 +1490,21 @@ public class IrJsCodegenInlineES6TestGenerated extends AbstractIrJsCodegenInline
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMethod.kt")
|
||||
public void testBoundInlineClassMethod() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMethodWithAny.kt")
|
||||
public void testBoundInlineClassMethodWithAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMethodWithInt.kt")
|
||||
public void testBoundInlineClassMethodWithInt() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundPropertyReference.kt")
|
||||
public void testBoundPropertyReference() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt");
|
||||
|
||||
Generated
+15
@@ -1490,6 +1490,21 @@ public class IrJsCodegenInlineTestGenerated extends AbstractIrJsCodegenInlineTes
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMethod.kt")
|
||||
public void testBoundInlineClassMethod() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMethodWithAny.kt")
|
||||
public void testBoundInlineClassMethodWithAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMethodWithInt.kt")
|
||||
public void testBoundInlineClassMethodWithInt() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundPropertyReference.kt")
|
||||
public void testBoundPropertyReference() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt");
|
||||
|
||||
Generated
+15
@@ -1490,6 +1490,21 @@ public class JsCodegenInlineTestGenerated extends AbstractJsCodegenInlineTest {
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundFunctionReferenceOnLong.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMethod.kt")
|
||||
public void testBoundInlineClassMethod() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethod.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMethodWithAny.kt")
|
||||
public void testBoundInlineClassMethodWithAny() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithAny.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundInlineClassMethodWithInt.kt")
|
||||
public void testBoundInlineClassMethodWithInt() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundInlineClassMethodWithInt.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("boundPropertyReference.kt")
|
||||
public void testBoundPropertyReference() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/defaultValues/lambdaInlining/callableReferences/boundPropertyReference.kt");
|
||||
|
||||
Reference in New Issue
Block a user