Files
kotlin-fork/backend.native
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
..
2017-03-10 18:08:47 +07:00