Commit Graph

2309 Commits

Author SHA1 Message Date
Ivan Kochurkin ee73e4774b [K2, MPP] Remove redundant expect declarations from klib metadata
^KT-57250 Fixed

Introduce flat Fir2IrActualizedResult

It contains output from Fir2Ir and IrActualizer
2023-03-24 14:48:26 +00:00
Abduqodiri Qurbonzoda 9076e5b112 [K/N] Mark BitSet usages in stdlib with @ObsoleteNativeApi 2023-03-23 14:48:23 +00:00
Abduqodiri Qurbonzoda 9ff863ced7 [K/N] Mark BitSet with @ObsoleteNativeApi #KT-57088 2023-03-23 14:48:23 +00:00
Abduqodiri Qurbonzoda 3ffbfba1d6 [K/N] Introduce ObsoleteNativeApi annotation
An opt-in annotation to mark the Kotlin/Native standard library API
that is considered obsolete and is being phased out.
2023-03-23 14:48:22 +00:00
Pavel Kunyavskiy 1c2f34ab4e [K/N] Add test for Annotations on type parameters and update doc
^KT-57404
2023-03-23 10:27:23 +00:00
Dmitriy Dolovov 2a4d880037 [PL] Deep rework of the partial linkage
1. Leaving no unbound symbols in the IR tree, KT-54491:
   - All unbound symbols are bound to synthetic stub declarations
   - Improved detection of the root cause for every partially linked classifier
   - Improved error messages

2. Visibility valiation, KT-54469

3. Always check deserialized symbols:
   If the deserialized symbol mismatches the symbol kind at the call site in the deserializer then generate and reference another symbol with the same signature. In case PL is off, just throw IrSymbolTypeMismatchException.

4. Handle class inheritance violation:
   - Detect illegal inheritance (ex: inheriting from a final class)
   - Detect invalid constructor delegation (ex: delegating to another class than the direct superclass)
   - Simplification: Reduce the number of PartialLinkageCase subclasses
   - Reworked error message generation to have shorter and clearer messages

5. Handle class transformations and all known side-effects, examples:
   - nested <-> inner
   - class <-> enum/object
   - adding/removing subclasses of sealed class
   - adding/removing enum entries

6. Check direct instantiation of abstract class.
   Such instantiation could be possible if a class was non-abstract in the previous version of a library.

7. Handle unlinked annotations on declarations.
   Such annotations are removed from the IR. The appropriate compiler error message is produced for every individual case.

8. Handle value argument count mismatch at call sites

9. Handle calling suspend function from non-suspend context.
   This could happen if a suspen function was non-suspend in the previous version of a library.

10. Handle overriding inline callables.
    Only the leaf final callable can be marked with `inline`.

11. Detect illegal non-local returns from noinline/crossinline lambdas.
2023-03-23 10:24:27 +00:00
Dmitriy Dolovov f99ad3be3b [PL][Native] Fix: Preserve origin while applying ThrowIrLinkageError intrinsic 2023-03-23 10:24:26 +00:00
Pavel Kunyavskiy b01cc1f88c [K2/N] Fix property accessors modality in K2 metadata
^KT-56603
2023-03-22 13:47:01 +00:00
Ilya Chernikov 59b88f33b2 [K2, MPP] implement IR errors reporting and test infrastructure
Fix test data

^KT-56344 Fixed
2023-03-22 01:28:16 +00:00
Pavel Punegov 668dfdd81d [K/N][test] Exclude skia interop test that fails due to ^KT-57484
Merge-request: KT-MR-9291
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-03-21 18:45:17 +00:00
Vyacheslav Gerasimov 76c54a8ff3 Build: Fix usages of apis deprecated in Gradle 8 2023-03-20 19:45:39 +00:00
Vyacheslav Gerasimov bd9f096cfd Build: Replace configuration dependencies with extends
Configuration dependencies on configuration are not allowed in Gradle 8
2023-03-20 19:45:38 +00:00
Pavel Punegov 56cd550e27 [K/N][test] Remove old lldb tests that were replaced in the new infra
These tests were replaced by the 842a66c3 and now located
in :native:native.tests project

Merge-request: KT-MR-9256
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-03-20 13:56:42 +00:00
Ilya Chernikov 8edf8573b5 Revert "[K2/N] adjust interop_objc_direct test for K2 because of ^KT-55902"
This reverts commit 8315eeaf92.
2023-03-17 08:57:52 +00:00
Ilya Chernikov be2a85be71 K2: support implicit integer to unsigned conversions...
with dedicated opt-in language feature and special
annotation or module capability.
Not intended for a general use, solves specific K/N
scenario with interop libs.
#KT-55902 fixed
2023-03-17 08:57:51 +00:00
Pavel Kunyavskiy e655e0a809 [K/N] Fix default argument lambda in suspend function code generation 2023-03-16 21:14:41 +00:00
Dmitriy Novozhilov b6a41c6d93 [CLI] Extract classes of compiler configuration from :compiler:cli to the separate module
Those classes mainly include KotlinCoreEnvironment and its dependencies

This change is needed for two reasons:
1. Splitting of some common configuration of compiler from logic of CLI
    makes code structure more clean
2. There is a need to add dependency on `:analysis:analysis-api-standalone`
    to `:compiler:cli`, because FIR analogue of AnalysysHandlerExtension uses
    services from it. But the problems is that standalone AA itself depends
    on classes for compiler configuration, which leads to circular
    dependency between those modules. Extracting configuration to
    `:compiler:cli-base` solves the problem
2023-03-16 15:16:32 +00:00
Pavel Kunyavskiy 8f4c6eae2f [K/N] Get rid of ArrayAsList class, use .asList() instead
^KT-57137
2023-03-15 18:03:14 +00:00
Pavel Kunyavskiy 62fb3df7f0 [K/N] Disable scope initialization on constant access
^KT-57098
2023-03-15 09:03:19 +00:00
Alexander Shabalin e6297f92fa [K/N] Issue deprecation warning when using legacy MM
Merge-request: KT-MR-9091
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2023-03-15 08:22:37 +00:00
Vladimir Sukharev 5bd0a1a0ba Disable some tests due to open issues and incompatibility with K1/MPP
Merge-request: KT-MR-9206
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-03-15 06:55:27 +00:00
Ivan Kylchik ab2c3572ab Drop all usages of inlineFunctionSymbol in IrReturnableBlock 2023-03-14 20:47:41 +00:00
Ivan Kylchik ef78196cbc Replace all usages of inlineFunctionSymbol with inlineFunction 2023-03-14 20:47:34 +00:00
Svyatoslav Scherbina ba2e46758d Fix kotlin-native/backend.native/tests/samples after 82524fd
Enable language feature for these tests, because some code relies
on implicit integer coercion there
2023-03-14 19:26:44 +00:00
Pavel Kunyavskiy dc2e072af2 [K/N] Make exception handling in initializers more consistent with jvm
^KT-57091
2023-03-14 12:59:14 +00:00
Pavel Kunyavskiy 0506d39d8a [K/N] Support ignoring test with legacy mm 2023-03-14 12:59:13 +00:00
Pavel Punegov 76ab130011 [K/N] Make executors be separate included project
This change will make possible use Executors in old, gtest and new
test infrastructures.

Merge-request: KT-MR-8964
2023-03-14 11:06:50 +00:00
Pavel Kunyavskiy 854506fa9e [K/N] refactor all function calls to use LlvmCallable machinery 2023-03-14 09:50:00 +00:00
Nikolay Krasko 2c80d3c66a Remove outdated KotlinBuildPusher
There should not be any direct dependencies to TeamCity
in the repository.
2023-03-13 18:40:19 +00:00
Svyatoslav Scherbina 8315eeaf92 [K2/N] adjust interop_objc_direct test for K2 because of ^KT-55902
K2 doesn't support implicit integer coercion for cinterop yet.
2023-03-13 13:39:51 +00:00
Svyatoslav Scherbina 950c2baa34 [K2/N] ignore library_ir_provider_mismatch test because of ^KT-56855
K2 doesn't support one-stage compilation mode for Native yet.
2023-03-13 13:39:51 +00:00
Svyatoslav Scherbina 424fd19fb4 [K2/N] ignore interop_kt40426 test because of ^KT-56030
K2 doesn't support subclassing Obj-C classes with methods differing only
by parameter names yet.
2023-03-13 13:39:50 +00:00
Pavel Punegov 752d6505e9 [K/N][test] Opt-in ImplicitSignedToUnsignedIntegerConversion in tests
Add option to allow such conversions, see ^KT-56583

Merge-request: KT-MR-9160
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-03-13 13:00:19 +00:00
Alexander Udalov d96112b944 Remove dependency of fir2ir/fir.entrypoint on psi2ir 2023-03-10 17:49:35 +00:00
Svyatoslav Scherbina 60b8d2b3d9 [K/N] Disable more failing tests on mips, target is deprecated 2023-03-10 13:25:53 +00:00
Nikolay Krasko 57934a6870 Revert "Revert "[K2/N] KT-57026, KT-57208: Adjust Native & JS test infrastructures for MPP testing""
This reverts commit c0c692844e.
2023-03-10 14:24:49 +01:00
Nikolay Krasko c0c692844e Revert "[K2/N] KT-57026, KT-57208: Adjust Native & JS test infrastructures for MPP testing"
This reverts commit 6964121c15.
2023-03-10 13:14:10 +00:00
Pavel Punegov aed6272107 [K/N] Merge :kotlin-native-shared with :native:kotlin-native-utils
* Code was moved to utils, but sources are included to the shared
until bootstrap advance.
* Fixed dependencies and set API & LV to 1.4 for the modules used with
Gradle.

Merge-request: KT-MR-9122
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-03-10 12:57:35 +00:00
Igor Chevdar e5523c196e [K/N][codegen] Removed a thread unsafe optimization
It's not that needed anyway (according to the profile logs).
2023-03-10 11:05:55 +00:00
Igor Chevdar ea7c851748 [K/N][IR][codegen] Fixed a number of thread safety problems 2023-03-10 11:05:55 +00:00
Igor Chevdar f442936320 [K/N] Build per-file caches in parallel 2023-03-10 11:05:54 +00:00
Sergey Bogolepov af1f3a102b [K/N] Disable split_compilation_pipeline for MinGW 2023-03-10 09:31:41 +00:00
Sergey Bogolepov 236cf2b9ca [K/N] Disable split_compilation_pipeline in two-stage mode
There is no way to pass flags only to the second stage in tests.
2023-03-10 09:31:41 +00:00
Sergey Bogolepov bba7e9e395 [K/N] Prohibit -Xcompile-from-bitcode when producing library 2023-03-10 09:31:40 +00:00
Vladimir Sukharev 6964121c15 [K2/N] KT-57026, KT-57208: Adjust Native & JS test infrastructures for MPP testing
Merge-request: KT-MR-9081
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-03-09 18:56:30 +00:00
Yahor Berdnikau b9d19a864a Unify Kotlin daemon JVM arguments settings in Kotlin repo
Now 'kotlin-daemon-config' convention plugin should be added into
settings plugins to configure Kotlin daemon.
2023-03-09 10:16:05 +00:00
Igor Chevdar 7f0a4ad737 [K/N][IR] Reworked saving inline function bodies for cross-file inlining
#KT-57053 Fixed
 #KT-57029 Fixed
2023-03-08 06:48:52 +00:00
Vladimir Sukharev 8dc6ae41f6 Exclude 3 KonanDriverTest testcases from K2 testing due to KT-56855
Merge-request: KT-MR-9114
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-03-07 14:05:12 +00:00
Pavel Kunyavskiy 2b4abb0c7b [K/N] Remove outdated boxing related functions and classes
^KT-55765
2023-03-07 08:51:00 +00:00
Pavel Kunyavskiy f2c1145462 [K/N] Disable failing test on mips, target is deprecated 2023-03-06 11:56:10 +00:00