Commit Graph

11 Commits

Author SHA1 Message Date
Pavel Kunyavskiy 6e8a7d4662 [ObjCInterop] Implement @ObjCSignatureOverride
This annotation leads to conflicting overloads error supression,
in case where several function with the same argument types,
but different argument names are inherited from ObjC class.

We need to implement it in both K1 and K2 to make the IDE experience
better.
But the annotation itself wouldn't be available in K1.

    ^KT-61323
2024-02-14 11:44:01 +00:00
Vladimir Sukharev a78cfff8c9 [K/N] Move more names to NativeStandardInteropNames
^KT-61564
2024-01-09 14:17:47 +00:00
Vladimir Sukharev 7eb239c282 [K/N][Tests] Move objCActionFqName to NativeStandardInteropNames
^KT-61259
2024-01-09 14:17:47 +00:00
Sergej Jaskiewicz a1970d3d57 [K/N] Move KonanIrModuleSerializer to serialization.native
KT-64392
2023-12-19 15:20:01 +00:00
Sergej Jaskiewicz 3f9de91bec [K/N] Move KonanIrFileSerializer to the serialization.native module
KT-64392
2023-12-19 15:20:01 +00:00
Sergey Bogolepov ce4eecebf4 KT-63264: Introduce a new ExportedBridge annotation
Swift Export Frontend generates a Kotlin file/library that contains a
set of simple bridging functions that connect Swift wrappers to their
Kotlin counterparts.
There are certain requirements for these wrappers:
1. They should not be DCEd when compiling a binary library.
In other words, these functions are roots.
2. They should provide a stable simple binary name.
3. Their signatures should be much simpler and restricted comparing to
other Kotlin functions.

Altogether, these requirements should be covered by introducing the new
ExportedBridge annotation.

Note: Frontend checks of ExportedBridge functions are not implemented
yet.
2023-12-12 07:03:25 +00:00
Ivan Kochurkin 115d685d91 [FIR] Fix ambiguity of Throws and other std annotations importing
Including `SharedImmutable` and `ThreadLocal`

Simplify code, remove `DefaultImportPriority.KOTLIN_THROWS`

Introduce `FirNativeClassMapper`
2023-11-23 23:51:23 +00:00
Pavel Kunyavskiy 8bcd1f4efa [FIR/Native] Move fir-related code from backend.native module to new one
^KT-61249
2023-08-22 08:56:16 +00:00
Svyatoslav Scherbina cba955cb3e Native, K1: add ExperimentalForeignApi to generated forward declarations
cinterop tool should add ExperimentalForeignApi to all generated
declarations, to indicate their experimental status and discourage using
them in public Kotlin API. But the same considerations are applicable
to forward declarations (cnames.*, objcnames.*), which are generated not
by cinterop tool, but directly by the compiler.

This commit adds ExperimentalForeignApi to those compiler-generated
classes.

^KT-58362
2023-07-21 17:44:09 +00:00
Pavel Kunyavskiy ef9413108b [K/N] Consolidate forward declarations handling
This is refactoring in preparation for KT-59764.
Names and layout of forward declarations related classes
was copy-pasted many times over compiler code.

Implementing KT-59764 would require copy-pasting it two more times.
So instead of doing this it was put in single place.

No behaviour changes intended in this commit.
2023-07-10 08:59:16 +00:00
Pavel Kunyavskiy 0179b45840 Introduce compiler.common.native module 2023-07-10 08:59:16 +00:00