[K/N] Move kotlin.native.internal.Debugging into kotlin.native.runtime
As a part of efforts to stabilize Native stdlib #KT-55765.
This commit is contained in:
@@ -11,7 +11,7 @@ fun main() {
|
||||
|
||||
// TODO: the test used to work with forceCheckedShutdown,
|
||||
// but it is broken now. Revisit after it is fixed.
|
||||
// kotlin.native.internal.Debugging.forceCheckedShutdown = true
|
||||
// kotlin.native.runtime.Debugging.forceCheckedShutdown = true
|
||||
Platform.isCleanersLeakCheckerActive = true
|
||||
|
||||
val f = Foo()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class)
|
||||
|
||||
import leakMemory.*
|
||||
import kotlin.native.concurrent.*
|
||||
import kotlin.native.Platform
|
||||
@@ -16,7 +18,7 @@ fun ensureInititalized() {
|
||||
|
||||
fun main() {
|
||||
Platform.isMemoryLeakCheckerActive = true
|
||||
kotlin.native.internal.Debugging.forceCheckedShutdown = true
|
||||
kotlin.native.runtime.Debugging.forceCheckedShutdown = true
|
||||
assertTrue(global.value == 0)
|
||||
// Created a thread, made sure Kotlin is initialized there.
|
||||
test_RunInNewThread(staticCFunction(::ensureInititalized))
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class)
|
||||
|
||||
import leakMemory.*
|
||||
import kotlin.native.concurrent.*
|
||||
import kotlin.native.Platform
|
||||
@@ -16,7 +18,7 @@ fun ensureInititalized() {
|
||||
|
||||
fun main() {
|
||||
Platform.isMemoryLeakCheckerActive = true
|
||||
kotlin.native.internal.Debugging.forceCheckedShutdown = false
|
||||
kotlin.native.runtime.Debugging.forceCheckedShutdown = false
|
||||
assertTrue(global.value == 0)
|
||||
// Created a thread, made sure Kotlin is initialized there.
|
||||
test_RunInNewThread(staticCFunction(::ensureInititalized))
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
@file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class)
|
||||
|
||||
import objclib.*
|
||||
import kotlin.native.concurrent.*
|
||||
import kotlinx.cinterop.*
|
||||
@@ -19,6 +21,6 @@ fun main() {
|
||||
if (Platform.memoryModel == MemoryModel.EXPERIMENTAL) {
|
||||
// Experimental MM by default doesn't run GC neither on worker termination nor on program exit.
|
||||
// Enforce GC on program exit:
|
||||
kotlin.native.internal.Debugging.forceCheckedShutdown = true
|
||||
kotlin.native.runtime.Debugging.forceCheckedShutdown = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import kotlin.test.*
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
// Test relies on full deinitialization at shutdown.
|
||||
kotlin.native.internal.Debugging.forceCheckedShutdown = true
|
||||
kotlin.native.runtime.Debugging.forceCheckedShutdown = true
|
||||
autoreleasepool {
|
||||
run()
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ import kotlin.test.*
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
// Test relies on full deinitialization at shutdown.
|
||||
kotlin.native.internal.Debugging.forceCheckedShutdown = true
|
||||
kotlin.native.runtime.Debugging.forceCheckedShutdown = true
|
||||
autoreleasepool {
|
||||
run()
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
import kotlin.native.internal.Debugging
|
||||
@file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class)
|
||||
|
||||
import kotlin.native.runtime.Debugging
|
||||
import kotlin.test.*
|
||||
import kotlinx.cinterop.staticCFunction
|
||||
import threadStates.*
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
import kotlin.native.internal.Debugging
|
||||
@file:OptIn(kotlin.native.runtime.NativeRuntimeApi::class)
|
||||
|
||||
import kotlin.native.runtime.Debugging
|
||||
import kotlin.test.*
|
||||
import kotlinx.cinterop.*
|
||||
import threadStates.*
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
@file:OptIn(FreezingIsDeprecated::class, ExperimentalStdlibApi::class)
|
||||
@file:OptIn(FreezingIsDeprecated::class, ExperimentalStdlibApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||
|
||||
import kotlin.native.concurrent.*
|
||||
import kotlin.native.internal.Debugging
|
||||
import kotlin.native.runtime.Debugging
|
||||
import kotlinx.cinterop.staticCFunction
|
||||
import threadStates.*
|
||||
|
||||
|
||||
+2
-2
@@ -2,10 +2,10 @@
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
@file:OptIn(FreezingIsDeprecated::class, ExperimentalStdlibApi::class)
|
||||
@file:OptIn(FreezingIsDeprecated::class, ExperimentalStdlibApi::class, kotlin.native.runtime.NativeRuntimeApi::class)
|
||||
|
||||
import kotlin.native.concurrent.*
|
||||
import kotlin.native.internal.Debugging
|
||||
import kotlin.native.runtime.Debugging
|
||||
import kotlinx.cinterop.staticCFunction
|
||||
import threadStates.*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user