Commit Graph

2504 Commits

Author SHA1 Message Date
Igor Chevdar 55632f5df2 [K/N][runtime] Used internal isInstance 2023-05-22 12:49:58 +00:00
Igor Chevdar d1a3752626 [K/N][tests] Fixed lldb tests on arrays 2023-05-22 12:49:58 +00:00
cristiangarcia d32d5346a2 Fix gradle deprecations in Kotlin Native
Merge-request: KT-MR-10267
Merged-by: Cristian Garcia <Cristian.Garcia-Marin@jetbrains.com>
2023-05-22 12:39:57 +00:00
Troels Bjerre Lund 20d8f54ea3 Unlink weakref objects on finalizer-enque ^KT-55364
Co-authored-by: Troels Lund <troels@google.com>

Merge-request: KOTLIN-MR-694
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-05-22 12:16:48 +00:00
Vladimir Sukharev 4705207263 [K2/N] Fix lost diagnostics
^KT-58065

Merge-request: KT-MR-10264
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-22 09:18:04 +00:00
Vladimir Sukharev 363c56e226 [K2/N] Export C adapters for non-root packages
^KT-56182

Merge-request: KT-MR-10160
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-19 11:40:59 +00:00
Sergey Bogolepov c57c34525f [K/N] KT-58562: Implement frontend checkers for HiddenFromObjC on classes 2023-05-19 11:33:17 +00:00
Vladimir Sukharev 6a8981372b [K2/N] Read KDoc strings from LightTree nodes
^KT-56090

Merge-request: KT-MR-9613
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-17 08:12:39 +00:00
Nikolay Lunyak c57d9097c2 [FIR] Add the syntax tree suffix to buildResolveAndCheckFir 2023-05-16 12:11:47 +00:00
Nikolay Lunyak 90651c5851 [FIR] KT-58065: Support LT in K2Native 2023-05-16 12:11:46 +00:00
Ilya Gorbunov bbb36ce501 KT-58046 Promote time sources, time marks, measureTime to stable 2023-05-16 11:42:32 +00:00
Vladimir Sukharev bbe1e708f9 [K2/N] Rewrite mpp tests from old native infra to new
^KT-58543

Merge-request: KT-MR-10065
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-16 08:41:39 +00:00
Dmitriy Dolovov 2b913d7c47 [Native] Don't produce broken @Deprecated annotations in c-interop
#KT-58651
2023-05-16 08:30:29 +00:00
Svyatoslav Scherbina 16acb72521 Native: don't pack endorsed libraries (namely kotlinx.cli) into dist
The overall concept of "endorsed" libraries is currently unmaintained
and non-reviewed.
kotlinx-cli is in its alpha, and is available from Maven.

See also KT-54098.
2023-05-15 10:10:56 +00:00
Alexander Udalov 41cb2ce3d8 K/N: enable -Xlambdas=class for :kotlin-native:Interop:Indexer
`staticCFunction` is used a few times in this module, and it uses
kotlin-reflect to inspect the lambda parameter, which is only possible
for class-generated lambdas.

This is needed to enable indy lambdas in the project.
2023-05-12 14:01:30 +00:00
Troels Bjerre Lund bc7b1094c3 K/N custom-alloc: Fix GC stats for NextFitPage ^KT-55364
Swept and kept objects in NextFitPages are double counted; first in
GCApi::SweepObject and then again inside NextFitPage::Sweep. This fix
removes the latter.


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

Merge-request: KOTLIN-MR-691
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-05-12 09:24:16 +00:00
Kirill Rakhman e2dafdb5b9 [Native/Tests] Add explicit import for SharedImmutable
This fixes an overload resolution ambiguity in K2.

#KT-56272
2023-05-11 13:10:34 +00:00
Igor Chevdar 2f24c6df80 [K/N] Added isSubtype intrinsic 2023-05-11 09:30:18 +00:00
Igor Chevdar 67b65ec56a [K/N] Reformat 2023-05-11 09:30:18 +00:00
Igor Chevdar 96c142569d [K/N] Slight devirtualization improvement
Make devirtualization not by an actual receiver type but rather
by an actual virtual method implementation (which sometimes can be better)
2023-05-11 09:30:18 +00:00
Igor Chevdar 1ef81c005e [K/N][tests] Fixed a test for KT-55938
Used in the test cache directory should be prepared before the test
2023-05-10 13:12:09 +00:00
Sergej Jaskiewicz 93d1932ccb [IR] Make IrReturnTargetSymbol a sealed interface 2023-05-10 11:51:26 +00:00
Sergej Jaskiewicz 6c211f3a39 [IR] Make IrFunctionSymbol a sealed interface 2023-05-10 11:51:26 +00:00
Sergej Jaskiewicz 1a371350ea [IR] Make IrClassifierSymbol a sealed interface 2023-05-10 11:51:25 +00:00
Troels Bjerre Lund 388634e47d [K/N] custom-alloc: Encode consecutive free blocks ^KT-55364
Co-authored-by: Troels Lund <troels@google.com>

Merge-request: KOTLIN-MR-662
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-05-10 09:45:14 +00:00
Igor Chevdar e4f30589a4 [K/N] Incremental compilation of per-file caches 2023-05-10 08:37:32 +00:00
Igor Chevdar 74864ba1d0 [K/N][codegen] Trampoline to call virtual functions to reduce dependencies coupling 2023-05-10 08:37:32 +00:00
Igor Chevdar 281296fc2a [K/N] Rely on file fqName & path instead of unstable index 2023-05-10 08:37:32 +00:00
Igor Chevdar f90db20512 [K/N][caches] Added klib hash computing and storing 2023-05-10 08:37:32 +00:00
Igor Chevdar a8135c60ce [K/N] Turn on optimistic escape analysis
For new MM (with tracing GC), it is safe to turn it on
2023-05-10 05:51:52 +00:00
Vladimir Sukharev c6d9821ef0 [K2/N] Rework testStdlibFramework to avoid compiler crash due to KT-58459
^KT-58459

Merge-request: KT-MR-10043
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-09 16:52:04 +00:00
Troels Bjerre Lund 918a247bcc [K/N] custom_alloc: sweep extraobjects outside stw ^KT-55364
Co-authored-by: Troels Lund <troels@google.com>

Merge-request: KOTLIN-MR-677
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-05-09 16:37:58 +00:00
Aleksei.Glushko 57707180c6 [K/N] Cooperative intrusive list (in preparations for parallel mark)
Merge-request: KOTLIN-MR-670
Merged-by: Aleksej Glushko <aleksei.glushko@jetbrains.com>
2023-05-09 15:08:32 +00:00
Pavel Punegov 5a95d919c7 [K/N] Add kotlinx.cinterop.ExperimentalForeignApi opt-ins
Add more opt-ins in Samples, tests and Benchmarks.
This is a follow-up to KT-MR-9788 

Merge-request: KT-MR-9997
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-05-09 09:39:40 +00:00
Pavel Kunyavskiy 11e1bcca1d [K/N] Avoid using deprecated functions in data class generated methods
^KT-58267
2023-05-09 09:18:42 +00:00
Pavel Kunyavskiy 2f3947d8e5 [K/N] Unmute some actually passing tests 2023-05-09 09:15:41 +00:00
Igor Chevdar b6030b3517 [K/N] Devirtualization: virtual calls from external world fix
The fix deals with the situation where a virtual function potentially from
the external world (because of the receiver) returns a final type (if it isn't final,
then it's conservatively assumed that no devirtualization could be done on it).

 #KT-57791 Fixed
2023-05-09 05:25:11 +00:00
Igor Chevdar 197cba35eb [K/N] Added couple of reproducers for KT-57791 2023-05-09 05:25:11 +00:00
Pavel Kunyavskiy 68a68b2763 [K/N] Refactor KonanSymbols to avoid descriptors when built over FIR
^KT-58437
2023-05-08 07:51:56 +00:00
Alexander Shabalin 142e2b4b2a [K/N] Add RosettaExecutor
Merge-request: KT-MR-9986
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2023-05-06 13:44:25 +00:00
Alexander Shabalin 917f64c893 [K/N] Fix ObjCAction, ObjCOutlet not switching state. ^KT-58441 2023-05-05 19:02:34 +00:00
Alexander Shabalin 860d0e32f7 [K/N] Add tests on ObjCAction and ObjCOutlet. ^KT-58441 2023-05-05 19:02:34 +00:00
Vladimir Sukharev 98be76295f [K2/N] Insert asserts to reveal wrongly recursive Fir2IrLazy*.overriddenSymbols
^KT-58459
[Merge-request: KT-MR-9962
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-05 12:06:22 +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
Sergey Bogolepov a8b7306342 [K/N] KT-58422: Mute obsolete tests 2023-05-04 14:14:55 +00:00
Vsevolod Tolstopyatov f4e8ae5191 Explicitly declare stability levels of declarations in kotlinx.cinterop package
* @ExperimentalForeignApi for all declarations that operate on
    unmanaged memory (i.e. pointers and references)
* @BetaInteropApi for the rest of the interoperability declarations,
    namely Swift/CInterop-specific interfaces and convenience-functions

### Implementation details

* Some typealiases are not marked explicitly because it crashes the compiler,
    yet their experimentality is properly propagated
* License header is adjusted where it previously had been existing
* Deprecated with ERROR interop declarations that are deprecated for more than
    two years are removed
* WASM target interop declarations are deprecated
* Deliberately make Boolean.toByte and Byte.toBoolean foreign-experimental to scare
    people away

^KT-57728 fixed

Merge-request: KT-MR-9788
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2023-05-04 13:52:21 +00:00
Aleksei.Glushko cfa481d38f [K/N] Benches for parallel mark: life + splay with mark helpers
Merge-request: KOTLIN-MR-669
Merged-by: Aleksej Glushko <aleksei.glushko@jetbrains.com>
2023-05-02 10:24:25 +00:00
Aleksei.Glushko 8173091fee [K/N] print thread id in assertion failed
Merge-request: KOTLIN-MR-668
Merged-by: Aleksej Glushko <aleksei.glushko@jetbrains.com>
2023-05-02 10:23:38 +00:00
Nikolay Krasko 0fb5934ebd [213] Add library dependencies to kotlin-native.jar
While dependency is added to backend.native, it's than
transitively packed to :kotlin-native:shadowJar. Without it
running gradle with -Pkotlin.native.useEmbeddableCompilerJar=false fails
with

e: java.lang.NoClassDefFoundError: org/codehaus/stax2/typed/TypedXMLStreamException

KTI-1114
2023-05-01 14:58:48 +00:00
Pavel Kunyavskiy f55fd481e9 [K/N] Refactor default argument lowering to avoid boxing
Current inline classes API is not compatible between different backends.
So implementing common function required for this optimization
was not possible in Native backend.

So, common default arguments lowering was refactored to make bigger
piece of code replaceable in backends.

^KT-57860
2023-05-01 13:04:21 +00:00