Commit Graph

1306 Commits

Author SHA1 Message Date
Alexander Gorshenev 8035a77e52 a little more on phases. 2016-12-23 16:47:06 +04:00
Svyatoslav Scherbina 62737efd54 backend: add tests:
* test for uninitialized vals
* test initializers3: global `var` of reference type
* expression_as_statement (disabled): using type operator as statement

Also enable test break1.
2016-12-23 11:40:31 +07:00
Nikolay Igotti 25db86df3e Rework variable management for memory management's sake. (#156) 2016-12-22 18:30:58 +03:00
Svyatoslav Scherbina 4acb0774cf backend: do not refer phases by name
also transform KonanPhase to enum
2016-12-22 18:01:48 +07:00
SvyatoslavScherbina b6561b13a4 Implement lowering of some builtin operators. (#154)
* EQEQ
* THROW_NPE

Add test for (un)boxing `==` operands.
2016-12-22 13:02:20 +07:00
Svyatoslav Scherbina 0632a30eca kotlin-compiler update: 1.1-20161219.154657-321 2016-12-22 12:49:45 +07:00
Nikolay Igotti 8ec62ba474 Change code structure by adding explicit epilogue. (#150) 2016-12-21 14:20:57 +03:00
Alexander Gorshenev 16079ce6af Moved
DescriptorUtils.kt -> descriptors/DescriptorUtils.kt
    IrUtils.kt -> ir/IrUtils.kt
2016-12-21 14:38:19 +04:00
Alexander Gorshenev 25fcd23e03 Forgottent commit to fix the broken build. 2016-12-20 19:55:31 +04:00
Alexander Gorshenev 82143d6c8a Eliminated Logger class.
Context now provides the log(message: String) method.
This method knows if the current phase is verbose or not.
2016-12-20 19:34:26 +04:00
Alexander Gorshenev e48c5a7215 Introduced
nativeMemUtils.getByteArray
and
    nativeMemUtils.putByteArray
for faster memory copy.
2016-12-20 19:32:27 +04:00
Alexander Gorshenev 823ef031eb After the code review. 2016-12-20 19:32:27 +04:00
Alexander Gorshenev a1786614ea Removed Javascript serializer from Konan.
Introduced our own serializer.
2016-12-20 19:32:27 +04:00
SvyatoslavScherbina 2950921bd1 backend/codegen: use unnamed values instead of passing tmp variable names (#149) 2016-12-20 17:29:48 +07:00
Konstantin Anisimov 801953ec56 RUNTIME: laucher uses runtime API for registering and running out initializers 2016-12-20 12:46:22 +03:00
Konstantin Anisimov 5f097350ac TEST: test for global variable initialization added 2016-12-20 12:46:22 +03:00
Konstantin Anisimov 86bb5477c5 CODEGEN: implementation of global fields initialization. 2016-12-20 12:46:22 +03:00
Konstantin Anisimov bca03288f6 CODEGEN: Possibility to create string literal from String implemented (refactoring) 2016-12-20 12:46:22 +03:00
Svyatoslav Scherbina 4706ec9ddd Review feedback, part 1 2016-12-20 15:33:38 +07:00
Svyatoslav Scherbina f2b5b98dba backend: enable and add tests for autoboxing 2016-12-20 15:33:38 +07:00
Svyatoslav Scherbina 61c28db886 backend: improve Nothing type handling 2016-12-20 15:33:38 +07:00
Svyatoslav Scherbina 44f2036506 backend: implement autoboxing as IR transformation 2016-12-20 15:33:38 +07:00
Nikolay Igotti 3b7321ef94 Boxing. 2016-12-20 15:33:38 +07:00
Vasily Levchenko 86a6771a09 kotlin-compiler update: 1.1-20161217.025654-317 2016-12-19 12:36:47 +03:00
Alexander Gorshenev e8c2fb4f53 Fix broken build. 2016-12-14 21:49:11 +04:00
Alexander Gorshenev f5a627f6ff Allow -Pkonanc_flags="-print_bitcode" for gradle commands. 2016-12-14 20:40:45 +04:00
Nikolay Igotti 175dc9fb14 Fix build. 2016-12-14 18:23:36 +03:00
Vasily Levchenko 11f132f16d CODEGEN: string concatination with string builder 2016-12-14 16:48:44 +03:00
Nikolay Igotti 08bdcc963f Use lambdas in stdlib. (#140) 2016-12-14 16:46:39 +03:00
Alexander Gorshenev 35668cc7e1 Added phase control flags.
-print_descriptors
-print_ir
-print_bitcode

-verify_descriptors
-verify_ir
-verify_bitcode

-list

-enable <phase name>
-disable <phase name>
-verbose <phase name>
2016-12-13 21:31:47 +04:00
Alexander Gorshenev 6a6424f462 A little more konanc. 2016-12-13 17:11:27 +04:00
Nikolay Igotti 093409a1af Allow binary search for open methods. (#132) 2016-12-13 13:24:50 +03:00
Svyatoslav Scherbina a6a6c677a3 backend.common: fix minor bug in LocalFunctionsLowering
extension receiver parameter should be remapped too
(e.g. to support lambda with receiver)
2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina 7cebc4f676 backend: support function types with receiver 2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina 319a473565 backend: add test for lambda with receiver 2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina ac4aca1c3a backend: add more tests for lambda 2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina 7d4074a1a4 Review feedback, part 1 2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina 4dec392880 backend: add tests for lambda functions 2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina b5ffc48547 backend.konan: support function types in codegen 2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina 2fa2727935 backend.konan: implement callable reference lowering 2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina 8dce1884fd backend: implement KonanSharedVariablesManager 2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina 7d5890e354 backend.konan: apply common lowering 2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina a37cabbd51 backend/common: adapt common lowering to use in konan 2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina 6edafb1974 backendn: fix minor bug in SharedVariablesLowering 2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina 0fec2e743c backend/common: extract common part from copied sources 2016-12-13 16:09:55 +07:00
Svyatoslav Scherbina 191c98ec60 backend/common: copy some sources from JVM BE 2016-12-13 16:09:55 +07:00
Nikolay Igotti 8071b4999f As catching exception by type requires RTTI, use catch all clause. (#136) 2016-12-12 18:13:31 +03:00
Vasily Levchenko 3646ab7825 CODEGEN: add initializer in place and reference to GET_OBJECT 2016-12-12 17:35:58 +03:00
Nikolay Igotti 240a87d0ac Remve unreachable code for -opt, minor bugfix. (#135) 2016-12-12 16:38:19 +03:00
Nikolay Igotti 6565a5eb23 Fix broken build. 2016-12-11 20:40:17 +03:00