diff --git a/libraries/stdlib/common/src/kotlin/CollectionsH.kt b/libraries/stdlib/common/src/kotlin/CollectionsH.kt index 68c75e05d1d..4d6582e9d85 100644 --- a/libraries/stdlib/common/src/kotlin/CollectionsH.kt +++ b/libraries/stdlib/common/src/kotlin/CollectionsH.kt @@ -167,3 +167,8 @@ public expect fun Grouping.eachCount(): Map internal expect fun copyToArrayImpl(collection: Collection<*>): Array internal expect fun copyToArrayImpl(collection: Collection<*>, array: Array): Array + +internal expect fun arrayOfNulls(reference: Array, size: Int): Array +internal expect fun Map.toSingletonMapOrSelf(): Map +internal expect fun Map.toSingletonMap(): Map +internal expect fun Array.copyToArrayOfAny(isVarargs: Boolean): Array diff --git a/libraries/stdlib/common/src/kotlin/ConsoleH.kt b/libraries/stdlib/common/src/kotlin/ConsoleH.kt deleted file mode 100644 index 6b976c0e66c..00000000000 --- a/libraries/stdlib/common/src/kotlin/ConsoleH.kt +++ /dev/null @@ -1,11 +0,0 @@ -package kotlin.io - - -/** Prints a newline to the standard output stream. */ -public expect fun println() - -/** Prints the given message and newline to the standard output stream. */ -public expect fun println(message: Any?) - -/** Prints the given message to the standard output stream. */ -public expect fun print(message: Any?) diff --git a/libraries/stdlib/common/src/kotlin/JvmAnnotationsH.kt b/libraries/stdlib/common/src/kotlin/JvmAnnotationsH.kt index 13a26f3647c..001c7a6b15e 100644 --- a/libraries/stdlib/common/src/kotlin/JvmAnnotationsH.kt +++ b/libraries/stdlib/common/src/kotlin/JvmAnnotationsH.kt @@ -25,3 +25,6 @@ expect annotation class JvmName(val name: String) expect annotation class JvmMultifileClass() expect annotation class JvmField() + +@Target(FIELD) +expect annotation class Volatile() \ No newline at end of file diff --git a/libraries/stdlib/common/src/kotlin/KotlinH.kt b/libraries/stdlib/common/src/kotlin/KotlinH.kt index d85504020f1..c0cfd5d9eed 100644 --- a/libraries/stdlib/common/src/kotlin/KotlinH.kt +++ b/libraries/stdlib/common/src/kotlin/KotlinH.kt @@ -74,12 +74,7 @@ expect inline fun Comparator(crossinline comparison: (a: T, b: T) -> Int): C // From kotlin.kt -internal expect fun arrayOfNulls(reference: Array, size: Int): Array -internal inline expect fun Map.toSingletonMapOrSelf(): Map -internal inline expect fun Map.toSingletonMap(): Map -internal inline expect fun Array.copyToArrayOfAny(isVarargs: Boolean): Array -internal expect interface Serializable // From numbers.kt @@ -135,8 +130,8 @@ public expect fun Float.Companion.fromBits(bits: Int): Float // From concurrent.kt -@Target(PROPERTY, FIELD) -expect annotation class Volatile() +@Deprecated("Use Volatile annotation from kotlin.jvm package", ReplaceWith("kotlin.jvm.Volatile"), level = DeprecationLevel.WARNING) +public typealias Volatile = kotlin.jvm.Volatile public expect inline fun synchronized(lock: Any, block: () -> R): R diff --git a/libraries/stdlib/common/src/kotlin/ioH.kt b/libraries/stdlib/common/src/kotlin/ioH.kt new file mode 100644 index 00000000000..9856cff5483 --- /dev/null +++ b/libraries/stdlib/common/src/kotlin/ioH.kt @@ -0,0 +1,30 @@ +/* + * Copyright 2010-2017 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package kotlin.io + + +/** Prints a newline to the standard output stream. */ +public expect fun println() + +/** Prints the given message and newline to the standard output stream. */ +public expect fun println(message: Any?) + +/** Prints the given message to the standard output stream. */ +public expect fun print(message: Any?) + + +internal expect interface Serializable