This line was added in commit 8c611e0 to allow the
`incremental-compilation-impl` module to use Gson.
This module is no longer using Gson now (only used by its unit tests),
so we can revert that commit.
^KT-52141 Fixed
To snapshot a Java class (+ its fields and methods), previously we used
Gson to serialize a class field/method to a string via reflection, and
hash that string.
We now use an ASM ClassWriter to write a placeholder class containing
the field/method of interest and hash the bytecode of that class.
One experiment showed that this new approach is ~10 times faster than
the previous approach (140s down to 16s when snapshotting 600 jars).
Test: Updated expectation files for JavaClassSnapshotterTest unit tests
+ Existing integration tests to prevent regression
^KT-52141 In Progress
When building Kotlin/Native from sources on macOS, build scripts check
that installed Xcode has specific major version. It is possible to
suppress the version mismatch error (with caution), but the error
message didn't mention that.
Fix that by adding a hint to the error message.
This commit introduces support for calling and referencing local functions and
objects in evaluate expression on the IR backend.
The primary incision is a lowering inserted after Local Declaration Lowering,
that uses the intermediate data structures recorded by LDL to rewrite calls to
local functions to the appropriate function in the binary, instead of predicting
the compilation strategy. The required changes to the rest of the pipeline
facilitate piping the required data around.
The key to this transformation is that _captures by the local function_ must be
introduced as _captures by the fragment function_, such that the evaluator
infrastructure can find the appropriate values at run-time. This is necessary
due to the strategy of compiling local functions to static functions instead of
closures.
Additional test coverage of stepping behavior support the corresponding changes
in the Evaluator, part of the Kotlin Debugger plug-in.
Compiler supposed to generate such method inside the
LocalFileKotlinClass class, but because of the KT-18489 method
getContainingLibrary is not generated. Because of that we potentially
could get AbstractMethodError. In order to fix that we are adding
explicit ovverride in java super class
This only affects JVM IR, and this is similar to how this was done in
the old JVM backend in `CallBasedArgumentGenerator.generateVararg`.
#KT-52146 Fixed
Now common SourceSet output will have '_common' suffix, while all
variants will have the same name - '<module-name>.kotlin_module'.
This change is required for KSP as short-term workaround, as they
are using some internal properties/methods, which was mangled before
this change and hard to access in different variants.
^KT-52138 Fixed
^KT-52050 Verification Pending
The issue described in KT-52050 happened, because forwardDeclarations
were not carried into next commonization steps. For commonization
it is fair to choose the union of all modules forwardDeclarations
as common dependency (instead of a union), since we can assume that
all those forward declarations will be provided.
The test project will be compiled and proves that
'platform.posix.DIR' retains it's 'CPointed' supertype.
The test is expected to fail on platforms that do not support
macos (windows and linux), since the issue seems to be caused
by optimistic, single platform propagation.