Commit Graph

36 Commits

Author SHA1 Message Date
Alexander Shabalin 48f5e1d05c [K/N] Deprecate -Xworker-exception-handling ^KT-65170
Also deprecate legacy option with error (was a warning since 1.9.20-Beta)
2024-01-22 19:22:44 +00:00
Alexander Shabalin 9ad7b00613 [K/N] Migrate some runtime/workers tests to new testing infra ^KT-61259 2023-11-17 07:42:28 +00:00
mvicsokolova 5f431e4e87 [K/N] Updated deprecations for native atomics
* Removed deprecated methods from the new atomics in kotlin.concurrent
* Changed deprecation level from WARNING to ERROR for the old atomics in kotlin.native.concurrent
* Removed FreezingIsDeprecated annotation from kotlin.concurrent.AtomicReference

See KT-58123

Merge-request: KT-MR-10650
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-08-22 13:42:12 +00:00
Abduqodiri Qurbonzoda 209c916a7e OptIn ExperimentalNativeApi 2023-06-30 15:27:09 +00:00
Abduqodiri Qurbonzoda 4ae19b2b44 [K/N] Deprecate SharedImmutable annotation #KT-57837
As a part of efforts to stabilize Native stdlib.
2023-06-19 11:35:32 +00:00
Alexander Shabalin aea8bac7d2 [K/N] Do not compile for deprecated targets and legacy MM
^KT-56533
^KT-58853
2023-05-30 16:44:58 +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
mvicsokolova 75b4469757 [K/N] Stabilization of Atomics API
`AtomicInt`, `AtomicLong`, `AtomicReference` and `AtomicNativePtr` classes were moved to `kotlin.concurrent` package. The corresponding classes from `kotlin.native.concurrent` were deprecated with warning since Kotlin 1.9.

In order to prepare for further commonization of Atomics API the following changes were made:
* `kotlin.concurrent.AtomicInt`: 
    * `increment(): Unit` and `decrement(): Unit` methods were deprecated with error
    * New methods were added: `incrementAndGet(): Int` , `decrementAndGet(): Int`, `getAndIncrement(): Int`, `getAndDecrement(): Int`, `getAndSet(newValue: Int): Int` 
* `kotlin.concurrent.AtomicLong`:
    * `increment(): Unit` and `decrement(): Unit` methods were deprecated with error
    * New methods were added: `incrementAndGet(): Long`, `decrementAndGet(): Long`, `getAndIncrement(): Long`, `getAndDecrement(): Long`, `getAndSet(newValue: Long): Long`
    * Deprecated `AtomicLong()` constructor with default parameter value
* For all atomic classes `compareAndSwap` method was renamed to `compareAndExchange`

See KT-58074 for more details.

Merge-request: KT-MR-9272
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-04-25 16:55:42 +00:00
Abduqodiri Qurbonzoda 5407ac1c72 [K/N] Mark UnhandledExceptionHook-related API with ExperimentalNativeApi
Instead of ExperimentalStdlibApi

As a part of efforts to stabilize Native stdlib #KT-55765.
2023-04-19 20:36:31 +00:00
Vsevolod Tolstopyatov af9252aa96 Mark all Worker-related API as obsolete.
* Explain what obsolete means and why workers are obsolete
* Add some documentation to workers to explain its common pitfalls

^KT-54702


Merge-request: KT-MR-9563
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2023-04-19 09:28:23 +00:00
Abduqodiri Qurbonzoda e1c91ee50f [K/N] Move kotlin.native.internal.GC into kotlin.native.runtime
As a part of efforts to stabilize Native stdlib #KT-55765.
2023-04-12 13:07:50 +03:00
Abduqodiri Qurbonzoda 16078ae8e8 [K/N] Mark WeakReference with ExperimentalNativeApi
As a part of efforts to stabilize Native stdlib #KT-55765.
2023-04-12 09:44:25 +00:00
Abduqodiri Qurbonzoda 8663239369 [K/N] Mark UnhandledExceptionHook-related API as experimental
As a part of efforts to stabilize Native stdlib.
2023-04-01 20:40:40 +03:00
Alexander Shabalin 6f844f15e0 [K/N] Worker API improvements ^KT-52429
Merge-request: KT-MR-6898
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-08-22 10:41:14 +00:00
Alexander Shabalin 29f3445721 [K/N] Deprecated freezing ^KT-50541
Starting with 1.7.20 freezing is deprecated. See https://github.com/JetBrains/kotlin/blob/master/kotlin-native/NEW_MM.md#freezing-deprecation for details.

Merge-request: KT-MR-6399
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-06-16 09:04:14 +00:00
Pavel Kunyavskiy 803014ef24 [K/N] Test for freezing disabling 2022-01-25 13:43:48 +00:00
Pavel Kunyavskiy 3798920183 [K/N] Any.isFrozen is now always false when freezing is disabled 2022-01-24 13:38:30 +00:00
Alexander Shabalin 4fd61ad1b0 [K/N] Change AtomicReference for the new MM ^KT-50026
Make AtomicReference behave like FreezableAtomicReference with the new MM: not frozen by default, don't require freezing value unless the ref itself is frozen. The behaviour with the old MM is unchanged.

Merge-request: KT-MR-5155
2021-12-03 17:08:21 +00:00
Svyatoslav Scherbina 24e7a11abc Native: fix losing Worker.executeAfter jobs on scheduled time clash
The implementation was keeping delayed jobs in std::set sorted
only by the scheduled execution time (in microseconds since epoch).
So two jobs submitted to a worker and having the same scheduled time
were considered equivalent by the set, and one of them got lost.

Fix this by using std::multiset instead of std::set.
2021-11-26 11:59:40 +00:00
Alexander Shabalin c678702847 [K/N] Add tests on Atomic integers ^KT-49348 2021-10-27 13:54:35 +00:00
Pavel Kunyavskiy 504d72011b [K/N] Transform FunctionReference without bound values to ConstantValue 2021-10-14 11:22:26 +00:00
Dmitriy Dolovov 1a863106e6 [Native][tests] Move golden data outside of Gradle build file 2021-09-01 10:14:01 +03:00
Dmitriy Dolovov c2e2d3a43e [Native][tests] workers5 - remove redundant test annotations 2021-09-01 10:13:55 +03:00
Pavel Kunyavskiy d88a665fa8 [K/N] Implement Lazy for new mm 2021-08-13 13:20:59 +00:00
Alexander Shabalin 7e04bb4bf1 [K/N] Refactor unhandled exception handling API
* Do not reset unhandled exception hook
* Add processUnhandledException to perform default unhandled exception
  processing
* Add terminateWithUnhandledException to report the unhandled exception
  and terminate the program
* Use the default unhandled exception processing in entrypoint, interop
  boundaries and in Worker.executeAfter
* Add -Xworker-exception-handling to control exception processing of
  Worker.executeAfter. By default its the old behaviour with the old MM,
  and new behaviour with the new MM.
2021-08-10 08:22:55 +00:00
max-kammerer 5b21444805 Update worker11.kt 2021-07-21 13:36:02 +02:00
Alexander Shabalin 092750e215 Fix race in Lazy for the new MM 2021-06-29 06:29:57 +00:00
Alexander Shabalin 28b6427d3e Make FreezableAtomicReference atomic when unfrozen for the new MM. 2021-06-25 21:18:37 +00:00
Alexander Shabalin cc71069a3a Do not require freezing for Worker.executeAfter on experimental MM 2021-06-24 07:57:23 +00:00
Svyatoslav Scherbina 2a54f1c610 Improve exception messages for kotlin.native.concurrent.* operations 2021-06-18 13:51:21 +00:00
Alexander Shabalin 9ebba93dd9 Make SingleThreadMarkAndSweep support multiple threads 2021-06-10 09:59:37 +00:00
Alexander Shabalin e0c7cda1cf Adjust test expectations for the new MM 2021-05-27 11:39:56 +00:00
Alexander Shabalin 73533e4b19 Make NoOp GC support multiple mutators 2021-05-21 06:31:09 +00:00
Alexander Shabalin 77e2b9f9a0 Disable running checkers by default (#4644)
* Make checkers be disabled by default

* Allow running checkers in test launcher
2021-01-26 17:38:03 +03:00
Alexander Shabalin 4297b521e4 Remove unneeded zeroing TLS (#4480) 2020-11-28 20:48:55 +01:00
Stanislav Erokhin f624800b84 Move everything under kotlin-native folder
I was forced to manually do update the following files, because otherwise
they would be ignored according .gitignore settings. Probably they
should be deleted from repo.

Interop/.idea/compiler.xml
Interop/.idea/gradle.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_1_0_3.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_0_3.xml
Interop/.idea/modules.xml
Interop/.idea/modules/Indexer/Indexer.iml
Interop/.idea/modules/Runtime/Runtime.iml
Interop/.idea/modules/StubGenerator/StubGenerator.iml
backend.native/backend.native.iml
backend.native/bc.frontend/bc.frontend.iml
backend.native/cli.bc/cli.bc.iml
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.kt
backend.native/tests/link/lib/foo.kt
backend.native/tests/link/lib/foo2.kt
backend.native/tests/teamcity-test.property
2020-10-27 21:00:28 +03:00