[FIR] Get rid of FirProvidedDeclarationsForMetadataService.getProvidedNestedClassifiers

It's now impossible to add new classes to metadata, because this
  functionality is not implemented in IrGeneratedDeclarationsRegistrar
  and FirDeclarationsForMetadataProviderExtension is removed
This commit is contained in:
Dmitriy Novozhilov
2023-11-28 18:18:09 +02:00
parent 139e1223ea
commit c3fdbab7fe
2 changed files with 0 additions and 12 deletions
@@ -380,7 +380,6 @@ class FirElementSerializer private constructor(
* Order of nested classifiers: * Order of nested classifiers:
* - declared classifiers in declaration order * - declared classifiers in declaration order
* - generated classifiers in sorted order * - generated classifiers in sorted order
* - provided classifiers in sorted order
*/ */
fun computeNestedClassifiersForClass(classSymbol: FirClassSymbol<*>): List<FirClassifierSymbol<*>> { fun computeNestedClassifiersForClass(classSymbol: FirClassSymbol<*>): List<FirClassifierSymbol<*>> {
val scope = session.nestedClassifierScope(classSymbol.fir) ?: return emptyList() val scope = session.nestedClassifierScope(classSymbol.fir) ?: return emptyList()
@@ -391,11 +390,6 @@ class FirElementSerializer private constructor(
.partition { it in indexByDeclaration } .partition { it in indexByDeclaration }
declared.sortedBy { indexByDeclaration.getValue(it) }.mapTo(this) { it.symbol } declared.sortedBy { indexByDeclaration.getValue(it) }.mapTo(this) { it.symbol }
nonDeclared.sortedWith(FirMemberDeclarationComparator).mapTo(this) { it.symbol } nonDeclared.sortedWith(FirMemberDeclarationComparator).mapTo(this) { it.symbol }
providedDeclarationsService.getProvidedNestedClassifiers(classSymbol, scopeSession)
.map { it.fir }
.sortedWith(FirMemberDeclarationComparator)
.mapTo(this) { it.symbol }
} }
} }
@@ -66,7 +66,6 @@ abstract class FirProvidedDeclarationsForMetadataService : FirSessionComponent {
abstract fun getProvidedTopLevelDeclarations(packageFqName: FqName, scopeSession: ScopeSession): List<FirDeclaration> abstract fun getProvidedTopLevelDeclarations(packageFqName: FqName, scopeSession: ScopeSession): List<FirDeclaration>
abstract fun getProvidedConstructors(owner: FirClassSymbol<*>, scopeSession: ScopeSession): List<FirConstructor> abstract fun getProvidedConstructors(owner: FirClassSymbol<*>, scopeSession: ScopeSession): List<FirConstructor>
abstract fun getProvidedCallables(owner: FirClassSymbol<*>, scopeSession: ScopeSession): List<FirCallableDeclaration> abstract fun getProvidedCallables(owner: FirClassSymbol<*>, scopeSession: ScopeSession): List<FirCallableDeclaration>
abstract fun getProvidedNestedClassifiers(owner: FirClassSymbol<*>, scopeSession: ScopeSession): List<FirClassLikeSymbol<*>>
abstract fun registerDeclaration(declaration: FirCallableDeclaration) abstract fun registerDeclaration(declaration: FirCallableDeclaration)
@@ -105,11 +104,6 @@ private class FirProvidedDeclarationsForMetadataServiceImpl(private val session:
return memberCache[owner]?.providedCallables ?: emptyList() return memberCache[owner]?.providedCallables ?: emptyList()
} }
override fun getProvidedNestedClassifiers(owner: FirClassSymbol<*>, scopeSession: ScopeSession): List<FirClassLikeSymbol<*>> {
// TODO: remove
return emptyList()
}
private class ClassDeclarations { private class ClassDeclarations {
val providedCallables: MutableList<FirCallableDeclaration> = mutableListOf() val providedCallables: MutableList<FirCallableDeclaration> = mutableListOf()
val providedConstructors: MutableList<FirConstructor> = mutableListOf() val providedConstructors: MutableList<FirConstructor> = mutableListOf()