rename Jet* classes to Kt*
This commit is contained in:
+3
-3
@@ -17,12 +17,12 @@
|
||||
package org.jetbrains.kotlin.serialization.deserialization
|
||||
|
||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedClassDescriptor
|
||||
import org.jetbrains.kotlin.types.JetType
|
||||
import org.jetbrains.kotlin.types.KtType
|
||||
|
||||
interface AdditionalSupertypes {
|
||||
fun forClass(classDescriptor: DeserializedClassDescriptor): Collection<JetType>
|
||||
fun forClass(classDescriptor: DeserializedClassDescriptor): Collection<KtType>
|
||||
|
||||
object None : AdditionalSupertypes {
|
||||
override fun forClass(classDescriptor: DeserializedClassDescriptor): Collection<JetType> = emptyList()
|
||||
override fun forClass(classDescriptor: DeserializedClassDescriptor): Collection<KtType> = emptyList()
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -20,7 +20,7 @@ import com.google.protobuf.MessageLite;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.kotlin.serialization.ProtoBuf;
|
||||
import org.jetbrains.kotlin.types.JetType;
|
||||
import org.jetbrains.kotlin.types.KtType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -72,6 +72,6 @@ public interface AnnotationAndConstantLoader<A, C, T> {
|
||||
C loadPropertyConstant(
|
||||
@NotNull ProtoContainer container,
|
||||
@NotNull ProtoBuf.Property proto,
|
||||
@NotNull JetType expectedType
|
||||
@NotNull KtType expectedType
|
||||
);
|
||||
}
|
||||
|
||||
+3
-3
@@ -30,7 +30,7 @@ import org.jetbrains.kotlin.serialization.ProtoBuf.Annotation.Argument
|
||||
import org.jetbrains.kotlin.serialization.ProtoBuf.Annotation.Argument.Value
|
||||
import org.jetbrains.kotlin.serialization.ProtoBuf.Annotation.Argument.Value.Type
|
||||
import org.jetbrains.kotlin.types.ErrorUtils
|
||||
import org.jetbrains.kotlin.types.JetType
|
||||
import org.jetbrains.kotlin.types.KtType
|
||||
import org.jetbrains.kotlin.types.Variance
|
||||
import org.jetbrains.kotlin.types.typeUtil.isSubtypeOf
|
||||
|
||||
@@ -65,7 +65,7 @@ public class AnnotationDeserializer(private val module: ModuleDescriptor) {
|
||||
}
|
||||
|
||||
public fun resolveValue(
|
||||
expectedType: JetType,
|
||||
expectedType: KtType,
|
||||
value: Value,
|
||||
nameResolver: NameResolver
|
||||
): ConstantValue<*> {
|
||||
@@ -141,7 +141,7 @@ public class AnnotationDeserializer(private val module: ModuleDescriptor) {
|
||||
return factory.createErrorValue("Unresolved enum entry: $enumClassId.$enumEntryName")
|
||||
}
|
||||
|
||||
private fun resolveArrayElementType(value: Value, nameResolver: NameResolver): JetType =
|
||||
private fun resolveArrayElementType(value: Value, nameResolver: NameResolver): KtType =
|
||||
with(builtIns) {
|
||||
when (value.getType()) {
|
||||
Type.BYTE -> getByteType()
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ public class TypeDeserializer(
|
||||
get() = typeParameterDescriptors().values().toReadOnlyList()
|
||||
|
||||
// TODO: don't load identical types from TypeTable more than once
|
||||
fun type(proto: ProtoBuf.Type, additionalAnnotations: Annotations = Annotations.EMPTY): JetType {
|
||||
fun type(proto: ProtoBuf.Type, additionalAnnotations: Annotations = Annotations.EMPTY): KtType {
|
||||
if (proto.hasFlexibleTypeCapabilitiesId()) {
|
||||
val id = c.nameResolver.getString(proto.flexibleTypeCapabilitiesId)
|
||||
val capabilities = c.components.flexibleTypeCapabilitiesDeserializer.capabilitiesById(id) ?:
|
||||
|
||||
+5
-5
@@ -26,13 +26,13 @@ import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.resolve.DescriptorFactory
|
||||
import org.jetbrains.kotlin.resolve.OverridingUtil
|
||||
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
|
||||
import org.jetbrains.kotlin.resolve.scopes.JetScope
|
||||
import org.jetbrains.kotlin.resolve.scopes.KtScope
|
||||
import org.jetbrains.kotlin.resolve.scopes.StaticScopeForKotlinClass
|
||||
import org.jetbrains.kotlin.serialization.Flags
|
||||
import org.jetbrains.kotlin.serialization.ProtoBuf
|
||||
import org.jetbrains.kotlin.serialization.deserialization.*
|
||||
import org.jetbrains.kotlin.types.AbstractClassTypeConstructor
|
||||
import org.jetbrains.kotlin.types.JetType
|
||||
import org.jetbrains.kotlin.types.KtType
|
||||
import org.jetbrains.kotlin.types.upperIfFlexible
|
||||
import org.jetbrains.kotlin.utils.addIfNotNull
|
||||
import org.jetbrains.kotlin.utils.singletonOrEmptyList
|
||||
@@ -134,8 +134,8 @@ public class DeserializedClassDescriptor(
|
||||
|
||||
override fun getCompanionObjectDescriptor(): ClassDescriptor? = companionObjectDescriptor()
|
||||
|
||||
private fun computeSupertypes(): Collection<JetType> {
|
||||
val result = ArrayList<JetType>(classProto.supertypeCount)
|
||||
private fun computeSupertypes(): Collection<KtType> {
|
||||
val result = ArrayList<KtType>(classProto.supertypeCount)
|
||||
val unresolved = ArrayList<DeserializedType>(0)
|
||||
|
||||
for (supertypeProto in classProto.supertypes(c.typeTable)) {
|
||||
@@ -188,7 +188,7 @@ public class DeserializedClassDescriptor(
|
||||
private inner class DeserializedClassMemberScope : DeserializedMemberScope(c, classProto.functionList, classProto.propertyList) {
|
||||
private val classDescriptor: DeserializedClassDescriptor get() = this@DeserializedClassDescriptor
|
||||
private val allDescriptors = c.storageManager.createLazyValue {
|
||||
computeDescriptors(DescriptorKindFilter.ALL, JetScope.ALL_NAME_FILTER, NoLookupLocation.WHEN_GET_ALL_DESCRIPTORS)
|
||||
computeDescriptors(DescriptorKindFilter.ALL, KtScope.ALL_NAME_FILTER, NoLookupLocation.WHEN_GET_ALL_DESCRIPTORS)
|
||||
}
|
||||
|
||||
override fun getDescriptors(kindFilter: DescriptorKindFilter,
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ import org.jetbrains.kotlin.descriptors.*
|
||||
import org.jetbrains.kotlin.incremental.components.LookupLocation
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
|
||||
import org.jetbrains.kotlin.resolve.scopes.JetScopeImpl
|
||||
import org.jetbrains.kotlin.resolve.scopes.KtScopeImpl
|
||||
import org.jetbrains.kotlin.serialization.ProtoBuf
|
||||
import org.jetbrains.kotlin.serialization.deserialization.DeserializationContext
|
||||
import org.jetbrains.kotlin.serialization.deserialization.receiverType
|
||||
@@ -33,7 +33,7 @@ public abstract class DeserializedMemberScope protected constructor(
|
||||
protected val c: DeserializationContext,
|
||||
functionList: Collection<ProtoBuf.Function>,
|
||||
propertyList: Collection<ProtoBuf.Property>
|
||||
) : JetScopeImpl() {
|
||||
) : KtScopeImpl() {
|
||||
|
||||
private data class ProtoKey(val name: Name, val isExtension: Boolean)
|
||||
|
||||
|
||||
+3
-3
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.descriptors.impl.AbstractLazyTypeParameterDescriptor
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns
|
||||
import org.jetbrains.kotlin.serialization.ProtoBuf
|
||||
import org.jetbrains.kotlin.serialization.deserialization.*
|
||||
import org.jetbrains.kotlin.types.JetType
|
||||
import org.jetbrains.kotlin.types.KtType
|
||||
import java.util.*
|
||||
|
||||
class DeserializedTypeParameterDescriptor(
|
||||
@@ -39,12 +39,12 @@ class DeserializedTypeParameterDescriptor(
|
||||
|
||||
override fun getAnnotations(): Annotations = annotations
|
||||
|
||||
override fun resolveUpperBounds(): Set<JetType> {
|
||||
override fun resolveUpperBounds(): Set<KtType> {
|
||||
val upperBounds = proto.upperBounds(typeTable)
|
||||
if (upperBounds.isEmpty()) {
|
||||
return setOf(this.builtIns.getDefaultBound())
|
||||
}
|
||||
val result = LinkedHashSet<JetType>(upperBounds.size())
|
||||
val result = LinkedHashSet<KtType>(upperBounds.size())
|
||||
for (upperBound in upperBounds) {
|
||||
result.add(typeDeserializer.type(upperBound, Annotations.EMPTY))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user