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.
* 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.
* 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.