Commit Graph

843 Commits

Author SHA1 Message Date
Vasily Levchenko 5a001faaaa IR:STRING_CONCATINATION: don't stop on first cancatination, please check children 2017-03-31 12:05:06 +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
Alexander Gorshenev 9fd555471a A couple of konanc driver tests. 2017-03-31 11:07:01 +03:00
Alexander Gorshenev 742934a1d8 Load metadata lazily per package fragment. 2017-03-31 11:06:38 +03:00
Alexander Gorshenev 8c30ae38b6 Serializer warning cleanup. 2017-03-30 20:54:18 +03:00
Alexander Gorshenev f63862e98d Added correspondingClass support in enum serialization. 2017-03-30 20:49:43 +03:00
Alexander Gorshenev b763e003ae IrContinue support in IR serializer. 2017-03-30 20:49:43 +03:00
Alexander Gorshenev 5b66a62da5 Default function argument support in IR serializer. 2017-03-30 20:49:43 +03:00
Alexander Gorshenev aa7e3f40fd Initial support of enums in IR serialization. 2017-03-30 20:49:43 +03:00
Konstantin Anisimov d34e5205ae Typo fixed 2017-03-30 22:50:16 +07:00
Konstantin Anisimov 34733d12e6 Typo fixed 2017-03-30 22:50:16 +07:00
Konstantin Anisimov 14fb3b87b6 Support for ClassDescriptor and FunctionDescriptor copy 2017-03-30 22:50:16 +07:00
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