[stdlib and samples][rename] konan -> kotlin.native

This commit is contained in:
Vasily Levchenko
2018-08-10 12:44:44 +03:00
parent 5ad0012ab1
commit 79755d8fbf
155 changed files with 294 additions and 282 deletions
@@ -15,8 +15,8 @@
*/ */
package kotlinx.wasm.jsinterop package kotlinx.wasm.jsinterop
import kotlin.native.*
import konan.internal.ExportForCppRuntime import kotlin.native.internal.ExportForCppRuntime
import kotlinx.cinterop.* import kotlinx.cinterop.*
typealias Arena = Int typealias Arena = Int
@@ -16,8 +16,8 @@
package kotlinx.cinterop package kotlinx.cinterop
import konan.internal.Intrinsic import kotlin.native.internal.Intrinsic
import konan.internal.ExportForCompiler import kotlin.native.internal.ExportForCompiler
@Intrinsic external operator fun <R> CPointer<CFunction<() -> R>>.invoke(): R @Intrinsic external operator fun <R> CPointer<CFunction<() -> R>>.invoke(): R
@@ -16,7 +16,8 @@
package kotlinx.cinterop package kotlinx.cinterop
import konan.internal.Intrinsic import kotlin.native.*
import kotlin.native.internal.Intrinsic
@PublishedApi @PublishedApi
internal inline val pointerSize: Int internal inline val pointerSize: Int
@@ -15,6 +15,7 @@
*/ */
package kotlinx.cinterop package kotlinx.cinterop
import kotlin.native.*
@SymbolName("Kotlin_Interop_createStablePointer") @SymbolName("Kotlin_Interop_createStablePointer")
internal external fun createStablePointer(any: Any): COpaquePointer internal external fun createStablePointer(any: Any): COpaquePointer
@@ -16,12 +16,12 @@
package kotlinx.cinterop package kotlinx.cinterop
import konan.internal.getNativeNullPtr import kotlin.native.internal.getNativeNullPtr
import konan.internal.Intrinsic import kotlin.native.internal.Intrinsic
import konan.internal.reinterpret import kotlin.native.internal.reinterpret
typealias NativePtr = konan.internal.NativePtr typealias NativePtr = kotlin.native.internal.NativePtr
internal typealias NonNullNativePtr = konan.internal.NonNullNativePtr internal typealias NonNullNativePtr = kotlin.native.internal.NonNullNativePtr
@Suppress("NOTHING_TO_INLINE") @Suppress("NOTHING_TO_INLINE")
internal inline fun NativePtr.toNonNull() = this.reinterpret<NativePtr, NonNullNativePtr>() internal inline fun NativePtr.toNonNull() = this.reinterpret<NativePtr, NonNullNativePtr>()
@@ -16,7 +16,7 @@
package kotlinx.cinterop package kotlinx.cinterop
import konan.internal.Intrinsic import kotlin.native.internal.Intrinsic
internal fun decodeFromUtf8(bytes: ByteArray): String = bytes.stringFromUtf8() internal fun decodeFromUtf8(bytes: ByteArray): String = bytes.stringFromUtf8()
@@ -17,6 +17,7 @@
@file:Suppress("NOTHING_TO_INLINE") @file:Suppress("NOTHING_TO_INLINE")
package kotlinx.cinterop package kotlinx.cinterop
import kotlin.native.*
interface ObjCObject interface ObjCObject
interface ObjCClass : ObjCObject interface ObjCClass : ObjCObject
@@ -24,7 +25,7 @@ interface ObjCClassOf<T : ObjCObject> : ObjCClass // TODO: T should be added to
typealias ObjCObjectMeta = ObjCClass typealias ObjCObjectMeta = ObjCClass
@ExportTypeInfo("theForeignObjCObjectTypeInfo") @ExportTypeInfo("theForeignObjCObjectTypeInfo")
internal open class ForeignObjCObject : konan.internal.ObjCObjectWrapper internal open class ForeignObjCObject : kotlin.native.internal.ObjCObjectWrapper
abstract class ObjCObjectBase protected constructor() : ObjCObject { abstract class ObjCObjectBase protected constructor() : ObjCObject {
@Target(AnnotationTarget.CONSTRUCTOR) @Target(AnnotationTarget.CONSTRUCTOR)
@@ -39,10 +40,10 @@ fun optional(): Nothing = throw RuntimeException("Do not call me!!!")
"Add @OverrideInit to constructor to make it override Objective-C initializer", "Add @OverrideInit to constructor to make it override Objective-C initializer",
level = DeprecationLevel.WARNING level = DeprecationLevel.WARNING
) )
@konan.internal.Intrinsic @kotlin.native.internal.Intrinsic
external fun <T : ObjCObjectBase> T.initBy(constructorCall: T): T external fun <T : ObjCObjectBase> T.initBy(constructorCall: T): T
@konan.internal.ExportForCompiler @kotlin.native.internal.ExportForCompiler
private fun ObjCObjectBase.superInitCheck(superInitCallResult: ObjCObject?) { private fun ObjCObjectBase.superInitCheck(superInitCallResult: ObjCObject?) {
if (superInitCallResult == null) if (superInitCallResult == null)
throw RuntimeException("Super initialization failed") throw RuntimeException("Super initialization failed")
@@ -88,7 +89,7 @@ var <T : Any?> ObjCNotImplementedVar<T>.value: T
typealias ObjCStringVarOf<T> = ObjCNotImplementedVar<T> typealias ObjCStringVarOf<T> = ObjCNotImplementedVar<T>
typealias ObjCBlockVar<T> = ObjCNotImplementedVar<T> typealias ObjCBlockVar<T> = ObjCNotImplementedVar<T>
@konan.internal.Intrinsic external fun getReceiverOrSuper(receiver: NativePtr, superClass: NativePtr): COpaquePointer? @kotlin.native.internal.Intrinsic external fun getReceiverOrSuper(receiver: NativePtr, superClass: NativePtr): COpaquePointer?
@Target(AnnotationTarget.CLASS) @Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.BINARY) @Retention(AnnotationRetention.BINARY)
@@ -118,7 +119,7 @@ annotation class InteropStubs()
@Retention(AnnotationRetention.SOURCE) @Retention(AnnotationRetention.SOURCE)
private annotation class ObjCMethodImp(val selector: String, val encoding: String) private annotation class ObjCMethodImp(val selector: String, val encoding: String)
@konan.internal.ExportForCppRuntime("Kotlin_Interop_getObjCClass") @kotlin.native.internal.ExportForCppRuntime("Kotlin_Interop_getObjCClass")
private fun getObjCClassByName(name: NativePtr): NativePtr { private fun getObjCClassByName(name: NativePtr): NativePtr {
val result = objc_lookUpClass(name) val result = objc_lookUpClass(name)
if (result == nativeNullPtr) { if (result == nativeNullPtr) {
@@ -131,7 +132,7 @@ private fun getObjCClassByName(name: NativePtr): NativePtr {
return result return result
} }
@konan.internal.ExportForCompiler @kotlin.native.internal.ExportForCompiler
private fun allocObjCObject(clazz: NativePtr): NativePtr { private fun allocObjCObject(clazz: NativePtr): NativePtr {
val rawResult = objc_allocWithZone(clazz) val rawResult = objc_allocWithZone(clazz)
if (rawResult == nativeNullPtr) { if (rawResult == nativeNullPtr) {
@@ -143,14 +144,15 @@ private fun allocObjCObject(clazz: NativePtr): NativePtr {
return rawResult return rawResult
} }
@konan.internal.Intrinsic @kotlin.native.internal.Intrinsic
@konan.internal.ExportForCompiler @kotlin.native.internal.ExportForCompiler
private external fun <T : ObjCObject> getObjCClass(): NativePtr private external fun <T : ObjCObject> getObjCClass(): NativePtr
@konan.internal.Intrinsic external fun getMessenger(superClass: NativePtr): COpaquePointer? @kotlin.native.internal.Intrinsic external fun getMessenger(superClass: NativePtr): COpaquePointer?
@konan.internal.Intrinsic external fun getMessengerStret(superClass: NativePtr): COpaquePointer? @kotlin.native.internal.Intrinsic external fun getMessengerStret(superClass: NativePtr): COpaquePointer?
internal class ObjCWeakReferenceImpl : konan.ref.WeakReferenceImpl() {
internal class ObjCWeakReferenceImpl : kotlin.native.ref.WeakReferenceImpl() {
@SymbolName("Konan_ObjCInterop_getWeakReference") @SymbolName("Konan_ObjCInterop_getWeakReference")
external override fun get(): Any? external override fun get(): Any?
} }
@@ -158,7 +160,7 @@ internal class ObjCWeakReferenceImpl : konan.ref.WeakReferenceImpl() {
@SymbolName("Konan_ObjCInterop_initWeakReference") @SymbolName("Konan_ObjCInterop_initWeakReference")
private external fun ObjCWeakReferenceImpl.init(objcPtr: NativePtr) private external fun ObjCWeakReferenceImpl.init(objcPtr: NativePtr)
@konan.internal.ExportForCppRuntime internal fun makeObjCWeakReferenceImpl(objcPtr: NativePtr): ObjCWeakReferenceImpl { @kotlin.native.internal.ExportForCppRuntime internal fun makeObjCWeakReferenceImpl(objcPtr: NativePtr): ObjCWeakReferenceImpl {
val result = ObjCWeakReferenceImpl() val result = ObjCWeakReferenceImpl()
result.init(objcPtr) result.init(objcPtr)
return result return result
@@ -15,6 +15,7 @@
*/ */
package kotlinx.cinterop package kotlinx.cinterop
import kotlin.native.*
data class Pinned<out T : Any> internal constructor(private val stablePtr: COpaquePointer) { data class Pinned<out T : Any> internal constructor(private val stablePtr: COpaquePointer) {
@@ -15,6 +15,7 @@
*/ */
package kotlinx.cinterop package kotlinx.cinterop
import kotlin.native.*
private const val MAX_ARGUMENT_SIZE = 8 private const val MAX_ARGUMENT_SIZE = 8
@@ -121,7 +121,7 @@ class ObjCMethodStub(private val stubGenerator: StubGenerator,
} }
context.addTopLevelDeclaration( context.addTopLevelDeclaration(
listOf("@konan.internal.ExportForCompiler", listOf("@kotlin.native.internal.ExportForCompiler",
"@ObjCBridge".applyToStrings(method.selector, method.encoding, implementationTemplate)) "@ObjCBridge".applyToStrings(method.selector, method.encoding, implementationTemplate))
+ block(bridgeHeader, bodyLines) + block(bridgeHeader, bodyLines)
) )
@@ -168,7 +168,7 @@ class SimpleBridgeGeneratorImpl(
val cReturnType = returnType.nativeType val cReturnType = returnType.nativeType
val symbolName = pkgName.replace(INVALID_CLANG_IDENTIFIER_REGEX, "_") + "_$kotlinFunctionName" val symbolName = pkgName.replace(INVALID_CLANG_IDENTIFIER_REGEX, "_") + "_$kotlinFunctionName"
kotlinLines.add("@konan.internal.ExportForCppRuntime(${symbolName.quoteAsKotlinLiteral()})") kotlinLines.add("@kotlin.native.internal.ExportForCppRuntime(${symbolName.quoteAsKotlinLiteral()})")
val cFunctionHeader = "$cReturnType $symbolName($joinedCParameters)" val cFunctionHeader = "$cReturnType $symbolName($joinedCParameters)"
nativeLines.add("$cFunctionHeader;") nativeLines.add("$cFunctionHeader;")
@@ -903,7 +903,7 @@ class StubGenerator(
out("") out("")
} }
if (platform == KotlinPlatform.NATIVE) { if (platform == KotlinPlatform.NATIVE) {
out("import konan.SymbolName") out("import kotlin.native.SymbolName")
} }
out("import kotlinx.cinterop.*") out("import kotlinx.cinterop.*")
@@ -111,7 +111,7 @@ private val cKeywords = setOf(
"xor_eq" "xor_eq"
) )
private val cnameAnnotation = FqName("konan.internal.CName") private val cnameAnnotation = FqName("kotlin.native.internal.CName")
private fun org.jetbrains.kotlin.types.KotlinType.isGeneric() = private fun org.jetbrains.kotlin.types.KotlinType.isGeneric() =
constructor.declarationDescriptor is TypeParameterDescriptor constructor.declarationDescriptor is TypeParameterDescriptor
@@ -285,14 +285,14 @@ internal class Context(config: KonanConfig) : KonanBackendContext(config) {
moduleDescriptor.builtIns as KonanBuiltIns moduleDescriptor.builtIns as KonanBuiltIns
} }
private val packageScope by lazy { builtIns.builtInsModule.getPackage(KonanFqNames.packageName).memberScope } private val packageScope by lazy { builtIns.builtInsModule.getPackage(KonanFqNames.internalPackageName).memberScope }
val nativePtr by lazy { packageScope.getContributedClassifier(NATIVE_PTR_NAME) as ClassDescriptor } val nativePtr by lazy { packageScope.getContributedClassifier(NATIVE_PTR_NAME) as ClassDescriptor }
val nativePtrPlusLong by lazy { nativePtr.unsubstitutedMemberScope.getContributedFunctions("plus").single() } val nativePtrPlusLong by lazy { nativePtr.unsubstitutedMemberScope.getContributedFunctions("plus").single() }
val nativePtrToLong by lazy { nativePtr.unsubstitutedMemberScope.getContributedFunctions("toLong").single() } val nativePtrToLong by lazy { nativePtr.unsubstitutedMemberScope.getContributedFunctions("toLong").single() }
val getNativeNullPtr by lazy { packageScope.getContributedFunctions("getNativeNullPtr").single() } val getNativeNullPtr by lazy { packageScope.getContributedFunctions("getNativeNullPtr").single() }
val immutableBinaryBlobOf by lazy { val immutableBinaryBlobOf by lazy {
builtIns.builtInsModule.getPackage(FqName("konan")).memberScope.getContributedFunctions("immutableBinaryBlobOf").single() builtIns.builtInsModule.getPackage(KonanFqNames.packageName).memberScope.getContributedFunctions("immutableBinaryBlobOf").single()
} }
val specialDeclarationsFactory = SpecialDeclarationsFactory(this) val specialDeclarationsFactory = SpecialDeclarationsFactory(this)
@@ -319,7 +319,7 @@ internal class Context(config: KonanConfig) : KonanBackendContext(config) {
@Suppress("UNCHECKED_CAST") (lazyValues.getOrPut(member, { member.initializer(this) }) as T) @Suppress("UNCHECKED_CAST") (lazyValues.getOrPut(member, { member.initializer(this) }) as T)
override val reflectionTypes: ReflectionTypes by lazy(PUBLICATION) { override val reflectionTypes: ReflectionTypes by lazy(PUBLICATION) {
ReflectionTypes(moduleDescriptor, FqName("konan.internal")) ReflectionTypes(moduleDescriptor, KonanFqNames.internalPackageName)
} }
private val vtableBuilders = mutableMapOf<IrClass, ClassVtablesBuilder>() private val vtableBuilders = mutableMapOf<IrClass, ClassVtablesBuilder>()
@@ -212,14 +212,14 @@ private val implicitInlineClasses =
private enum class ValueClass(val fqName: FqNameUnsafe, val binaryType: BinaryType.Primitive) { private enum class ValueClass(val fqName: FqNameUnsafe, val binaryType: BinaryType.Primitive) {
BOOLEAN("konan.internal.BooleanValue", PrimitiveBinaryType.BOOLEAN), BOOLEAN("kotlin.native.internal.BooleanValue", PrimitiveBinaryType.BOOLEAN),
BYTE("konan.internal.ByteValue", PrimitiveBinaryType.BYTE), BYTE("kotlin.native.internal.ByteValue", PrimitiveBinaryType.BYTE),
SHORT("konan.internal.ShortValue", PrimitiveBinaryType.SHORT), SHORT("kotlin.native.internal.ShortValue", PrimitiveBinaryType.SHORT),
INT("konan.internal.IntValue", PrimitiveBinaryType.INT), INT("kotlin.native.internal.IntValue", PrimitiveBinaryType.INT),
LONG("konan.internal.LongValue", PrimitiveBinaryType.LONG), LONG("kotlin.native.internal.LongValue", PrimitiveBinaryType.LONG),
FLOAT("konan.internal.FloatValue", PrimitiveBinaryType.FLOAT), FLOAT("kotlin.native.internal.FloatValue", PrimitiveBinaryType.FLOAT),
DOUBLE("konan.internal.DoubleValue", PrimitiveBinaryType.DOUBLE), DOUBLE("kotlin.native.internal.DoubleValue", PrimitiveBinaryType.DOUBLE),
NON_NULL_POINTER("konan.internal.NotNullPointerValue", PrimitiveBinaryType.POINTER) NON_NULL_POINTER("kotlin.native.internal.NotNullPointerValue", PrimitiveBinaryType.POINTER)
; ;
@@ -104,7 +104,7 @@ internal class InteropBuiltIns(builtIns: KonanBuiltIns, vararg konanPrimitives:
val staticCFunction = packageScope.getContributedFunctions("staticCFunction").toSet() val staticCFunction = packageScope.getContributedFunctions("staticCFunction").toSet()
val workerPackageScope = builtIns.builtInsModule.getPackage(FqName("konan.worker")).memberScope val workerPackageScope = builtIns.builtInsModule.getPackage(FqName("kotlin.native.worker")).memberScope
val scheduleFunction = workerPackageScope.getContributedClass("Worker") val scheduleFunction = workerPackageScope.getContributedClass("Worker")
.unsubstitutedMemberScope.getContributedFunctions("schedule").single() .unsubstitutedMemberScope.getContributedFunctions("schedule").single()
@@ -18,7 +18,7 @@ package org.jetbrains.kotlin.backend.konan
import org.jetbrains.kotlin.backend.common.CommonBackendContext import org.jetbrains.kotlin.backend.common.CommonBackendContext
import org.jetbrains.kotlin.backend.konan.descriptors.KonanSharedVariablesManager import org.jetbrains.kotlin.backend.konan.descriptors.KonanSharedVariablesManager
import org.jetbrains.kotlin.backend.konan.descriptors.konanInternal import org.jetbrains.kotlin.backend.konan.descriptors.kotlinNativeInternal
import org.jetbrains.kotlin.backend.konan.ir.KonanIr import org.jetbrains.kotlin.backend.konan.ir.KonanIr
import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation
@@ -44,10 +44,10 @@ abstract internal class KonanBackendContext(val config: KonanConfig) : CommonBac
} }
override fun getInternalClass(name: String): ClassDescriptor = override fun getInternalClass(name: String): ClassDescriptor =
builtIns.konanInternal.getContributedClassifier(Name.identifier(name), NoLookupLocation.FROM_BACKEND) as ClassDescriptor builtIns.kotlinNativeInternal.getContributedClassifier(Name.identifier(name), NoLookupLocation.FROM_BACKEND) as ClassDescriptor
override fun getInternalFunctions(name: String): List<FunctionDescriptor> = override fun getInternalFunctions(name: String): List<FunctionDescriptor> =
builtIns.konanInternal.getContributedFunctions(Name.identifier(name), NoLookupLocation.FROM_BACKEND).toList() builtIns.kotlinNativeInternal.getContributedFunctions(Name.identifier(name), NoLookupLocation.FROM_BACKEND).toList()
val messageCollector: MessageCollector val messageCollector: MessageCollector
get() = config.configuration.getNotNull(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY) get() = config.configuration.getNotNull(CLIConfigurationKeys.MESSAGE_COLLECTOR_KEY)
@@ -24,10 +24,11 @@ internal const val NATIVE_PTR_NAME = "NativePtr"
object KonanFqNames { object KonanFqNames {
val packageName = FqName("konan.internal") val packageName = FqName("kotlin.native")
val nativePtr = packageName.child(Name.identifier(NATIVE_PTR_NAME)).toUnsafe() val internalPackageName = FqName("kotlin.native.internal")
val nonNullNativePtr = FqNameUnsafe("konan.internal.NonNullNativePtr") val nativePtr = internalPackageName.child(Name.identifier(NATIVE_PTR_NAME)).toUnsafe()
val throws = FqName("konan.Throws") val nonNullNativePtr = FqNameUnsafe("kotlin.native.internal.NonNullNativePtr")
val throws = FqName("kotlin.native.Throws")
} }
/** /**
@@ -83,8 +83,8 @@ internal fun IrSimpleFunction.resolveFakeOverride(): IrSimpleFunction {
return realSupers.first { it.modality != Modality.ABSTRACT } return realSupers.first { it.modality != Modality.ABSTRACT }
} }
private val intrinsicAnnotation = FqName("konan.internal.Intrinsic") private val intrinsicAnnotation = FqName("kotlin.native.internal.Intrinsic")
private val frozenAnnotation = FqName("konan.internal.Frozen") private val frozenAnnotation = FqName("kotlin.native.internal.Frozen")
// TODO: don't forget to remove descriptor access here. // TODO: don't forget to remove descriptor access here.
internal val FunctionDescriptor.isIntrinsic: Boolean internal val FunctionDescriptor.isIntrinsic: Boolean
@@ -108,7 +108,7 @@ internal val arrayTypes = setOf(
"kotlin.FloatArray", "kotlin.FloatArray",
"kotlin.DoubleArray", "kotlin.DoubleArray",
"kotlin.BooleanArray", "kotlin.BooleanArray",
"konan.ImmutableBinaryBlob" "kotlin.native.ImmutableBinaryBlob"
) )
@@ -58,13 +58,13 @@ internal val ClassDescriptor.isArray: Boolean
internal val ClassDescriptor.isInterface: Boolean internal val ClassDescriptor.isInterface: Boolean
get() = (this.kind == ClassKind.INTERFACE) get() = (this.kind == ClassKind.INTERFACE)
private val konanInternalPackageName = FqName.fromSegments(listOf("konan", "internal")) private val kotlinNativeInternalPackageName = FqName.fromSegments(listOf("kotlin", "native", "internal"))
/** /**
* @return `konan.internal` member scope * @return `konan.internal` member scope
*/ */
internal val KonanBuiltIns.konanInternal: MemberScope internal val KonanBuiltIns.kotlinNativeInternal: MemberScope
get() = this.builtInsModule.getPackage(konanInternalPackageName).memberScope get() = this.builtInsModule.getPackage(kotlinNativeInternalPackageName).memberScope
internal val KotlinType.isKFunctionType: Boolean internal val KotlinType.isKFunctionType: Boolean
get() { get() {
@@ -137,7 +137,7 @@ internal fun DeclarationDescriptor.allContainingDeclarations(): List<Declaration
// since externals don't have IR bodies. // since externals don't have IR bodies.
// Enforce inlining of constructors annotated with @InlineConstructor. // Enforce inlining of constructors annotated with @InlineConstructor.
private val inlineConstructor = FqName("konan.internal.InlineConstructor") private val inlineConstructor = FqName("kotlin.native.internal.InlineConstructor")
internal val FunctionDescriptor.needsInlining: Boolean internal val FunctionDescriptor.needsInlining: Boolean
get() { get() {
@@ -20,7 +20,7 @@ import org.jetbrains.kotlin.backend.common.COROUTINE_SUSPENDED_NAME
import org.jetbrains.kotlin.backend.common.ir.Ir import org.jetbrains.kotlin.backend.common.ir.Ir
import org.jetbrains.kotlin.backend.common.ir.Symbols import org.jetbrains.kotlin.backend.common.ir.Symbols
import org.jetbrains.kotlin.backend.konan.* import org.jetbrains.kotlin.backend.konan.*
import org.jetbrains.kotlin.backend.konan.descriptors.konanInternal import org.jetbrains.kotlin.backend.konan.descriptors.kotlinNativeInternal
import org.jetbrains.kotlin.backend.konan.llvm.findMainEntryPoint import org.jetbrains.kotlin.backend.konan.llvm.findMainEntryPoint
import org.jetbrains.kotlin.backend.konan.lower.TestProcessor import org.jetbrains.kotlin.backend.konan.lower.TestProcessor
import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.builtins.KotlinBuiltIns
@@ -173,7 +173,7 @@ internal class KonanSymbols(context: Context, val symbolTable: SymbolTable, val
symbolTable.referenceSimpleFunction(context.interopBuiltIns.CreateNSStringFromKString) symbolTable.referenceSimpleFunction(context.interopBuiltIns.CreateNSStringFromKString)
val objCExportTrapOnUndeclaredException = val objCExportTrapOnUndeclaredException =
symbolTable.referenceSimpleFunction(context.builtIns.konanInternal.getContributedFunctions( symbolTable.referenceSimpleFunction(context.builtIns.kotlinNativeInternal.getContributedFunctions(
Name.identifier("trapOnUndeclaredException"), Name.identifier("trapOnUndeclaredException"),
NoLookupLocation.FROM_BACKEND NoLookupLocation.FROM_BACKEND
).single()) ).single())
@@ -191,7 +191,7 @@ internal class KonanSymbols(context: Context, val symbolTable: SymbolTable, val
} }
val immutableBinaryBlob = symbolTable.referenceClass( val immutableBinaryBlob = symbolTable.referenceClass(
builtInsPackage("konan").getContributedClassifier( builtInsPackage("kotlin", "native").getContributedClassifier(
Name.identifier("ImmutableBinaryBlob"), NoLookupLocation.FROM_BACKEND Name.identifier("ImmutableBinaryBlob"), NoLookupLocation.FROM_BACKEND
) as ClassDescriptor ) as ClassDescriptor
) )
@@ -301,7 +301,7 @@ internal class KonanSymbols(context: Context, val symbolTable: SymbolTable, val
context.getInternalFunctions("initInstance").single()) context.getInternalFunctions("initInstance").single())
val freeze = symbolTable.referenceSimpleFunction( val freeze = symbolTable.referenceSimpleFunction(
builtInsPackage("konan", "worker").getContributedFunctions(Name.identifier("freeze"), NoLookupLocation.FROM_BACKEND).single()) builtInsPackage("kotlin", "native", "worker").getContributedFunctions(Name.identifier("freeze"), NoLookupLocation.FROM_BACKEND).single())
val println = symbolTable.referenceSimpleFunction( val println = symbolTable.referenceSimpleFunction(
builtInsPackage("kotlin", "io").getContributedFunctions(Name.identifier("println"), NoLookupLocation.FROM_BACKEND) builtInsPackage("kotlin", "io").getContributedFunctions(Name.identifier("println"), NoLookupLocation.FROM_BACKEND)
@@ -363,7 +363,7 @@ internal class KonanSymbols(context: Context, val symbolTable: SymbolTable, val
symbolTable.referenceClass(context.getInternalClass(name)) symbolTable.referenceClass(context.getInternalClass(name))
private fun getKonanTestClass(className: String) = symbolTable.referenceClass( private fun getKonanTestClass(className: String) = symbolTable.referenceClass(
builtInsPackage("konan", "test").getContributedClassifier( builtInsPackage("kotlin", "native", "test").getContributedClassifier(
Name.identifier(className), NoLookupLocation.FROM_BACKEND Name.identifier(className), NoLookupLocation.FROM_BACKEND
) as ClassDescriptor) ) as ClassDescriptor)
@@ -116,13 +116,13 @@ internal tailrec fun DeclarationDescriptor.isExported(): Boolean {
return true return true
} }
private val symbolNameAnnotation = FqName("konan.SymbolName") private val symbolNameAnnotation = FqName("kotlin.native.SymbolName")
private val exportForCppRuntimeAnnotation = FqName("konan.internal.ExportForCppRuntime") private val exportForCppRuntimeAnnotation = FqName("kotlin.native.internal.ExportForCppRuntime")
private val cnameAnnotation = FqName("konan.internal.CName") private val cnameAnnotation = FqName("kotlin.native.internal.CName")
private val exportForCompilerAnnotation = FqName("konan.internal.ExportForCompiler") private val exportForCompilerAnnotation = FqName("kotlin.native.internal.ExportForCompiler")
private val publishedApiAnnotation = FqName("kotlin.PublishedApi") private val publishedApiAnnotation = FqName("kotlin.PublishedApi")
@@ -61,7 +61,7 @@ internal fun findMainEntryPoint(context: Context): FunctionDescriptor? {
} }
private val defaultEntryName = "main" private val defaultEntryName = "main"
private val testEntryName = "konan.test.main" private val testEntryName = "kotlin.native.test.main"
private val defaultEntryPackage = FqName.ROOT private val defaultEntryPackage = FqName.ROOT
@@ -46,7 +46,7 @@ import org.jetbrains.kotlin.konan.target.CompilerOutputKind
import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameUnsafe import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameUnsafe
private val threadLocalAnnotationFqName = FqName("konan.ThreadLocal") private val threadLocalAnnotationFqName = FqName("kotlin.native.ThreadLocal")
val IrClassSymbol.objectIsShared get() = val IrClassSymbol.objectIsShared get() =
!descriptor.annotations.hasAnnotation(threadLocalAnnotationFqName) !descriptor.annotations.hasAnnotation(threadLocalAnnotationFqName)
@@ -2098,7 +2098,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
val name = descriptor.fqNameUnsafe.asString() val name = descriptor.fqNameUnsafe.asString()
when (name) { when (name) {
"konan.internal.areEqualByValue" -> { "kotlin.native.internal.areEqualByValue" -> {
val arg0 = args[0] val arg0 = args[0]
val arg1 = args[1] val arg1 = args[1]
assert (arg0.type == arg1.type, assert (arg0.type == arg1.type,
@@ -2119,7 +2119,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
} }
} }
} }
"konan.internal.ieee754Equals" -> { "kotlin.native.internal.ieee754Equals" -> {
val arg0 = args[0] val arg0 = args[0]
val arg1 = args[1] val arg1 = args[1]
assert (arg0.type == arg1.type, assert (arg0.type == arg1.type,
@@ -2130,7 +2130,7 @@ internal class CodeGeneratorVisitor(val context: Context, val lifetimes: Map<IrE
return functionGenerationContext.fcmpEq(arg0, arg1) return functionGenerationContext.fcmpEq(arg0, arg1)
} }
"konan.internal.getContinuation" -> return getContinuation() "kotlin.native.internal.getContinuation" -> return getContinuation()
} }
val interop = context.interopBuiltIns val interop = context.interopBuiltIns
@@ -135,7 +135,7 @@ private fun Context.getDeclaredFields(classDescriptor: ClassDescriptor): List<Ir
// TODO: hack over missed parents in deserialized fields/property declarations. // TODO: hack over missed parents in deserialized fields/property declarations.
fields.forEach{it.parent = irClass} fields.forEach{it.parent = irClass}
if (classDescriptor.hasAnnotation(FqName.fromSegments(listOf("konan", "internal", "NoReorderFields")))) if (classDescriptor.hasAnnotation(FqName.fromSegments(listOf("kotlin", "native", "internal", "NoReorderFields"))))
return fields return fields
return fields.sortedBy { return fields.sortedBy {
@@ -98,7 +98,7 @@ internal class RTTIGenerator(override val context: Context) : ContextUtils {
} }
private fun exportTypeInfoIfRequired(classDesc: ClassDescriptor, typeInfoGlobal: LLVMValueRef?) { private fun exportTypeInfoIfRequired(classDesc: ClassDescriptor, typeInfoGlobal: LLVMValueRef?) {
val annot = classDesc.descriptor.annotations.findAnnotation(FqName("konan.ExportTypeInfo")) val annot = classDesc.descriptor.annotations.findAnnotation(FqName("kotlin.native.ExportTypeInfo"))
if (annot != null) { if (annot != null) {
val name = getStringValue(annot)!! val name = getStringValue(annot)!!
// TODO: use LLVMAddAlias? // TODO: use LLVMAddAlias?
@@ -118,7 +118,7 @@ internal class RTTIGenerator(override val context: Context) : ContextUtils {
"kotlin.DoubleArray" to LLVMDoubleType()!!, "kotlin.DoubleArray" to LLVMDoubleType()!!,
"kotlin.BooleanArray" to LLVMInt8Type()!!, "kotlin.BooleanArray" to LLVMInt8Type()!!,
"kotlin.String" to LLVMInt16Type()!!, "kotlin.String" to LLVMInt16Type()!!,
"konan.ImmutableBinaryBlob" to LLVMInt8Type()!! "kotlin.native.ImmutableBinaryBlob" to LLVMInt8Type()!!
) )
// Keep in sync with Konan_RuntimeType. // Keep in sync with Konan_RuntimeType.
@@ -20,7 +20,7 @@ import org.jetbrains.kotlin.descriptors.FunctionDescriptor
import org.jetbrains.kotlin.descriptors.annotations.* import org.jetbrains.kotlin.descriptors.annotations.*
import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.FqName
private val annotationName = FqName("konan.Used") private val annotationName = FqName("kotlin.native.Used")
internal val FunctionDescriptor.usedAnnotation: Boolean internal val FunctionDescriptor.usedAnnotation: Boolean
get() { get() {
@@ -109,7 +109,7 @@ internal class CallableReferenceLowering(val context: Context): FileLoweringPass
val argumentDescriptor = descriptor.valueParameters.singleOrNull { val argumentDescriptor = descriptor.valueParameters.singleOrNull {
cur.getValueArgument(it.index) == argument cur.getValueArgument(it.index) == argument
} }
if (argumentDescriptor != null && argumentDescriptor.annotations.findAnnotation(FqName("konan.VolatileLambda")) != null) { if (argumentDescriptor != null && argumentDescriptor.annotations.findAnnotation(FqName("kotlin.native.VolatileLambda")) != null) {
return expression return expression
} }
break break
@@ -121,7 +121,7 @@ internal class FunctionInlining(val context: Context): IrElementTransformerVoidW
override fun visitElement(element: IrElement) = element.accept(this, null) override fun visitElement(element: IrElement) = element.accept(this, null)
} }
private val inlineConstructor = FqName("konan.internal.InlineConstructor") private val inlineConstructor = FqName("kotlin.native.internal.InlineConstructor")
private val FunctionDescriptor.isInlineConstructor get() = annotations.hasAnnotation(inlineConstructor) private val FunctionDescriptor.isInlineConstructor get() = annotations.hasAnnotation(inlineConstructor)
//-----------------------------------------------------------------------------// //-----------------------------------------------------------------------------//
@@ -635,7 +635,7 @@ internal class InteropLoweringPart1(val context: Context) : IrBuildingTransforme
// Special case: bridge from Objective-C method implementation template to Kotlin method; // Special case: bridge from Objective-C method implementation template to Kotlin method;
// handled in CodeGeneratorVisitor.callVirtual. // handled in CodeGeneratorVisitor.callVirtual.
val useKotlinDispatch = isInteropStubsFile && val useKotlinDispatch = isInteropStubsFile &&
builder.scope.scopeOwner.annotations.hasAnnotation(FqName("konan.internal.ExportForCppRuntime")) builder.scope.scopeOwner.annotations.hasAnnotation(FqName("kotlin.native.internal.ExportForCppRuntime"))
if (!useKotlinDispatch) { if (!useKotlinDispatch) {
val arguments = descriptor.valueParameters.map { expression.getValueArgument(it)!! } val arguments = descriptor.valueParameters.map { expression.getValueArgument(it)!! }
@@ -456,7 +456,7 @@ internal object DataFlowIR {
private val NAME_ESCAPES = Name.identifier("Escapes") private val NAME_ESCAPES = Name.identifier("Escapes")
private val NAME_POINTS_TO = Name.identifier("PointsTo") private val NAME_POINTS_TO = Name.identifier("PointsTo")
private val FQ_NAME_KONAN = FqName.fromSegments(listOf("konan")) private val FQ_NAME_KONAN = FqName.fromSegments(listOf("kotlin", "native"))
private val FQ_NAME_ESCAPES = FQ_NAME_KONAN.child(NAME_ESCAPES) private val FQ_NAME_ESCAPES = FQ_NAME_KONAN.child(NAME_ESCAPES)
private val FQ_NAME_POINTS_TO = FQ_NAME_KONAN.child(NAME_POINTS_TO) private val FQ_NAME_POINTS_TO = FQ_NAME_KONAN.child(NAME_POINTS_TO)
@@ -24,7 +24,7 @@ import org.jetbrains.kotlin.types.*
import org.jetbrains.kotlin.resolve.calls.inference.* import org.jetbrains.kotlin.resolve.calls.inference.*
import org.jetbrains.kotlin.storage.LockBasedStorageManager import org.jetbrains.kotlin.storage.LockBasedStorageManager
private val konanInternalPackageName = FqName("konan.internal") private val konanInternalPackageName = FqName("kotlin.native.internal")
private val fakeCapturedTypeClassName = Name.identifier("FAKE_CAPTURED_TYPE_CLASS") private val fakeCapturedTypeClassName = Name.identifier("FAKE_CAPTURED_TYPE_CLASS")
internal fun createFakeClass(packageName: FqName, className: Name) internal fun createFakeClass(packageName: FqName, className: Name)
@@ -162,13 +162,13 @@ internal tailrec fun DeclarationDescriptor.isExported(): Boolean {
return true return true
} }
private val symbolNameAnnotation = FqName("konan.SymbolName") private val symbolNameAnnotation = FqName("kotlin.native.SymbolName")
private val exportForCppRuntimeAnnotation = FqName("konan.internal.ExportForCppRuntime") private val exportForCppRuntimeAnnotation = FqName("kotlin.native.internal.ExportForCppRuntime")
private val cnameAnnotation = FqName("konan.internal.CName") private val cnameAnnotation = FqName("kotlin.native.internal.CName")
private val exportForCompilerAnnotation = FqName("konan.internal.ExportForCompiler") private val exportForCompilerAnnotation = FqName("kotlin.native.internal.ExportForCompiler")
private val publishedApiAnnotation = FqName("kotlin.PublishedApi") private val publishedApiAnnotation = FqName("kotlin.PublishedApi")
@@ -1,7 +1,7 @@
package codegen.enum.isFrozen package codegen.enum.isFrozen
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
enum class Zzz(val zzz: String) { enum class Zzz(val zzz: String) {
Z1("z1"), Z1("z1"),
@@ -5,7 +5,7 @@ import kotlin.test.*
/** /**
* Test fails with code generation: * Test fails with code generation:
* Call parameter type does not match function signature! * Call parameter type does not match function signature!
* %5 = invoke %struct.ObjHeader* @"kfun:konan.internal.boxInt(kotlin.Int)"(i32 1, %struct.ObjHeader** %4) * %5 = invoke %struct.ObjHeader* @"kfun:kotlin.native.internal.boxInt(kotlin.Int)"(i32 1, %struct.ObjHeader** %4)
* to label %label_ unwind label %cleanup_landingpad * to label %label_ unwind label %cleanup_landingpad
* i32 invoke void @"kfun:foo$default(kotlin.Int;kotlin.Int;kotlin.Int)"(%struct.ObjHeader* %5, i32 0, i32 2) * i32 invoke void @"kfun:foo$default(kotlin.Int;kotlin.Int;kotlin.Int)"(%struct.ObjHeader* %5, i32 0, i32 2)
* to label %label_1 unwind label %cleanup_landingpad * to label %label_1 unwind label %cleanup_landingpad
@@ -10,7 +10,7 @@ var A.w: Int
v = c + 10 v = c + 10
} }
@konan.ThreadLocal @kotlin.native.ThreadLocal
object F { object F {
var u = 0 var u = 0
} }
@@ -2,7 +2,7 @@ import kotlin.reflect.KProperty
var result: String by Delegate var result: String by Delegate
@konan.ThreadLocal @kotlin.native.ThreadLocal
object Delegate { object Delegate {
var value = "lol" var value = "lol"
@@ -6,7 +6,7 @@ class Outer {
} }
} }
@konan.ThreadLocal @kotlin.native.ThreadLocal
companion object { companion object {
public var s = "fail" public var s = "fail"
private set private set
@@ -7,7 +7,7 @@ class Delegate<T>(var inner: T) {
class Foo (val f: Int) { class Foo (val f: Int) {
@konan.ThreadLocal @kotlin.native.ThreadLocal
companion object { companion object {
val A: Foo by Delegate(Foo(11)) val A: Foo by Delegate(Foo(11))
var B: Foo by Delegate(Foo(11)) var B: Foo by Delegate(Foo(11))
@@ -15,7 +15,7 @@ class Foo (val f: Int) {
} }
interface FooTrait { interface FooTrait {
@konan.ThreadLocal @kotlin.native.ThreadLocal
companion object { companion object {
val A: Foo by Delegate(Foo(11)) val A: Foo by Delegate(Foo(11))
var B: Foo by Delegate(Foo(11)) var B: Foo by Delegate(Foo(11))
@@ -1,4 +1,4 @@
@konan.ThreadLocal @kotlin.native.ThreadLocal
object Test { object Test {
var z = "0" var z = "0"
var l = 0L var l = 0L
@@ -2,7 +2,7 @@
import kotlin.test.* import kotlin.test.*
@konan.ThreadLocal @kotlin.native.ThreadLocal
object O { object O {
var equalsCalled: Boolean = false var equalsCalled: Boolean = false
get(): Boolean { get(): Boolean {
@@ -1,4 +1,4 @@
@konan.ThreadLocal @kotlin.native.ThreadLocal
object A { object A {
var x = 0 var x = 0
@@ -18,7 +18,7 @@ open class BaseClass {
get() = this get() = this
} }
@konan.ThreadLocal @kotlin.native.ThreadLocal
object C: BaseClass(), I<String> { object C: BaseClass(), I<String> {
fun f(s: Int) = 1 fun f(s: Int) = 1
fun f(s: String) = 2 fun f(s: String) = 2
@@ -19,7 +19,7 @@ open class BaseClass {
} }
class Class { class Class {
@konan.ThreadLocal @kotlin.native.ThreadLocal
companion object C: BaseClass(), I<String> { companion object C: BaseClass(), I<String> {
fun f(s: Int) = 1 fun f(s: Int) = 1
fun f(s: String) = 2 fun f(s: String) = 2
@@ -1,6 +1,6 @@
// See KT-14999 // See KT-14999
@konan.ThreadLocal @kotlin.native.ThreadLocal
object Obj { object Obj {
var key = "" var key = ""
var value = "" var value = ""
@@ -1,6 +1,6 @@
class Test { class Test {
@konan.ThreadLocal @kotlin.native.ThreadLocal
companion object { companion object {
public val prop1 : Int = 10 public val prop1 : Int = 10
@@ -1,6 +1,6 @@
class TestObject() class TestObject()
{ {
@konan.ThreadLocal @kotlin.native.ThreadLocal
companion object { companion object {
var prop: Int = 1 var prop: Int = 1
get() = field++ get() = field++
@@ -2,7 +2,7 @@ class CallbackBlock {}
public class Foo public class Foo
{ {
@konan.ThreadLocal @kotlin.native.ThreadLocal
companion object { companion object {
private var bar = 0 private var bar = 0
} }
@@ -1,5 +1,5 @@
class Foo() { class Foo() {
@konan.ThreadLocal @kotlin.native.ThreadLocal
companion object { companion object {
val bar = "OK"; val bar = "OK";
var boo = "FAIL"; var boo = "FAIL";
@@ -4,7 +4,7 @@ class D {
operator fun getValue(a: Any, p: KProperty<*>) { } operator fun getValue(a: Any, p: KProperty<*>) { }
} }
@konan.ThreadLocal @kotlin.native.ThreadLocal
object P { object P {
val u = Unit val u = Unit
val v by D() val v by D()
@@ -2,7 +2,7 @@ class App {
fun init() { fun init() {
s = "OK" s = "OK"
} }
@konan.ThreadLocal @kotlin.native.ThreadLocal
companion object { companion object {
var s: String = "Fail" var s: String = "Fail"
private set private set
@@ -8,7 +8,7 @@ public class A {
return str return str
} }
@konan.ThreadLocal @kotlin.native.ThreadLocal
private companion object { private companion object {
private lateinit var str: String private lateinit var str: String
} }
@@ -14,7 +14,7 @@ class Foo {
} }
} }
@konan.ThreadLocal @kotlin.native.ThreadLocal
object Bar { object Bar {
lateinit var p: String lateinit var p: String
@@ -4,7 +4,7 @@
import kotlin.reflect.KProperty import kotlin.reflect.KProperty
import kotlin.test.assertEquals import kotlin.test.assertEquals
@konan.ThreadLocal @kotlin.native.ThreadLocal
object Delegate { object Delegate {
lateinit var prop: KProperty<*> lateinit var prop: KProperty<*>
@@ -1,5 +1,5 @@
class A { class A {
@konan.ThreadLocal @kotlin.native.ThreadLocal
companion object { companion object {
private var r: Int = 1; private var r: Int = 1;
@@ -1,4 +1,4 @@
@konan.ThreadLocal @kotlin.native.ThreadLocal
object A { object A {
private var r: Int = 1; private var r: Int = 1;
@@ -1,5 +1,5 @@
class C { class C {
@konan.ThreadLocal @kotlin.native.ThreadLocal
companion object { companion object {
private val s: String private val s: String
private var s2: String private var s2: String
+1 -1
View File
@@ -1,6 +1,6 @@
import kotlinx.cinterop.* import kotlinx.cinterop.*
import objcSmoke.* import objcSmoke.*
import konan.ref.* import kotlin.native.ref.*
import kotlin.test.* import kotlin.test.*
fun main(args: Array<String>) { fun main(args: Array<String>) {
@@ -13,15 +13,15 @@ open class Base {
open fun fooParam(arg0: String, arg1: Int) = println("Base.fooParam: $arg0 $arg1") open fun fooParam(arg0: String, arg1: Int) = println("Base.fooParam: $arg0 $arg1")
@konan.internal.CName(fullName = "", shortName = "strangeName") fun странноеИмя() = 111 @kotlin.native.internal.CName(fullName = "", shortName = "strangeName") fun странноеИмя() = 111
} }
// Top level functions. // Top level functions.
@konan.internal.CName(fullName = "topLevelFunctionFromC", shortName = "topLevelFunctionFromCShort") @kotlin.native.internal.CName(fullName = "topLevelFunctionFromC", shortName = "topLevelFunctionFromCShort")
fun topLevelFunction(x1: Int, x2: Int) = x1 - x2 fun topLevelFunction(x1: Int, x2: Int) = x1 - x2
@konan.internal.CName("topLevelFunctionVoidFromC") @kotlin.native.internal.CName("topLevelFunctionVoidFromC")
fun topLevelFunctionVoid(x1: Int, pointer: COpaquePointer?) { fun topLevelFunctionVoid(x1: Int, pointer: COpaquePointer?) {
assert(x1 == 42) assert(x1 == 42)
assert(pointer == null) assert(pointer == null)
@@ -1,6 +1,6 @@
package runtime.basic.worker_random package runtime.basic.worker_random
import konan.worker.* import kotlin.native.worker.*
import kotlin.collections.* import kotlin.collections.*
import kotlin.random.* import kotlin.random.*
import kotlin.system.* import kotlin.system.*
@@ -2,7 +2,7 @@ package runtime.collections.array3
import kotlin.test.* import kotlin.test.*
import konan.* import kotlin.native.*
@Test fun runTest() { @Test fun runTest() {
val data = immutableBinaryBlobOf(0x1, 0x2, 0x3, 0x7, 0x8, 0x9, 0x80, 0xff) val data = immutableBinaryBlobOf(0x1, 0x2, 0x3, 0x7, 0x8, 0x9, 0x80, 0xff)
@@ -43,7 +43,7 @@ fun createCycles(junk: Node) {
// Create outer link from cyclic garbage. // Create outer link from cyclic garbage.
val outer = Node(42, null, null, null) val outer = Node(42, null, null, null)
createCycles(outer) createCycles(outer)
konan.internal.GC.collect() kotlin.native.internal.GC.collect()
// Ensure outer is not collected. // Ensure outer is not collected.
println(outer.data) println(outer.data)
} }
@@ -1,11 +1,11 @@
package runtime.memory.cycles1 package runtime.memory.cycles1
import kotlin.test.* import kotlin.test.*
import konan.ref.* import kotlin.native.ref.*
@Test fun runTest() { @Test fun runTest() {
val weakRefToTrashCycle = createLoop() val weakRefToTrashCycle = createLoop()
konan.internal.GC.collect() kotlin.native.internal.GC.collect()
assertNull(weakRefToTrashCycle.get()) assertNull(weakRefToTrashCycle.get())
} }
@@ -1,4 +1,4 @@
fun main(args: Array<String>) { fun main(args: Array<String>) {
konan.internal.GC.collect() kotlin.native.internal.GC.collect()
} }
+1 -1
View File
@@ -1,7 +1,7 @@
package runtime.memory.weak0 package runtime.memory.weak0
import kotlin.test.* import kotlin.test.*
import konan.ref.* import kotlin.native.ref.*
data class Data(val s: String) data class Data(val s: String)
+2 -2
View File
@@ -1,7 +1,7 @@
package runtime.memory.weak1 package runtime.memory.weak1
import kotlin.test.* import kotlin.test.*
import konan.ref.* import kotlin.native.ref.*
class Node(var next: Node?) class Node(var next: Node?)
@@ -10,6 +10,6 @@ class Node(var next: Node?)
val node2 = Node(node1) val node2 = Node(node1)
node1.next = node2 node1.next = node2
konan.ref.WeakReference(node1) kotlin.native.ref.WeakReference(node1)
println("OK") println("OK")
} }
@@ -2,7 +2,7 @@ package runtime.workers.atomic0
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
fun test1(workers: Array<Worker>) { fun test1(workers: Array<Worker>) {
val atomic = AtomicInt(15) val atomic = AtomicInt(15)
@@ -1,7 +1,7 @@
package runtime.workers.enum_identity package runtime.workers.enum_identity
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
enum class A { enum class A {
A, B A, B
@@ -18,7 +18,7 @@ package runtime.workers.freeze0
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
data class SharedDataMember(val double: Double) data class SharedDataMember(val double: Double)
@@ -18,7 +18,7 @@ package runtime.workers.freeze1
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
data class Node(var previous: Node?, var data: Int) data class Node(var previous: Node?, var data: Int)
@@ -18,7 +18,7 @@ package runtime.workers.freeze2
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
data class Data(var int: Int) data class Data(var int: Int)
@@ -2,13 +2,13 @@ package runtime.workers.freeze3
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
object Immutable { object Immutable {
var x = 1 var x = 1
} }
@konan.ThreadLocal @kotlin.native.ThreadLocal
object Mutable { object Mutable {
var x = 2 var x = 2
} }
@@ -2,7 +2,7 @@ package runtime.workers.freeze4
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
data class Data(val x: Int, val s: String, val next: Data? = null) data class Data(val x: Int, val s: String, val next: Data? = null)
@@ -2,7 +2,7 @@ package runtime.workers.freeze_stress
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
class Random(private var seed: Int) { class Random(private var seed: Int) {
fun next(): Int { fun next(): Int {
@@ -2,7 +2,7 @@ package runtime.workers.lazy0
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
data class Data(val x: Int, val y: String) data class Data(val x: Int, val y: String)
@@ -2,7 +2,7 @@ package runtime.workers.worker0
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
@Test fun runTest() { @Test fun runTest() {
val worker = startWorker() val worker = startWorker()
@@ -2,7 +2,7 @@ package runtime.workers.worker1
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
@Test fun runTest() { @Test fun runTest() {
val COUNT = 5 val COUNT = 5
@@ -2,7 +2,7 @@ package runtime.workers.worker2
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
data class WorkerArgument(val intParam: Int, val stringParam: String) data class WorkerArgument(val intParam: Int, val stringParam: String)
data class WorkerResult(val intResult: Int, val stringResult: String) data class WorkerResult(val intResult: Int, val stringResult: String)
@@ -2,7 +2,7 @@ package runtime.workers.worker3
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
data class DataParam(var int: Int) data class DataParam(var int: Int)
data class WorkerArgument(val intParam: Int, val dataParam: DataParam) data class WorkerArgument(val intParam: Int, val dataParam: DataParam)
@@ -2,7 +2,7 @@ package runtime.workers.worker4
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
@Test fun runTest() { @Test fun runTest() {
val worker = startWorker() val worker = startWorker()
@@ -2,7 +2,7 @@ package runtime.workers.worker5
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
@Test fun runTest() { @Test fun runTest() {
val worker = startWorker() val worker = startWorker()
@@ -2,7 +2,7 @@ package runtime.workers.worker6
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
@Test fun runTest() { @Test fun runTest() {
val worker = startWorker() val worker = startWorker()
@@ -2,7 +2,7 @@ package runtime.workers.worker7
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
@Test fun runTest() { @Test fun runTest() {
val worker = startWorker() val worker = startWorker()
@@ -2,7 +2,7 @@ package runtime.workers.worker8
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
data class SharedDataMember(val double: Double) data class SharedDataMember(val double: Double)
@@ -2,7 +2,7 @@ package runtime.workers.worker9
import kotlin.test.* import kotlin.test.*
import konan.worker.* import kotlin.native.worker.*
@Test fun runTest() { @Test fun runTest() {
withLock { println("zzz") } withLock { println("zzz") }
+1 -1
View File
@@ -1,7 +1,7 @@
package kotlin.test.tests package kotlin.test.tests
import kotlin.test.* import kotlin.test.*
import konan.test.* import kotlin.native.test.*
@Ignore @Ignore
+1 -1
View File
@@ -1,7 +1,7 @@
package kotlin.test.tests package kotlin.test.tests
import kotlin.test.* import kotlin.test.*
import konan.test.* import kotlin.native.test.*
@Test @Test
fun test() { fun test() {
@@ -9,7 +9,7 @@ import org.jetbrains.kotlin.storage.StorageManager
object KonanPlatform : TargetPlatform("Konan") { object KonanPlatform : TargetPlatform("Konan") {
override fun computePlatformSpecificDefaultImports(storageManager: StorageManager, result: MutableList<ImportPath>) { override fun computePlatformSpecificDefaultImports(storageManager: StorageManager, result: MutableList<ImportPath>) {
result.add(ImportPath.fromString("konan.*")) result.add(ImportPath.fromString("kotlin.native.*"))
} }
override val multiTargetPlatform = MultiTargetPlatform.Specific(platformName) override val multiTargetPlatform = MultiTargetPlatform.Specific(platformName)
+1 -1
View File
@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
import konan.internal.ExportForCppRuntime import kotlin.native.internal.ExportForCppRuntime
// This function is produced by the code generator given // This function is produced by the code generator given
// the '-entry foo.bar.main' flag. // the '-entry foo.bar.main' flag.
+7 -7
View File
@@ -1384,19 +1384,19 @@ void GarbageCollect() {
#endif // USE_GC #endif // USE_GC
void Kotlin_konan_internal_GC_collect(KRef) { void Kotlin_native_internal_GC_collect(KRef) {
#if USE_GC #if USE_GC
GarbageCollect(); GarbageCollect();
#endif #endif
} }
void Kotlin_konan_internal_GC_suspend(KRef) { void Kotlin_native_internal_GC_suspend(KRef) {
#if USE_GC #if USE_GC
memoryState->gcSuspendCount++; memoryState->gcSuspendCount++;
#endif #endif
} }
void Kotlin_konan_internal_GC_resume(KRef) { void Kotlin_native_internal_GC_resume(KRef) {
#if USE_GC #if USE_GC
MemoryState* state = memoryState; MemoryState* state = memoryState;
if (state->gcSuspendCount > 0) { if (state->gcSuspendCount > 0) {
@@ -1409,7 +1409,7 @@ void Kotlin_konan_internal_GC_resume(KRef) {
#endif #endif
} }
void Kotlin_konan_internal_GC_stop(KRef) { void Kotlin_native_internal_GC_stop(KRef) {
#if USE_GC #if USE_GC
if (memoryState->toFree != nullptr) { if (memoryState->toFree != nullptr) {
GarbageCollect(); GarbageCollect();
@@ -1421,7 +1421,7 @@ void Kotlin_konan_internal_GC_stop(KRef) {
#endif #endif
} }
void Kotlin_konan_internal_GC_start(KRef) { void Kotlin_native_internal_GC_start(KRef) {
#if USE_GC #if USE_GC
if (memoryState->toFree == nullptr) { if (memoryState->toFree == nullptr) {
memoryState->toFree = konanConstructInstance<ContainerHeaderList>(); memoryState->toFree = konanConstructInstance<ContainerHeaderList>();
@@ -1430,7 +1430,7 @@ void Kotlin_konan_internal_GC_start(KRef) {
#endif #endif
} }
void Kotlin_konan_internal_GC_setThreshold(KRef, KInt value) { void Kotlin_native_internal_GC_setThreshold(KRef, KInt value) {
#if USE_GC #if USE_GC
if (value > 0) { if (value > 0) {
initThreshold(memoryState, value); initThreshold(memoryState, value);
@@ -1438,7 +1438,7 @@ void Kotlin_konan_internal_GC_setThreshold(KRef, KInt value) {
#endif #endif
} }
KInt Kotlin_konan_internal_GC_getThreshold(KRef) { KInt Kotlin_native_internal_GC_getThreshold(KRef) {
#if USE_GC #if USE_GC
return memoryState->gcThreshold; return memoryState->gcThreshold;
#else #else
+1 -1
View File
@@ -44,7 +44,7 @@ OBJ_GETTER0(Kotlin_getCurrentStackTrace) {
} }
// TODO: consider handling it with compiler magic instead. // TODO: consider handling it with compiler magic instead.
OBJ_GETTER0(Kotlin_konan_internal_undefined) { OBJ_GETTER0(Kotlin_native_internal_undefined) {
RETURN_OBJ(nullptr); RETURN_OBJ(nullptr);
} }
+3 -3
View File
@@ -131,10 +131,10 @@ OBJ_GETTER(Kotlin_String_subSequence, KString thiz, KInt startIndex, KInt endInd
OBJ_GETTER0(Kotlin_getCurrentStackTrace); OBJ_GETTER0(Kotlin_getCurrentStackTrace);
OBJ_GETTER0(Kotlin_konan_internal_undefined); OBJ_GETTER0(Kotlin_native_internal_undefined);
void Kotlin_konan_internal_GC_suspend(KRef); void Kotlin_native_internal_GC_suspend(KRef);
void Kotlin_konan_internal_GC_resume(KRef); void Kotlin_native_internal_GC_resume(KRef);
#ifdef __cplusplus #ifdef __cplusplus
} }
+7 -7
View File
@@ -39,9 +39,9 @@
#define DEFAULT_WIDTH MAX_ACCURACY_WIDTH #define DEFAULT_WIDTH MAX_ACCURACY_WIDTH
extern "C" { extern "C" {
KDouble Konan_FloatingPointParser_parseDoubleImpl (KString s, KInt e); KDouble Kotlin_native_FloatingPointParser_parseDoubleImpl (KString s, KInt e);
void Konan_NumberConverter_bigIntDigitGeneratorInstImpl (KRef results, void Kotlin_native_NumberConverter_bigIntDigitGeneratorInstImpl (KRef results,
KRef uArray, KRef uArray,
KLong f, KLong f,
KInt e, KInt e,
@@ -49,16 +49,16 @@ void Konan_NumberConverter_bigIntDigitGeneratorInstImpl (KRef results,
KBoolean mantissaIsZero, KBoolean mantissaIsZero,
KInt p); KInt p);
KDouble Konan_NumberConverter_ceil(KDouble x) { KDouble Kotlin_native_NumberConverter_ceil(KDouble x) {
return ceil(x); return ceil(x);
} }
void Kotlin_IntArray_set(KRef thiz, KInt index, KInt value); void Kotlin_IntArray_set(KRef thiz, KInt index, KInt value);
KDouble Konan_long_bits_to_double(KLong x); KDouble Kotlin_native_long_bits_to_double(KLong x);
} }
KDouble Konan_long_bits_to_double(KLong x) { KDouble Kotlin_native_long_bits_to_double(KLong x) {
union { union {
int64_t x; int64_t x;
double d; double d;
@@ -638,7 +638,7 @@ OutOfMemory:
#pragma optimize("",on) /*restore optimizations */ #pragma optimize("",on) /*restore optimizations */
#endif #endif
KDouble Konan_FloatingPointParser_parseDoubleImpl (KString s, KInt e) KDouble Kotlin_native_FloatingPointParser_parseDoubleImpl (KString s, KInt e)
{ {
const KChar* utf16 = CharArrayAddressOfElementAt(s, 0); const KChar* utf16 = CharArrayAddressOfElementAt(s, 0);
KStdString utf8; KStdString utf8;
@@ -691,7 +691,7 @@ KDouble Konan_FloatingPointParser_parseDoubleImpl (KString s, KInt e)
* 1.2341234124312331E107 * 1.2341234124312331E107
* *
*/ */
void Konan_NumberConverter_bigIntDigitGeneratorInstImpl (KRef results, void Kotlin_native_NumberConverter_bigIntDigitGeneratorInstImpl (KRef results,
KRef uArray, KRef uArray,
KLong f, KLong f,
KInt e, KInt e,
+2 -2
View File
@@ -39,7 +39,7 @@
#define DEFAULT_WIDTH MAX_ACCURACY_WIDTH #define DEFAULT_WIDTH MAX_ACCURACY_WIDTH
extern "C" KFloat Konan_int_bits_to_float(KInt x) { extern "C" KFloat Kotlin_native_int_bits_to_float(KInt x) {
union { union {
int32_t x; int32_t x;
float f; float f;
@@ -538,7 +538,7 @@ OutOfMemory:
#endif #endif
extern "C" KFloat extern "C" KFloat
Konan_FloatingPointParser_parseFloatImpl(KString s, KInt e) Kotlin_native_FloatingPointParser_parseFloatImpl(KString s, KInt e)
{ {
const KChar* utf16 = CharArrayAddressOfElementAt(s, 0); const KChar* utf16 = CharArrayAddressOfElementAt(s, 0);
KStdString utf8; KStdString utf8;
+2 -2
View File
@@ -15,8 +15,8 @@
*/ */
package kotlin package kotlin
import konan.internal.ExportForCompiler import kotlin.native.internal.ExportForCompiler
import konan.internal.InlineConstructor import kotlin.native.internal.InlineConstructor
// TODO: remove that, as RTTI shall be per instantiation. // TODO: remove that, as RTTI shall be per instantiation.
@ExportTypeInfo("theArrayTypeInfo") @ExportTypeInfo("theArrayTypeInfo")
+1 -1
View File
@@ -19,7 +19,7 @@
package kotlin package kotlin
import konan.internal.InlineConstructor import kotlin.native.internal.InlineConstructor
import kotlin.collections.* import kotlin.collections.*
import kotlin.internal.PureReifiable import kotlin.internal.PureReifiable
import kotlin.util.sortArrayComparable import kotlin.util.sortArrayComparable
+3 -3
View File
@@ -20,7 +20,7 @@ package kotlin
* Represents a value which is either `true` or `false`. On the JVM, non-nullable values of this type are * Represents a value which is either `true` or `false`. On the JVM, non-nullable values of this type are
* represented as values of the primitive type `boolean`. * represented as values of the primitive type `boolean`.
*/ */
public final class Boolean private constructor(private val value: konan.internal.BooleanValue) : Comparable<Boolean> { public final class Boolean private constructor(private val value: kotlin.native.internal.BooleanValue) : Comparable<Boolean> {
/** /**
* Returns the inverse of this boolean. * Returns the inverse of this boolean.
*/ */
@@ -49,10 +49,10 @@ public final class Boolean private constructor(private val value: konan.internal
external public override fun compareTo(other: Boolean): Int external public override fun compareTo(other: Boolean): Int
// Konan-specific. // Konan-specific.
public fun equals(other: Boolean): Boolean = konan.internal.areEqualByValue(this, other) public fun equals(other: Boolean): Boolean = kotlin.native.internal.areEqualByValue(this, other)
public override fun equals(other: Any?): Boolean = public override fun equals(other: Any?): Boolean =
other is Boolean && konan.internal.areEqualByValue(this, other) other is Boolean && kotlin.native.internal.areEqualByValue(this, other)
public override fun toString() = if (this) "true" else "false" public override fun toString() = if (this) "true" else "false"
+1 -1
View File
@@ -20,7 +20,7 @@ package kotlin
* Represents a 16-bit Unicode character. * Represents a 16-bit Unicode character.
* On the JVM, non-nullable values of this type are represented as values of the primitive type `char`. * On the JVM, non-nullable values of this type are represented as values of the primitive type `char`.
*/ */
public final class Char private constructor(private val value: konan.internal.ShortValue) : Comparable<Char> { public final class Char private constructor(private val value: kotlin.native.internal.ShortValue) : Comparable<Char> {
/** /**
* Compares this value with the specified value for order. * Compares this value with the specified value for order.
+15 -15
View File
@@ -16,13 +16,13 @@
package kotlin package kotlin
import konan.internal.NumberConverter import kotlin.native.internal.NumberConverter
/** /**
* Represents a 8-bit signed integer. * Represents a 8-bit signed integer.
* On the JVM, non-nullable values of this type are represented as values of the primitive type `byte`. * On the JVM, non-nullable values of this type are represented as values of the primitive type `byte`.
*/ */
public final class Byte private constructor(private val value: konan.internal.ByteValue) : Number(), Comparable<Byte> { public final class Byte private constructor(private val value: kotlin.native.internal.ByteValue) : Number(), Comparable<Byte> {
companion object { companion object {
/** /**
* A constant holding the minimum value an instance of Byte can have. * A constant holding the minimum value an instance of Byte can have.
@@ -219,10 +219,10 @@ public final class Byte private constructor(private val value: konan.internal.By
} }
// Konan-specific. // Konan-specific.
public fun equals(other: Byte): Boolean = konan.internal.areEqualByValue(this, other) public fun equals(other: Byte): Boolean = kotlin.native.internal.areEqualByValue(this, other)
public override fun equals(other: Any?): Boolean = public override fun equals(other: Any?): Boolean =
other is Byte && konan.internal.areEqualByValue(this, other) other is Byte && kotlin.native.internal.areEqualByValue(this, other)
@SymbolName("Kotlin_Byte_toString") @SymbolName("Kotlin_Byte_toString")
external public override fun toString(): String external public override fun toString(): String
@@ -236,7 +236,7 @@ public final class Byte private constructor(private val value: konan.internal.By
* Represents a 16-bit signed integer. * Represents a 16-bit signed integer.
* On the JVM, non-nullable values of this type are represented as values of the primitive type `short`. * On the JVM, non-nullable values of this type are represented as values of the primitive type `short`.
*/ */
public final class Short private constructor(private val value: konan.internal.ShortValue) : Number(), Comparable<Short> { public final class Short private constructor(private val value: kotlin.native.internal.ShortValue) : Number(), Comparable<Short> {
companion object { companion object {
/** /**
* A constant holding the minimum value an instance of Short can have. * A constant holding the minimum value an instance of Short can have.
@@ -433,10 +433,10 @@ public final class Short private constructor(private val value: konan.internal.S
external public override fun toDouble(): Double external public override fun toDouble(): Double
// Konan-specific. // Konan-specific.
public fun equals(other: Short): Boolean = konan.internal.areEqualByValue(this, other) public fun equals(other: Short): Boolean = kotlin.native.internal.areEqualByValue(this, other)
public override fun equals(other: Any?): Boolean = public override fun equals(other: Any?): Boolean =
other is Short && konan.internal.areEqualByValue(this, other) other is Short && kotlin.native.internal.areEqualByValue(this, other)
@SymbolName("Kotlin_Short_toString") @SymbolName("Kotlin_Short_toString")
external public override fun toString(): String external public override fun toString(): String
@@ -450,7 +450,7 @@ public final class Short private constructor(private val value: konan.internal.S
* Represents a 32-bit signed integer. * Represents a 32-bit signed integer.
* On the JVM, non-nullable values of this type are represented as values of the primitive type `int`. * On the JVM, non-nullable values of this type are represented as values of the primitive type `int`.
*/ */
public final class Int private constructor(private val value: konan.internal.IntValue) : Number(), Comparable<Int> { public final class Int private constructor(private val value: kotlin.native.internal.IntValue) : Number(), Comparable<Int> {
companion object { companion object {
/** /**
* A constant holding the minimum value an instance of Int can have. * A constant holding the minimum value an instance of Int can have.
@@ -669,10 +669,10 @@ public final class Int private constructor(private val value: konan.internal.Int
external public override fun toDouble(): Double external public override fun toDouble(): Double
// Konan-specific. // Konan-specific.
public fun equals(other: Int): Boolean = konan.internal.areEqualByValue(this, other) public fun equals(other: Int): Boolean = kotlin.native.internal.areEqualByValue(this, other)
public override fun equals(other: Any?): Boolean = public override fun equals(other: Any?): Boolean =
other is Int && konan.internal.areEqualByValue(this, other) other is Int && kotlin.native.internal.areEqualByValue(this, other)
@SymbolName("Kotlin_Int_toString") @SymbolName("Kotlin_Int_toString")
external public override fun toString(): String external public override fun toString(): String
@@ -686,7 +686,7 @@ public final class Int private constructor(private val value: konan.internal.Int
* Represents a 64-bit signed integer. * Represents a 64-bit signed integer.
* On the JVM, non-nullable values of this type are represented as values of the primitive type `long`. * On the JVM, non-nullable values of this type are represented as values of the primitive type `long`.
*/ */
public final class Long private constructor(private val value: konan.internal.LongValue) : Number(), Comparable<Long> { public final class Long private constructor(private val value: kotlin.native.internal.LongValue) : Number(), Comparable<Long> {
companion object { companion object {
/** /**
* A constant holding the minimum value an instance of Long can have. * A constant holding the minimum value an instance of Long can have.
@@ -905,10 +905,10 @@ public final class Long private constructor(private val value: konan.internal.Lo
external public override fun toDouble(): Double external public override fun toDouble(): Double
// Konan-specific. // Konan-specific.
public fun equals(other: Long): Boolean = konan.internal.areEqualByValue(this, other) public fun equals(other: Long): Boolean = kotlin.native.internal.areEqualByValue(this, other)
public override fun equals(other: Any?): Boolean = public override fun equals(other: Any?): Boolean =
other is Long && konan.internal.areEqualByValue(this, other) other is Long && kotlin.native.internal.areEqualByValue(this, other)
@SymbolName("Kotlin_Long_toString") @SymbolName("Kotlin_Long_toString")
external public override fun toString(): String external public override fun toString(): String
@@ -922,7 +922,7 @@ public final class Long private constructor(private val value: konan.internal.Lo
* Represents a single-precision 32-bit IEEE 754 floating point number. * Represents a single-precision 32-bit IEEE 754 floating point number.
* On the JVM, non-nullable values of this type are represented as values of the primitive type `float`. * On the JVM, non-nullable values of this type are represented as values of the primitive type `float`.
*/ */
public final class Float private constructor(private val value: konan.internal.FloatValue) : Number(), Comparable<Float> { public final class Float private constructor(private val value: kotlin.native.internal.FloatValue) : Number(), Comparable<Float> {
companion object { companion object {
/** /**
* A constant holding the smallest *positive* nonzero value of Float. * A constant holding the smallest *positive* nonzero value of Float.
@@ -1141,7 +1141,7 @@ public final class Float private constructor(private val value: konan.internal.F
* Represents a double-precision 64-bit IEEE 754 floating point number. * Represents a double-precision 64-bit IEEE 754 floating point number.
* On the JVM, non-nullable values of this type are represented as values of the primitive type `double`. * On the JVM, non-nullable values of this type are represented as values of the primitive type `double`.
*/ */
public final class Double private constructor(private val value: konan.internal.DoubleValue) : Number(), Comparable<Double> { public final class Double private constructor(private val value: kotlin.native.internal.DoubleValue) : Number(), Comparable<Double> {
companion object { companion object {
/** /**
* A constant holding the smallest *positive* nonzero value of Double. * A constant holding the smallest *positive* nonzero value of Double.
+1 -1
View File
@@ -17,7 +17,7 @@
package kotlin package kotlin
@ExportTypeInfo("theStringTypeInfo") @ExportTypeInfo("theStringTypeInfo")
@konan.internal.Frozen @kotlin.native.internal.Frozen
public final class String : Comparable<String>, CharSequence { public final class String : Comparable<String>, CharSequence {
public companion object { public companion object {
} }

Some files were not shown because too many files have changed in this diff Show More