It should make easier to use different intellij-core versions
Some of them doesn't have JDK_15_PREVIEW while the other don't have
JDK_17, while we're ok with both of them since they support records and
sealed interfaces
Compiler runner used incorrect cache key for isolated classloader:
it didn't take the actually used compiler jar into account,
only the K/N home dir.
Fix this by using the entire classpath as a key.
When running tool in-process, log the actual classpath extracted from
the classloader, not the one that was intended.
This helps to detect the cases when these two don't match.
Apply generic (backend-agnostic) compiler plugin artifact instead of
Native-specific one when Native embeddable compiler jar is used
(with `kotlin.native.useEmbeddableCompilerJar=true` project property).
This partially reverts commit 2baf344f5f,
removing support for K/N embeddable compiler jar from subplugins.
More migration-friendly implementation is to be added instead.
Create `JavaClassDescriptor`s for Java classes
Ignore anonymous and synthetic classes
as they can't impact recompilation.
Clean up handling of local and anonymous classes
Bug: KT-45777
Test: New JavaClassDescriptorCreatorTest
Unfortunately, llvm removes full debug info from module on any error.
Different version debug info in bitcode is not always compatible, also
it adds this debug info additional requirements on generated debug info.
So this feature is quite unstable and shouldn't be enabled by default,
although it has almost no downsides when worked correctly.
This test should have it's own test data file.
Previously it used 'hello3.kt' test data file shared with 'hello3' test which uses golden data. This caused a conflict.
The "archiveFile" property is deprecated on the jar task, and
archiveFileName is used in this commit. Also, this fixes an
issue in Gradle where convention mapping is incorrectly
deserialized from configuraiton cache.
Original issue: https://issuetracker.google.com/193558867
Test: testJvmWithJavaConfigurationCache
Descriptors are already supposed to be sorted in scopes. The problem is
that rendering descriptors for sorting takes a lot of time (~1.5% of
total compilation time of intellij with JVM IR), and simple heuristics,
like comparing by names first, don't fully help with it.
#KT-48233
It is not correct to assume that arg0 has been generated to have the
same IrType as the whole expression.
The reason it only backfired in throwing exceptions probably has to do
with the fact that visitThrow might be the only place in
ExpressionCodegen right now which uses the IrType from PromisedValue to
make a decision on whether to generate checkcast.
It seems suspicious that ExpressionCodegen.visitFieldAccess/visitCall
return PromisedValue whose IrType mentions type parameters which are
declared outside of the call site, but that should probably be
investigated separately.
#KT-48440 Fixed