From 65f71cccc9011451fc85ba4f1a968f5adf5c0133 Mon Sep 17 00:00:00 2001 From: Shahlin Ibrahim <32275018+shahlin@users.noreply.github.com> Date: Fri, 16 Dec 2022 20:05:08 +0400 Subject: [PATCH] Fix several typos in docs of K/N runtime (#5054) --- .../runtime/src/main/kotlin/kotlin/native/Platform.kt | 2 +- .../runtime/src/main/kotlin/kotlin/native/concurrent/Lazy.kt | 2 +- .../src/main/kotlin/kotlin/native/concurrent/MutableData.kt | 2 +- .../main/kotlin/kotlin/native/concurrent/ObjectTransfer.kt | 4 ++-- .../runtime/src/main/kotlin/kotlin/native/internal/Boxing.kt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/native/Platform.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/native/Platform.kt index 4fa46fbed13..82108258192 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/native/Platform.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/native/Platform.kt @@ -70,7 +70,7 @@ public object Platform { get() = OsFamily.values()[Platform_getOsFamily()] /** - * Architechture of the CPU program executes upon. + * Architecture of the CPU program executes upon. */ public val cpuArchitecture: CpuArchitecture get() = CpuArchitecture.values()[Platform_getCpuArchitecture()] diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/native/concurrent/Lazy.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/native/concurrent/Lazy.kt index 3c522a13b0c..13ea07893db 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/native/concurrent/Lazy.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/native/concurrent/Lazy.kt @@ -122,7 +122,7 @@ internal class AtomicLazyImpl(initializer: () -> T) : Lazy { * Atomic lazy initializer, could be used in frozen objects, freezes initializing lambda, * so use very carefully. Also, as with other uses of an [AtomicReference] may potentially * leak memory, so it is recommended to use `atomicLazy` in cases of objects living forever, - * such as object signletons, or in cases where it's guaranteed not to have cyclical garbage. + * such as object singletons, or in cases where it's guaranteed not to have cyclical garbage. */ @FreezingIsDeprecated public fun atomicLazy(initializer: () -> T): Lazy = AtomicLazyImpl(initializer) diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/native/concurrent/MutableData.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/native/concurrent/MutableData.kt index c8e4f331450..3835dfc188d 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/native/concurrent/MutableData.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/native/concurrent/MutableData.kt @@ -18,7 +18,7 @@ external private fun CopyMemory(to: COpaquePointer?, from: COpaquePointer?, coun internal external fun readHeapRefNoLock(where: Any, index: Int): Any? /** - * Mutable concurrently accessible data buffer. Could be accessed from several workers simulteniously. + * Mutable concurrently accessible data buffer. Could be accessed from several workers simultaneously. */ @Frozen @NoReorderFields diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/native/concurrent/ObjectTransfer.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/native/concurrent/ObjectTransfer.kt index cdc77bfa12c..7172d5df865 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/native/concurrent/ObjectTransfer.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/native/concurrent/ObjectTransfer.kt @@ -38,11 +38,11 @@ import kotlin.native.internal.Frozen // Not @FreezingIsDeprecated: every `Worker.execute` uses this. public enum class TransferMode(val value: Int) { /** - * Reachibility check is performed. + * Reachability check is performed. */ SAFE(0), /** - * Skip reachibility check, can lead to mysterious crashes in an application. + * Skip reachability check, can lead to mysterious crashes in an application. * USE UNSAFE MODE ONLY IF ABSOLUTELY SURE WHAT YOU'RE DOING!!! */ UNSAFE(1) diff --git a/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/Boxing.kt b/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/Boxing.kt index 78fcdbd2f8b..86f07eee711 100644 --- a/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/Boxing.kt +++ b/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/Boxing.kt @@ -41,7 +41,7 @@ external fun getCachedLongBox(value: Long): Long? @GCUnsafeCall("inLongBoxCache") external fun inLongBoxCache(value: Long): Boolean -// TODO: functions below are used for ObjCExport and CAdapterGenerator, move and rename them correspondigly. +// TODO: functions below are used for ObjCExport and CAdapterGenerator, move and rename them correspondingly. @ExportForCppRuntime("Kotlin_boxBoolean") fun boxBoolean(value: Boolean): Boolean? = value