JVM IR: improve ABI of properties in multifile facades
When copying top level declarations from multifile parts to facades, also copy corresponding properties. This allows to keep their annotations, which are later used in codegen (for example, to generate ACC_DEPRECATED on property accessors), and allows to get rid of the hack where the JVM name of the property accessor was computed prematurely via methodSignatureMapper. Also, don't copy `$annotations` methods for non-const properties to facades because the old backend only generates them in parts (which might be a separate problem, see KT-27644). #KT-40262 Fixed
This commit is contained in:
+2
-2
@@ -5,8 +5,8 @@ public final class A {
|
||||
public final static method internal(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
||||
public synthetic static method internalInline$default(p0: java.lang.String, p1: int, p2: int, p3: java.lang.Object): void
|
||||
public final static method internalInline(@org.jetbrains.annotations.NotNull p0: java.lang.String, p1: int): void
|
||||
synthetic static method private$A__TestKt$default(p0: java.lang.String, p1: int, p2: java.lang.Object): void
|
||||
synthetic static method privateInline$A__TestKt$default(p0: java.lang.String, p1: int, p2: int, p3: java.lang.Object): void
|
||||
synthetic static method private$default(p0: java.lang.String, p1: int, p2: java.lang.Object): void
|
||||
synthetic static method privateInline$default(p0: java.lang.String, p1: int, p2: int, p3: java.lang.Object): void
|
||||
public synthetic static method public$default(p0: java.lang.String, p1: int, p2: java.lang.Object): void
|
||||
public final static method public(@org.jetbrains.annotations.NotNull p0: java.lang.String): void
|
||||
public synthetic static method publicInline$default(p0: java.lang.String, p1: int, p2: int, p3: java.lang.Object): void
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// WITH_RUNTIME
|
||||
// FILE: part.kt
|
||||
|
||||
@file:JvmMultifileClass
|
||||
@file:JvmName("A")
|
||||
|
||||
package test
|
||||
|
||||
@Deprecated("")
|
||||
val str: String
|
||||
get() = ""
|
||||
|
||||
@Deprecated("")
|
||||
fun f() {}
|
||||
|
||||
@Deprecated("")
|
||||
val Int.ext: Int get() = this
|
||||
|
||||
var Int.extA: Int
|
||||
get() = this
|
||||
@Deprecated("")
|
||||
set(value) {}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
@kotlin.Metadata
|
||||
public final class test/A {
|
||||
// source: 'part.kt'
|
||||
public deprecated final static @kotlin.Deprecated method f(): void
|
||||
public deprecated final static method getExt(p0: int): int
|
||||
public final static method getExtA(p0: int): int
|
||||
public deprecated final static @org.jetbrains.annotations.NotNull method getStr(): java.lang.String
|
||||
public deprecated final static @kotlin.Deprecated method setExtA(p0: int, p1: int): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
synthetic final class test/A__PartKt {
|
||||
// source: 'part.kt'
|
||||
public deprecated final static @kotlin.Deprecated method f(): void
|
||||
public synthetic deprecated static @kotlin.Deprecated method getExt$annotations(p0: int): void
|
||||
public deprecated final static method getExt(p0: int): int
|
||||
public final static method getExtA(p0: int): int
|
||||
public synthetic deprecated static @kotlin.Deprecated method getStr$annotations(): void
|
||||
public deprecated final static @org.jetbrains.annotations.NotNull method getStr(): java.lang.String
|
||||
public deprecated final static @kotlin.Deprecated method setExtA(p0: int, p1: int): void
|
||||
}
|
||||
Reference in New Issue
Block a user