FIR IDE: do not resolve declarations if they are already resolved when we are inside lock
This commit is contained in:
+1
-1
@@ -45,7 +45,7 @@ internal class FirFileBuilder(
|
||||
val firFile = buildRawFirFileWithCaching(ktFile, cache)
|
||||
if (toPhase > FirResolvePhase.RAW_FIR) {
|
||||
cache.firFileLockProvider.withLock(firFile) {
|
||||
//add lock for implit type resolve phase & super type
|
||||
if (firFile.resolvePhase >= toPhase) return@withLock
|
||||
runResolveWithoutLock(firFile, fromPhase = firFile.resolvePhase, toPhase = toPhase, checkPCE = checkPCE)
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -75,6 +75,7 @@ internal class FirLazyDeclarationResolver(
|
||||
towerDataContextCollector: FirTowerDataContextCollector? = null,
|
||||
checkPCE: Boolean
|
||||
) {
|
||||
if (firDeclarationToResolve.resolvePhase >= toPhase) return
|
||||
val nonLazyPhase = minOf(toPhase, FirResolvePhase.DECLARATIONS)
|
||||
if (firDeclarationToResolve.resolvePhase < nonLazyPhase) {
|
||||
firFileBuilder.runResolveWithoutLock(
|
||||
|
||||
Reference in New Issue
Block a user