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:
pyos
2021-06-07 13:17:42 +02:00
committed by TeamCityServer
parent 117c99aee6
commit ade8b0a7d3
17 changed files with 228 additions and 9 deletions
@@ -3,7 +3,7 @@ synthetic final class A$testDefaultArguments$1 {
// source: 'adaptedReference.kt'
enclosing method A.testDefaultArguments()V
inner (anonymous) class A$testDefaultArguments$1
method <init>(p0: A): void
method <init>(p0: java.lang.Object): void
public synthetic final static method access$getReceiver$p(p0: A$testDefaultArguments$1): java.lang.Object
public synthetic bridge method invoke(): java.lang.Object
public final @org.jetbrains.annotations.NotNull method invoke(): java.lang.String
@@ -14,7 +14,7 @@ synthetic final class A$testDefaultArguments$2 {
// source: 'adaptedReference.kt'
enclosing method A.testDefaultArguments()V
inner (anonymous) class A$testDefaultArguments$2
method <init>(p0: A): void
method <init>(p0: java.lang.Object): void
public synthetic final static method access$getReceiver$p(p0: A$testDefaultArguments$2): java.lang.Object
public final @org.jetbrains.annotations.Nullable method invoke(@org.jetbrains.annotations.NotNull p0: kotlin.coroutines.Continuation): java.lang.Object
public synthetic bridge method invoke(p0: java.lang.Object): java.lang.Object