mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Instead of generating overrides for getOwner/getName/getSignature in each anonymous class representing a callable reference, pass them to the superclass' constructor and store as fields. This occupies some small memory but helps to reduce the size of the generated class files, and will be helpful for adding further runtime information to callable references, such as information about implicit conversions this reference has been subject to. Represent owner as java.lang.Class + boolean instead of KDeclarationContainer, so that the unnecessary wrapping Class->KClass wouldn't happen before it's needed, and also to make sure all callable references remain serializable. Note that the argument type where the "is declaration container a class" is passed is int instead of boolean. The plan is to pass the aforementioned implicit conversion information as bits of this same integer value. #KT-27362 Fixed
55 lines
2.5 KiB
Plaintext
Vendored
55 lines
2.5 KiB
Plaintext
Vendored
@kotlin.Metadata
|
|
public final class A {
|
|
private final field bar: int
|
|
public method <init>(): void
|
|
public final method foo(): void
|
|
public final method getBar(): int
|
|
}
|
|
|
|
@kotlin.Metadata
|
|
synthetic final class NoReceiverInCallableReferenceClassesKt$A_bar$1 {
|
|
public final static field INSTANCE: kotlin.reflect.KProperty1
|
|
static method <clinit>(): void
|
|
method <init>(): void
|
|
public @org.jetbrains.annotations.Nullable method get(@org.jetbrains.annotations.Nullable p0: java.lang.Object): java.lang.Object
|
|
}
|
|
|
|
@kotlin.Metadata
|
|
synthetic final class NoReceiverInCallableReferenceClassesKt$A_foo$1 {
|
|
public final static field INSTANCE: NoReceiverInCallableReferenceClassesKt$A_foo$1
|
|
inner class NoReceiverInCallableReferenceClassesKt$A_foo$1
|
|
static method <clinit>(): void
|
|
method <init>(): void
|
|
public final method invoke(@org.jetbrains.annotations.NotNull p0: A): void
|
|
public synthetic bridge method invoke(p0: java.lang.Object): java.lang.Object
|
|
}
|
|
|
|
@kotlin.Metadata
|
|
synthetic final class NoReceiverInCallableReferenceClassesKt$aBar$1 {
|
|
method <init>(p0: A): void
|
|
public @org.jetbrains.annotations.Nullable method get(): java.lang.Object
|
|
}
|
|
|
|
@kotlin.Metadata
|
|
synthetic final class NoReceiverInCallableReferenceClassesKt$aFoo$1 {
|
|
inner class NoReceiverInCallableReferenceClassesKt$aFoo$1
|
|
method <init>(p0: A): void
|
|
public synthetic bridge method invoke(): java.lang.Object
|
|
public final method invoke(): void
|
|
}
|
|
|
|
@kotlin.Metadata
|
|
public final class NoReceiverInCallableReferenceClassesKt {
|
|
private final static @org.jetbrains.annotations.NotNull field A_bar: kotlin.reflect.KProperty1
|
|
private final static @org.jetbrains.annotations.NotNull field A_foo: kotlin.reflect.KFunction
|
|
private final static @org.jetbrains.annotations.NotNull field aBar: kotlin.reflect.KProperty0
|
|
private final static @org.jetbrains.annotations.NotNull field aFoo: kotlin.reflect.KFunction
|
|
inner class NoReceiverInCallableReferenceClassesKt$A_foo$1
|
|
inner class NoReceiverInCallableReferenceClassesKt$aFoo$1
|
|
static method <clinit>(): void
|
|
public final static @org.jetbrains.annotations.NotNull method getABar(): kotlin.reflect.KProperty0
|
|
public final static @org.jetbrains.annotations.NotNull method getAFoo(): kotlin.reflect.KFunction
|
|
public final static @org.jetbrains.annotations.NotNull method getA_bar(): kotlin.reflect.KProperty1
|
|
public final static @org.jetbrains.annotations.NotNull method getA_foo(): kotlin.reflect.KFunction
|
|
}
|