Those descriptors are already presented in enum's declaration and
are perfectly fine. We just need to replace their synthetic bodies
with real implementations.
* Represent pointer parameters of C functions as `CValuesRef`.
* Represent struct value parameters as `CValue`.
* Implement some helper methods to make the new approach more useful.
* Migrate some code to new interop approach for pointers and values.
Also do not map to `String?`:
- pointers to 8-bit integers;
- pointers to non-const chars.
* 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).