Commit Graph

46 Commits

Author SHA1 Message Date
SvyatoslavScherbina 8f1b94f38b Use unsigned types in interop (#1913) 2018-08-24 18:30:56 +03:00
Nikolay Igotti 4606f02705 Gross stdlib cleanup (part 1). (#1918) 2018-08-23 11:48:37 +03:00
Nikolay Igotti 31f27fb246 Improve zlib test and ImmutableBinaryBlob API 2018-08-16 18:34:31 +03:00
Mike Sinkovsky 3ad52b8736 platform.zlib: fix + mingw + test (#1880) 2018-08-16 17:17:00 +03:00
Vasily Levchenko 79755d8fbf [stdlib and samples][rename] konan -> kotlin.native 2018-08-14 15:05:24 +03:00
Mike Sinkovsky 5ad0012ab1 ImmutableBinaryBlob.asCPointer: fix + test (#1879) 2018-08-14 13:24:23 +03:00
SvyatoslavScherbina 5f661b20aa Support weak references to Objective-C objects (#1531) 2018-04-24 12:32:43 +03:00
Nikolay Igotti c5c2a080d8 Fix missing dealloc hooks on object freed by cycle collector. (#1487) 2018-04-12 18:40:07 +03:00
Svyatoslav Scherbina 77139d58f8 Unify interop with Objective-C in both directions
Also support casts to Objective-C types
2018-04-12 09:56:29 +03:00
Svyatoslav Scherbina 841bb51e65 Add workaround to interop_objc_smoke for bug in MM 2018-04-12 09:56:29 +03:00
Alexander Gorshenev 18b7bb31fc Platform library for iconv.h on macos, ios and linux. 2018-03-15 16:09:34 +03:00
Svyatoslav Scherbina e035ac1022 Support importing string literal macros with cinterop 2018-02-22 10:08:54 +03:00
Svyatoslav Scherbina e1b507f998 Fix fixed NSString* parameters in variadic functions 2018-01-11 12:28:40 +03:00
Svyatoslav Scherbina b700f96e0c Rework stubs for interop globals passed by value
#KT-21855 Fixed
2018-01-09 17:51:50 +03:00
Svyatoslav Scherbina 905390cd45 Improve support for Objective-C forward declarations 2017-12-15 14:38:22 +03:00
Vasily Levchenko d470df57c0 [tests][teaspot opengl] fix build 2017-10-19 10:06:08 +03:00
Svyatoslav Scherbina ffb0d0cfcb Add quickfix for unsupported typedef NSFoo Bar. 2017-10-17 13:23:21 +03:00
Svyatoslav Scherbina e8f97b0436 Represent Objective-C block pointers in methods as Kotlin functions
Also do some refactoring.
2017-10-17 13:23:21 +03:00
Svyatoslav Scherbina a0dc2ecef2 Enable method signature checks when overriding Objective-C method 2017-10-17 13:23:21 +03:00
SvyatoslavScherbina 7795a7856a Support global variables in interop (#903) 2017-10-06 10:56:31 +03:00
Vasily Levchenko 3777d86be2 [tests][interop] fix sockets.def placement closer to test (fix build) 2017-10-06 06:29:08 +03:00
Svyatoslav Scherbina a6ca64871f Implement explicit and implicit object pinning for interop
This allows passing Kotlin primitive arrays directly to native
2017-09-26 09:50:42 +03:00
Svyatoslav Scherbina 79455c5161 Support interop modularity
* Add list of included headers into the manifest
* Implement importing "foreign" type declarations
* Implement forward declarations more natively in the compiler
* Represent Objective-C categories as Kotlin extension methods and
  properties

Also:
* Do some refactoring in stub generation
* Call bridges directly in stubs for Objective-C properties
2017-09-14 16:47:26 +03:00
Svyatoslav Scherbina 4e285a5ef4 Implement equals, hashCode and toString for Objective-C objects 2017-09-06 23:57:19 +03:00
Svyatoslav Scherbina 99dd7227dc Support Boolean in interop varargs and function pointers invocation 2017-08-18 17:45:41 +03:00
Svyatoslav Scherbina 5586d29764 Add basic support for calling C function pointers
Fix #739
2017-08-18 17:45:41 +03:00
Svyatoslav Scherbina 5c3e8d63d4 Support bit fields in interop
Fix #728
2017-08-16 15:03:58 +03:00
Svyatoslav Scherbina d3185e3e19 Implement very basic Objective-C interop
Also refactor StubGenerator
2017-08-16 10:04:23 +03:00
Vasily Levchenko f07273d55f [debug][test] build fix 2017-07-28 17:52:58 +03:00
SvyatoslavScherbina 88e3c1d05c Implement parsing additional interop header directly from .def file (#557) 2017-05-09 19:48:19 +03:00
Svyatoslav Scherbina 8a0b494c2e Apply interop filtering
Also actualize .def files
2017-04-26 20:07:06 +03:00
Svyatoslav Scherbina ea2d7cbf01 Handle lambda argument of staticCFunction 2017-04-21 14:03:36 +03:00
Svyatoslav Scherbina 2a3450047c Add interop test for returning struct by value 2017-04-10 17:28:25 +03:00
Svyatoslav Scherbina 50c3be3fc2 Simplify working with values in interop
* Access primitive interop array elements and struct fields without `.value`
* Simplify C*Var* interop types names
2017-03-31 11:44:07 +03:00
SvyatoslavScherbina c1d9dc1cbb Replace CArray by CPointer (#406)
Also do some cleanup.
2017-03-28 17:44:08 +03:00
Svyatoslav Scherbina f65044c7bb Implement interop integer conversions to be used with type inference 2017-03-28 12:23:23 +03:00
SvyatoslavScherbina c4abb8f706 Implement varargs in interop for Kotlin N (#393)
* Implement CValues.equals and .hashCode

* Add trivial test for interop varargs

* Implement varargs in interop for Kotlin N

* Compile and link runtime with libffi

* Fix few places.
2017-03-27 16:44:24 +03:00
Alexander Gorshenev 334d2f0ee6 Remote test execution for cross compiled tests. Run it like:
$ ./gradlew backend.native:tests:run \
    -Premote=user@111.22.33.444 -Ptest_target=raspberrypi

The new gradle command line options:

    -Pbuild_flags  renamed -Pkonanc_flags.
    -Ptest_flags   provides compiler flags to the test builds.
    -Ptest_target  properly sets up compiler as well as interop
                   to cross compile tests.
    -Premote       specifies remote host and login.
2017-03-27 15:14:57 +03:00
Svyatoslav Scherbina c9d8d4d57d Implement CValuesRef in interop
* Represent pointer parameters of C functions as `CValuesRef`.
* Represent struct value parameters as `CValue`.
* Implement some helper methods to make the new approach more useful.
* Migrate some code to new interop approach for pointers and values.

Also do not map to `String?`:
- pointers to 8-bit integers;
- pointers to non-const chars.
2017-03-20 15:52:23 +07:00
Svyatoslav Scherbina a41f575f52 backend/tests: add interop_opengl_teapot 2017-03-13 11:00:33 +07:00
Svyatoslav Scherbina 304a9ebd8e build/tests: support declaring tests to be manually executed 2017-03-13 11:00:33 +07:00
Svyatoslav Scherbina a85d30215d backend/tests: add interop3 (uses callback) 2017-03-01 16:14:17 +07:00
Svyatoslav Scherbina 4e6ad59d9f backend/tests: improve interop_echo_server code 2017-02-21 16:42:14 +07:00
Svyatoslav Scherbina 8dc171aabb backend/tests: add interop_echo_server (doesn't check that it works yet) 2017-02-13 11:08:24 +07:00
Svyatoslav Scherbina 19dbdf3137 backend/tests: add more interop tests 2017-02-08 11:57:55 +07:00
Svyatoslav Scherbina 56bab774f1 backend/tests: add interop0 2017-02-06 11:58:10 +07:00