From 49e545c24457ae32db55813c3769af71ebf6a736 Mon Sep 17 00:00:00 2001 From: Kunshan Wang Date: Sun, 28 Apr 2024 10:44:43 +0800 Subject: [PATCH] Introduce NullableObjectReference ObjectReference is now non-nullable, while NullableObjectReference is used to pass values to C. --- internal/mmtk.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/mmtk.h b/internal/mmtk.h index a60d83e9515cef..467e9170f72216 100644 --- a/internal/mmtk.h +++ b/internal/mmtk.h @@ -19,6 +19,7 @@ typedef rb_thread_t* MMTk_VMMutatorThread; typedef struct MMTk_GCThreadTLS* MMTk_VMWorkerThread; typedef void* MMTk_Address; typedef void* MMTk_ObjectReference; +typedef void* MMTk_NullableObjectReference; typedef uint32_t MMTk_AllocationSemantics; @@ -164,7 +165,7 @@ bool mmtk_is_reachable(MMTk_ObjectReference object); bool mmtk_is_live_object(MMTk_ObjectReference object); -MMTk_ObjectReference mmtk_get_forwarded_object(MMTk_ObjectReference object); +MMTk_NullableObjectReference mmtk_get_forwarded_object(MMTk_ObjectReference object); bool mmtk_is_mmtk_object(MMTk_Address addr);