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
@@ -3684,4 +3684,16 @@ ALWAYS_INLINE RUNTIME_NOTHROW void Kotlin_mm_switchThreadStateRunnable() {
// no-op, used by the new MM only.
}
ALWAYS_INLINE RUNTIME_NOTHROW void Kotlin_mm_safePointFunctionEpilogue() {
// no-op, used by the new MM only.
}
ALWAYS_INLINE RUNTIME_NOTHROW void Kotlin_mm_safePointWhileLoopBody() {
// no-op, used by the new MM only.
}
ALWAYS_INLINE RUNTIME_NOTHROW void Kotlin_mm_safePointExceptionUnwind() {
// no-op, used by the new MM only.
}
} // extern "C"
@@ -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
@@ -102,4 +102,16 @@ ForeignRefContext InitLocalForeignRef(ObjHeader* object) {
TODO();
}
RUNTIME_NOTHROW void Kotlin_mm_safePointFunctionEpilogue() {
TODO();
}
RUNTIME_NOTHROW void Kotlin_mm_safePointWhileLoopBody() {
TODO();
}
RUNTIME_NOTHROW void Kotlin_mm_safePointExceptionUnwind() {
TODO();
}
} // extern "C"