[Low Level FIR] optimize getting callables in LLFirProviderHelper
This commit is contained in:
+2
@@ -29,6 +29,8 @@ public abstract class KotlinDeclarationProvider {
|
||||
public abstract fun getTopLevelProperties(callableId: CallableId): Collection<KtProperty>
|
||||
public abstract fun getTopLevelFunctions(callableId: CallableId): Collection<KtNamedFunction>
|
||||
|
||||
public abstract fun getTopLevelCallableFiles(callableId: CallableId): Collection<KtFile>
|
||||
|
||||
public abstract fun getTopLevelCallableNamesInPackage(packageFqName: FqName): Set<Name>
|
||||
|
||||
public abstract fun findFilesForFacadeByPackage(packageFqName: FqName): Collection<KtFile>
|
||||
|
||||
+5
@@ -97,6 +97,11 @@ public class KotlinStaticDeclarationProvider internal constructor(
|
||||
}
|
||||
?: emptyList()
|
||||
|
||||
override fun getTopLevelCallableFiles(callableId: CallableId): Collection<KtFile> = buildSet {
|
||||
getTopLevelProperties(callableId).mapTo(this) { it.containingKtFile }
|
||||
getTopLevelFunctions(callableId).mapTo(this) { it.containingKtFile }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class KotlinStaticDeclarationProviderFactory(
|
||||
|
||||
Reference in New Issue
Block a user