Commit Graph

1401 Commits

Author SHA1 Message Date
Troels Bjerre Lund 2818957689 [K/N] Custom allocator for all GCs ^KT-55364
Also enables the integration tests for custom allocator and the
currently available GCs.

Co-authored-by: Troels Bjerre Lund <troels@google.com>

Merge-request: KT-MR-11199
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2023-07-24 16:28:47 +00:00
Pavel Kunyavskiy ba75ee4c03 [K/N] Copy more flags to the first stage of one-shot compilation mode
This fixes obj-export lazy header generation in non-default modes,
and makes nightly tests green.
2023-07-24 12:47:14 +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
mvicsokolova 298c4f8c32 [K/N] Introduce atomic arrays in K/N stdlib
This commit introduces API for AtomicIntArray, AtomicLongArray and AtomicArray<T>.

The current set of functions is implemented via atomic arrays intrinsics (see KT-58360) and provides sequentially consistent memory ordering guarantees and no spurious failures in compareAndSet/compareAndExchange operations.

For details see: KT-60608

Merge-request: KT-MR-11071
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-07-21 15:30:20 +00:00
Svyatoslav Scherbina 3280d3ef80 Native: prepare existing tests for cinterop adding ExperimentalForeignApi
cinterop tool should add ExperimentalForeignApi to all generated
declarations by default. This commit prepares existing tests for this.

^KT-58362
2023-07-21 11:54:14 +00:00
Pavel Kunyavskiy b6060f8440 [K/N] Fix lazy header export in one-shot compilation mode 2023-07-21 09:37:52 +00:00
Ivan Kylchik ca8db7d0b8 [IR] Move toIrConst method into common IrUtils file
This method is used not only in IR interpreter, so it makes sense to
move it.
2023-07-19 15:12:54 +00:00
Dmitriy Novozhilov 11974c14d8 [IR] Fix various TODOs in SymbolTable 2023-07-17 21:02:40 +00:00
Dmitriy Novozhilov 8ad202eb8b [IR] Remove descriptor-related methods from SymbolTable
Replace them with calls to SymbolTableExtension
2023-07-17 21:02:39 +00:00
Dmitriy Novozhilov 4986cb14aa [IR] Extract descriptor part from SymbolTable into separate component
After this change SymbolTable (and ReferenceSymbolTable) contains only
  methods with IdSignatures. All descriptors-related methods are moved
  into DescriptorSymbolTableExtension, which automatically delegates to
  the SymbolTable if needed

At this moment there are cross-references between SymbolTable, because
  descriptor API is still actively used across backends. So SymbolTable
  is accessible in some place then descriptor extension will be accessible
  too

DescriptorSymbolTableExtension is an implementation of abstract SymbolTableExtension
  which allows to implement different kinds of storages, e.g. FIR based
  (it probably will be needed for FIR2IR)
2023-07-17 21:02:39 +00:00
Vladimir Sukharev 52068e11ee [K/N] Pass USE_FIR config setting to splitted first stage, and not to second stage
Merge-request: KT-MR-11084
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-07-14 15:23:27 +00:00
Pavel Punegov 61ba29a775 [K/N][test] Excluded filecheck_signext_zeroext_objc_export
With enabled two-stage compilation test fails to match bridges
which generation depends on order
See ^KT-58863
2023-07-12 14:46:27 +00:00
mvicsokolova d9fa9c1b3b [K/N] Introduce intrinsics that atomically update array elements
Supported atomic update of elements for IntArray, LongArray and Array<T>
See KT-58360

Merge-request: KT-MR-11020
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-07-12 14:32:36 +00:00
Ivan Kochurkin 1a28067b76 [FIR] Merge FirBasedKotlinMangler into FirMangler
FirMangler has only one implementation and it's FirBasedKotlinMangler

It looks excessive
2023-07-12 13:11:24 +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
Svyatoslav Scherbina 710381e489 Native: don't report Objective-C-related errors on expect classes
An expect class might lack some details and thus seem incorrect to the
compiler, while the corresponding actual class is totally fine.
Due to the specifics of the compiler, this happens more often then it
should (because the compiler actually always analyzes expects along
with actuals, with most references actualized).

For example, in KT-52882 the compiler analyzes an expect class
(TestImpl), but the class refers to the actual interface Test as its
supertype, meaning that the compiler sees TestImpl as a class inheriting
an Objective-C protocol but not an Objective-C class, which is
prohibited. While the actual class has its super types in order.

So, in reality, from both actualized and non-actualized points of view,
the code is totally correct, and the error was reported only because of
the way the compiler handles multiplatform.

Those compiler checks only matter for the actual class anyway, so
disabling them for expect classes is harmless.

^KT-52882 Fixed
2023-07-10 16:15:49 +00:00
Alexander Shabalin 6619edbbac [K/N] Fix redundant sp removal tests 2023-07-10 15:45:30 +00:00
Ivan Kylchik 0c6e2f135e [Native] Drop constantInliningPhase
We don't need this lowering anymore because corresponding work is done
by `constEvaluationPhase`
2023-07-10 13:19:52 +00:00
Ivan Kylchik a4b8ab8199 [Native] Forbid to inline NaN values during const evaluation 2023-07-10 13:19:52 +00:00
Ivan Kylchik 8e42ccaccb [IR] Drop FoldConstantLowering and StringTrimLowering 2023-07-10 13:19:51 +00:00
Ivan Kylchik ad6332112e [IR] Support const optimizations for Native backend 2023-07-10 13:19:51 +00:00
Pavel Kunyavskiy 19ccb23088 [K/N] Fix compilation error caused by bad merge 2023-07-10 10:31:00 +00:00
Pavel Kunyavskiy ef9413108b [K/N] Consolidate forward declarations handling
This is refactoring in preparation for KT-59764.
Names and layout of forward declarations related classes
was copy-pasted many times over compiler code.

Implementing KT-59764 would require copy-pasting it two more times.
So instead of doing this it was put in single place.

No behaviour changes intended in this commit.
2023-07-10 08:59:16 +00:00
Igor Chevdar 58639951f6 [K/N] Refactored 2-stage splitting 2023-07-07 17:51:46 +00:00
Igor Chevdar afdc596121 [K/N] Fix for two-stage compilation 2023-07-07 17:51:46 +00:00
Vladimir Sukharev 4cfcf45120 [K/N] Partially fix IncrementalCompilationTest
^KT-59245
2023-07-07 17:51:46 +00:00
Vladimir Sukharev e240d7aae3 [K/N] Fix test split_compilation_pipeline
^KT-59245
2023-07-07 17:51:46 +00:00
Vladimir Sukharev 32a390ea18 [K/N] K1/MPP: Enable splitting 1-stage to two CLI invocations
^KT-59245 Fixed
2023-07-07 17:51:46 +00:00
Vladimir Sukharev a87b662bc5 [K/N] Split 1-stage K1 compilations to two stages
^KT-59245 Fixed
2023-07-07 17:51:46 +00:00
Pavel Punegov d5c6dd5f5c [K/N][test] Improve testStackTrace test
Make it print stack trace before the checks
2023-07-07 17:09:40 +00:00
Pavel Punegov e722212502 [K/N][test] Suppress internal visibility in the test with @Retain 2023-07-06 16:22:02 +00:00
Dmitriy Dolovov 8aacdb471b [K/N] Fix: Ignore bridge functions in FunctionReferenceLowering
^KT-59858
2023-07-06 12:39:46 +00:00
Ivan Kylchik abbafc0b2a [IR] Move some inline utils from backend.common into ir.util 2023-07-06 11:00:14 +00:00
Pavel Punegov 7cb0875bd8 [K/N][test] Add ExperimentalNativeApi opt-in in the samples 2023-07-05 18:20:35 +00:00
Pavel Kunyavskiy 396cfb3956 [K/N] Make cast to objc forward declaration unchecked
Before this commit it caused compiler crash.
Unchecked cast warning to be done later.

^KT-59645
2023-07-05 06:49:34 +00:00
Yahor Berdnikau 6d5f1c84a7 [repo] Migrate Groovy build scripts to use 'javadocJar()' directly from buildSrc 2023-07-04 19:26:38 +00:00
Yahor Berdnikau 5de2b5aeb4 [repo] Migrate Groovy build scripts to use 'kotlinStdlib()' directly from buildSrc 2023-07-04 19:26:38 +00:00
Aleksei.Glushko 96b44e0ad8 [K/N] concurrent weak sweep ^KT-57772 2023-07-04 13:42:59 +00:00
Igor Chevdar 4f859a634e [K/N] Fixed a bug in escape analysis
#KT-59693 Fixed
2023-07-04 09:45:48 +00:00
Sergey Bogolepov 2d945b7226 [K/N] Disable KT-59167 test on watchOS 2023-07-03 14:45:21 +00:00
Abduqodiri Qurbonzoda 209c916a7e OptIn ExperimentalNativeApi 2023-06-30 15:27:09 +00:00
Sergey Bogolepov aee9b7aae3 [K/N] Add a trivial test-case for KT-59167 2023-06-30 09:01:38 +00:00
Pavel Kunyavskiy cd3237295b [K/N] Remove module-wide ObsoleteDescriptorBasedApi opt-in 2023-06-28 13:18:09 +00:00
Sergej Jaskiewicz 7b77ec9930 [IR] Reorder parameters in IrFactory#createFunction
This is to prepare for IrFactory auto-generation (KT-59308).
2023-06-28 10:13:09 +00:00
Vladimir Sukharev 767cba5211 [K/N] Adjust test objc_direct.kt to pass under both K1 and K2
^KT-54610

Merge-request: KT-MR-10825
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-06-26 16:57:47 +00:00
Vladimir Sukharev 4d9f93e4eb [K2/N/MPP] Disable one-stage MPP compilation
^KT-56855

Merge-request: KT-MR-10735
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-06-23 15:51:59 +00:00
Pavel Kunyavskiy f486fc942b [K/N] Fix special backend checks tests 2023-06-22 16:22:59 +00:00
Sergej Jaskiewicz 0b7db067e6 [IR] Reorder parameters in IrFactory#createField
This is to prepare for IrFactory auto-generation (KT-59308).
2023-06-22 15:55:02 +00:00
Alexander.Likhachev 3affe78ae5 [Build] Make K/N backend sources publishing for IDE in a less hacky way
The previous way was too hacky relying on internal API
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00
Alexander.Likhachev 01276bbe49 [Build] Fix buildscripts deprecation warnings
#KTI-1221 In Progress
2023-06-22 15:16:08 +00:00