* Support `typedef` to function type without pointer;
* Support 64-bit integers in function types;
* Generate opaque function type on JVM if not supported.
Fix other minor bugs.
* Update build to Kotlin 1.1.0
* Add heuristics and options for selecting C enum interop binding style
Also do some refactoring.
* Add ':Interop:Indexer:updatePrebuilt' Gradle task
* Update Interop/Indexer/prebuilt
previously in case:
```
fun box(): String {
val a: A = B(1)
a.copy(1)
a.component1()
return "OK"
}
interface A {
fun copy(x: Int): A
fun component1(): Any
}
data class B(val x: Int) : A
```
in stab `B::copy$default` `B::copy` called with `A::this` that behaviour isn't correct, should be `B::this` used.
This patch adds empty kotlin.experimental package to avoid unresolved
reference errors in bitwiseOp tests:
external_codegen_box_binaryOp/bitwiseOp.kt
external_codegen_box_binaryOp/bitwiseOpAny.kt
external_codegen_box_binaryOp/bitwiseOpNullable.kt
Byte/Short bitwise operations are supported in Kotlin Native by default.
* Do not add dependency on compiler built-ins, add missing declarations
* Drop most usages of KonanPlatform.builtIns
Instead, lookup symbols through the module that is being compiled. This
should be more correct because KonanPlatform.builtIns represents
built-ins loaded from kotlin-compiler.jar's resources
* Minor, make Context.moduleDescriptor lateinit and not null
* Do not ever load KonanBuiltIns from Kotlin compiler anymore
KonanBuiltIns.builtInsModule is now always the module that is being
compiled at the moment. An instance of KonanBuiltIns is thus nothing
more than a helper that loads classes with some predefined names from
the module that is being compiled
* Temporarily disable a part of IR validation
Consider this code:
object Delegate {
operator fun getValue(t: Any?, p: KProperty<*>): String {
return ""
}
}
class A {
val String.ext by Delegate
}
then the type of <p> is KProperty2 (it has 2 receivers).
* Default enum class should not have primary constructor.
* Made simple delegating constructor non-primary + some refactoring.
* Make singleton object constructor primary.
* 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