[K/N] Replaced safe points to prologue

This commit is contained in:
Elena Lepilkina
2021-10-27 18:43:51 +03:00
committed by Space
parent 15dcfa2837
commit f67941e244
11 changed files with 38 additions and 58 deletions
+2 -8
View File
@@ -533,10 +533,10 @@ extern "C" void CheckGlobalsAccessible() {
// Always accessible
}
extern "C" RUNTIME_NOTHROW ALWAYS_INLINE void Kotlin_mm_safePointFunctionEpilogue() {
extern "C" RUNTIME_NOTHROW ALWAYS_INLINE void Kotlin_mm_safePointFunctionPrologue() {
auto* threadData = mm::ThreadRegistry::Instance().CurrentThreadData();
AssertThreadState(threadData, ThreadState::kRunnable);
threadData->gc().SafePointFunctionEpilogue();
threadData->gc().SafePointFunctionPrologue();
}
extern "C" RUNTIME_NOTHROW ALWAYS_INLINE void Kotlin_mm_safePointWhileLoopBody() {
@@ -545,12 +545,6 @@ extern "C" RUNTIME_NOTHROW ALWAYS_INLINE void Kotlin_mm_safePointWhileLoopBody()
threadData->gc().SafePointLoopBody();
}
extern "C" RUNTIME_NOTHROW ALWAYS_INLINE void Kotlin_mm_safePointExceptionUnwind() {
auto* threadData = mm::ThreadRegistry::Instance().CurrentThreadData();
AssertThreadState(threadData, ThreadState::kRunnable);
threadData->gc().SafePointExceptionUnwind();
}
extern "C" ALWAYS_INLINE RUNTIME_NOTHROW void Kotlin_mm_switchThreadStateNative() {
SwitchThreadState(mm::ThreadRegistry::Instance().CurrentThreadData(), ThreadState::kNative);
}