Commit Graph

69 Commits

Author SHA1 Message Date
Svyatoslav Scherbina 2cdf8cd7b1 Native: support Objective-C instancetype in more cases in cinterop
Objective-C has a special type, "instancetype". Generally, it is a type
that matches the method receiver type. So, if `Foo.foo` method returns
`instancetype`, then `Foo.foo()` would be of type `Foo`, while
`Bar.foo()` would be of type `Bar` (where `Bar` is a subclass of `Foo`).

Surprisingly, `instancetype` can be used not only as a return type, but
also somewhere inside a return type. cinterop wasn't ready for this.

This commit expands implementation of `instancetype` in cinterop to
cover more cases.

^KT-59597 Fixed
2023-12-14 08:57:29 +00:00
Vladimir Sukharev a59742258e [K/N] Speedup test CInterop/executable/bitfields/ 2023-12-13 19:06:57 +00:00
Dmitriy Dolovov c9f4a1a841 IR: Avoid overwriting of property signature descriptions
^KT-64085
^KT-64082
2023-12-07 15:02:24 +00:00
Vladimir Sukharev c5248fc5f4 [K/N] Migrate some cinterop tests to new test infra 2023-12-04 08:43:28 +00:00
Alexander Shabalin 340103098f [K/N][tests] Migrate entry point runtime tests to new testing infra ^KT-61259 2023-12-01 12:07:25 +00:00
Alexander Shabalin 6ca8f546fe [K/N][tests] Migrate console runtime tests to new testing infra ^KT-61259 2023-11-29 16:22:28 +00:00
Vladimir Sukharev 1b1df9f0db [K/N] Create test model for building/executing C-Interop tests
^KT-63287 Fixed
2023-11-14 19:35:52 +00:00
Svyatoslav Scherbina 8d20d5b16c Native: support objcExportReportNameCollisions=true binary option
This binary option makes the compiler emit a warning whenever it mangles
a name emitted by ObjCExport.

^KT-63153 Fixed
2023-11-14 19:24:43 +00:00
Vladimir Sukharev 3ea4a6a937 [K/N] Add test for KT-63048, K1greenK2red
^KT-63048
2023-11-07 18:51:10 +00:00
Dmitriy Dolovov a3bfe58415 [KLIB tool] Fix failing test on dumping c-interop signatures 2023-11-02 18:44:14 +00:00
Dmitriy Dolovov e18a2d0a2e [KLIB tool] Add tests for dumping metadata signatures 2023-10-27 09:28:00 +00:00
Dmitriy Dolovov 88a297b022 [KLIB tool] Run tests for 'dump-metadata' with & without signatures 2023-10-27 09:28:00 +00:00
Dmitriy Dolovov aa9b901926 [KLIB tool] Migrate 'dump-metadata' tests to K/N test infra 2023-10-27 09:28:00 +00:00
Dmitriy Dolovov 93506bcb95 [KLIB tool] Add tests for dumping IR signatures
^KT-62341
2023-10-27 09:27:59 +00:00
Johan Bay fb1d2278a0 [klibs] header klibs should keep private interfaces
^KT-62213 Fixed
2023-10-23 11:48:05 +00:00
Dmitriy Novozhilov 3d6ec0ec75 [FIR2IR] Automatically store IR declaration in its parent upon creation
Previously, creating a declaration with Fir2IrCallableDeclarationsGenerator/
  Fir2IrClassifiersGenerator didn't guarantee that this declaration will
  be actually added to the list of parent class/file declarations, which
  lead to situations when FIR2IR created some declarations in the air
  (mostly fake-overrides)
2023-10-17 12:46:27 +00:00
Igor Chevdar 1b30f76a78 [K/N][tests] Added a test on stepping through inline arguments 2023-10-11 06:27:02 +00:00
Johan Bay a1c2ded8a3 [K/N] Header klibs: Keep private properties in value classes
^KT-61767 Fixed
2023-09-08 13:13:19 +00:00
Johan Bay 0a612e4268 [klib] Add an option to write out header klibs
The header klib is supposed to only contain the public abi of the module
similar to jvm-abi-gen. It is intended to be used as a dependency for other
klib compilations instead of the full klib for compilation avoidance.

^KT-60807
2023-08-29 13:25:07 +00:00
Svyatoslav Scherbina 0a2348e595 Native: add debugger test for inspecting string variables
We just had no tests checking that debugger can properly show values
of string-typed variables. This commit adds such a test.
2023-08-24 15:03:27 +00:00
Pavel Kunyavskiy eefc51657a [K/N] Fix debug info for lambdas inside inline functions
^KT-57365
2023-08-23 08:18:56 +00:00
Igor Chevdar 7c67e9e08b [tests][lldb] Added a reproducer for #KT-61131 2023-08-21 12:05:28 +00:00
Igor Chevdar c1874d0184 [K/N][codegen] Added debug info to virtual functions trampolines
#KT-61131 Fixed
2023-08-21 12:05:28 +00:00
Dmitriy Dolovov cb92990ed6 [KLIB][tests] Reorganize "klib dump-metadata" tests
- Keep the test data under "native/native.tests/testData/klib/" dir
- Rename tests from "klib contents" to "klib dump-metadata"
2023-08-16 19:11:35 +00:00
Dmitriy Dolovov ec9370c30b [KLIB][tests] Reorganize "klib dump-ir" tests
- Keep the test data under "native/native.tests/testData/klib/" dir
- Rename tests from "klib ir" to "klib dump-ir"
2023-08-16 19:11:35 +00:00
Johan Bay fafea27283 [klib tool] Add option to print ir
Dumping the IR from a klib is useful for debugging klib compilations.

^KT-58877
2023-07-31 09:45:19 +00:00
Svyatoslav Scherbina bcc4a891be Native: add tests for ExperimentalForeignApi on cinterop declarations
Add tests checking that all (top-level) declarations generated by
cinterop now have ExperimentalForeignApi annotation.

^KT-58362
2023-07-21 11:54:14 +00:00
Pavel Kunyavskiy f67f8c393b K2: Added test for data class metadata
#KT-57622 Fixed
2023-06-14 07:09:16 +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
Igor Chevdar 39dfb9958b [K/N][tests] Fixed some of lldb tests 2023-05-17 07:28:14 +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
Igor Chevdar fe1d7c2f52 [K/N][tests] Fixed some of lldb tests 2023-05-11 16:56:40 +00:00
Igor Chevdar 9fcb4ece64 [K/N][tests] Added a bunch of tests on incremental compilation 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
Dmitriy Novozhilov af60681705 [FIR] Save declarations in metadata in source order
^KT-54792 Fixed
^KT-54801
^KT-54800
2023-05-09 07:36:32 +00:00
Vladimir Sukharev 79599ab69e [K2/N] Add ObjCExport test for kdoc strings
^KT-56090

Merge-request: KT-MR-9926
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-04 19:17:00 +00:00
Gleb Lukianets 242ca73d83 rrn/rd/KT-55578 User-provided hints for linker errors
[K/N] KT-55578 Show customized user suggestions on linkage errors

Merge-request: KT-MR-9636
Merged-by: Gleb Lukianets <Gleb.Lukianets@jetbrains.com>
2023-04-27 14:14:43 +00:00
Pavel Punegov a8bf83a97e [K/N][test] Wild-card the debugger tests to for with caches
Don't match all non-matching parts instead of excluding
2023-04-26 13:20:21 +00:00
Pavel Punegov 3ae9d2e4e8 [K/N][test] Make debugger tests work with caches
With caches (everywhere) Konan_start gets different location
`entryPointOwner:1:1`
2023-04-26 13:20:20 +00:00
Ivan Kylchik 99d47da014 Drop a part of compileTimeConstants.kt that is not serializable in K2
Basically `val a = 10; val b = a + 20` will not be serialized for
`b` property because `a` is not constant
2023-04-07 18:07:12 +00:00
Ivan Kylchik 6909d9a2f9 [K2] Support proper serialization of string concatenation expressions 2023-04-07 18:07:11 +00:00
Ivan Kylchik 8499891756 [K2] Properly serialize constant values
#KT-56190 Fixed
2023-04-07 18:07:10 +00:00
Ivan Kylchik ac480e2285 [K2] Support serialization of complex annotations
#KT-57611 Fixed
2023-04-07 18:07:09 +00:00
Mark Mann b6f669189b Use protocol name when creating objc protocol wrapper class 2023-03-31 09:50:25 +00:00
Vladimir Sukharev 639b0cc525 Revert "[K2/N] KT-56190 Serialize simple const property initializers"
This reverts commit 2ace8ba9bd.
2023-03-29 18:00:09 +02:00
Vladimir Sukharev 2ace8ba9bd [K2/N] KT-56190 Serialize simple const property initializers
Merge-request: KT-MR-8623
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-03-29 13:26:43 +00:00
Ivan Kylchik e981b1f958 [Native] Support evaluation of const intrinsics for K2
#KT-56023
#KT-55469 Fixed
2023-03-24 15:55:03 +00:00
Pavel Kunyavskiy 1c2f34ab4e [K/N] Add test for Annotations on type parameters and update doc
^KT-57404
2023-03-23 10:27:23 +00:00
Pavel Kunyavskiy b01cc1f88c [K2/N] Fix property accessors modality in K2 metadata
^KT-56603
2023-03-22 13:47:01 +00:00
Pavel Punegov 40270a9c72 [K/N][test] Update LLDB tests with function references
After the fixes to function inlining tests revealed the problem with
debug info generated for inlined lambdas. See the ^KT-57365

Merge-request: KT-MR-9252
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-03-20 12:03:43 +00:00