Commit Graph

825 Commits

Author SHA1 Message Date
Ivan Kochurkin 2251214d24 [FIR] Don't crash on complex expression as annotation argument if metadata compilation is used
^KT-58139 Fixed
2023-05-31 14:38:38 +00:00
Alexander Udalov 60016d3e5b Remove obsolete compiler flag -Xuse-ir 2023-05-30 14:46:09 +00:00
Alexander Udalov bb4bb58453 Remove tests on -Xuse-ir compiler flag
This flag is going to be removed because old backend is not supported
anymore, therefore there's no need to test it.
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 Udalov e4e1bcefbd JVM: remove tests on JVM target 1.6 2023-05-19 13:23:59 +00:00
Nikolay Lunyak d72a50b3f5 [FIR] KT-58065: Support LT in K2JsIrCompiler 2023-05-16 12:11:46 +00:00
Alexander Udalov d757847ed6 JVM: enable -Xlambdas=class for some backend tests
These tests are checking the specifics of the class-generated lambdas.
2023-05-12 15:21:00 +00:00
Nikolay Lunyak 76df0f9ad1 [FIR] KT-48870: Allow resolution to InaccessibleImplicitReceiverValue
^KT-48870 Fixed
2023-05-08 14:25:54 +00:00
Stanislav Ruban 47c32ef37f KT-52671: Add CLI test
The issue in question was obsoleted by development of K2/MPP.

^KT-52671
2023-05-05 11:58:22 +00:00
Alexander Udalov b72b1ad7cd CLI: fix confusing error message about JvmDefault
#KT-58351 Fixed
2023-05-02 10:52:01 +00:00
Ilya Gorbunov b35b727d73 KT-53778 Remove experimental annotations from open ranges 2023-04-28 17:12:15 +00:00
Zalim Bashorov ef28bf27ae [CLI tests] Update testdata 2023-04-25 19:44:03 +02:00
Alexander Udalov a0790047f7 JvmDefault: remove -Xjvm-default modes "enable" and "compatibility"
#KT-54746
2023-04-25 14:33:00 +00:00
Alexander Udalov 3120a35a88 JvmDefault: remove most tests on @JvmDefault
The tests are removed because JvmDefault is going to be deprecated with
error in KT-54746 and removed later in KT-57696.

Many of the removed tests already had existing counterparts with the new
modes `all` and `all-compatibility`. In this change, I've added such
tests where they were missing, and removed tests which were testing
behavior specific to the JvmDefault annotation, such as some
diagnostics.

 #KT-54746
2023-04-25 14:33:00 +00:00
Nikolay Lunyak 360d236b7e [FIR JS] KT-57601: Get rid of the builtin provider
In this example we get 2 variants of `kotlin/toString()`:
one coming from the KLib provider, and the
other coming from the builtins provider.
These are identical deserialized functions.

^KT-57601 Fixed
2023-04-25 11:29:34 +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
Artem Kobzar f0aa6c6d32 [K/JS Gradle] Remove forceLegacyBackendUsage from KotlinGradlePlugin previously added with the compiler flags refactoring, also fix bootstrap compilation of atomicfu plugin 2023-04-12 14:04:34 +00:00
Ivan Kochurkin 9a5cc39588 [FIR] Use FirDefaultOverridesBackwardCompatibilityHelper with common metadata compilation
Also, use it with JS compilation

^KT-57735 Fixed
2023-04-06 22:27:24 +02:00
Kirill Rakhman 674397be82 [FIR] Trim rendered symbols in diagnostic messages 2023-04-05 08:44:56 +00:00
Dmitriy Novozhilov 96e9d690a6 [CLI] Prohibit passing HMPP module structure with CLI arguments to metadata compiler
^KT-57644 Fixed
2023-03-31 09:59:52 +00:00
Alexander Udalov 37c776b233 Add JVM target bytecode version 20
#KT-57495 Fixed
2023-03-30 19:05:41 +00:00
Dmitriy Dolovov 46ed6e5766 [PL] Change semantics of CLI parameter -Xpartial-linkage
This parameter accepts the name of the "mode" in which the partial linkage would work. Currently, only two options are supported: 'enable', 'disable'. But the list may be extended in the future as needed.

At the moment the 'disable' option is the default one. This will be changed in #KT-51447, #KT-51443.
2023-03-30 12:38:07 +00:00
Dmitriy Dolovov 831611d577 [PL] Introduce new CLI parameter: -Xpartial-linkage-loglevel
The parameter controls the level of logs produced during the compile time by the partial linkage: 'info', 'warn' (default for now), and 'error'.
2023-03-30 12:38:06 +00:00
Ivan Kylchik 5d5582d201 Move ignoreConstOptimizationErrors compiler key from jvm to common
#KT-56023
2023-03-24 15:55:03 +00:00
Ivan Kochurkin d91efb212d [K2, MPP] Rename jvm.kt to platform.kt in JS tests 2023-03-24 14:48:24 +00:00
Ivan Kochurkin 227018624e [K2, MPP] Add common constructorCache to Fir2IrCommonMemberStorage
Use it in Fir2IrDeclarationStorage

^KT-56660 Fixed
2023-03-24 14:48:24 +00:00
Ivan Kochurkin 879deb90fc [FIR] Report friendly errors for type aliases from stdlib if -no-jdk option is set
^KT-54531 Fixed
2023-03-21 20:24:56 +00:00
Ivan Kylchik 6bce668cac Introduce language version 2.1 2023-03-21 20:02:42 +00:00
Artem Kobzar 4da81b2b6e [K/JS] Remove an internal system property and replace it with the new compiler flag 2023-03-17 12:38:34 +00:00
Denis.Zharkov bcbe26287a Adjust CLI tests for JSR305 annotations being extracted
See the previous commits
2023-03-16 14:43:04 +00:00
Ivan Kylchik 1c210822ea Add new configuration key that can enable IR inlining for JVM 2023-03-14 20:47:41 +00:00
Ivan Kochurkin d829f8b684 [FIR] Drop using of JavaSymbolProvider and OptionalAnnotationClassesProvider in FirCommonSessionFactory
Drop using of all Java stuff inside FirCommonSessionFactory

^KT-56063
2023-03-03 20:58:24 +00:00
Sebastian Sellmair b90207edb9 [Gradle] Rename -Xdepends-on to -Xfragment-refines and use ':' for -Xfragment-sources instead of ';'
^KT-56210 Verification Pending
2023-03-01 16:30:44 +00:00
Sebastian Sellmair 21bf497830 [CLI] Replace K2 -Xmodule by -Xfragments and -Xfragment-sources
KT-56210
2023-03-01 16:30:41 +00:00
Dmitriy Novozhilov e0fa1e64b9 [FIR] Properly setup java parser version for CLI pipeline with light tree
^KT-56549 Fixed
2023-02-28 09:17:41 +00:00
Dmitriy Novozhilov 94faa759cb [CLI] Rename -XdependsOn flag to -Xdepends-on to keep convention
^KT-56209
2023-02-17 14:09:30 +00:00
Dmitriy Novozhilov 79e4df72bf [CLI] Introduce utilities for creating FirSession hierarchy in CLI for all platforms
Also support session creation and compilation for HMPP projects

^KT-56209 Fixed
2023-02-17 11:08:51 +00:00
Dmitriy Novozhilov 77caa31640 [CLI] Add CLI arguments to pass HMPP module structure to the compiler
^KT-56209
2023-02-17 11:08:50 +00:00
Ilya Chernikov 27db8ce1bb FIR LT: extract syntax diagnostic info from error element
#KT-56701 fixed
2023-02-16 10:21:04 +00:00
Ilya Chernikov e39eb62e6e FIR LT: Fix diagnostic location calculation on the last line
it was calculated incorrectly on the last line that do not end
with EOL.
#KT-56649 fixed
2023-02-16 10:21:03 +00:00
Kirill Rakhman 22fd7921fe [FIR] Introduce MetadataBasedAnnotationDeserializer for compiling common
^KT-56361 Fixed
2023-02-08 13:32:33 +00:00
Ivan Kochurkin f3e3cc0037 [FIR] Implement support of MPP in JS CLI 2023-02-07 14:16:29 +00:00
Kirill Rakhman 1eb18f13bd FIR: Fix test data after making LHS of assignment an expression
KT-54648
2023-01-31 08:39:43 +00:00
Dmitriy Novozhilov 88efa6bfb6 Update tests after switching to LV 1.9 2023-01-30 09:29:57 +00:00
Ilya Goncharov 1150ec6882 [JS] Implementation dependencies for JS klibs
^KT-56158 fixed
2023-01-27 13:31:59 +00:00
Stanislav Ruban 7e0f69b8de Introduce tweaks and wording changes related to LV2.0-specific CLI warnings
Fix merge conflict related to renaming of one of the tests

Regenerate tests affected by previous commit

Fix merge conflict related to renaming of one of the tests

Improve wording of the `-Xuse-k2 -language-version 1.*` CLI warning

Improve wording of LV2.0-specific CLI warnings some more

Fix output of one of the tests for -Xuse-k2 deprecation

Tweak wording of LV2.0-specific CLI warnings

* make it clear in every warning that -Xuse-k2 is deprecated
* add a reminder to remove -Xuse-k2 for `-Xuse-k2 -language-version 2.0`
* add both possibly wanted fixes for `-Xuse-k2 -language-version 1.*`

Remove deprecated -Xuse-k2 flag from one of the tests

Merge-request: KT-MR-8449
Merged-by: Stanislav Ruban <Stanislav.Ruban@jetbrains.com>
2023-01-26 11:55:03 +00:00
Ivan Kochurkin 44b7859356 [FIR] Implement FIR metadata serialization
Add FirMetadataSerializer

Add CLI metadata tests on FIR
2023-01-24 15:27:14 +00:00
Ivan Kochurkin 46b9e15101 [FIR] Rename firMultiplatformCompilationWithLightTreeWithoutErrors
to firMultiplatformCompilationWithPsiWithoutErrors

Use `-Xuse-fir-lt=false` since now lt is default
2023-01-24 15:27:13 +00:00
Mikhail Glukhikh 565adf3075 K1: don't filter Enum.entries in tower to report error later
After this commit we:
- preserve Enum.entries synthetic property in tower even in case the bound feature is OFF
- report an error on Enum.entries call in specific checker if the feature is OFF
- give this synthetic property lower priority, no matter feature ON or OFF

#KT-55251 Fixed
2023-01-24 12:45:59 +00:00
Ilya Chernikov 7ec72b568d Fix assertion in light tree diagnostic reporter
happened then two diagnostics are reported on the same element.
#KT-55924 fixed
2023-01-20 17:57:15 +00:00