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.
We do not need to check a default implementation of the interface during
the translation to JS because it must be checked before.
Moreover, this check breaks the produced JS code
if IR is partial loaded, e.g. during the incremental rebuild.
^KT-55716 Fixed
The patch adds an error if the module can not find the cross-module reference.
The patch removes the DCE optimization which eliminates implement() intrinsic,
because it leads to a broken cross-module reference and
broken JS code with implement() call, albeit in an unreachable block.
The JsAllowValueClassesInExternals feature is enabled explicitly,
because otherwise it's enabled
implicitly depending on the backend. See:
org/jetbrains/kotlin/test/builders/LanguageVersionSettingsBuilder.kt:90
A property may have a fake source return kind, while its accessor
has a real source kind. In this case we can't "just copy"
the property return type down to the accessor.
Moving tests to another package made the IDEA run configuration obsolete.
To prevent this problem in the future a separate task (jsStdlibApiTest)
was introduced. The task is run in TC and will fail if the tests are missing.
Merge-request: KT-MR-8128
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>