Minor, rename field deserializer -> memberDeserializer
This commit is contained in:
+4
-4
@@ -123,8 +123,8 @@ public class MemberDeserializer {
|
|||||||
!isNotDefault,
|
!isNotDefault,
|
||||||
property.getKind(), null, SourceElement.NO_SOURCE);
|
property.getKind(), null, SourceElement.NO_SOURCE);
|
||||||
DeserializationContextWithTypes setterLocal = local.childContext(setter, Collections.<TypeParameter>emptyList());
|
DeserializationContextWithTypes setterLocal = local.childContext(setter, Collections.<TypeParameter>emptyList());
|
||||||
List<ValueParameterDescriptor> valueParameters
|
List<ValueParameterDescriptor> valueParameters =
|
||||||
= setterLocal.getDeserializer().valueParameters(proto, AnnotatedCallableKind.PROPERTY_SETTER);
|
setterLocal.getMemberDeserializer().valueParameters(proto, AnnotatedCallableKind.PROPERTY_SETTER);
|
||||||
assert valueParameters.size() == 1 : "Property setter should have a single value parameter: " + setter;
|
assert valueParameters.size() == 1 : "Property setter should have a single value parameter: " + setter;
|
||||||
setter.initialize(valueParameters.get(0));
|
setter.initialize(valueParameters.get(0));
|
||||||
}
|
}
|
||||||
@@ -166,7 +166,7 @@ public class MemberDeserializer {
|
|||||||
local.getTypeDeserializer().typeOrNull(proto.hasReceiverType() ? proto.getReceiverType() : null),
|
local.getTypeDeserializer().typeOrNull(proto.hasReceiverType() ? proto.getReceiverType() : null),
|
||||||
getDispatchReceiverParameter(),
|
getDispatchReceiverParameter(),
|
||||||
local.getTypeDeserializer().getOwnTypeParameters(),
|
local.getTypeDeserializer().getOwnTypeParameters(),
|
||||||
local.getDeserializer().valueParameters(proto, AnnotatedCallableKind.FUNCTION),
|
local.getMemberDeserializer().valueParameters(proto, AnnotatedCallableKind.FUNCTION),
|
||||||
local.getTypeDeserializer().type(proto.getReturnType()),
|
local.getTypeDeserializer().type(proto.getReturnType()),
|
||||||
modality(Flags.MODALITY.get(flags)),
|
modality(Flags.MODALITY.get(flags)),
|
||||||
visibility(Flags.VISIBILITY.get(flags))
|
visibility(Flags.VISIBILITY.get(flags))
|
||||||
@@ -192,7 +192,7 @@ public class MemberDeserializer {
|
|||||||
DeserializationContextWithTypes local = context.childContext(descriptor, Collections.<TypeParameter>emptyList());
|
DeserializationContextWithTypes local = context.childContext(descriptor, Collections.<TypeParameter>emptyList());
|
||||||
descriptor.initialize(
|
descriptor.initialize(
|
||||||
classDescriptor.getTypeConstructor().getParameters(),
|
classDescriptor.getTypeConstructor().getParameters(),
|
||||||
local.getDeserializer().valueParameters(proto, AnnotatedCallableKind.FUNCTION),
|
local.getMemberDeserializer().valueParameters(proto, AnnotatedCallableKind.FUNCTION),
|
||||||
visibility(Flags.VISIBILITY.get(proto.getFlags()))
|
visibility(Flags.VISIBILITY.get(proto.getFlags()))
|
||||||
);
|
);
|
||||||
descriptor.setReturnType(local.getTypeDeserializer().type(proto.getReturnType()));
|
descriptor.setReturnType(local.getTypeDeserializer().type(proto.getReturnType()));
|
||||||
|
|||||||
+2
-2
@@ -85,13 +85,13 @@ class DeserializationContextWithTypes(
|
|||||||
val containingDeclaration: DeclarationDescriptor,
|
val containingDeclaration: DeclarationDescriptor,
|
||||||
val typeDeserializer: TypeDeserializer
|
val typeDeserializer: TypeDeserializer
|
||||||
) : DeserializationContext(components, classDeserializer, nameResolver) {
|
) : DeserializationContext(components, classDeserializer, nameResolver) {
|
||||||
val deserializer: MemberDeserializer = MemberDeserializer(this)
|
val memberDeserializer: MemberDeserializer = MemberDeserializer(this)
|
||||||
|
|
||||||
fun childContext(descriptor: DeclarationDescriptor, typeParameterProtos: List<TypeParameter>): DeserializationContextWithTypes {
|
fun childContext(descriptor: DeclarationDescriptor, typeParameterProtos: List<TypeParameter>): DeserializationContextWithTypes {
|
||||||
val childTypeDeserializer = TypeDeserializer(this, typeDeserializer, "Child deserializer for ${descriptor.getName()}")
|
val childTypeDeserializer = TypeDeserializer(this, typeDeserializer, "Child deserializer for ${descriptor.getName()}")
|
||||||
val childContext = withTypes(descriptor, childTypeDeserializer)
|
val childContext = withTypes(descriptor, childTypeDeserializer)
|
||||||
|
|
||||||
for (typeParameter in childContext.deserializer.typeParameters(typeParameterProtos, childTypeDeserializer)) {
|
for (typeParameter in childContext.memberDeserializer.typeParameters(typeParameterProtos, childTypeDeserializer)) {
|
||||||
childTypeDeserializer.addTypeParameter(typeParameter)
|
childTypeDeserializer.addTypeParameter(typeParameter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -112,7 +112,7 @@ public class DeserializedClassDescriptor(
|
|||||||
return descriptor
|
return descriptor
|
||||||
}
|
}
|
||||||
|
|
||||||
return context.deserializer.loadCallable(constructorProto.getData()) as ConstructorDescriptor
|
return context.memberDeserializer.loadCallable(constructorProto.getData()) as ConstructorDescriptor
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getUnsubstitutedPrimaryConstructor(): ConstructorDescriptor? = primaryConstructor()
|
override fun getUnsubstitutedPrimaryConstructor(): ConstructorDescriptor? = primaryConstructor()
|
||||||
|
|||||||
+1
-1
@@ -78,7 +78,7 @@ public abstract class DeserializedMemberScope protected(
|
|||||||
|
|
||||||
[suppress("UNCHECKED_CAST")]
|
[suppress("UNCHECKED_CAST")]
|
||||||
return memberProtos.mapTo(LinkedHashSet<D>()) { memberProto ->
|
return memberProtos.mapTo(LinkedHashSet<D>()) { memberProto ->
|
||||||
context.deserializer.loadCallable(memberProto) as D
|
context.memberDeserializer.loadCallable(memberProto) as D
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user