Commit Graph

831 Commits

Author SHA1 Message Date
Svyatoslav Scherbina f564bd7707 Always link bitcode files specified with -nativelibrary 2017-03-30 15:55:39 +03:00
Svyatoslav Scherbina 4a1b2721d8 Eliminate some warnings from Kotlin code 2017-03-30 14:54:55 +03:00
Igor Chevdar 760de3cdad Run inlining phase against whole module
It is wrong to run inlining phase file by file, because other lowerings
could modify inline function before it had been inlined.
2017-03-30 11:05:30 +03:00
Igor Chevdar dbea244b0e Fixed bug with type substitution for reified type parameter 2017-03-30 11:05:30 +03:00
Igor Chevdar 662abba4a7 Changed type of exception from CastClassException to TypeCastException
When converting from null to non-nullable type kotlin JVM throws TypeCastException
2017-03-30 11:05:30 +03:00
Nikolay Igotti 0cbd34086e Added JB copyright (#417) 2017-03-30 09:51:58 +03:00
Ilya Matveev fd5f837299 Use download.jetbrains.com for user dependency downloading 2017-03-30 11:02:35 +07:00
Ilya Matveev a906bd0d07 Download dependencies only in dist
Don't extract dependencies in dependencies/all, only in dist/dependencies
Remove konan.dependencies property
2017-03-30 11:02:35 +07:00
Igor Chevdar 7f4740130e Use cloned descriptors for default enum entry 2017-03-29 18:58:25 +03:00
Igor Chevdar 9447cf8d9d Do not duplicate inherited bridge 2017-03-29 18:58:25 +03:00
alexander-gorshenev db7b22bbb1 Don't serialize anything to a final kexe file. (#413)
That gives a little compilation speed improvement.
2017-03-29 18:15:08 +03:00
Igor Chevdar 8e38e28f89 Added tests 2017-03-29 15:58:36 +03:00
Igor Chevdar d31a770e70 Implemented enumValueOf<>() and enumValues<>() 2017-03-29 15:58:36 +03:00
Igor Chevdar a3becd24ec Fix for finally block for inline functions
For local return from inline function to outer scope just
call super version of genReturn.
2017-03-29 12:53:33 +03:00
Igor Chevdar 1bf73fd9d7 Added titles to all basic blocks 2017-03-29 12:53:33 +03:00
Ilya Matveev ddcecba1dc Rename clang+llvm-3.9.0* dependencies to clang-llvm-3.9.0* 2017-03-29 16:38:19 +07:00
Alexander Gorshenev 9e15aa7204 Moved the backend from llc to llvm-lto even for unoptimized compilation.
Unoptimized means '-O1' -- that's the fastest one. ;-)

Mark llvm functions with "no-frame-pointer-elim" attribute when not optimizing.
2017-03-29 12:10:41 +03:00
Alexander Gorshenev 89ea6396f6 It should be --time, not -time.
It should be -list_targets, not --list_targets.
The -list should better be -list_phases now that we have several sets to list.
2017-03-29 12:10:41 +03:00
Alexander Gorshenev e8327bc4f8 Gzipping serialized metadata saves some library load time. 2017-03-29 12:10:41 +03:00
Ilya Matveev 6dea5e5c79 tools: Don't use Distribution class in helpers 2017-03-29 14:42:48 +07:00
Ilya Matveev 0d13908f78 Fix RaspberryPi dependences in konan.properties 2017-03-29 14:42:48 +07:00
SvyatoslavScherbina c1d9dc1cbb Replace CArray by CPointer (#406)
Also do some cleanup.
2017-03-28 17:44:08 +03:00
Vasily Levchenko d106e9e8d9 FLAGS: added --print_locations flag (boolean) for printing lines/column information
(cherry picked from commit 9decbaadfb3ef7ca946a732a03e475b576f4f1be)
2017-03-28 15:56:14 +03:00
Igor Chevdar 6f8d75a232 Always finish basic block if it exists 2017-03-28 15:53:38 +03:00
Igor Chevdar 779976f2b1 Supported nested non-local returns 2017-03-28 15:46:32 +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
Ilya Matveev 0e68a4ad30 tools: Set dependencies list in konan.properties 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
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 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 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
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
Alexander Gorshenev f402b3e180 Tell lto to preserve Konan_main, rather than main. 2017-03-22 17:00:11 +04:00
Alexander Gorshenev 2071414079 Split LINK_STAGE phase into OBJECT_FILES and LINKER sub-phases,
to be able to measure lcc/lto time separately from ld time.
2017-03-22 16:53:15 +04:00
Nikolay Igotti e197573e3e Raspberry Pi target (#365) 2017-03-22 15:43:19 +03:00
Konstantin Anisimov bfc4e1106a Noinline support
Bug fix
2017-03-22 19:22:59 +07:00
Konstantin Anisimov 26f4271906 Type propagation on call sites 2017-03-22 19:22:59 +07:00