[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:
-6
@@ -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 }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
-6
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user