Commit Graph

3213 Commits

Author SHA1 Message Date
Mikhail Glukhikh 336ea28735 Drop setting progressive mode in cli / cli-base (related to KT-59171)
This commit prevents language version increase due to bootstrapping
problems. Compiler version X attempts to build the project with the
current version X+1 -> warning about progressive mode cannot be enabled ->
error due to -Werror -> build failure.
2023-07-26 18:19:58 +00:00
Ilya Chernikov 266a223460 Update scripting plugin autoload logic for K2 2023-07-26 08:49:26 +00:00
Mikhail Glukhikh 8c305d6143 K2: introduce infrastructure for LanguageVersionSettings checkers 2023-07-24 12:50:38 +00:00
Pavel Kunyavskiy d797505f06 [K/N] Drop merging forward and real declaration in deserializer
^KT-59643
2023-07-24 08:24:20 +00:00
Dmitrii Gridin 88da053408 [AA] forbid analyze from write action
Analysis is not supposed to be called from write action.
Such actions can lead to IDE freezes and incorrect behavior

^KT-60586 Fixed
2023-07-21 13:03:04 +00:00
Alexander Korepanov 08d158f901 [JS FIR] Support JS module system FE diagnostics
Support CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM diagnostic
^KT-59377 Fixed

Support CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM diagnostic
^KT-59381 Fixed

Support CALL_FROM_UMD_MUST_BE_JS_MODULE_AND_JS_NON_MODULE diagnostic
^KT-59417 Fixed
2023-07-18 14:02:30 +00:00
Mikhail Glukhikh 00b4ae6ae9 K2: expand type before isSomeType checks properly
Related to KT-60229
2023-07-14 16:38:47 +00:00
Dmitrii Krasnov f2816a5531 Added property for overriding konan distribution location
#KT-50463 Fixed

Merge-request: KT-MR-10310
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-07-12 12:36:51 +00:00
Sergei Kharitontcev-Beglov 34c6afec5e [Wasm] A name cache to distinguish same named declarations in DCE dump 2023-07-07 17:42:00 +00:00
Igor Yakovlev 750653e4b3 [Wasm] Add kotlin wasm wasi mode compiler flag 2023-07-07 15:23:18 +00:00
Pavel Mikhailovskii 083f54aceb [KAPT4] Create basic infrastructure for KAPT4 2023-07-07 11:09:16 +00:00
Dmitriy Novozhilov 037572ee9f [FIR] Create FirExtensionSyntheticFunctionInterfaceProvider only once for all sessions
This is needed to avoid duplication of symbols for the same classIds

^KT-58539 Fixed
2023-07-06 11:00:38 +00:00
Sergei Kharitontcev-Beglov 55bfd3efcb KT-52178: Argument propagation into IR backend & lowering dump action 2023-07-06 10:55:26 +00:00
Ilya Chernikov 5824b9c59c K2 Scripting: add Fir script codegen tests
27 failing tests are muted
2023-07-05 19:46:03 +00:00
Alexander Udalov 0625c1ea76 Minor, workaround an incremental compilation issue
After the previous commit, IC does not recompile code related to CLI
arguments parsing (likely due to KT-57919), so the resulting dist
compiler doesn't work at all, and all related tests are failing. This
"useless" override tricks the IC to recompile the class and all its
subclasses.
2023-06-27 08:34:40 +00:00
Troels Bjerre Lund 111bb461a9 CLI: Change kotlin reflection to java reflection
The command line argument parser is using between 0.25s and 0.5s
(depending on platform) on finding annotated properties. This fix
replaces the slow kotlin reflection with java reflection, which is an
order of magnitude faster.

 #KT-58183 Fixed
2023-06-27 08:34:40 +00:00
Artem Kobzar 64158a8a2f [K/JS] Add file-to-file compilation ^KT-6168 Fixed 2023-06-22 18:23:45 +00:00
Alexander Udalov bb4d25dfc9 IR: do not copy calls/references in ExpectSymbolTransformer
This is just a refactoring/optimization that makes use of the fact that
IrCall.symbol and other similar fields are now mutable.
2023-06-22 17:18:59 +00:00
Alexander Udalov e4d1e6246e CLI: increase default value of Xms option
According to the preloader's "-measure" option, just the raw class files
occupy ~50 Mb during compilation of hello world (~55 Mb for K2). So 32M
is a very outdated value for Xms. This change sets it to something more
reasonable to hopefully avoid unnecessary GCs and thus help with
performance and potentially with OOMs (KT-58690).

 #KT-58690
2023-06-22 17:10:11 +00:00
Alexander Udalov 530f533c84 K2 CLI: minor, remove misleading warning
Light tree is used by default now, so it's no longer far from being
production-ready.
2023-06-21 14:16:43 +00:00
Alexander Udalov 8653992ffc K2 CLI: wrap module name into angle brackets
This is not a user-visible change, so no issue is created and no tests
are added.

K1 uses angle brackets, and it will be very convenient to have the same
module names in K1 and K2, in particular to compare IR dumps where
almost everything is the same (up to a certain point) except the module
name.
2023-06-21 14:16:42 +00:00
Dmitriy Novozhilov 5717b59f52 [FIR/IR] Introduce an ability to propagate generated IR annotation to metadata
^KT-58638 Fixed
2023-06-21 06:56:59 +00:00
Ilya Chernikov 4fe3e875fa Write refined classpath back to compiler config in core env
- fixes refining with classpath updates
2023-06-20 16:38:33 +00:00
Ilya Chernikov 6f8049ffd3 CLI: support -language-version option in cli runner 2023-06-20 16:38:32 +00:00
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