Introduce MemberScope::classifierNames and some implementations

It aims to help with further optimizations
This commit is contained in:
Denis Zharkov
2017-08-15 17:50:37 +07:00
parent 1b255b4ed0
commit cd3edfc5b2
17 changed files with 59 additions and 2 deletions
@@ -107,6 +107,7 @@ class MetadataPackageFragment(
) {
override fun hasClass(name: Name): Boolean = hasTopLevelClass(name)
override fun definitelyDoesNotContainName(name: Name) = false
override fun getClassifierNames(): Set<Name>? = null
})
return ChainedMemberScope.create("Metadata scope", scopes)
@@ -76,6 +76,7 @@ abstract class DeserializedMemberScope protected constructor(
override fun getFunctionNames() = functionNamesLazy
override fun getVariableNames() = variableNamesLazy
override fun getClassifierNames(): Set<Name>? = classNames + typeAliasNames
private inline fun <M : MessageLite> Collection<M>.groupByName(
getNameIndex: (M) -> Int