Commit Graph

351 Commits

Author SHA1 Message Date
Ilya Matveev 5745b31853 Revert "Depend on kotlin-native-shared from a separate repo"
This reverts commit a2370920db.
2019-05-30 19:48:50 +03:00
Nikolay Igotti faafeea719 Perform runtime patching of signal handlers. (#3016) 2019-05-27 18:45:27 +03:00
Abduqodiri Qurbonzoda 1426a8309a Deprecate former String <-> ByteArray conversion api 2019-05-27 16:20:41 +03:00
LepilkinaElena dbc10781af Unify compiler and cinterop flags names (#2915) 2019-04-30 12:48:50 +03:00
SvyatoslavScherbina cd4e0af034 Improve support for Objective-C methods clashing with methods of Any (#2914) 2019-04-25 11:29:35 +03:00
SvyatoslavScherbina a6f1048e8a Fix #2872 (#2898) 2019-04-23 11:40:15 +03:00
Svyatoslav Scherbina e437339d9a Support variadic Objective-C methods 2019-04-19 13:52:19 +03:00
Sergey Bogolepov 41cae8bb0b Fix RetainForTarget annotation usage (#2868) 2019-04-15 08:32:39 +03:00
Nikolay Igotti d072920133 Rework memory manager to make stack slot update faster (#2813) 2019-04-09 15:40:14 +02:00
Svyatoslav Scherbina 54881b421c Use compiler-generated C stubs to call Objective-C methods
Also
*   Use compiler-generated C stubs when overriding all Objective-C methods
*   Support block types in C stubs generator
2019-04-08 10:03:29 +03:00
LepilkinaElena 5a80eafec3 Rework cinterop linkerOpts/compilerOpts (KT-29970) (#2841) 2019-04-02 16:56:01 +03:00
Svyatoslav Scherbina de90535386 Avoid using shared module cache in cinterop
To improve compilation predictability
2019-04-02 16:40:03 +03:00
Svyatoslav Scherbina 8a1d8a29b1 Improve verbosity when clang_parseTranslationUnit fails 2019-04-02 16:40:03 +03:00
Elena Lepilkina c49223d190 Revert "Rework cinterop linkerOpts/compilerOpts (KT-29970) (#2805)"
This reverts commit df14d401e8.
2019-04-02 10:48:14 +03:00
LepilkinaElena df14d401e8 Rework cinterop linkerOpts/compilerOpts (KT-29970) (#2805) 2019-04-01 17:02:49 +03:00
Svyatoslav Scherbina 06f8864b69 Refine LLVM bitcode imports detection
Don't link native libraries if external function requires
only library-stored bitcode
2019-03-18 14:53:10 +03:00
Svyatoslav Scherbina f8393819fc Avoid requesting selectors in Objective-C interop stubs
Selector references aren't DCEed and thus can cause false positive
API usage report from AppStore online validation.
Generate selectors by compiler instead.
2019-03-18 14:53:10 +03:00
Svyatoslav Scherbina 0ff1209d0a Simplify support for importing Objective-C properties 2019-03-18 14:53:10 +03:00
Ilya Matveev a2370920db Depend on kotlin-native-shared from a separate repo
Kotlin-native-shared was copied in a separate repository.
This patch removes this subproject from the K/N repo and
adds a dependency on an artifact built from this separate repo.
2019-03-14 21:51:46 +07:00
LepilkinaElena de6fa0e72f Remove -shims. Warning for -linkerOpts for native flavor (#2730) 2019-02-28 17:23:28 +03:00
LepilkinaElena 328a6ff8fc Divide header option to full form and short deprecated form (#2717) 2019-02-26 11:23:19 +03:00
LepilkinaElena eb9965d2c8 Add short form for cinterop flag library (#2702) 2019-02-22 15:26:07 +03:00
SvyatoslavScherbina 4d6614e674 Use compiler-generated C stubs when overriding some Objective-C methods (#2697)
* Add tests to interop_objc_smoke

* Use compiler-generated C stubs when overriding some Objective-C methods
2019-02-22 13:51:08 +03:00
LepilkinaElena 1b680a4b13 Fix jsinterop: added option target which now has only one proper value wasm32 (#2694) 2019-02-20 16:18:04 +03:00
LepilkinaElena 6b6d09774e Fix name of property in refactored cinterop tool (#2692) 2019-02-20 13:43:33 +03:00
Nikolay Igotti e97ff3a1fc Support UTF-32 conversion. (#2689) 2019-02-20 12:39:15 +03:00
LepilkinaElena 75805b3528 Rewrite interop tools command line options to have help messages without crashes (#2672) 2019-02-20 09:14:28 +03:00
Nikolay Igotti 2b78ec2ebb Use different C types for boolean types in C and Objective-C mode. (#2676) 2019-02-18 14:20:43 +03:00
SvyatoslavScherbina 469eede9d3 Add basic support for variable-length array parameters in cinterop (#2666) 2019-02-18 09:54:41 +03:00
Pavel Punegov 309ecbb696 Use konan.home as compiler system property, kotlin.native.home as a gradle only property 2019-02-14 19:34:53 +03:00
Pavel Punegov 9c3a1332d5 Replace deprecated konan.home with org.jetbrains.kotlin.native.home 2019-02-13 17:06:10 +03:00
LepilkinaElena c258bcfb70 Made benchmark application flexible to run separate benchmarks (#2649) 2019-02-13 08:38:15 +03:00
Nikolay Igotti 072f0fb9c4 Simplify interop stubs and runtime. (#2627) 2019-02-12 12:33:45 +03:00
Pavel Punegov 3e153e5937 Fix warnings in compiler and interop 2019-02-04 19:03:13 +03:00
Svyatoslav Scherbina 1f60745f4b Support importing modules in cinterop
Modules can be imported by using 'modules =' in .def file
2019-02-04 12:36:47 +03:00
Svyatoslav Scherbina 67b06b5f2a Fix minor cinterop bug with clashing macro and enum constant 2019-02-04 12:36:47 +03:00
Svyatoslav Scherbina f9346f5d5c Don't reparse headers when collecting macro names 2019-02-04 12:36:47 +03:00
Nikolay Igotti d9474a8319 Move compiler version to 1.3.20, simplify interop runtime. (#2608) 2019-02-01 09:06:27 +03:00
Alexander Gorshenev ce0451e5c8 Made ObjCMethodImp internal and @PublishedApi. 2019-01-25 19:21:30 +03:00
SvyatoslavScherbina 6fa39bf27d Hide duplicates among members of Objective-C categories of same class (#2558) 2019-01-22 09:35:12 +03:00
Svyatoslav Scherbina 6ca196399a Implement C stubs generation in compiler
Use it in
* C varargs support (thus dropping libffi from runtime)
* C callbacks support (thus enabling callbacks with structs)
2019-01-18 11:06:23 +03:00
Sergey Bogolepov 0d62143c20 Move the rest of intrinsics under TypedIntrinsic annotation (#2500)
* Create interface between codegen and intrinsics generator
* No more @Intrinsic annotation
2018-12-26 23:16:20 +07:00
Sergey Bogolepov baaf6edba7 Move more intrinsics under TypedIntrinsic annotation (#2474) 2018-12-19 18:40:30 +03:00
Svyatoslav Scherbina fe2b680be8 Support C enums with forward declarations 2018-12-12 09:32:36 +03:00
SvyatoslavScherbina 328413337b Improve code related to object layout (#2446) 2018-12-09 10:38:23 +03:00
Martin O'Connor b583e8cd7b Add toCValues() extension functions to Arrays of unsigned types (#2417) 2018-11-29 09:47:24 +03:00
Svyatoslav Scherbina ed323a98b5 Forbid calling Objective-C initializers
These methods must not be used directly, construstors and factory
methods are provided instead
2018-11-26 16:36:47 +03:00
Svyatoslav Scherbina f4cf5e842d Uniform alloc and cValue APIs in kotlinx.cinterop
#KT-25628 Fixed
2018-11-21 13:29:08 +03:00
Svyatoslav Scherbina 4cb83cbcc5 Document -o cinterop option
#KT-27881 Fixed
2018-11-21 13:29:08 +03:00
Ilya Matveev 1ec506d0b1 Don't generate functional types for functions with long signatures (#2349)
The K/N stdlib doesn't contain basic classes (e.g. Functon0,
Function1 etc) for functional types with >22 parameters.
So we cannot convert functional pointers with such signatures
into Kotlin functional types and have to replace them with
opaque pointers.

Fix for GitHub issue #2334.
2018-11-21 11:21:37 +07:00