There is a single PartialBodyResolveFilter instance per module
and each of them were containing just the same sets of available
in project Nothing-typed functions (including duplicating String instances),
in case of Kotlin project it might sum up to 27M of heap.
The solution is to share the global sets between all modules in a project
Otherwise results are effectively retained in the maps until we're close
to OutOfMemory.
While we mostly need them for a short time (especially in the case we
run resolution during usages search).
The possible problem is that the values may become too short-living,
but now using these maps is a conventional solution for similar tasks in
Java resolve
Before this change, when somebody has requested the exact light class
we also store LazyJvmDiagnostic for it in a map inside DiagnosticHolder.
The problem is that LazyJvmDiagnostic retains a lot of memory:
GenerationState, bindingContext, etc.
At the same time, it commonly happens that light classes are being computed from Java resolve and diagnostics are obviously
unnecessary there.
The solution has two parts:
1. We don't retain diagnostics until somebody explicitly requested them
2. We force computation of LazyJvmDiagnostic to avoid retaining
backend's parts
The solution has a kind of drawback: for an opened in editor Kotlin file,
we'll run back-end twice for contained classes (analysis parts should be reused, though)
#KT-24048 Fixed
If some pending event processing caused exception in PerModulePackageCacheService,
log the problem and consider event processed. Otherwise it is going to
be stuck there forever.
This allows to emulate current compiler behaviour
Introduce CombinedModuleInfo which is a combination of several other modules intended to be analyzed together
Revert "[Unneeded?] Revert "ExpressionOfTypeProcessor: get member name in read action""
This reverts commit 7ec59fc
Revert "[Unneeded] Revert "AbstractNavigateToLibraryTest: fix for invalid files""
This reverts commit 9e80c60
Revert "[Unneeded?] Revert "AbstractExtractionTest: fix for invalid files""
This reverts commit 0b2113b
Revert "[Unneeded] Revert "AbstractIntentionTest: `isApplicableOnPooled` made run under ProgressIndicator""
This reverts commit a41c247
Generate continuation type as kotlin.coroutines.Continuaion. This code will
fail at runtime since there is no stdlib backing this change yet.
However, in order to generate compatible stdlib we need a compiler, which
generates continuation type as kotlin.coroutines.Continuation.
Thus, firstly we support the change in the compiler, make it bootstrap
compiler and only then change stdlib and tests accordingly.
#KT-23362
Do not mix ScriptDependenciesInfo for all project and for concrete script.
Rename ScriptDependenciesModuleInfo to ScriptDependenciesInfo
Rename ScriptDependenciesModuleSourceInfo to ScriptDependenciesSourceInfo