aboutsummaryrefslogtreecommitdiffstats
path: root/kotlinx-coroutines-core/native/src/Debug.kt
diff options
context:
space:
mode:
Diffstat (limited to 'kotlinx-coroutines-core/native/src/Debug.kt')
-rw-r--r--kotlinx-coroutines-core/native/src/Debug.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/kotlinx-coroutines-core/native/src/Debug.kt b/kotlinx-coroutines-core/native/src/Debug.kt
index a0a8d272..f17c2ed7 100644
--- a/kotlinx-coroutines-core/native/src/Debug.kt
+++ b/kotlinx-coroutines-core/native/src/Debug.kt
@@ -5,14 +5,12 @@
package kotlinx.coroutines
import kotlin.math.*
+import kotlin.native.*
internal actual val DEBUG: Boolean = false
-internal actual val Any.hexAddress: String get() = abs(id().let { if (it == Int.MIN_VALUE) 0 else it }).toString(16)
+internal actual val Any.hexAddress: String get() = identityHashCode().toUInt().toString(16)
internal actual val Any.classSimpleName: String get() = this::class.simpleName ?: "Unknown"
-@SymbolName("Kotlin_Any_hashCode")
-public external fun Any.id(): Int // Note: can return negative value on K/N
-
internal actual inline fun assert(value: () -> Boolean) {}