[LL FIR] drop redundant lazy resolve to imports phase
Also, createTowerDataContext now uses cache ^KT-56551
This commit is contained in:
committed by
Space Team
parent
81ff3916e6
commit
14b28ba99b
+1
-3
@@ -159,13 +159,11 @@ object LowLevelFirApiFacadeForResolveOnAir {
|
|||||||
val firFile = moduleComponents.firFileBuilder.buildRawFirFileWithCaching(file)
|
val firFile = moduleComponents.firFileBuilder.buildRawFirFileWithCaching(file)
|
||||||
|
|
||||||
val scopeSession = firResolveSession.getScopeSessionFor(session)
|
val scopeSession = firResolveSession.getScopeSessionFor(session)
|
||||||
firFile.lazyResolveToPhase(FirResolvePhase.IMPORTS)
|
|
||||||
|
|
||||||
return firFile.createTowerDataContext(scopeSession)
|
return firFile.createTowerDataContext(scopeSession)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun FirFile.createTowerDataContext(scopeSession: ScopeSession): FirTowerDataContext {
|
private fun FirFile.createTowerDataContext(scopeSession: ScopeSession): FirTowerDataContext {
|
||||||
val importingScopes = createImportingScopes(this, moduleData.session, scopeSession, useCaching = false)
|
val importingScopes = createImportingScopes(this, moduleData.session, scopeSession)
|
||||||
val fileScopeElements = importingScopes.map { it.asTowerDataElement(isLocal = false) }
|
val fileScopeElements = importingScopes.map { it.asTowerDataElement(isLocal = false) }
|
||||||
return FirTowerDataContext().addNonLocalTowerDataElements(fileScopeElements)
|
return FirTowerDataContext().addNonLocalTowerDataElements(fileScopeElements)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user