Commit Graph

3189 Commits

Author SHA1 Message Date
Ivan Kylchik 0021a5f655 [K2] Save inlined java field into special InlineConstTracker 2023-06-14 19:02:39 +00:00
Dmitriy Novozhilov ba41e8ec38 [IR] Use common expect/actual matching algorithm in IR actualizer
^KT-58578 Fixed
2023-06-10 07:33:29 +00:00
Pavel Mikhailovskii fc7af2c9e0 KT-58720 Generate full InnerClass attributes for the standard library; deprecate -Xuse-old-innerclasses-logic 2023-06-09 11:31:17 +00:00
Nikolay Lunyak 23f87eda1f [FIR] KT-57803: Report the error message for light tree
The renaming prevents the JVM clash.

^KT-57803 Fixed
2023-06-06 07:43:37 +00:00
Nikolay Lunyak 70605c84df [FIR Native] KT-58549: Get rid of the builtin provider
According to
`FirNativeCodegenBoxTestGenerated.testNestedClassesInAnnotations`,
the annotation
`kotlin.internal.PlatformDependent` is
unresolved reference.

^KT-58549 Fixed
2023-06-01 10:27:54 +00:00
Ivan Kochurkin abdb173f6c Add AnalysisFlags.metadataCompilation flag
It's `true` if metadata compilation mode is activated

It's being initialized in K2MetadataCompilerArguments
2023-05-31 14:38:38 +00:00
Ilya Kirillov c114cb67cb [Java resolution] make it possible to provide custom source element for JavaElement
This is needed to allow using PSI pointers in IDE in JavaElement.
`JavaElement`s are reused between read actions,
so underlying PSI elements might be invalidated when using hard PSI references

^KT-58194
2023-05-31 13:01:19 +00:00
Alexander Shabalin aea8bac7d2 [K/N] Do not compile for deprecated targets and legacy MM
^KT-56533
^KT-58853
2023-05-30 16:44:58 +00:00
Alexander Udalov 60016d3e5b Remove obsolete compiler flag -Xuse-ir 2023-05-30 14:46:09 +00:00
Ivan Kochurkin 994c2229df [FIR] Report UNSUPPORTED_FEATURE for expect/actual members if MPP is disabled
Always enable MultiPlatformProjects for K2MetadataCompilerArguments

 ^KT-57243 Fixed
2023-05-25 09:46:56 +00:00
Alexander Korepanov e4d7897071 [JS IR] Check fir compilation errors after checking IC next round 2023-05-23 10:13:26 +00:00
Alexander Korepanov 28b781f60a [JS IR] Move fir to klib serialization code in separate class 2023-05-23 10:13:26 +00:00
Alexander Udalov fb900d2e2a JVM: remove most usages of JvmTarget.JVM_1_6 2023-05-19 13:24:00 +00:00
Alexander.Likhachev e8ab063dc9 Use uppercase() instead of uppercase(Locale) in CliJavaModuleFinder
It follows the 877438b1f3 commit removing LV/AV limits for the module and it needed to avoid, for example, cases when `i` is being uppercased to `İ` in the `TR` locale
2023-05-17 19:34:40 +00:00
Ilya Goncharov bcefa1cd66 [Gradle, Wasm] Add wasm platform kind
KTIJ-25583
2023-05-17 13:28:20 +00:00
Nikolay Lunyak c57d9097c2 [FIR] Add the syntax tree suffix to buildResolveAndCheckFir 2023-05-16 12:11:47 +00:00
Nikolay Lunyak 51b8e400d9 [FIR] Sort KtSourceFiles analogously to KtFiles
The
`IncrementalJsFirKlibCompilerWithScopeExpansionRunnerTestGenerate
.testSerializedSubClassAndChangedInterfaces`
test fail because the checksums of
the `manifest` files don't match
after the full recompilation.
It happens, because the `b.kt` file may be passed
to the compiler before `a.kt`, in which case while
generating the data class members the compiler
will generate a call to `Any::hashCode` when
accessing the hashcode of the `a` property instead
of generating a call to the fake override
`A::hashCode`.
When working with PSI, the compiler sorts the
input files to at `KotlinCoreEnvironment.kt:200`.

This change removes the flaky
behavior by sorting the input files.
2023-05-16 12:11:46 +00:00
Nikolay Lunyak d72a50b3f5 [FIR] KT-58065: Support LT in K2JsIrCompiler 2023-05-16 12:11:46 +00:00
Svyatoslav Scherbina 43b4791fd2 Native: mark -no-endorsed-libs compiler flag as deprecated
It no longer has any effect, and there is no intention to change that.
2023-05-15 10:10:57 +00:00
Alexander.Likhachev 877438b1f3 Remove LV/AV customization for the compiler CLI modules
The customization was added for compatibility with Gradle. That isn't a problem anymore, as we don't use it from KGP and soon we will eliminate the direct dependency on kotlin-compiler from KGP.
2023-05-12 12:59:39 +00:00
Igor Chevdar f5478bda3d Handle recently added property to K2NativeCompilerArguments 2023-05-10 11:05:06 +00:00
Igor Chevdar e4f30589a4 [K/N] Incremental compilation of per-file caches 2023-05-10 08:37:32 +00:00
Sergej Jaskiewicz a74df3b4b4 [IR] Store manglers used for signature computation in IrBackendInput
We will need them in signature dump tests later.
2023-05-04 14:58:06 +00:00
Alexander Udalov b72b1ad7cd CLI: fix confusing error message about JvmDefault
#KT-58351 Fixed
2023-05-02 10:52:01 +00:00
Dmitrii Gridin f425dea3b8 [CLI] JvmDependenciesIndexImpl: add lock to make it thread safe
Can be rewritten to multi-thread implementation in the feature

^KT-56550
2023-04-28 13:41:05 +00:00
Kirill Rakhman 6d3b911dfc [K2/Native] Configure metadata compilation mode
This fixes access to internal declarations in common source sets from
intermediate source sets that are compiled to metadata.

#KT-58219 Fixed
2023-04-27 10:49:53 +00:00
Zalim Bashorov 4e36f5b391 [Wasm, JS] Add a warning that dumping reachability and size infos to file is supported only for Kotlin/Wasm 2023-04-25 19:44:03 +02:00
Zalim Bashorov 0a1116376c [CLI, JS, Wasm] Regenerate K2JSCompilerArgumentsCopyGenerated.kt 2023-04-25 19:44:03 +02:00
Zalim Bashorov bd852e87ab [Wasm] Add an option to dump declaration IR sizes to file 2023-04-25 19:44:03 +02:00
Zalim Bashorov 62b21ac078 [Wasm] Add an option to dump reachability info to file 2023-04-25 19:44:02 +02:00
Alexander Udalov a0790047f7 JvmDefault: remove -Xjvm-default modes "enable" and "compatibility"
#KT-54746
2023-04-25 14:33:00 +00:00
Jinseong Jeon 5298abf2d6 AA/LC: introduce an API to find script files 2023-04-25 14:49:03 +02:00
Jinseong Jeon f9086daf4d SLC: add support for .kts
^KTIJ-21108
^KT-50241
^KT-55626 Fixed
2023-04-25 14:49:03 +02:00
Nataliya.Valtman 2a391f7330 Move kotlin-build-statistic project to :compiler 2023-04-25 11:29:09 +00:00
nataliya.valtman e34dd043da Add minimal statistic report for JPS build
Fix build stat for gradle 8

#KT-56438 Fixed
2023-04-25 11:29:09 +00:00
Ilya Kirillov e32bcc2c83 Move IDE extension points from compiler.xml to the IDE repository
And remove `org.jetbrains.kotlin.moduleBuilder` as it's not used anymore

^KTIJ-25304 fixed
2023-04-24 09:25:13 +00:00
Anton Bannykh c839fdca3e [JS IR] initial support for KLIB incremental compilation with K2 2023-04-23 14:47:48 +02:00
Yahor Berdnikau eb4e96a113 Add kotlin-build-tools-enum-compat workaround
It acts as a workaround for the case when build tools or dependencies
are compiled with latest 'kotlin-stdlib' version, but at a runtime older
 'kotlin-stdlib' is provided, which does not know about new
 `EnumEntries`.

 ^KT-57317 Fixed
2023-04-21 14:57:17 +00:00
Pavel Mikhailovskii 1f649b698c [CLI] Get rid of unnecessary type parameters in arguments.kt 2023-04-21 13:21:28 +00:00
Nikolay Krasko f9169e8c7c [213] Dummy code style facade for ClsElementImpl.appendMirrorText()
The only test that fails without is FirOldFrontendLightClassesTestGenerated.
While there's no proof that code fails in production, the footprint from
services shouldn't be big, and it's better to have them instead of
failing in runtime.

KTI-1114
2023-04-21 13:19:05 +00:00
Roman Golyshev d4cffb8a5a [213] Switch to 213 platform
KTI-1114
2023-04-21 13:19:04 +00:00
Dmitriy Dolovov 7da05d66e3 [PL][tests] Run JS tests with enabled PL with ERROR log level
#KT-57378
2023-04-20 10:23:47 +00:00
Pavel Mikhailovskii 58143a2006 KT-57598 Run Kapt with K1 even when the compiler is run with K2 2023-04-20 09:30:38 +00:00
Ivan Kylchik 0b70b7904d [K2] Create and add EvaluatedConstTracker in configuration 2023-04-19 13:52:43 +00:00
Ivan Kylchik fe989d0ba7 [K2] Add languageVersionSettings to Fir2IrConfiguration class 2023-04-19 13:52:42 +00:00
Ivan Kylchik e16231104e [K2] Add Fir2IrConfiguration class to store configuration parameters
One example of such parameter is `linkViaSignatures`. There is
`Psi2IrConfiguration` as an analog for K1.
2023-04-19 13:52:41 +00:00
Ivan Kylchik 525098dea6 [K2] Unbind fir:fir2ir:jvm-backend from other non jvm modules 2023-04-19 13:52:41 +00:00
Alexander Korepanov 79d378f2bd [JS IR] Perform optimizations on the generated JS code
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
2023-04-18 12:49:33 +00:00
Dmitriy Dolovov 66797ff876 [PL] Temporarily disable PL for WASM 2023-04-18 09:22:54 +00:00
Dmitriy Dolovov 000cf47c21 [PL][JS] Fix: Pass PL CLI arguments properly 2023-04-18 09:22:53 +00:00