Commit Graph

1832 Commits

Author SHA1 Message Date
Vladimir Sukharev 046f0ad95d Adjust test kt53119_append_generated.kt to changes in KT-53864
Merge-request: KT-MR-7080
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-09-09 14:42:11 +00:00
Igor Chevdar 1e6f7f6d58 [K/N] Fixed problem with non-empty output directory 2022-09-09 12:23:05 +00:00
Rick Clephas b406722e20 [K/N] Prohibit empty ObjCNames 2022-09-09 12:31:36 +02:00
Pavel Kunyavskiy 2a36c08e1f [K/N] Fix nan tests on mips 2022-09-08 12:13:43 +00:00
Abduqodiri Qurbonzoda 73a65c1bb1 Promote top-level kotlin.math.cbrt() to stable #KT-53277 2022-09-08 12:00:58 +00:00
Igor Chevdar d8fb9560d1 [K/N] Used compiler_interface.bc instead of runtime.bc 2022-09-08 07:56:15 +03:00
Igor Chevdar 44010a04b1 [K/N][runtime] Extracted compiler interface from native runtime 2022-09-06 14:03:41 +00:00
Igor Chevdar b8bf82114b [K/N][codegen] Refactored getting types from runtime 2022-09-06 14:03:41 +00:00
Pavel Punegov 7a7954b1e2 [K/N][samples] Exclude curl sample on Windows
Due to the linkage error caused by passing whole
mingw lib directory with -L
2022-09-06 08:05:36 +00:00
Pavel Kunyavskiy d822d3e7c6 [K/N] Reenable constant inlining except for Double nan constants
^KT-52970
2022-09-05 06:06:44 +00:00
Svyatoslav Scherbina f8462f1b0c Native: allow virtual calls in CoroutineLaunchpad intrinsic
This intrinsic was always calling the supplied suspend function
non-virtually, and this was hardcoded in the intrinsic generator.
Now this can be configured with `superQualifierSymbol` in the respective
IrCall, just the way this works with any other calls.

As a side effect, global optimizations now process this intrinsic more
correctly (before that, they didn't take the intrinsic generator into
account, and treated the call as virtual).
2022-09-01 09:35:23 +00:00
Svyatoslav Scherbina 728fe918fe Native: don't expect that startCoroutineUninterceptedOrReturn receiver is FunctionN+1
Previous implementation of startCoroutineUninterceptedOrReturn expected
that the receiver (i.e. the suspend function object to start) of type
SuspendFunctionN (i.e. suspend function type with arity = N) is also an
instance of FunctionN+1 (i.e. regular function type with arity = N + 1)
with proper convention.

While compiler tries to achieve that (for better compatibility with
Kotlin/JVM, by generating additional supertypes and methods for classes
implementing suspend function types), this doesn't work e.g. for
implementations defined in Swift.

Fix this by adding fallbacks for cases when the receiver is not
a FunctionN+1, while keeping the fastpath for default FunctionN+1
cases.

^KT-51043 Fixed
2022-09-01 09:35:22 +00:00
Svyatoslav Scherbina 15fe2c2c5c Native: remove code duplication in coroutine intrinsics implementation
Make `createCoroutineUnintercepted` invoke
`startCoroutineUninterceptedOrReturn` when suspend function object is
not a `BaseContinuationImpl` (e.g. for a custom suspend function type
subclass), instead of using the copy of its implementation.
2022-09-01 09:35:22 +00:00
Svyatoslav Scherbina e64b057131 Native: make KonanTarget.supportsMimallocAllocator() exhaustive
To prevent forgetting adding a target there again.
2022-09-01 09:24:11 +00:00
Svyatoslav Scherbina 3f9da7263a Native: enable mimalloc by default on ios_simulator_arm64
This was probably forgotten when supporting Apple silicon.
2022-09-01 09:24:11 +00:00
Johan Bay f71931d04b [K/N] Parallelize marking in CMS GC
This change parallelizes marking by making each non-native Kotlin thread
mark its own view of the heap. To make this safe, we make flipping the
marking bit atomic which ensures that threads do not try to trace the
same objects.

Co-authored-by: Johan Bay <jobay@google.com>

Merge-request: KOTLIN-MR-423
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2022-09-01 09:07:54 +00:00
Alexander Shabalin 0734456a87 [K/N] Enable extra option for mimalloc ^KT-53182
Merge-request: KT-MR-6952
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-09-01 09:02:23 +00:00
Vladimir Sukharev 77ab69240e Do inline safepoints for watchos_arm64
Merge-request: KT-MR-6993
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-09-01 08:14:41 +00:00
Svyatoslav Scherbina 7bf6d64cfb Native: move samples to backend.native/tests/ 2022-08-31 16:10:04 +00:00
Svyatoslav Scherbina b7337d2e64 Native: use samples only as compiler tests
Remove unrelated parts.
2022-08-31 16:10:04 +00:00
Svyatoslav Scherbina 71b8089f33 Native: remove samples that are not used in tests 2022-08-31 16:10:04 +00:00
Artem Kobzar 8b826a865b [K/JS, K/WASM] feat(Enum.entries): add support of new enum static field for JS and WASM. 2022-08-29 16:04:12 +00:00
Sergey Bogolepov f946496979 [K/N] Deprecate obsolete GC handles. 2022-08-26 14:35:08 +00:00
Sergey Bogolepov 8010203ee5 [K/N] Update Throwable.kt documentation for the new MM 2022-08-26 14:35:08 +00:00
Sergey Bogolepov aaf24c897f [K/N] Update ObjectTransfer.kt documentation for the new MM 2022-08-26 14:35:08 +00:00
Sergey Bogolepov 122f3033f2 [K/N] Update Atomics.kt documentation for the new MM 2022-08-26 14:35:07 +00:00
Sergey Bogolepov 5d11e0d408 [K/N] Update Worker.kt documentation for the new MM 2022-08-26 14:35:06 +00:00
Sergey Bogolepov 2e22a5bd41 [K/N] Update annotations documentation for the new MM 2022-08-26 14:35:05 +00:00
Sergey Bogolepov abed99bdb7 [K/N] Update GC.kt documentation 2022-08-26 14:35:04 +00:00
Pavel Kunyavskiy 776b68f2fe [K/N] Move aws address for perf infra from code to environment 2022-08-26 09:52:48 +00:00
Vladimir Sukharev 99fe242b38 Disable failed test on linux_mips32
^KT-48949 Turn off failed test

Merge-request: KT-MR-6935
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-08-25 13:11:56 +00:00
Pavel Punegov cde46adc08 [K/N][samples] Use mingw preinstalled only in the exact place
Newer versions got be env variable lead to linkage errors
2022-08-25 12:56:15 +00:00
Pavel Kunyavskiy 895a8ff149 [K/N] Basic support of Enum.entries for Native
No forward compatibility yet, with old klib IR linker will fail.

^KT-53324
2022-08-25 12:40:30 +00:00
Ilya Gorbunov 203a00151d rangeUntil member operator in builtins #KT-52933 2022-08-24 22:22:53 +00:00
Pavel Kunyavskiy c279facc28 [K/N] More localized debug info rejection is supported
Sometimes plugins generate code with UNDEFINED_OFFSET debug info.
Probably, we can't control it, and just need to deal with it.

^KT-53667
2022-08-24 10:27:08 +00:00
Vladimir Sukharev 7f1ab29668 Fix Windows targets has bad addresses in stacktrace
^KT-49240 Fixed

Merge-request: KT-MR-6883
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-08-24 09:05:06 +00:00
Alexander Shabalin 58569f2eee Fix pthread to number converstion ^KT-52429
Merge-request: KT-MR-6918
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-08-23 16:36:24 +00:00
Svyatoslav Scherbina 860f99482a Native: prohibit calling suspend functions from autoreleasepool {}
If a suspend function is called from `autoreleasepool {}` block, this
might cause the autoreleasepool frame to be removed earlier than
expected. See https://youtrack.jetbrains.com/issue/KT-50786 for more
details.

^KT-50786 Fixed
2022-08-23 14:30:54 +00:00
Alexander Shabalin 94b550b9dc [K/N] Do not make compdb depend on runtime building
Merge-request: KT-MR-6907
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-08-23 07:41:59 +00:00
Rick Clephas 6ae517a2df [Native] Add HiddenFromObjC and ShouldRefineInSwift annotations 2022-08-22 16:10:44 +02:00
Nikita Bobko 2a4f3f41aa 2/5 Replace source dependency on kotlin-reflect with binary dependency
Review: https://jetbrains.team/p/kt/reviews/6753

Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.

Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276

Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
2022-08-22 15:43:49 +02:00
Nikita Bobko 6eb3f1ac05 Refactor: Inline kotlinReflectModule
Review: https://jetbrains.team/p/kt/reviews/6753

In the next commits, source dependency on kotlin-reflect will be
replaced with binary dependency. Thus, it won't be technically be a a
"module" anynmore. So I either have to rename "kotlinReflectModule" or
get rid of it. I decided to get rid of it (inline it) because there is
only one usage.
2022-08-22 15:42:56 +02:00
Nikita Bobko 837d100cda Drop settings.gradle.kts from kotlin-native/shared
Review: https://jetbrains.team/p/kt/reviews/6753

I don't know why this settings.gradle.kts is needed. But I think that
it was needed before "kotlin-native merge into kotlin" times. (Pavel
Punegov says the same) I try to remove and if CI doesn't fail then I
will push it.

I need to drop settings.gradle.kts because I'm going to replace
kotlin-reflect dependency from source to binary in the next commits. And
before doing this refactoring I want to normalize all the dependencies
on kotlin-reflect.
2022-08-22 15:42:40 +02: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
Igor Chevdar 0f9ae605d0 [K/N][codegen] Fixed bug with stack allocated strings
#KT-53667 Fixed
2022-08-22 06:05:53 +00:00
Igor Chevdar 16eaba8f68 [K/N][tests] Added a test on stack allocated string 2022-08-22 06:05:53 +00:00
Igor Chevdar d3eedd791e [K/N][IR] Turned off prerequisite for ReturnsInsertionsPhase
Sometimes we have 0 files in the module and CompilerPhase thinks no work has been done
causing the prerequisite requirement to fail
2022-08-19 16:19:53 +03:00
Igor Chevdar 3462d4e5e8 [K/N][IR] Made caches ABI lowerings per file 2022-08-19 10:33:22 +00:00
Igor Chevdar 85379159be [K/N][IR] Reworked caches ABI lowering 2022-08-19 10:33:21 +00:00
Igor Chevdar c1d63fa6dd [K/N][IR] Moved caches ABI lowerings to a separate file 2022-08-19 10:33:20 +00:00