diff --git a/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Generated.kt b/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Generated.kt index 1ecf951711c..323811d4e53 100644 --- a/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Generated.kt +++ b/Interop/Runtime/src/main/kotlin/kotlinx/cinterop/Generated.kt @@ -134,16 +134,13 @@ inline operator fun > CPointer?.plus(index: Int): CPointer< inline operator fun CPointer>.get(index: Int): T = (this + index)!!.pointed.value -@JvmName("set\$UByte") inline operator fun CPointer>.set(index: Int, value: T) { (this + index)!!.pointed.value = value } -@JvmName("get\$UByte") inline operator fun CPointer>.get(index: Long): T = (this + index)!!.pointed.value -@JvmName("set\$UByte") inline operator fun CPointer>.set(index: Long, value: T) { (this + index)!!.pointed.value = value } @@ -160,7 +157,6 @@ inline operator fun > CPointer?.plus(index: Int): CPointer inline operator fun CPointer>.get(index: Int): T = (this + index)!!.pointed.value -@JvmName("set\$UShort") inline operator fun CPointer>.set(index: Int, value: T) { (this + index)!!.pointed.value = value } @@ -169,7 +165,6 @@ inline operator fun CPointer>.set(index: Int, value: inline operator fun CPointer>.get(index: Long): T = (this + index)!!.pointed.value -@JvmName("set\$UShort") inline operator fun CPointer>.set(index: Long, value: T) { (this + index)!!.pointed.value = value } @@ -186,7 +181,6 @@ inline operator fun > CPointer?.plus(index: Int): CPointer CPointer>.get(index: Int): T = (this + index)!!.pointed.value -@JvmName("set\$UInt") inline operator fun CPointer>.set(index: Int, value: T) { (this + index)!!.pointed.value = value } @@ -195,7 +189,6 @@ inline operator fun CPointer>.set(index: Int, value: T) inline operator fun CPointer>.get(index: Long): T = (this + index)!!.pointed.value -@JvmName("set\$UInt") inline operator fun CPointer>.set(index: Long, value: T) { (this + index)!!.pointed.value = value } @@ -212,7 +205,6 @@ inline operator fun > CPointer?.plus(index: Int): CPointer< inline operator fun CPointer>.get(index: Int): T = (this + index)!!.pointed.value -@JvmName("set\$ULong") inline operator fun CPointer>.set(index: Int, value: T) { (this + index)!!.pointed.value = value } @@ -221,7 +213,6 @@ inline operator fun CPointer>.set(index: Int, value: T inline operator fun CPointer>.get(index: Long): T = (this + index)!!.pointed.value -@JvmName("set\$ULong") inline operator fun CPointer>.set(index: Long, value: T) { (this + index)!!.pointed.value = value } @@ -322,4 +313,4 @@ gen ULong 8 gen Float 4 gen Double 8 - */ \ No newline at end of file + */ diff --git a/backend.native/build.gradle b/backend.native/build.gradle index 3785c528d23..7a38e97fbfb 100644 --- a/backend.native/build.gradle +++ b/backend.native/build.gradle @@ -183,6 +183,7 @@ targetList.each { target -> '-Xmulti-platform', '-Xuse-experimental=kotlin.Experimental', '-Xuse-experimental=kotlin.contracts.ExperimentalContracts', '-Xuse-experimental=kotlin.ExperimentalMultiplatform', + '-Xallow-result-return-type', commonSrc.absolutePath, project(':Interop:Runtime').file('src/main/kotlin'), project(':Interop:Runtime').file('src/native/kotlin'), diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/irasdescriptors/FakeIrUtils.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/irasdescriptors/FakeIrUtils.kt index 4ad7bbee636..4f5602ab050 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/irasdescriptors/FakeIrUtils.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/irasdescriptors/FakeIrUtils.kt @@ -7,7 +7,6 @@ package org.jetbrains.kotlin.backend.konan.irasdescriptors import org.jetbrains.kotlin.backend.konan.* import org.jetbrains.kotlin.backend.konan.llvm.llvmSymbolOrigin -import org.jetbrains.kotlin.idea.MainFunctionDetector import org.jetbrains.kotlin.ir.declarations.* import org.jetbrains.kotlin.ir.types.IrType import org.jetbrains.kotlin.ir.types.toKotlinType @@ -38,7 +37,5 @@ internal fun IrFunction.isExternalObjCClassMethod() = this.descriptor.isExternal internal val IrDeclaration.llvmSymbolOrigin get() = this.descriptor.llvmSymbolOrigin -internal fun IrFunction.isMain() = MainFunctionDetector.isMain(this.descriptor) - internal fun IrType.isObjCObjectType() = this.toKotlinType().isObjCObjectType() diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmDeclarations.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmDeclarations.kt index 385b96b4fa8..12763332655 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmDeclarations.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/llvm/LlvmDeclarations.kt @@ -407,7 +407,7 @@ private class DeclarationsGeneratorVisitor(override val context: Context) : } else { val symbolName = if (descriptor.isExported()) { descriptor.symbolName.also { - if (!descriptor.isMain()) { + if (descriptor.name.asString() != "main") { assert(LLVMGetNamedFunction(context.llvm.llvmModule, it) == null) { it } } else { // As a workaround, allow `main` functions to clash because frontend accepts this. diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index 7c8059b0c91..3ced68dd29e 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -43,7 +43,7 @@ repositories { dependencies { cli_bc project(path: ':backend.native', configuration: 'cli_bc') - update_tests (group: 'org', name: 'Kotlin_dev_CompilerAllPlugins', version: testKotlinVersion) { + update_tests (group: 'org', name: 'Kotlin_130_Compiler', version: testKotlinVersion) { artifact { name = 'internal/kotlin-test-data' type = 'zip' diff --git a/gradle.properties b/gradle.properties index 83d10b85219..453d09d17ba 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,13 +15,13 @@ # # A version of the Kotlin "toolchain" (compiler, runtime, stdlib etc) used by the build script. -buildKotlinVersion=1.3-M2 -buildKotlinCompilerRepo=http://dl.bintray.com/kotlin/kotlin-eap +buildKotlinVersion=1.3.0-rc-6 +buildKotlinCompilerRepo=http://dl.bintray.com/kotlin/kotlin-dev remoteRoot=konan_tests testDataVersion=1226829:id -kotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_dev_CompilerAllPlugins),number:1.3.0-dev-391,tag:kotlin-native,pinned:true,branch:(default:any)/artifacts/content/maven -kotlinVersion=1.3.0-dev-391 -testKotlinVersion=1.3.0-dev-391 +kotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_130_Compiler),number:1.3.0-rc-6,branch:(default:any)/artifacts/content/maven +kotlinVersion=1.3.0-rc-6 +testKotlinVersion=1.3.0-rc-6 konanVersion=0.9 org.gradle.jvmargs='-Dfile.encoding=UTF-8' org.gradle.workers.max=4 diff --git a/runtime/src/main/kotlin/kotlin/Exceptions.kt b/runtime/src/main/kotlin/kotlin/Exceptions.kt index de98b81ea06..84b2a6d555f 100644 --- a/runtime/src/main/kotlin/kotlin/Exceptions.kt +++ b/runtime/src/main/kotlin/kotlin/Exceptions.kt @@ -171,4 +171,14 @@ public open class IllegalCharacterConversionException : IllegalArgumentException constructor(): super() constructor(message: String?) : super(message) +} + +public actual open class ConcurrentModificationException actual constructor(message: String?, cause: Throwable?) : + RuntimeException(message, cause) { + + actual constructor() : this(null, null) + + actual constructor(message: String?) : this(message, null) + + actual constructor(cause: Throwable?) : this(null, cause) } \ No newline at end of file diff --git a/runtime/src/main/kotlin/kotlin/coroutines/intrinsics/IntrinsicsNative.kt b/runtime/src/main/kotlin/kotlin/coroutines/intrinsics/IntrinsicsNative.kt index 0198f920dba..8baefee5fe2 100644 --- a/runtime/src/main/kotlin/kotlin/coroutines/intrinsics/IntrinsicsNative.kt +++ b/runtime/src/main/kotlin/kotlin/coroutines/intrinsics/IntrinsicsNative.kt @@ -180,12 +180,4 @@ private inline fun createCoroutineFromSuspendFunction( else -> error("This coroutine had already completed") } } -} - -/** - * This value is used as a return value of [suspendCoroutineOrReturn] `block` argument to state that - * the execution was suspended and will not return any result immediately. - */ -@SinceKotlin("1.3") -public actual val COROUTINE_SUSPENDED: Any - get() = CoroutineSingletons.COROUTINE_SUSPENDED \ No newline at end of file +} \ No newline at end of file diff --git a/runtime/src/main/kotlin/kotlin/reflect/KCallable.kt b/runtime/src/main/kotlin/kotlin/reflect/KCallable.kt index 4c74203d1a7..a3ca665e6d4 100644 --- a/runtime/src/main/kotlin/kotlin/reflect/KCallable.kt +++ b/runtime/src/main/kotlin/kotlin/reflect/KCallable.kt @@ -12,8 +12,7 @@ import kotlin.native.internal.FixmeReflection * * @param R return type of the callable. */ -@FixmeReflection -public interface KCallable : KAnnotatedElement { +public actual interface KCallable : KAnnotatedElement { /** * The name of this callable as it was declared in the source code. * If the callable has no name, a special invented name is created. @@ -22,7 +21,7 @@ public interface KCallable : KAnnotatedElement { * - property accessors: the getter for a property named "foo" will have the name "", * the setter, similarly, will have the name "". */ - public val name: String + public actual val name: String /** * The type of values returned by this callable. diff --git a/runtime/src/main/kotlin/kotlin/reflect/KClass.kt b/runtime/src/main/kotlin/kotlin/reflect/KClass.kt index f88c3cbb81a..c7d6a5b7979 100644 --- a/runtime/src/main/kotlin/kotlin/reflect/KClass.kt +++ b/runtime/src/main/kotlin/kotlin/reflect/KClass.kt @@ -13,12 +13,12 @@ package kotlin.reflect * * @param T the type of the class. */ -public interface KClass : KDeclarationContainer, KAnnotatedElement, KClassifier { +public actual interface KClass : KDeclarationContainer, KAnnotatedElement, KClassifier { /** * The simple name of the class as it was declared in the source code, * or `null` if the class has no name (if, for example, it is an anonymous object literal). */ - public val simpleName: String? + public actual val simpleName: String? /** * The fully qualified dot-separated name of the class, diff --git a/runtime/src/main/kotlin/kotlin/reflect/KProperty.kt b/runtime/src/main/kotlin/kotlin/reflect/KProperty.kt index 42fbdfba0be..8d013c6a0c3 100644 --- a/runtime/src/main/kotlin/kotlin/reflect/KProperty.kt +++ b/runtime/src/main/kotlin/kotlin/reflect/KProperty.kt @@ -15,48 +15,40 @@ import kotlin.native.internal.FixmeReflection * * @param R the type of the property. */ -@FixmeReflection -public interface KProperty : KCallable +public actual interface KProperty : KCallable -@FixmeReflection -public interface KProperty0 : kotlin.reflect.KProperty, () -> R { +public actual interface KProperty0 : kotlin.reflect.KProperty, () -> R { - public abstract fun get(): R + public actual fun get(): R public override abstract operator fun invoke(): R } -@FixmeReflection -public interface KProperty1 : kotlin.reflect.KProperty, (T) -> R { - public abstract fun get(p1: T): R +public actual interface KProperty1 : kotlin.reflect.KProperty, (T) -> R { + public actual fun get(receiver: T): R - public override abstract operator fun invoke(p1: T): R + public override operator fun invoke(p1: T): R } -@FixmeReflection -public interface KProperty2 : kotlin.reflect.KProperty, (T1, T2) -> R { - public abstract fun get(p1: T1, p2: T2): R +public actual interface KProperty2 : kotlin.reflect.KProperty, (T1, T2) -> R { + public actual fun get(receiver1: T1, receiver2: T2): R - public override abstract operator fun invoke(p1: T1, p2: T2): R + public override operator fun invoke(p1: T1, p2: T2): R } /** * Represents a property declared as a `var`. */ -@FixmeReflection -public interface KMutableProperty : KProperty +public actual interface KMutableProperty : KProperty -@FixmeReflection -public interface KMutableProperty0 : KProperty0, KMutableProperty { - public abstract fun set(value: R) +public actual interface KMutableProperty0 : KProperty0, KMutableProperty { + public actual fun set(value: R) } -@FixmeReflection -public interface KMutableProperty1 : KProperty1, KMutableProperty { - public abstract fun set(receiver: T, value: R) +public actual interface KMutableProperty1 : KProperty1, KMutableProperty { + public actual fun set(receiver: T, value: R) } -@FixmeReflection -public interface KMutableProperty2 : KProperty2, KMutableProperty { - public abstract fun set(receiver1: T1, receiver2: T2, value: R) +public actual interface KMutableProperty2 : KProperty2, KMutableProperty { + public actual fun set(receiver1: T1, receiver2: T2, value: R) } \ No newline at end of file diff --git a/samples/calculator/android/build.gradle b/samples/calculator/android/build.gradle index 0e2b6dd6944..3c9cf238013 100644 --- a/samples/calculator/android/build.gradle +++ b/samples/calculator/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.3-M2' + ext.kotlin_version = '1.3.0-rc-6' repositories { google() diff --git a/samples/calculator/build.gradle b/samples/calculator/build.gradle index 71d73abb85b..bfefa0e3edf 100644 --- a/samples/calculator/build.gradle +++ b/samples/calculator/build.gradle @@ -1,12 +1,12 @@ allprojects { buildscript { repositories { - maven { url "http://dl.bintray.com/kotlin/kotlin-eap" } + maven { url "http://dl.bintray.com/kotlin/kotlin-dev" } } } repositories { - maven { url "http://dl.bintray.com/kotlin/kotlin-eap" } + maven { url "http://dl.bintray.com/kotlin/kotlin-dev" } } } @@ -20,4 +20,4 @@ task clean { subprojects.each { dependsOn("${it.path}:clean") } -} \ No newline at end of file +} diff --git a/samples/calculator/common/build.gradle b/samples/calculator/common/build.gradle index 241d8d4e898..81b0de4d771 100644 --- a/samples/calculator/common/build.gradle +++ b/samples/calculator/common/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.3-M2' + ext.kotlin_version = '1.3.0-rc-6' repositories { mavenCentral() diff --git a/samples/calculator/jvm/build.gradle b/samples/calculator/jvm/build.gradle index ca9f3f91643..4ea69932403 100644 --- a/samples/calculator/jvm/build.gradle +++ b/samples/calculator/jvm/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.3-M2' + ext.kotlin_version = '1.3.0-rc-6' repositories { mavenCentral() diff --git a/tools/kotlin-native-gradle-plugin/build.gradle b/tools/kotlin-native-gradle-plugin/build.gradle index d52e5fd9a84..c0998571ef4 100644 --- a/tools/kotlin-native-gradle-plugin/build.gradle +++ b/tools/kotlin-native-gradle-plugin/build.gradle @@ -79,8 +79,8 @@ dependencies { bundleDependencies "org.jetbrains.kotlin:kotlin-native-shared:$konanVersion" testImplementation 'junit:junit:4.12' - testImplementation "org.jetbrains.kotlin:kotlin-test:1.3-M2" - testImplementation "org.jetbrains.kotlin:kotlin-test-junit:1.3-M2" + testImplementation "org.jetbrains.kotlin:kotlin-test:1.3.0-rc-6" + testImplementation "org.jetbrains.kotlin:kotlin-test-junit:1.3.0-rc-6" testImplementation "org.tools4j:tools4j-spockito:1.6" testImplementation('org.spockframework:spock-core:1.1-groovy-2.4') { exclude module: 'groovy-all'