Mark safe points in code generator (#4640)

This commit is contained in:
Alexander Shabalin
2021-01-22 16:35:45 +03:00
committed by Nikolay Krasko
parent 9e62134ea0
commit d633b1c545
7 changed files with 48 additions and 2 deletions
@@ -44,4 +44,7 @@ void EnsureDeclarationsEmitted() {
ensureUsed(CheckGlobalsAccessible);
ensureUsed(Kotlin_mm_switchThreadStateNative);
ensureUsed(Kotlin_mm_switchThreadStateRunnable);
ensureUsed(Kotlin_mm_safePointFunctionEpilogue);
ensureUsed(Kotlin_mm_safePointWhileLoopBody);
ensureUsed(Kotlin_mm_safePointExceptionUnwind);
}
@@ -283,6 +283,11 @@ ALWAYS_INLINE RUNTIME_NOTHROW void Kotlin_mm_switchThreadStateNative();
// Sets state of the current thread to RUNNABLE (used by the new MM).
ALWAYS_INLINE RUNTIME_NOTHROW void Kotlin_mm_switchThreadStateRunnable();
// Safe point callbacks from Kotlin code generator.
void Kotlin_mm_safePointFunctionEpilogue() RUNTIME_NOTHROW;
void Kotlin_mm_safePointWhileLoopBody() RUNTIME_NOTHROW;
void Kotlin_mm_safePointExceptionUnwind() RUNTIME_NOTHROW;
#ifdef __cplusplus
}
#endif