Drop Callable and primary/secondary constructor proto messages
This commit is contained in:
@@ -111,13 +111,6 @@ extend Property {
|
||||
optional int32 property_impl_class_name = 101 [(string_id_in_table) = true];
|
||||
}
|
||||
|
||||
// TODO: drop
|
||||
extend Callable {
|
||||
optional JvmMethodSignature old_method_signature = 100;
|
||||
optional JvmPropertySignature old_property_signature = 101;
|
||||
optional int32 old_impl_class_name = 102 [(name_id_in_table) = true];
|
||||
}
|
||||
|
||||
extend Type {
|
||||
repeated Annotation type_annotation = 100;
|
||||
optional bool is_raw = 101;
|
||||
|
||||
+5
-51
@@ -104,25 +104,6 @@ public abstract class AbstractBinaryClassAnnotationAndConstantLoader<A : Any, C
|
||||
|
||||
loadPropertyAnnotations(propertyAnnotations, fieldAnnotations)
|
||||
}
|
||||
is ProtoBuf.Callable -> {
|
||||
val nameResolver = container.nameResolver
|
||||
if (kind == AnnotatedCallableKind.PROPERTY) {
|
||||
val syntheticFunctionSignature = getPropertySignature(proto, nameResolver, synthetic = true)
|
||||
val fieldSignature = getPropertySignature(proto, nameResolver, field = true)
|
||||
|
||||
val propertyAnnotations = syntheticFunctionSignature?.let { sig ->
|
||||
findClassAndLoadMemberAnnotations(container, proto, sig)
|
||||
} ?: listOf()
|
||||
|
||||
val fieldAnnotations = fieldSignature?.let { sig ->
|
||||
findClassAndLoadMemberAnnotations(container, proto, sig, isStaticFieldInOuter(proto))
|
||||
} ?: listOf()
|
||||
|
||||
return loadPropertyAnnotations(propertyAnnotations, fieldAnnotations)
|
||||
}
|
||||
val signature = getCallableSignature(proto, nameResolver, kind) ?: return emptyList()
|
||||
transformAnnotations(findClassAndLoadMemberAnnotations(container, proto, signature))
|
||||
}
|
||||
else -> emptyList()
|
||||
}
|
||||
}
|
||||
@@ -231,19 +212,13 @@ public abstract class AbstractBinaryClassAnnotationAndConstantLoader<A : Any, C
|
||||
nameResolver.getName(proto.getExtension(methodImplClassName))
|
||||
proto is ProtoBuf.Property && proto.hasExtension(propertyImplClassName) ->
|
||||
nameResolver.getName(proto.getExtension(propertyImplClassName))
|
||||
proto is ProtoBuf.Callable && proto.hasExtension(oldImplClassName) ->
|
||||
nameResolver.getName(proto.getExtension(oldImplClassName))
|
||||
else -> null
|
||||
}
|
||||
|
||||
private fun isStaticFieldInOuter(proto: MessageLite): Boolean =
|
||||
when {
|
||||
proto is ProtoBuf.Property && proto.hasExtension(propertySignature) ->
|
||||
proto.getExtension(propertySignature).let { it.hasField() && it.field.isStaticInOuter }
|
||||
proto is ProtoBuf.Callable && proto.hasExtension(oldPropertySignature) ->
|
||||
proto.getExtension(oldPropertySignature).let { it.hasField() && it.field.isStaticInOuter }
|
||||
else -> false
|
||||
}
|
||||
if (proto is ProtoBuf.Property && proto.hasExtension(propertySignature))
|
||||
proto.getExtension(propertySignature).let { it.hasField() && it.field.isStaticInOuter }
|
||||
else false
|
||||
|
||||
private fun loadAnnotationsAndInitializers(kotlinClass: KotlinJvmBinaryClass): Storage<A, C> {
|
||||
val memberAnnotations = HashMap<MemberSignature, MutableList<A>>()
|
||||
@@ -300,16 +275,13 @@ public abstract class AbstractBinaryClassAnnotationAndConstantLoader<A : Any, C
|
||||
}
|
||||
|
||||
private fun getPropertySignature(
|
||||
proto: MessageLite,
|
||||
proto: ProtoBuf.Property,
|
||||
nameResolver: NameResolver,
|
||||
field: Boolean = false,
|
||||
synthetic: Boolean = false
|
||||
): MemberSignature? {
|
||||
val signature =
|
||||
if (proto is ProtoBuf.Property && proto.hasExtension(propertySignature))
|
||||
proto.getExtension(propertySignature)
|
||||
else if (proto is ProtoBuf.Callable && proto.hasExtension(oldPropertySignature))
|
||||
proto.getExtension(oldPropertySignature)
|
||||
if (proto.hasExtension(propertySignature)) proto.getExtension(propertySignature)
|
||||
else return null
|
||||
|
||||
if (field && signature.hasField()) {
|
||||
@@ -339,24 +311,6 @@ public abstract class AbstractBinaryClassAnnotationAndConstantLoader<A : Any, C
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
proto is ProtoBuf.Callable -> {
|
||||
when (kind) {
|
||||
AnnotatedCallableKind.FUNCTION ->
|
||||
if (proto.hasExtension(oldMethodSignature))
|
||||
MemberSignature.fromMethod(nameResolver, proto.getExtension(oldMethodSignature))
|
||||
else null
|
||||
AnnotatedCallableKind.PROPERTY_GETTER ->
|
||||
if (proto.hasExtension(oldPropertySignature))
|
||||
MemberSignature.fromMethod(nameResolver, proto.getExtension(oldPropertySignature).getter)
|
||||
else null
|
||||
AnnotatedCallableKind.PROPERTY_SETTER ->
|
||||
if (proto.hasExtension(oldPropertySignature))
|
||||
MemberSignature.fromMethod(nameResolver, proto.getExtension(oldPropertySignature).setter)
|
||||
else null
|
||||
AnnotatedCallableKind.PROPERTY ->
|
||||
getPropertySignature(proto, nameResolver, true, true)
|
||||
}
|
||||
}
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
||||
-48
@@ -12,9 +12,6 @@ public final class JvmProtoBuf {
|
||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.methodImplClassName);
|
||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.propertySignature);
|
||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.propertyImplClassName);
|
||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.oldMethodSignature);
|
||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.oldPropertySignature);
|
||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.oldImplClassName);
|
||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.typeAnnotation);
|
||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.isRaw);
|
||||
registry.add(org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.index);
|
||||
@@ -3788,51 +3785,6 @@ public final class JvmProtoBuf {
|
||||
null,
|
||||
101,
|
||||
com.google.protobuf.WireFormat.FieldType.INT32);
|
||||
public static final int OLD_METHOD_SIGNATURE_FIELD_NUMBER = 100;
|
||||
/**
|
||||
* <code>extend .org.jetbrains.kotlin.serialization.Callable { ... }</code>
|
||||
*/
|
||||
public static final
|
||||
com.google.protobuf.GeneratedMessageLite.GeneratedExtension<
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Callable,
|
||||
org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmMethodSignature> oldMethodSignature = com.google.protobuf.GeneratedMessageLite
|
||||
.newSingularGeneratedExtension(
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Callable.getDefaultInstance(),
|
||||
org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmMethodSignature.getDefaultInstance(),
|
||||
org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmMethodSignature.getDefaultInstance(),
|
||||
null,
|
||||
100,
|
||||
com.google.protobuf.WireFormat.FieldType.MESSAGE);
|
||||
public static final int OLD_PROPERTY_SIGNATURE_FIELD_NUMBER = 101;
|
||||
/**
|
||||
* <code>extend .org.jetbrains.kotlin.serialization.Callable { ... }</code>
|
||||
*/
|
||||
public static final
|
||||
com.google.protobuf.GeneratedMessageLite.GeneratedExtension<
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Callable,
|
||||
org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmPropertySignature> oldPropertySignature = com.google.protobuf.GeneratedMessageLite
|
||||
.newSingularGeneratedExtension(
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Callable.getDefaultInstance(),
|
||||
org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmPropertySignature.getDefaultInstance(),
|
||||
org.jetbrains.kotlin.serialization.jvm.JvmProtoBuf.JvmPropertySignature.getDefaultInstance(),
|
||||
null,
|
||||
101,
|
||||
com.google.protobuf.WireFormat.FieldType.MESSAGE);
|
||||
public static final int OLD_IMPL_CLASS_NAME_FIELD_NUMBER = 102;
|
||||
/**
|
||||
* <code>extend .org.jetbrains.kotlin.serialization.Callable { ... }</code>
|
||||
*/
|
||||
public static final
|
||||
com.google.protobuf.GeneratedMessageLite.GeneratedExtension<
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Callable,
|
||||
java.lang.Integer> oldImplClassName = com.google.protobuf.GeneratedMessageLite
|
||||
.newSingularGeneratedExtension(
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Callable.getDefaultInstance(),
|
||||
0,
|
||||
null,
|
||||
null,
|
||||
102,
|
||||
com.google.protobuf.WireFormat.FieldType.INT32);
|
||||
public static final int TYPE_ANNOTATION_FIELD_NUMBER = 100;
|
||||
/**
|
||||
* <code>extend .org.jetbrains.kotlin.serialization.Type { ... }</code>
|
||||
|
||||
+6
-3
@@ -44,9 +44,12 @@ class BuiltInsAnnotationAndConstantLoader(
|
||||
proto: MessageLite,
|
||||
kind: AnnotatedCallableKind
|
||||
): List<AnnotationWithTarget> {
|
||||
proto as ProtoBuf.Callable // TODO
|
||||
|
||||
val annotations = proto.getExtension(BuiltInsProtoBuf.oldCallableAnnotation).orEmpty()
|
||||
val annotations = when (proto) {
|
||||
is ProtoBuf.Constructor -> proto.getExtension(BuiltInsProtoBuf.constructorAnnotation)
|
||||
is ProtoBuf.Function -> proto.getExtension(BuiltInsProtoBuf.functionAnnotation)
|
||||
is ProtoBuf.Property -> proto.getExtension(BuiltInsProtoBuf.propertyAnnotation)
|
||||
else -> error("Unknown message: $proto")
|
||||
}.orEmpty()
|
||||
return annotations.map { proto -> AnnotationWithTarget(deserializer.deserializeAnnotation(proto, container.nameResolver), null) }
|
||||
}
|
||||
|
||||
|
||||
@@ -110,10 +110,6 @@ public class DescriptorFactory {
|
||||
return new DefaultConstructorDescriptor(containingClass, source);
|
||||
}
|
||||
|
||||
public static boolean isDefaultPrimaryConstructor(@NotNull ConstructorDescriptor constructor) {
|
||||
return constructor instanceof DefaultConstructorDescriptor;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static SimpleFunctionDescriptor createEnumValuesMethod(@NotNull ClassDescriptor enumClass) {
|
||||
SimpleFunctionDescriptorImpl values =
|
||||
|
||||
@@ -30,11 +30,6 @@ extend Class {
|
||||
repeated Annotation class_annotation = 150;
|
||||
}
|
||||
|
||||
extend Callable {
|
||||
repeated Annotation old_callable_annotation = 150;
|
||||
optional Annotation.Argument.Value old_compile_time_value = 151;
|
||||
}
|
||||
|
||||
extend Constructor {
|
||||
repeated Annotation constructor_annotation = 150;
|
||||
}
|
||||
|
||||
@@ -177,28 +177,12 @@ message Class {
|
||||
repeated Function function = 9;
|
||||
repeated Property property = 10;
|
||||
|
||||
repeated Callable member = 11;
|
||||
|
||||
repeated int32 enum_entry = 12 [packed = true, (name_id_in_table) = true];
|
||||
|
||||
message PrimaryConstructor {
|
||||
// If this field is present, it contains serialized data for the primary constructor.
|
||||
// Otherwise it's default and can be created manually upon deserialization
|
||||
// Note: currently only objects have default primary constructor
|
||||
optional Callable data = 1;
|
||||
}
|
||||
|
||||
// This field is present if and only if the class has a primary constructor
|
||||
optional PrimaryConstructor primary_constructor = 13;
|
||||
repeated Callable secondary_constructor = 14;
|
||||
|
||||
extensions 100 to 199;
|
||||
}
|
||||
|
||||
message Package {
|
||||
repeated Callable member = 1;
|
||||
|
||||
repeated Constructor constructor = 2;
|
||||
repeated Function function = 3;
|
||||
repeated Property property = 4;
|
||||
|
||||
@@ -279,46 +263,6 @@ message Property {
|
||||
extensions 100 to 199;
|
||||
}
|
||||
|
||||
message Callable {
|
||||
/*
|
||||
Visibility
|
||||
Modality
|
||||
hasAnnotations
|
||||
CallableKind
|
||||
MemberKind
|
||||
hasGetter
|
||||
hasSetter
|
||||
hasConstant
|
||||
isConst
|
||||
lateinit
|
||||
isOperator
|
||||
isInfix
|
||||
*/
|
||||
optional int32 flags = 1;
|
||||
|
||||
/*
|
||||
isNotDefault
|
||||
Visibility
|
||||
Modality
|
||||
hasAnnotations
|
||||
*/
|
||||
optional int32 getter_flags = 9 /* absent => same as property */;
|
||||
optional int32 setter_flags = 10 /* absent => same as property */;
|
||||
|
||||
repeated TypeParameter type_parameter = 4;
|
||||
|
||||
optional Type receiver_type = 5;
|
||||
|
||||
required int32 name = 6 [(name_id_in_table) = true];
|
||||
|
||||
// Value parameters for functions and constructors, or setter value parameter for properties
|
||||
repeated ValueParameter value_parameter = 7;
|
||||
|
||||
required Type return_type = 8;
|
||||
|
||||
extensions 100 to 199;
|
||||
}
|
||||
|
||||
message ValueParameter {
|
||||
/*
|
||||
declaresDefault
|
||||
@@ -353,14 +297,6 @@ enum Visibility {
|
||||
LOCAL = 0x05;
|
||||
}
|
||||
|
||||
enum CallableKind {
|
||||
// 2 bits
|
||||
FUN = 0;
|
||||
VAL = 1;
|
||||
VAR = 2;
|
||||
CONSTRUCTOR = 3;
|
||||
}
|
||||
|
||||
enum MemberKind {
|
||||
// 2 bits
|
||||
DECLARATION = 0;
|
||||
|
||||
@@ -36,8 +36,11 @@ public class Flags {
|
||||
|
||||
// Callables
|
||||
|
||||
public static final FlagField<ProtoBuf.CallableKind> CALLABLE_KIND = FlagField.after(MODALITY, ProtoBuf.CallableKind.values());
|
||||
public static final FlagField<ProtoBuf.MemberKind> MEMBER_KIND = FlagField.after(CALLABLE_KIND, ProtoBuf.MemberKind.values());
|
||||
// TODO: use these flags
|
||||
public static final FlagField<Boolean> RESERVED_1 = FlagField.booleanAfter(MODALITY);
|
||||
public static final FlagField<Boolean> RESERVED_2 = FlagField.booleanAfter(RESERVED_1);
|
||||
|
||||
public static final FlagField<ProtoBuf.MemberKind> MEMBER_KIND = FlagField.after(RESERVED_2, ProtoBuf.MemberKind.values());
|
||||
|
||||
// Constructors
|
||||
|
||||
@@ -57,16 +60,6 @@ public class Flags {
|
||||
public static final FlagField<Boolean> LATE_INIT = FlagField.booleanAfter(IS_CONST);
|
||||
public static final FlagField<Boolean> HAS_CONSTANT = FlagField.booleanAfter(LATE_INIT);
|
||||
|
||||
// Old callables. TODO: delete
|
||||
|
||||
public static final FlagField<Boolean> OLD_HAS_GETTER = FlagField.booleanAfter(MEMBER_KIND);
|
||||
public static final FlagField<Boolean> OLD_HAS_SETTER = FlagField.booleanAfter(OLD_HAS_GETTER);
|
||||
public static final FlagField<Boolean> OLD_HAS_CONSTANT = FlagField.booleanAfter(OLD_HAS_SETTER);
|
||||
public static final FlagField<Boolean> OLD_IS_CONST = FlagField.booleanAfter(OLD_HAS_CONSTANT);
|
||||
public static final FlagField<Boolean> OLD_LATE_INIT = FlagField.booleanAfter(OLD_IS_CONST);
|
||||
public static final FlagField<Boolean> OLD_IS_OPERATOR = FlagField.booleanAfter(OLD_LATE_INIT);
|
||||
public static final FlagField<Boolean> OLD_IS_INFIX = FlagField.booleanAfter(OLD_IS_OPERATOR);
|
||||
|
||||
// Parameters
|
||||
|
||||
public static final FlagField<Boolean> DECLARES_DEFAULT_VALUE = FlagField.booleanAfter(HAS_ANNOTATIONS);
|
||||
@@ -123,35 +116,6 @@ public class Flags {
|
||||
throw new IllegalArgumentException("Unknown class kind: " + kind);
|
||||
}
|
||||
|
||||
public static int getCallableFlags(
|
||||
boolean hasAnnotations,
|
||||
@NotNull Visibility visibility,
|
||||
@NotNull Modality modality,
|
||||
@NotNull CallableMemberDescriptor.Kind memberKind,
|
||||
@NotNull ProtoBuf.CallableKind callableKind,
|
||||
boolean hasGetter,
|
||||
boolean hasSetter,
|
||||
boolean hasConstant,
|
||||
boolean lateInit,
|
||||
boolean isConst,
|
||||
boolean isOperator,
|
||||
boolean isInfix
|
||||
) {
|
||||
return HAS_ANNOTATIONS.toFlags(hasAnnotations)
|
||||
| MODALITY.toFlags(modality(modality))
|
||||
| VISIBILITY.toFlags(visibility(visibility))
|
||||
| MEMBER_KIND.toFlags(memberKind(memberKind))
|
||||
| CALLABLE_KIND.toFlags(callableKind)
|
||||
| OLD_HAS_GETTER.toFlags(hasGetter)
|
||||
| OLD_HAS_SETTER.toFlags(hasSetter)
|
||||
| OLD_HAS_CONSTANT.toFlags(hasConstant)
|
||||
| OLD_LATE_INIT.toFlags(lateInit)
|
||||
| OLD_IS_CONST.toFlags(isConst)
|
||||
| OLD_IS_OPERATOR.toFlags(isOperator)
|
||||
| OLD_IS_INFIX.toFlags(isInfix)
|
||||
;
|
||||
}
|
||||
|
||||
public static int getConstructorFlags(
|
||||
boolean hasAnnotations,
|
||||
@NotNull Visibility visibility,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
-32
@@ -9,8 +9,6 @@ public final class BuiltInsProtoBuf {
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
registry.add(org.jetbrains.kotlin.serialization.builtins.BuiltInsProtoBuf.className);
|
||||
registry.add(org.jetbrains.kotlin.serialization.builtins.BuiltInsProtoBuf.classAnnotation);
|
||||
registry.add(org.jetbrains.kotlin.serialization.builtins.BuiltInsProtoBuf.oldCallableAnnotation);
|
||||
registry.add(org.jetbrains.kotlin.serialization.builtins.BuiltInsProtoBuf.oldCompileTimeValue);
|
||||
registry.add(org.jetbrains.kotlin.serialization.builtins.BuiltInsProtoBuf.constructorAnnotation);
|
||||
registry.add(org.jetbrains.kotlin.serialization.builtins.BuiltInsProtoBuf.functionAnnotation);
|
||||
registry.add(org.jetbrains.kotlin.serialization.builtins.BuiltInsProtoBuf.propertyAnnotation);
|
||||
@@ -48,36 +46,6 @@ public final class BuiltInsProtoBuf {
|
||||
150,
|
||||
com.google.protobuf.WireFormat.FieldType.MESSAGE,
|
||||
false);
|
||||
public static final int OLD_CALLABLE_ANNOTATION_FIELD_NUMBER = 150;
|
||||
/**
|
||||
* <code>extend .org.jetbrains.kotlin.serialization.Callable { ... }</code>
|
||||
*/
|
||||
public static final
|
||||
com.google.protobuf.GeneratedMessageLite.GeneratedExtension<
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Callable,
|
||||
java.util.List<org.jetbrains.kotlin.serialization.ProtoBuf.Annotation>> oldCallableAnnotation = com.google.protobuf.GeneratedMessageLite
|
||||
.newRepeatedGeneratedExtension(
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Callable.getDefaultInstance(),
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Annotation.getDefaultInstance(),
|
||||
null,
|
||||
150,
|
||||
com.google.protobuf.WireFormat.FieldType.MESSAGE,
|
||||
false);
|
||||
public static final int OLD_COMPILE_TIME_VALUE_FIELD_NUMBER = 151;
|
||||
/**
|
||||
* <code>extend .org.jetbrains.kotlin.serialization.Callable { ... }</code>
|
||||
*/
|
||||
public static final
|
||||
com.google.protobuf.GeneratedMessageLite.GeneratedExtension<
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Callable,
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Annotation.Argument.Value> oldCompileTimeValue = com.google.protobuf.GeneratedMessageLite
|
||||
.newSingularGeneratedExtension(
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Callable.getDefaultInstance(),
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Annotation.Argument.Value.getDefaultInstance(),
|
||||
org.jetbrains.kotlin.serialization.ProtoBuf.Annotation.Argument.Value.getDefaultInstance(),
|
||||
null,
|
||||
151,
|
||||
com.google.protobuf.WireFormat.FieldType.MESSAGE);
|
||||
public static final int CONSTRUCTOR_ANNOTATION_FIELD_NUMBER = 150;
|
||||
/**
|
||||
* <code>extend .org.jetbrains.kotlin.serialization.Constructor { ... }</code>
|
||||
|
||||
+8
-8
@@ -39,18 +39,18 @@ public class MemberDeserializer(private val c: DeserializationContext) {
|
||||
getAnnotations(proto, flags, AnnotatedCallableKind.PROPERTY),
|
||||
Deserialization.modality(Flags.MODALITY.get(flags)),
|
||||
Deserialization.visibility(Flags.VISIBILITY.get(flags)),
|
||||
Flags.CALLABLE_KIND.get(flags) == ProtoBuf.CallableKind.VAR,
|
||||
Flags.IS_VAR.get(flags),
|
||||
c.nameResolver.getName(proto.getName()),
|
||||
Deserialization.memberKind(Flags.MEMBER_KIND.get(flags)),
|
||||
proto,
|
||||
c.nameResolver,
|
||||
Flags.OLD_LATE_INIT.get(flags),
|
||||
Flags.OLD_IS_CONST.get(flags)
|
||||
Flags.LATE_INIT.get(flags),
|
||||
Flags.IS_CONST.get(flags)
|
||||
)
|
||||
|
||||
val local = c.childContext(property, proto.getTypeParameterList())
|
||||
|
||||
val hasGetter = Flags.OLD_HAS_GETTER.get(flags)
|
||||
val hasGetter = Flags.HAS_GETTER.get(flags)
|
||||
val receiverAnnotations = if (hasGetter && proto.hasReceiverType())
|
||||
getReceiverParameterAnnotations(proto, AnnotatedCallableKind.PROPERTY_GETTER)
|
||||
else
|
||||
@@ -87,7 +87,7 @@ public class MemberDeserializer(private val c: DeserializationContext) {
|
||||
null
|
||||
}
|
||||
|
||||
val setter = if (Flags.OLD_HAS_SETTER.get(flags)) {
|
||||
val setter = if (Flags.HAS_SETTER.get(flags)) {
|
||||
val setterFlags = proto.getSetterFlags()
|
||||
val isNotDefault = proto.hasSetterFlags() && Flags.IS_NOT_DEFAULT.get(setterFlags)
|
||||
if (isNotDefault) {
|
||||
@@ -115,7 +115,7 @@ public class MemberDeserializer(private val c: DeserializationContext) {
|
||||
null
|
||||
}
|
||||
|
||||
if (Flags.OLD_HAS_CONSTANT.get(flags)) {
|
||||
if (Flags.HAS_CONSTANT.get(flags)) {
|
||||
property.setCompileTimeInitializer(
|
||||
c.storageManager.createNullableLazyValue {
|
||||
val container = c.containingDeclaration.asProtoContainer()!!
|
||||
@@ -145,8 +145,8 @@ public class MemberDeserializer(private val c: DeserializationContext) {
|
||||
Deserialization.modality(Flags.MODALITY.get(proto.flags)),
|
||||
Deserialization.visibility(Flags.VISIBILITY.get(proto.flags))
|
||||
)
|
||||
function.isOperator = Flags.OLD_IS_OPERATOR.get(proto.flags)
|
||||
function.isInfix = Flags.OLD_IS_INFIX.get(proto.flags)
|
||||
function.isOperator = Flags.IS_OPERATOR.get(proto.flags)
|
||||
function.isInfix = Flags.IS_INFIX.get(proto.flags)
|
||||
return function
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -322,7 +322,8 @@ public class DeserializedClassDescriptor(
|
||||
}
|
||||
|
||||
val nameResolver = c.nameResolver
|
||||
return classProto.getMemberList().mapTo(result) { nameResolver.getName(it.getName()) }
|
||||
return classProto.functionList.mapTo(result) { nameResolver.getName(it.name) } +
|
||||
classProto.propertyList.mapTo(result) { nameResolver.getName(it.name) }
|
||||
}
|
||||
|
||||
fun all(): Collection<ClassDescriptor> {
|
||||
|
||||
Reference in New Issue
Block a user