Commit Graph

82 Commits

Author SHA1 Message Date
Alexander Shabalin d6a922bc74 [K/N][tests] Migrate link tests to new testing infra ^KT-61259 2024-01-02 18:47:05 +00:00
Vladimir Sukharev 93642020ff [K/N][Tests] Move codegen test sources interfaceCallsNCasts..vector
^KT-61259
2023-12-20 07:07:27 +00:00
Vladimir Sukharev 71a834b778 [K/N][Tests] Move codegen test sources cycles..innerClass
^KT-61259
2023-12-19 10:57:24 +00:00
Vladimir Sukharev a5f3d5b737 [K/N][Tests] Move some codegen tests to new infra: annotations..coroutines
^KT-61259
2023-12-18 11:15:15 +00:00
Alexander Shabalin fa9c620261 [K/N] Migrate some runtime/basic tests to new testing infra ^KT-61259 2023-11-10 15:51:05 +00:00
Alexander Shabalin b3e13fb2c2 [K/N] Migrate runtime/collections tests to new testing infra ^KT-61259 2023-10-24 09:27:46 +00:00
Vladimir Sukharev e43b634122 [K/N] Migrate most simple filecheck tests to new infra
^KT-62157


Merge-request: KT-MR-12376
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-10-23 10:07:28 +00:00
Igor Chevdar 9d2d75313b [K/N][tests] Added a test for anonymous object in a top level inline fun 2023-09-13 09:18:26 +03:00
Igor Chevdar b66a6fcc08 [K/N][IR] Moved local declarations names invention down the pipeline 2023-09-13 09:18:26 +03:00
Igor Chevdar ac760cbbfb [K/N][tests] Refactored a bit test
arguments of assertEquals are (expected, actual), not vice versa
2023-09-13 09:18:26 +03:00
Abduqodiri Qurbonzoda 209c916a7e OptIn ExperimentalNativeApi 2023-06-30 15:27:09 +00:00
Igor Chevdar 95bef03d3e [K/N][tests] Added a reproducer for KT-59501 2023-06-20 06:20:52 +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
Abduqodiri Qurbonzoda 193aa0f935 Align the Boolean.hashCode() value across platforms
Boolean.hashCode() should return 1231/1237 for true/false correspondingly.

As a part of efforts to stabilize Native stdlib.
2023-06-14 08:19:46 +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
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
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 8e995e6c62 [K/N] Deprecate ArrayIndexOutOfBoundsException
As a part of efforts to stabilize Native stdlib.
2023-04-11 13:32:54 +00:00
Abduqodiri Qurbonzoda b65a68ca0d [K/N and WASM] Internalize NoWhenBranchMatchedException and UninitializedPropertyAccessException
As a part of efforts to stabilize Native stdlib.

Merge-request: KT-MR-9531
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-04-10 21:10:51 +00:00
Pavel Kunyavskiy 62fb3df7f0 [K/N] Disable scope initialization on constant access
^KT-57098
2023-03-15 09:03:19 +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 817dba8564 [K/N] Use suspend function desugaring lowerings. 2022-09-30 08:48:58 +00:00
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 16eaba8f68 [K/N][tests] Added a test on stack allocated string 2022-08-22 06:05:53 +00:00
Vladimir Sukharev 9f2cdb0130 Fix basic blocks order for WHEN expression
Merge-request: KT-MR-6833
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-08-11 08:27:06 +00:00
Vladimir Sukharev 412f07c55b Call toString() within known class, during string concatenation type narrowing
^KT-53119 Improved

Merge-request: KT-MR-6755
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-07-28 14:57:28 +00:00
Vladimir Sukharev 2313dbeb9e Don't introduce call to deprecated "StringBuilder.append(String)"
Merge-request: KT-MR-6705
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-07-27 11:08:58 +00:00
Vladimir Sukharev 26149be44a KT53100: Optimization: <T-unbox>(CONSTANT_PRIMITIVE(x: T?)) => x
Merge-request: KT-MR-6684
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-07-21 21:45:03 +00:00
Vladimir Sukharev d378d7d5f5 KT53119: Implement String Concatenation Type Narrowing to improve escape analysis
Merge-request: KT-MR-6661
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-07-20 16:28:33 +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
Igor Chevdar 554e94a322 [K/N][IR] Never consider a enum a final class
Unfortunately, neither descriptors nor Lazy IR have enough information
to correctly deduce a enum's modality as psi2ir does, so to avoid the RTTI generator
generating different vtables in different setups (whether a klib is cached or not),
conservatively consider all enums non-final.
2022-02-02 22:46:15 +05:00
Pavel Kunyavskiy 541f6b0c88 [K/N] Fix handling of legacy suspend-function superclass
^KT-50737
2022-01-12 19:42:37 +00:00
Elena Lepilkina f650311b11 [K/N] Support properties in BCE 2021-12-16 08:33:36 +00:00
Igor Chevdar cb71240938 [K/N] Supported outer this references from cached inline bodies 2021-11-18 17:52:57 +05:00
Svyatoslav Scherbina 2f5706597a IR: fix offsets in irTemporary
The variable generated by IrStatementBuilder.irTemporary doesn't inherit
startOffset and endOffset from the builder. In particular, as a result,
temporary variables generated for elvis operator left operand have
UNDEFINED_OFFSET.

Additionally, ProvisionalFunctionExpressionLowering copies the offsets
of a variable to lowered lambda in the variable initializer. With the
problem described above, this causes invalid debug information in
Kotlin/Native, see KT-49360.

Fix irTemporary by using builder's offsets for the variable.

^KT-49360 Fixed
2021-11-16 11:59:55 +00:00
zhelenskiy c1dc1f7e33 Diagnostics renamed
Signed-off-by: zhelenskiy <zhelenskiy2000@yandex.ru>
2021-11-13 12:38:45 +01:00
Pavel Kunyavskiy 523cb4b3e8 [K/N] Better handling of nested returns in RedundantCoercionsCleaner.kt
^KT-49356
2021-11-12 19:12:37 +00:00
Pavel Punegov a207a3e8fa [K/N][test] Don't use assertFailsWith on wasm32 in the test 2021-11-09 09:55:13 +00:00
Pavel Kunyavskiy f4a88bde4e [K/N] Force static constants and boxing caches be same values
^KT-49403
2021-11-03 07:21:25 +00:00
Svyatoslav Scherbina 99447a11c1 Native: fix ^KT-49384
Don't report errors for projections in nested type arguments of
SAM conversion target types.
2021-10-26 10:12:30 +00:00
Svyatoslav Scherbina 65bea27431 Native: add test for ^KT-48876
The issue itself was already fixed in 981a6ffe.
2021-10-26 10:10:26 +00:00
Igor Chevdar f1c1094393 [K/N][optmz] Fix for https://youtrack.jetbrains.com/issue/KT-49234 2021-10-15 14:08:17 +00:00
Pavel Kunyavskiy 533eb589cb [K/N] Add tests for static initialisation of ConstantValues 2021-10-14 11:22:28 +00:00
Igor Chevdar e64140af08 Added a test on unsigned arrays 2021-10-04 06:12:22 +00:00
Igor Chevdar e194a07358 [tests] Added some tests 2021-09-16 10:54:14 +00:00
Igor Chevdar 23a02be169 [K/N][IR] Fix for https://youtrack.jetbrains.com/issue/KT-48527 2021-09-13 16:41:37 +05:00
Pavel Kunyavskiy 51c85e7f86 [K/N] Safer handling of bridges function in dce 2021-09-10 15:58:42 +00:00
Mikhail Glukhikh 3febabe977 Use OPT_IN instead of EXPERIMENTAL in diagnostic names 2021-09-10 16:29:13 +03:00
Igor Chevdar e67a78abaf [K/N][codegen] Fix for https://youtrack.jetbrains.com/issue/KT-48543
Sometimes an interface contains final methods, they shouldn't be in its itable
cause they can't be called virtually
2021-09-07 12:04:26 +05:00
Dmitriy Dolovov 1a863106e6 [Native][tests] Move golden data outside of Gradle build file 2021-09-01 10:14:01 +03:00