Commit Graph

840 Commits

Author SHA1 Message Date
Ilya Goncharov 1f9af4b452 [Gradle, JS] Fix cli tests for ir
KT-60495
2023-07-26 12:51:37 +00:00
Mikhail Glukhikh 95bf63d6cb K2: introduce OptIn language version checker
#KT-60598 Fixed
2023-07-24 12:50:38 +00:00
Mikhail Glukhikh 17da09bf17 K2: add ConeKotlinType argument for NULL_FOR_NONNULL_TYPE 2023-07-13 09:07:39 +00:00
Mikhail Glukhikh 9d9d7880af K2: render types in quotes in diagnostic messages 2023-07-13 09:07:39 +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
Ilya Goncharov 148d8c9246 [Gradle, JS] Migrate JS cli tests to ir backend 2023-07-05 07:10:06 +00:00
Ivan Kylchik fba0bd79ad [K2] Don't crash compiler if receiver on property wasn't evaluated
Compilation crash must be handled separately in
`convertToConstantValues` method because we still want successfully
compile common code. All constants will be evaluated later on
fir2ir phase.

#KT-59362 Fixed
2023-06-27 08:51:39 +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 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
Kirill Rakhman 6a073e0b17 [FIR] Fix duplicate spaces in FirPartialModifierRenderer 2023-06-21 08:36:46 +00:00
Brian Norman 269dfc61c8 [FIR] Display actual type for argument type mismatch error
Previously the argument type was being used for the actual type error
display. However, safe-call arguments are unwrapped which causes
nullable types to be displayed as non-null. Change to use the actual
type provided by the diagnostic instead of extracting the type from
the argument.

#KT-58844 Fixed
2023-06-16 11:44:14 +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
Denis.Zharkov 0775748aa9 Postpone enabling JSpecify annotations by default until 2.0
Thus, KT-55586 is being postponed, too.
The reasoning behind this change is that the language-committee issue
has not been approved yet, so new annotation package can't be enabled
by default, but it seems that it doesn't make sense having
a different behavior for the old one but at least that would make them
work consistently, so we postpone them, too.
2023-06-06 12:45:31 +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
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