Commit Graph

1936 Commits

Author SHA1 Message Date
Igor Chevdar 779976f2b1 Supported nested non-local returns 2017-03-28 15:46:32 +03:00
Alexander Gorshenev eb4683f452 Exclude 'dist/dependencies' from bundle tgz. 2017-03-28 14:15:53 +03:00
Svyatoslav Scherbina 6af710028c Add @file:Suppress("UNUSED_EXPRESSION") to generated interop stubs 2017-03-28 12:23:23 +03:00
Svyatoslav Scherbina 6eb0ceb572 fixup! Implement interop integer conversions to be used with type inference 2017-03-28 12:23:23 +03:00
Svyatoslav Scherbina f65044c7bb Implement interop integer conversions to be used with type inference 2017-03-28 12:23:23 +03:00
Svyatoslav Scherbina 757c306341 Support enum arguments and return values in interop variadic functions 2017-03-28 10:15:06 +03:00
Svyatoslav Scherbina a6b89e3a0d Expose interop enum .value through CEnum interface 2017-03-28 10:15:06 +03:00
Svyatoslav Scherbina 88a69015d8 Add "import konan.SymbolName" to generated interop stubs 2017-03-28 10:15:06 +03:00
Svyatoslav Scherbina 220efdf621 Do not call directly C variadic functions from Kotlin N 2017-03-28 10:15:06 +03:00
Nikolay Igotti 8467fabf4d Small doc updates 2017-03-27 19:38:20 +03:00
Nikolay Igotti a6656a0cba Improve samples (#396) 2017-03-27 18:16:06 +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
Nikolay Igotti 826b3fc3f2 Missing sample files 2017-03-27 14:36:12 +03:00
Ilya Matveev 0c171992c1 tools: Fix path to dependencies 2017-03-27 18:16:53 +07:00
Ilya Matveev afd94d08a7 Delete built bundle in clean task 2017-03-27 18:16:53 +07:00
Ilya Matveev 9ba7fcdf81 tools: Add -z to tar arguments 2017-03-27 18:16:53 +07:00
Ilya Matveev 917345a932 Add built bundle to .gitignore 2017-03-27 18:16:53 +07:00
Ilya Matveev 0e68a4ad30 tools: Set dependencies list in konan.properties 2017-03-27 18:16:53 +07:00
Ilya Matveev 57a57d827a Revert "tools: Don't use tar to unpack dependencies"
Plexus archiver cannot unpack the macos sysroot (even repacked
by GNU tar). Return to tar using as a workaround.
2017-03-27 18:16:53 +07:00
Igor Chevdar 00e452bcdf Added tests on link stage (disabled for now). 2017-03-27 12:41:58 +03:00
Igor Chevdar 6381b4d831 Default arguments lowering should not touch inline functions. 2017-03-27 12:41:51 +03:00
Igor Chevdar 69eb96ecab Preserved the order of arguments to a function being inlined 2017-03-27 11:31:17 +03:00
igotti-google 4323065db5 Better Tetris build docs 2017-03-27 11:02:17 +03:00
Nikolay Igotti af3b74451d Misc tweaks (#387) 2017-03-25 11:35:56 +03:00
Konstantin Anisimov 16b076f46d Refactoring 2017-03-24 19:46:37 +07:00
Konstantin Anisimov d45f3fe678 Support for default arguments 2017-03-24 19:46:37 +07:00
Konstantin Anisimov bb91ebbfd9 Refactoring 2017-03-24 19:46:37 +07:00
Konstantin Anisimov 4cb4615e7c Do not evaluate Block argument 2017-03-24 19:46:37 +07:00
Konstantin Anisimov c278853f10 Bug fix for crash connected with "value-parameters" 2017-03-24 19:46:37 +07:00
Ilya Matveev 74116e7aed Add scripts for running with already downloaded dependecies
This patch adds 2 scipts in run-debug directory which execute
dist/bin/konanc and dist/bin/interop with
'-Dkonan.dependencies=dependencies/all' additional argument.

It allows us to run compiler and stub generator avoiding first run
dependecy download.
2017-03-24 19:31:23 +07:00
Ilya Matveev 8df9b535f2 tools: Don't use tar to unpack dependencies 2017-03-24 19:31:23 +07:00
Ilya Matveev 798687e680 tools: Report dependency downloading progress 2017-03-24 19:31:23 +07:00
Ilya Matveev fbc14becfc tools: Add dependecy download helpers
This patch adds 2 helpers to download dependencies for compiler and
stub generator during their execution.

They take list of external dependencies as a parameter and directory
where they must be located. Helpers check if these dependencies exist
in the given directory and download not existing ones.
2017-03-24 19:31:23 +07:00
Ilya Matveev 4a716fbf30 backend: Use konan.dependencies property to set dependencies dir
This patch set default dependencies directory to ${konan.home}/
dependencies and allows one to override this setting using
konan.dependencies system property.
2017-03-24 19:31:23 +07:00
Alexander Gorshenev 52a245bb10 Added platform name to tgz. 2017-03-24 13:52:58 +04:00
Alexander Gorshenev 5b653f9579 Added samples to tgz bundle.
Rename dist to kotlin-native in tgz bundle.
2017-03-24 13:52:58 +04:00
Svyatoslav Scherbina 7487364bcd Improve name clash resolution in interop stub generation
* Handle more keywords.
* Handle more identifier usages.
* Use backticks to escape identifiers that clash with keywords.
2017-03-24 07:00:03 +03:00
Alexander Gorshenev ff8acd21e6 This is initial implementation of serializer/deserializer for inline IR bodies.
The deserialization is disabled by default.

Use `-enable deserializer` to enable it.
Use `-verbose deserializer` to watch it crunch.
2017-03-24 01:03:59 +04:00
Nikolay Igotti 4a4225fd72 Fix char index search 2017-03-23 18:38:25 +03:00
Nikolay Igotti c55d0cd674 Simple CSV parser (#383) 2017-03-23 17:15:39 +03:00
Nikolay Igotti afcce921f2 Fix typo in string search 2017-03-23 17:04:18 +03:00
Konstantin Anisimov 78d2186f97 Typo fixed 2017-03-23 20:26:24 +07:00
Konstantin Anisimov 8661baabad Bug fix in recursive lambda inlining 2017-03-23 20:26:24 +07:00
Konstantin Anisimov 414a481fe3 If property initializer is inlined, we do not have proper outer scope to evaluate it 2017-03-23 20:26:24 +07:00
Nikolay Igotti b5c60e3082 Support data parsing operations (#380) 2017-03-23 12:54:24 +03:00
Igor Chevdar 8afa12684e Implemented StringBuilder.deleteCharAt 2017-03-22 22:25:24 +03:00
Igor Chevdar fc9638dbd4 Added ranges from Kotlin 1.1 2017-03-22 22:24:40 +03:00
Svyatoslav Scherbina 8ec4cb48f9 Rework primitive types handling in interop stub generation
Use libclang API to get correct size and spelling.
This should improve support for e.g. 32-bit platforms.
2017-03-22 20:45:08 +07:00
Svyatoslav Scherbina d6ba399e1e Refactor Pointer*Type in interop stub generation
All types should have correct `equals`/`hashCode` implementation.

Also update Indexer prebuilts.
2017-03-22 20:45:08 +07:00