Now all tests with `Fir` in name are named accordingly to parser which
is used in them -- `FirPsi` or `FirLightTree`. This is needed to keep
consistency between different types of tests, because there is no
single default in parser mode between different scenarios of using FIR
during tail-call optimization.
There can be code, where all next instructions are non-meaningful and
there is a back-edge, for example, while(true){}. Previously, analyzer
incorrectly assumed, that this cannot happen. Now, it keeps track of
visited instructions and says, that there is no meaningful instruction
in such case.
#KT-56815 Fixed
The IR linker is responsible for detecting unbound symbols,
if it skips them for some reason, IC infrastructure must not fail
with unbound symbols exceptions. Anyway, the IR validator
verifies later if there are unbound symbols in
reachable IR and generates the corresponding error.
^KT-56602 Fixed
Previously, containingDeclarationSymbol for V was set to the outer class
BaseRoot, so its upper bounds was computed to the ones from TNested
at org.jetbrains.kotlin.fir.resolve.calls.CreateFreshTypeVariableSubstitutorStageKt.getTypeParameterFromExpandedClass
^KT-56706 Fixed
JS IR BE incremental compilation infrastructure uses
LanguageVersionSettings::toString method to detect if any
compiler features or flags were enabled or disabled.
It is important that the features and flags order are stable
in the result string.
^KT-56580 Fixed
The dependency signature may refer to function type interface properties
(e.g. name) or methods. It is impossible to detect (without hacks)
which binary symbol for loading is required. However, when loading
a property or a method the entire function type interface is loaded.
And vice versa, a loading of function type interface loads
properties and methods as well. Therefore, load the top level signature only,
it must be the signature of function type interface.
^KT-56582 Fixed
Source mapping URL is not saved in JS module cache anymore,
because it was a wrong url pointed to the source map from the cache.
Instead, the URL is appended every time on writing the output JS code.
^KT-56469 Fixed
The patch removes logic of generating extra IrFiles (fake file) into
IrModuleFragment for the function type interfaces during klib deserialization,
because IC infrastructure can not process files which do not exist in klib.
Instead of adding extra IrFiles during deserialization, the empty files
with required packages are added into Kotlin/JS stdlib physically.
These files are used as containers for function type interface declarations.
Since Kotlin/WASM uses the same klib loading infrastructure as Kotlin/JS,
the the empty files are added into Kotlin/WASM stdlib as well.
The patch also adds a check that IrModuleFagment has files only from klib.
^KT-55720 Fixed
Review: https://jetbrains.team/p/kt/reviews/8401
In scope of: KT-55082
Because this version isn't used for anything. We have KotlinAbiVersion
to version the IR format.
- The fix for KT-55570 caused some backend tests to fail, because errors
are now correctly reported for simple classes and actual/expect in
the same module is not supported in FIR. See KT-55177.
- The commit also adds separate tests for K2. Unfortunately, these have
to be disabled for K1 because K1 then reports "expect without actual"
errors.
in startCoroutineUninterceptedOrReturn. Otherwise, the coroutine will
not be interceptable later.
Add a test, which checks, that intercepted continuation is released.
#KT-55869
Optimizaion: instead of reading all non modified JS files
from the cache into the memory at once, the patch allows
copying non-modified JS files from disk one by one
during the compilation output writing routine.
Optimization: often we don't need all hashes for all available symbols.
This patch allows the calculation of the symbol hash only on demand.
This patch also allows cycles for the inline function dependency
graph in the IC infrastructure. Note that the inline function cycles
may crash the inliner, however it is not the IC infrastructure
responsibility to check the cycles.
If inline function A calls another inline function B,
we must use the original version of inline function A for inlining,
which doesn’t have inlined function B. Because during the inlining
process, we remap all occurrences of inline function A
to a temporary copy of function A, and if the function B
somehow uses function A (e.g. callable reference),
the built IR will have a reference to the temporary function,
not the original one. All these things lead to broken cross-module references.
This patch saves the original versions of all inline functions
before inlining and provides them during the inline process.
^KT-55930 Fixed
Previously, a function reference that used generic parameters from its
outer scope was lowered into a top-level non-generic subclass of
`FunctionN`, with `FunctionN` type arguments referencing type parameters
not present in the scope anymore. This sometimes resulted in generating
malformed mangled names.
From now on the generated subclass of `FunctionN` is generic. The needed
type arguments are passed upon instantiation, when the relevant generic
parameters are present in the scope.