[K/N] Any.isFrozen is now always false when freezing is disabled

This commit is contained in:
Pavel Kunyavskiy
2022-01-19 16:15:20 +03:00
committed by Space
parent 35ef8cc6da
commit 3798920183
20 changed files with 116 additions and 50 deletions
@@ -15,6 +15,7 @@ RUNTIME_WEAK int32_t Kotlin_destroyRuntimeMode = 1;
RUNTIME_WEAK int32_t Kotlin_gcSchedulerType = 2;
RUNTIME_WEAK int32_t Kotlin_workerExceptionHandling = 0;
RUNTIME_WEAK int32_t Kotlin_freezingEnabled = 1;
RUNTIME_WEAK int32_t Kotlin_freezingChecksEnabled = 1;
RUNTIME_WEAK const Kotlin_getSourceInfo_FunctionType Kotlin_getSourceInfo_Function = nullptr;
#ifdef KONAN_ANDROID
RUNTIME_WEAK int32_t Kotlin_printToAndroidLogcat = 1;
@@ -32,6 +33,10 @@ ALWAYS_INLINE bool compiler::freezingEnabled() noexcept {
return Kotlin_freezingEnabled != 0;
}
ALWAYS_INLINE bool compiler::freezingChecksEnabled() noexcept {
return Kotlin_freezingChecksEnabled != 0;
}
ALWAYS_INLINE compiler::GCSchedulerType compiler::getGCSchedulerType() noexcept {
return static_cast<compiler::GCSchedulerType>(Kotlin_gcSchedulerType);
}