Introduce PackagePartSource to store part class name in deserialized descriptors
Not used at the moment, will be in the following commits
This commit is contained in:
+12
-5
@@ -21,6 +21,7 @@ import org.jetbrains.kotlin.descriptors.ModuleDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor
|
||||
import org.jetbrains.kotlin.descriptors.PackageFragmentProvider
|
||||
import org.jetbrains.kotlin.descriptors.impl.PackageFragmentDescriptorImpl
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmPackagePartSource
|
||||
import org.jetbrains.kotlin.load.kotlin.ModuleMapping
|
||||
import org.jetbrains.kotlin.load.kotlin.PackagePartClassUtils
|
||||
import org.jetbrains.kotlin.load.kotlin.incremental.components.IncrementalCache
|
||||
@@ -112,7 +113,9 @@ public class IncrementalPackageFragmentProvider(
|
||||
allParts.filterNot { it in obsoletePackageParts }
|
||||
} ?: emptyList<String>()
|
||||
|
||||
val scopes = actualPackagePartFiles.mapNotNull { incrementalCache.getPackagePartData(it) }.map { createPackageScope(it) }
|
||||
val scopes = actualPackagePartFiles.mapNotNull { internalName ->
|
||||
incrementalCache.getPackagePartData(internalName)?.let { internalName to it }
|
||||
}.map { createPackageScope(it.first, it.second) }
|
||||
|
||||
if (scopes.isEmpty()) {
|
||||
MemberScope.Empty
|
||||
@@ -136,13 +139,15 @@ public class IncrementalPackageFragmentProvider(
|
||||
val partsNames: Collection<String>
|
||||
) : PackageFragmentDescriptorImpl(moduleDescriptor, multifileClassFqName.parent()) {
|
||||
val memberScope = storageManager.createLazyValue {
|
||||
val partsData = partsNames.mapNotNull { incrementalCache.getPackagePartData(it) }
|
||||
val partsData = partsNames.mapNotNull { internalName ->
|
||||
incrementalCache.getPackagePartData(internalName)?.let { internalName to it }
|
||||
}
|
||||
if (partsData.isEmpty())
|
||||
MemberScope.Empty
|
||||
else {
|
||||
ChainedMemberScope(
|
||||
"Member scope for incremental compilation: union of multifile class parts data for $multifileClassFqName",
|
||||
partsData.map { createPackageScope(it) }
|
||||
partsData.map { createPackageScope(it.first, it.second) }
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -150,10 +155,12 @@ public class IncrementalPackageFragmentProvider(
|
||||
override fun getMemberScope(): MemberScope = memberScope()
|
||||
}
|
||||
|
||||
fun createPackageScope(part: JvmPackagePartProto): DeserializedPackageMemberScope {
|
||||
fun createPackageScope(internalName: String, part: JvmPackagePartProto): DeserializedPackageMemberScope {
|
||||
val packageData = JvmProtoBufUtil.readPackageDataFrom(part.data, part.strings)
|
||||
return DeserializedPackageMemberScope(
|
||||
this, packageData.packageProto, packageData.nameResolver, deserializationComponents, { listOf() }
|
||||
this, packageData.packageProto, packageData.nameResolver,
|
||||
JvmPackagePartSource(JvmClassName.byInternalName(internalName)),
|
||||
deserializationComponents, { listOf() }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -23,6 +23,7 @@ import org.jetbrains.kotlin.descriptors.ClassDescriptor;
|
||||
import org.jetbrains.kotlin.descriptors.PackageFragmentDescriptor;
|
||||
import org.jetbrains.kotlin.load.kotlin.header.KotlinClassHeader;
|
||||
import org.jetbrains.kotlin.name.Name;
|
||||
import org.jetbrains.kotlin.resolve.jvm.JvmClassName;
|
||||
import org.jetbrains.kotlin.resolve.scopes.ChainedMemberScope;
|
||||
import org.jetbrains.kotlin.resolve.scopes.MemberScope;
|
||||
import org.jetbrains.kotlin.serialization.ClassData;
|
||||
@@ -79,8 +80,9 @@ public final class DeserializedDescriptorResolver {
|
||||
String[] strings = kotlinClass.getClassHeader().getStrings();
|
||||
assert strings != null : "String table not found in " + kotlinClass;
|
||||
PackageData packageData = JvmProtoBufUtil.readPackageDataFrom(data, strings);
|
||||
JvmPackagePartSource source = new JvmPackagePartSource(JvmClassName.byClassId(kotlinClass.getClassId()));
|
||||
return new DeserializedPackageMemberScope(
|
||||
descriptor, packageData.getPackageProto(), packageData.getNameResolver(), components,
|
||||
descriptor, packageData.getPackageProto(), packageData.getNameResolver(), source, components,
|
||||
new Function0<Collection<Name>>() {
|
||||
@Override
|
||||
public Collection<Name> invoke() {
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2010-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.load.kotlin
|
||||
|
||||
import org.jetbrains.kotlin.resolve.jvm.JvmClassName
|
||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.PackagePartSource
|
||||
|
||||
class JvmPackagePartSource(val className: JvmClassName) : PackagePartSource
|
||||
+1
-1
@@ -56,7 +56,7 @@ public class ClassDeserializer(private val components: DeserializationComponents
|
||||
if (!fragment.hasTopLevelClass(classId.shortClassName)) return null
|
||||
}
|
||||
|
||||
components.createContext(fragment, nameResolver, TypeTable(classProto.typeTable))
|
||||
components.createContext(fragment, nameResolver, TypeTable(classProto.typeTable), packagePartSource = null)
|
||||
}
|
||||
|
||||
return DeserializedClassDescriptor(outerContext, classProto, nameResolver, sourceElement)
|
||||
|
||||
+2
-1
@@ -50,7 +50,8 @@ public abstract class DeserializedPackageFragment(
|
||||
internal val deserializedMemberScope by storageManager.createLazyValue {
|
||||
val packageStream = loadResourceSure(serializedResourcePaths.getPackageFilePath(fqName))
|
||||
val packageProto = ProtoBuf.Package.parseFrom(packageStream, serializedResourcePaths.extensionRegistry)
|
||||
DeserializedPackageMemberScope(this, packageProto, nameResolver, components, classNames = { loadClassNames(packageProto) })
|
||||
DeserializedPackageMemberScope(this, packageProto, nameResolver, packagePartSource = null, components = components,
|
||||
classNames = { loadClassNames(packageProto) })
|
||||
}
|
||||
|
||||
override fun getMemberScope() = deserializedMemberScope
|
||||
|
||||
+5
-4
@@ -47,7 +47,8 @@ public class MemberDeserializer(private val c: DeserializationContext) {
|
||||
Flags.IS_CONST.get(flags),
|
||||
proto,
|
||||
c.nameResolver,
|
||||
c.typeTable
|
||||
c.typeTable,
|
||||
c.packagePartSource
|
||||
)
|
||||
|
||||
val local = c.childContext(property, proto.getTypeParameterList())
|
||||
@@ -142,7 +143,7 @@ public class MemberDeserializer(private val c: DeserializationContext) {
|
||||
else Annotations.EMPTY
|
||||
val function = DeserializedSimpleFunctionDescriptor(
|
||||
c.containingDeclaration, /* original = */ null, annotations, c.nameResolver.getName(proto.name),
|
||||
Deserialization.memberKind(Flags.MEMBER_KIND.get(proto.flags)), proto, c.nameResolver, c.typeTable
|
||||
Deserialization.memberKind(Flags.MEMBER_KIND.get(proto.flags)), proto, c.nameResolver, c.typeTable, c.packagePartSource
|
||||
)
|
||||
val local = c.childContext(function, proto.typeParameterList)
|
||||
function.initialize(
|
||||
@@ -170,7 +171,7 @@ public class MemberDeserializer(private val c: DeserializationContext) {
|
||||
val classDescriptor = c.containingDeclaration as ClassDescriptor
|
||||
val descriptor = DeserializedConstructorDescriptor(
|
||||
classDescriptor, null, getAnnotations(proto, proto.flags, AnnotatedCallableKind.FUNCTION),
|
||||
isPrimary, CallableMemberDescriptor.Kind.DECLARATION, proto, c.nameResolver, c.typeTable
|
||||
isPrimary, CallableMemberDescriptor.Kind.DECLARATION, proto, c.nameResolver, c.typeTable, c.packagePartSource
|
||||
)
|
||||
val local = c.childContext(descriptor, listOf())
|
||||
descriptor.initialize(
|
||||
@@ -243,7 +244,7 @@ public class MemberDeserializer(private val c: DeserializationContext) {
|
||||
}
|
||||
|
||||
private fun DeclarationDescriptor.asProtoContainer(): ProtoContainer? = when (this) {
|
||||
is PackageFragmentDescriptor -> ProtoContainer.Package(fqName, c.nameResolver, c.typeTable)
|
||||
is PackageFragmentDescriptor -> ProtoContainer.Package(fqName, c.nameResolver, c.typeTable, c.packagePartSource)
|
||||
is DeserializedClassDescriptor -> ProtoContainer.Class(
|
||||
classProto, c.nameResolver, c.typeTable,
|
||||
isCompanionOfClass = DescriptorUtils.isCompanionObject(this) &&
|
||||
|
||||
+3
-1
@@ -18,6 +18,7 @@ package org.jetbrains.kotlin.serialization.deserialization
|
||||
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.serialization.ProtoBuf
|
||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.PackagePartSource
|
||||
|
||||
sealed class ProtoContainer(
|
||||
val nameResolver: NameResolver,
|
||||
@@ -35,7 +36,8 @@ sealed class ProtoContainer(
|
||||
class Package(
|
||||
val fqName: FqName,
|
||||
nameResolver: NameResolver,
|
||||
typeTable: TypeTable
|
||||
typeTable: TypeTable,
|
||||
val packagePartSource: PackagePartSource?
|
||||
) : ProtoContainer(nameResolver, typeTable) {
|
||||
override fun debugFqName(): FqName = fqName
|
||||
}
|
||||
|
||||
+9
-6
@@ -23,6 +23,7 @@ import org.jetbrains.kotlin.incremental.components.LookupTracker
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.resolve.constants.ConstantValue
|
||||
import org.jetbrains.kotlin.serialization.ProtoBuf
|
||||
import org.jetbrains.kotlin.serialization.deserialization.descriptors.PackagePartSource
|
||||
import org.jetbrains.kotlin.storage.StorageManager
|
||||
|
||||
class DeserializationComponents(
|
||||
@@ -46,9 +47,11 @@ class DeserializationComponents(
|
||||
fun createContext(
|
||||
descriptor: PackageFragmentDescriptor,
|
||||
nameResolver: NameResolver,
|
||||
typeTable: TypeTable
|
||||
typeTable: TypeTable,
|
||||
packagePartSource: PackagePartSource?
|
||||
): DeserializationContext =
|
||||
DeserializationContext(this, nameResolver, descriptor, typeTable, parentTypeDeserializer = null, typeParameters = listOf())
|
||||
DeserializationContext(this, nameResolver, descriptor, typeTable, packagePartSource,
|
||||
parentTypeDeserializer = null, typeParameters = listOf())
|
||||
}
|
||||
|
||||
|
||||
@@ -57,11 +60,12 @@ class DeserializationContext(
|
||||
val nameResolver: NameResolver,
|
||||
val containingDeclaration: DeclarationDescriptor,
|
||||
val typeTable: TypeTable,
|
||||
val packagePartSource: PackagePartSource?,
|
||||
parentTypeDeserializer: TypeDeserializer?,
|
||||
typeParameters: List<ProtoBuf.TypeParameter>
|
||||
) {
|
||||
val typeDeserializer = TypeDeserializer(this, parentTypeDeserializer, typeParameters,
|
||||
"Deserializer for ${containingDeclaration.getName()}")
|
||||
"Deserializer for ${containingDeclaration.name}")
|
||||
|
||||
val memberDeserializer = MemberDeserializer(this)
|
||||
|
||||
@@ -73,8 +77,7 @@ class DeserializationContext(
|
||||
nameResolver: NameResolver = this.nameResolver,
|
||||
typeTable: TypeTable = this.typeTable
|
||||
) = DeserializationContext(
|
||||
components, nameResolver, descriptor, typeTable,
|
||||
parentTypeDeserializer = this.typeDeserializer,
|
||||
typeParameters = typeParameterProtos
|
||||
components, nameResolver, descriptor, typeTable, this.packagePartSource,
|
||||
parentTypeDeserializer = this.typeDeserializer, typeParameters = typeParameterProtos
|
||||
)
|
||||
}
|
||||
|
||||
+16
-6
@@ -34,8 +34,14 @@ interface DeserializedCallableMemberDescriptor : CallableMemberDescriptor {
|
||||
val nameResolver: NameResolver
|
||||
|
||||
val typeTable: TypeTable
|
||||
|
||||
// Information about the origin of this top-level callable or null, if it's not top-level or there's no such information.
|
||||
// On JVM, this is JvmPackagePartSource which contains the internal name of the package part class
|
||||
val packagePartSource: PackagePartSource?
|
||||
}
|
||||
|
||||
interface PackagePartSource
|
||||
|
||||
class DeserializedSimpleFunctionDescriptor(
|
||||
containingDeclaration: DeclarationDescriptor,
|
||||
original: SimpleFunctionDescriptor?,
|
||||
@@ -44,7 +50,8 @@ class DeserializedSimpleFunctionDescriptor(
|
||||
kind: CallableMemberDescriptor.Kind,
|
||||
override val proto: ProtoBuf.Function,
|
||||
override val nameResolver: NameResolver,
|
||||
override val typeTable: TypeTable
|
||||
override val typeTable: TypeTable,
|
||||
override val packagePartSource: PackagePartSource?
|
||||
) : DeserializedCallableMemberDescriptor,
|
||||
SimpleFunctionDescriptorImpl(containingDeclaration, original, annotations, name, kind, SourceElement.NO_SOURCE) {
|
||||
|
||||
@@ -56,7 +63,8 @@ class DeserializedSimpleFunctionDescriptor(
|
||||
preserveSource: Boolean
|
||||
): FunctionDescriptorImpl {
|
||||
return DeserializedSimpleFunctionDescriptor(
|
||||
newOwner, original as SimpleFunctionDescriptor?, annotations, newName ?: name, kind, proto, nameResolver, typeTable
|
||||
newOwner, original as SimpleFunctionDescriptor?, annotations, newName ?: name, kind,
|
||||
proto, nameResolver, typeTable, packagePartSource
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -74,7 +82,8 @@ class DeserializedPropertyDescriptor(
|
||||
isConst: Boolean,
|
||||
override val proto: ProtoBuf.Property,
|
||||
override val nameResolver: NameResolver,
|
||||
override val typeTable: TypeTable
|
||||
override val typeTable: TypeTable,
|
||||
override val packagePartSource: PackagePartSource?
|
||||
) : DeserializedCallableMemberDescriptor,
|
||||
PropertyDescriptorImpl(containingDeclaration, original, annotations,
|
||||
modality, visibility, isVar, name, kind, SourceElement.NO_SOURCE, isLateInit, isConst) {
|
||||
@@ -88,7 +97,7 @@ class DeserializedPropertyDescriptor(
|
||||
): PropertyDescriptorImpl {
|
||||
return DeserializedPropertyDescriptor(
|
||||
newOwner, original, annotations, newModality, newVisibility, isVar, name, kind, isLateInit, isConst,
|
||||
proto, nameResolver, typeTable
|
||||
proto, nameResolver, typeTable, packagePartSource
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -101,7 +110,8 @@ class DeserializedConstructorDescriptor(
|
||||
kind: CallableMemberDescriptor.Kind,
|
||||
override val proto: ProtoBuf.Constructor,
|
||||
override val nameResolver: NameResolver,
|
||||
override val typeTable: TypeTable
|
||||
override val typeTable: TypeTable,
|
||||
override val packagePartSource: PackagePartSource?
|
||||
) : DeserializedCallableMemberDescriptor,
|
||||
ConstructorDescriptorImpl(containingDeclaration, original, annotations, isPrimary, kind, SourceElement.NO_SOURCE) {
|
||||
|
||||
@@ -114,7 +124,7 @@ class DeserializedConstructorDescriptor(
|
||||
): DeserializedConstructorDescriptor {
|
||||
return DeserializedConstructorDescriptor(
|
||||
newOwner as ClassDescriptor, original as ConstructorDescriptor?, annotations, isPrimary, kind,
|
||||
proto, nameResolver, typeTable
|
||||
proto, nameResolver, typeTable, packagePartSource
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -36,10 +36,11 @@ public open class DeserializedPackageMemberScope(
|
||||
packageDescriptor: PackageFragmentDescriptor,
|
||||
proto: ProtoBuf.Package,
|
||||
nameResolver: NameResolver,
|
||||
packagePartSource: PackagePartSource?,
|
||||
components: DeserializationComponents,
|
||||
classNames: () -> Collection<Name>
|
||||
) : DeserializedMemberScope(
|
||||
components.createContext(packageDescriptor, nameResolver, TypeTable(proto.typeTable)),
|
||||
components.createContext(packageDescriptor, nameResolver, TypeTable(proto.typeTable), packagePartSource),
|
||||
proto.functionList, proto.propertyList
|
||||
) {
|
||||
private val packageFqName = packageDescriptor.fqName
|
||||
|
||||
@@ -46,7 +46,7 @@ public fun <R> Function<R>.reflect(): KFunction<R>? {
|
||||
val moduleData = javaClass.getOrCreateModule()
|
||||
val context = DeserializationContext(
|
||||
moduleData.deserialization, nameResolver, moduleData.module,
|
||||
typeTable = TypeTable(proto.typeTable), parentTypeDeserializer = null, typeParameters = listOf()
|
||||
typeTable = TypeTable(proto.typeTable), packagePartSource = null, parentTypeDeserializer = null, typeParameters = listOf()
|
||||
)
|
||||
val descriptor = MemberDeserializer(context).loadFunction(proto)
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
|
||||
+4
-1
@@ -28,6 +28,7 @@ import org.jetbrains.kotlin.load.kotlin.*
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.resolve.TargetPlatform
|
||||
import org.jetbrains.kotlin.resolve.jvm.JvmClassName
|
||||
import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatform
|
||||
import org.jetbrains.kotlin.serialization.ClassDataWithSource
|
||||
import org.jetbrains.kotlin.serialization.deserialization.ClassDataFinder
|
||||
@@ -79,7 +80,9 @@ public class DeserializerForClassfileDecompiler(
|
||||
}
|
||||
val (nameResolver, packageProto) = JvmProtoBufUtil.readPackageDataFrom(annotationData, strings)
|
||||
val membersScope = DeserializedPackageMemberScope(
|
||||
createDummyPackageFragment(packageFqName), packageProto, nameResolver, deserializationComponents
|
||||
createDummyPackageFragment(packageFqName), packageProto, nameResolver,
|
||||
JvmPackagePartSource(JvmClassName.byClassId(binaryClassForPackageClass!!.classId)),
|
||||
deserializationComponents
|
||||
) { emptyList() }
|
||||
return membersScope.getContributedDescriptors().toList()
|
||||
}
|
||||
|
||||
+10
-5
@@ -24,6 +24,7 @@ import org.jetbrains.kotlin.builtins.KotlinBuiltIns
|
||||
import org.jetbrains.kotlin.idea.stubindex.KotlinFileStubForIde
|
||||
import org.jetbrains.kotlin.lexer.KtModifierKeywordToken
|
||||
import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.load.kotlin.JvmPackagePartSource
|
||||
import org.jetbrains.kotlin.load.kotlin.KotlinJvmBinaryClass
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
@@ -32,6 +33,7 @@ import org.jetbrains.kotlin.psi.*
|
||||
import org.jetbrains.kotlin.psi.stubs.KotlinUserTypeStub
|
||||
import org.jetbrains.kotlin.psi.stubs.elements.KtStubElementTypes
|
||||
import org.jetbrains.kotlin.psi.stubs.impl.*
|
||||
import org.jetbrains.kotlin.resolve.jvm.JvmClassName
|
||||
import org.jetbrains.kotlin.serialization.Flags
|
||||
import org.jetbrains.kotlin.serialization.ProtoBuf
|
||||
import org.jetbrains.kotlin.serialization.deserialization.AnnotatedCallableKind
|
||||
@@ -52,7 +54,7 @@ fun createPackageFacadeStub(
|
||||
): KotlinFileStubImpl {
|
||||
val fileStub = KotlinFileStubForIde.forFile(packageFqName, packageFqName.isRoot)
|
||||
setupFileStub(fileStub, packageFqName)
|
||||
createCallableStubs(fileStub, c, ProtoContainer.Package(packageFqName, c.nameResolver, c.typeTable),
|
||||
createCallableStubs(fileStub, c, ProtoContainer.Package(packageFqName, c.nameResolver, c.typeTable, packagePartSource = null),
|
||||
packageProto.functionList, packageProto.propertyList)
|
||||
return fileStub
|
||||
}
|
||||
@@ -65,8 +67,10 @@ fun createFileFacadeStub(
|
||||
val packageFqName = facadeFqName.parent()
|
||||
val fileStub = KotlinFileStubForIde.forFileFacadeStub(facadeFqName, packageFqName.isRoot)
|
||||
setupFileStub(fileStub, packageFqName)
|
||||
createCallableStubs(fileStub, c, ProtoContainer.Package(packageFqName, c.nameResolver, c.typeTable),
|
||||
packageProto.functionList, packageProto.propertyList)
|
||||
val container = ProtoContainer.Package(
|
||||
packageFqName, c.nameResolver, c.typeTable, JvmPackagePartSource(JvmClassName.byFqNameWithoutInnerClasses(facadeFqName))
|
||||
)
|
||||
createCallableStubs(fileStub, c, container, packageProto.functionList, packageProto.propertyList)
|
||||
return fileStub
|
||||
}
|
||||
|
||||
@@ -84,8 +88,9 @@ fun createMultifileClassStub(
|
||||
val partHeader = partFile.classHeader
|
||||
val (nameResolver, packageProto) = JvmProtoBufUtil.readPackageDataFrom(partHeader.annotationData!!, partHeader.strings!!)
|
||||
val partContext = components.createContext(nameResolver, packageFqName, TypeTable(packageProto.typeTable))
|
||||
createCallableStubs(fileStub, partContext, ProtoContainer.Package(packageFqName, partContext.nameResolver, partContext.typeTable),
|
||||
packageProto.functionList, packageProto.propertyList)
|
||||
val container = ProtoContainer.Package(packageFqName, partContext.nameResolver, partContext.typeTable,
|
||||
JvmPackagePartSource(JvmClassName.byClassId(partFile.classId)))
|
||||
createCallableStubs(fileStub, partContext, container, packageProto.functionList, packageProto.propertyList)
|
||||
}
|
||||
return fileStub
|
||||
}
|
||||
|
||||
+2
-1
@@ -81,7 +81,8 @@ public abstract class DeserializerForDecompilerBase(
|
||||
val content = file.contentsToByteArray(false)
|
||||
val packageProto = content.toPackageProto(paths.extensionRegistry)
|
||||
val membersScope = DeserializedPackageMemberScope(
|
||||
createDummyPackageFragment(packageFqName), packageProto, nameResolver, deserializationComponents
|
||||
createDummyPackageFragment(packageFqName), packageProto, nameResolver, packagePartSource = null,
|
||||
components = deserializationComponents
|
||||
) { emptyList() }
|
||||
return membersScope.getContributedDescriptors().toList()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user