Rename kotlin_native -> kotlin.
This commit is contained in:
committed by
Nikolay Igotti
parent
7eeb2d3046
commit
283303210f
+1
-1
@@ -7,7 +7,7 @@ import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.resolve.constants.StringValue
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameSafe
|
||||
|
||||
private val symbolNameAnnotation = FqName("kotlin_native.SymbolName")
|
||||
private val symbolNameAnnotation = FqName("kotlin.SymbolName")
|
||||
|
||||
internal val FunctionDescriptor.symbolName: String
|
||||
get() {
|
||||
|
||||
+5
-5
@@ -118,7 +118,7 @@ internal class RTTIGenerator(override val context: Context) : ContextUtils {
|
||||
}
|
||||
|
||||
private fun exportTypeInfoIfRequired(classDesc: ClassDescriptor, typeInfoGlobal: LLVMOpaqueValue?) {
|
||||
val annot = classDesc.annotations.findAnnotation(FqName("kotlin_native.ExportTypeInfo"))
|
||||
val annot = classDesc.annotations.findAnnotation(FqName("kotlin.ExportTypeInfo"))
|
||||
if (annot != null) {
|
||||
val nameValue = annot.allValueArguments.values.single() as StringValue
|
||||
// TODO: use LLVMAddAlias?
|
||||
@@ -128,10 +128,10 @@ internal class RTTIGenerator(override val context: Context) : ContextUtils {
|
||||
}
|
||||
|
||||
private val arrayClasses = mapOf(
|
||||
Pair("kotlin_native.ByteArray", -1),
|
||||
Pair("kotlin_native.CharArray", -2),
|
||||
Pair("kotlin_native.IntArray", -4),
|
||||
Pair("kotlin_native.String", -1)
|
||||
Pair("kotlin.ByteArray", -1),
|
||||
Pair("kotlin.CharArray", -2),
|
||||
Pair("kotlin.IntArray", -4),
|
||||
Pair("kotlin.String", -1)
|
||||
);
|
||||
|
||||
private fun getInstanceSize(classType: LLVMOpaqueType?, className: FqName) : Int {
|
||||
|
||||
@@ -99,14 +99,13 @@ task sum_3const(type: KonanTest) {
|
||||
source = "codegen/function/sum_3const.kt"
|
||||
}
|
||||
|
||||
/* TODO: enable, once kotlin.String -> kotlin_native.String is mapped.
|
||||
task hello0(type: KonanTest) {
|
||||
source = "runtime/basic/hello0.kt"
|
||||
}
|
||||
|
||||
task hello1(type: KonanTest) {
|
||||
source = "runtime/basic/hello1.kt"
|
||||
} */
|
||||
}
|
||||
|
||||
// TODO: waiting for boolean to be implemented
|
||||
//task bool_yes(type: KonanTest) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// TODO: remove kotlin_native.io once overrides are in place.
|
||||
fun main(args : Array<String>) {
|
||||
kotlin_native.io.print("Hello, world!")
|
||||
kotlin.io.print("Hello, world!")
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// TODO: remove kotlin_native.io once overrides are in place.
|
||||
fun main(args : Array<String>) {
|
||||
kotlin_native.io.print(kotlin_native.io.readLine())
|
||||
kotlin.io.print(kotlin.io.readLine())
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
package kotlin_native
|
||||
package kotlin
|
||||
|
||||
@ExportTypeInfo("theAnyTypeInfo")
|
||||
public open class Any0 {
|
||||
public open class Any {
|
||||
// @SymbolName("Kotlin_Any_equals")
|
||||
// external public open operator fun equals0(other: Any0?): Boolean
|
||||
|
||||
// TODO: do we need that in Any?
|
||||
@SymbolName("Kotlin_Any_hashCode")
|
||||
external public open fun hashCode0(): Int
|
||||
external public open fun hashCode(): Int
|
||||
|
||||
@SymbolName("Kotlin_Any_toString")
|
||||
external public open fun toString0(): String
|
||||
external public open fun toString(): String
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package kotlin_native
|
||||
package kotlin
|
||||
|
||||
@ExportTypeInfo("theByteArrayTypeInfo")
|
||||
class ByteArray : Cloneable {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package kotlin_native
|
||||
package kotlin
|
||||
|
||||
@ExportTypeInfo("theCloneableTypeInfo")
|
||||
public interface Cloneable {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package kotlin_native
|
||||
package kotlin
|
||||
|
||||
@SymbolName("Kotlin_String_fromUtf8Array")
|
||||
external fun fromUtf8Array(array: ByteArray) : String
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package kotlin_native
|
||||
package kotlin
|
||||
|
||||
// TODO: shouldn't these annotation be located in 'kotlin_native.internal' package?
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package kotlin.io
|
||||
|
||||
@kotlin.SymbolName("Kotlin_io_Console_print")
|
||||
external public fun print(message: kotlin.String)
|
||||
|
||||
@kotlin.SymbolName("Kotlin_io_Console_readLine")
|
||||
external public fun readLine(): kotlin.String
|
||||
@@ -1,7 +0,0 @@
|
||||
package kotlin_native.io
|
||||
|
||||
@kotlin_native.SymbolName("Kotlin_io_Console_print")
|
||||
external public fun print(message: kotlin_native.String)
|
||||
|
||||
@kotlin_native.SymbolName("Kotlin_io_Console_readLine")
|
||||
external public fun readLine(): kotlin_native.String
|
||||
Reference in New Issue
Block a user