[K/N] Added function SetCurrentFrame to use in unwind block

This commit is contained in:
Elena Lepilkina
2021-09-29 17:49:02 +03:00
committed by Space
parent 42c213d950
commit cde51ecc3a
12 changed files with 91 additions and 20 deletions
@@ -18,6 +18,7 @@
#define RUNTIME_MEMORY_H
#include <utility>
#include <functional>
#include "KAssert.h"
#include "Common.h"
@@ -122,6 +123,7 @@ ALWAYS_INLINE inline bool isNullOrMarker(const ObjHeader* obj) noexcept {
}
class ForeignRefManager;
struct FrameOverlay;
typedef ForeignRefManager* ForeignRefContext;
#ifdef __cplusplus
@@ -241,6 +243,10 @@ OBJ_GETTER(ReadHeapRefNoLock, ObjHeader* object, int32_t index);
void EnterFrame(ObjHeader** start, int parameters, int count) RUNTIME_NOTHROW;
// Called on frame leave, if it has object slots.
void LeaveFrame(ObjHeader** start, int parameters, int count) RUNTIME_NOTHROW;
// Set current frame in case if exception caught.
void SetCurrentFrame(ObjHeader** start) RUNTIME_NOTHROW;
FrameOverlay* getCurrentFrame() RUNTIME_NOTHROW;
// Clears object subgraph references from memory subsystem, and optionally
// checks if subgraph referenced by given root is disjoint from the rest of
// object graph, i.e. no external references exists.