These two functions apparently are represented in Kotlin as methods
of `kotlin.String`. Because of that we accidentally treated them as
builtins.
To also minimize such cases, added filtration by return type. We are
allowing to interpret only these functions that have primitive or
unsigned return type.
#KT-57028 Fixed
Current inline classes API is not compatible between different backends.
So implementing common function required for this optimization
was not possible in Native backend.
So, common default arguments lowering was refactored to make bigger
piece of code replaceable in backends.
^KT-57860
- When the bytecode tool window opens a file containing `actual`
declarations, not all the `expect` symbols reachable via the `actual`
symbols' descriptors might be contained in the symbol table, because
the source of the `expect` members is not included in the files to
compile. This caused an issue during lowering in
`ExpectDeclarationRemover.tryCopyDefaultArguments`.
- The solution adds `expect` symbols reachable via `actual` declarations
to the symbol table, so that these `expect` symbols can subsequently
be stubbed.
^KTIJ-25152 fixed
Adding or removing a method or property with
a default implementation to an interface should
invalidate all children: we must regenerate JS code for them
^KT-56237 Fixed
Generate a declaration for each delegated member without body. If we
don't generate delegated declarations, subclasses will have incorrect IR
with unbound symbols in fake overrides.
#KT-58027 Fixed
It is not enough to store evaluated constants only by
<startOffset, endOffset> pair. We need to consider case there constant
can be located in different files with the same offset but with
different values.
#KT-57928 Fixed
#KT-57929 Fixed
The behavior is unified with the IR deserializer.
See `isOverridableMemberOrAccessor` in IrOverridingUtil.kt
Without this change, if we add a private member to the Any in wasm stdlib,
the compiler starts crashing with a linker error.
It's hard to write a relevant, self-contained box test for that since it requires
adding a private member to Any and affects **only** "virtual" FunctionN interfaces.
The patch adopts and reuses the optimizations from the legacy backend.
The optimizations remove useless temporary variables,
statements and simplify generated JS code.
The optimizations can be disabled by `-Xoptimize-generated-js=false`.
Related to KT-51139
Enabled Partial Linkage may replace entire IR expressions with a stub
during klib linking and loading. This may break the incremental cache
dependency graph. Dropping incremental cache files after updating klibs
(e.g. update klib version) covers almost all cases which
could not be tracked due to a broken dependency graph.
This patch could be reverted after fixing KT-57347