Remove obsolete code in IncrementalPackageFragmentProvider

This commit is contained in:
Alexander Udalov
2015-12-18 23:24:48 +03:00
parent f7969621d6
commit 51cdb981f4
5 changed files with 29 additions and 81 deletions
@@ -40,11 +40,11 @@ public abstract class DeserializedMemberScope protected constructor(
private val functionProtos =
c.storageManager.createLazyValue {
groupByKey(filteredFunctionProtos(functionList), { it.name }) { it.receiverType(c.typeTable) != null }
groupByKey(functionList, { it.name }) { it.receiverType(c.typeTable) != null }
}
private val propertyProtos =
c.storageManager.createLazyValue {
groupByKey(filteredPropertyProtos(propertyList), { it.name }) { it.receiverType(c.typeTable) != null }
groupByKey(propertyList, { it.name }) { it.receiverType(c.typeTable) != null }
}
private val functions =
@@ -52,10 +52,6 @@ public abstract class DeserializedMemberScope protected constructor(
private val properties =
c.storageManager.createMemoizedFunction<Name, Collection<PropertyDescriptor>> { computeProperties(it) }
protected open fun filteredFunctionProtos(protos: Collection<ProtoBuf.Function>): Collection<ProtoBuf.Function> = protos
protected open fun filteredPropertyProtos(protos: Collection<ProtoBuf.Property>): Collection<ProtoBuf.Property> = protos
private fun <M : MessageLite> groupByKey(
protos: Collection<M>, getNameIndex: (M) -> Int, isExtension: (M) -> Boolean
): Map<ProtoKey, List<M>> {