Igor Chevdar ed2191b4a3 Initializers lowering fix: clone init blocks. (#321)
* Initializers lowering fix: clone init blocks.

In order to let following phases to modify IR we need to clone init blocks
for each constructor before inserting it.

* Used DeepCopyIRTreeWithDescriptors.

* Shared variables lowering must be performed before local functions lowering.

Local functions lowering makes all variables non-shared, thus they must be
transformed into Ref<> before this.

* Moved all initializers into a method.

In order not to deal with copying of IR at all it is easier to create a
method 'initialize' which will be called from each constructor.

* Used right parameters for call.

* If class has primary constructor then move initializers to it.

* review fixes
2017-03-10 19:02:02 +05:00
2016-10-27 13:52:00 +03:00
2016-10-07 14:14:00 +03:00
2016-10-27 13:52:00 +03:00
2016-10-27 13:52:00 +03:00

Kotlin-native backend

Download dependencies:

./gradlew dependencies:update

Then build the compiler:

./gradlew dist

After that you should be able to compile your programs like that:

./dist/bin/konanc hello.kt -o hello

For an optimized compilation use -opt:

./dist/bin/konanc hello.kt -o hello -opt

For some tests, use:

./gradlew backend.native:tests:run

To run blackbox compiler tests from JVM Kotlin use (takes time):

./gradlew run_external
S
Description
The Kotlin Programming Language.
Readme 2.1 GiB
Languages
Kotlin 79.9%
Java 10.4%
Swift 4.3%
C 2.8%
C++ 2.1%
Other 0.3%