- Rename NullabilityQualifierWithApplicability -> JavaDefaultQualifiers
- Use JavaDefaultQualifiers instead of JavaTypeQualifiers for default qualifiers
This change is intended to make code more clear and to allow add some additional
parameters specific for default qualifiers needed for codeanalysis annotations
From now all customization of session should perform via DSL which
declared in FirSessionFactory. Registration or mutation session
services from other places is prohibited
This is needed because we have different visibility rules for different
platform visibilities (e.g. protected and package private on JVM), so
we need ability to configure visibility checks for different platforms
There was one non-removable usage of those function in FirJavaElementFinder
and three non-trivial implementation
- `FirProvider.SymbolProvider`
- `KotlinDeserializedJvmSymbolsProvider`
- `FirBuiltinSymbolProvider`
First implementation was moved to `FirProvider` and other two was
deleted, because in FirJavaElementFinder we need lookup only in
classes from source code, so such methods in library providers are
useless
#KT-41048
Now, FirTypeScope returns only direct overridden and a base scope
where a client might look for deeper overridden
It's necessary to make the API fast and simple
when only direct overridden are needed
At the same time, while this API looks a bit complicated for most of the clients
there are simple extension helpers that obtain just the direct or all overridden
- Cache ModuleResolveState for module till the world changes
- Resolve every file under a lock
- All creation of raw fir files and resolve of them happens in FirFileBuilder
- Lazy resolve of fir elements happens in FirElementBuilder
Caching works like the following:
- FirModuleResolveState holds PsiToFirCache & DiagnosticsCollector & FileCacheForModuleProvider
- FileCacheForModuleProvider holds a mapping from ModuleInfo to ModuleFileCache
- ModuleFileCache caches
- KtFile -> FirFile mapping
- ClassId -> FirClassLikeDeclaration, CallableId -> FirCallableSymbol
which used in corresponding FirProvider
- mapping from declaration to it's file
which used in corresponding FirProvider
- locks for fir file resolving
- PsiToFirCache provides mapping from KtElement to FirElement
- DiagnosticsCollector collects diagnostics for file and caches them