summaryrefslogtreecommitdiff
path: root/imemo.c
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2024-02-27 14:36:19 -0500
committerPeter Zhu <[email protected]>2024-02-27 15:49:04 -0500
commitedc7b73fc4755bb91ea16d1513993fbce5a6e244 (patch)
treea73c41b1062563b907a6604085f561394f4467d3 /imemo.c
parent7c4bf61a35a89a10ff2ef9214a27bd478241027e (diff)
Remove pointer check in moved_or_living_object_strictly_p
We don't need to check that the object is pointer to the GC heap in moved_or_living_object_strictly_p because it is called during reference updating, which does not free pages so it can never point to an object that is not on the GC heap.
Diffstat (limited to 'imemo.c')
-rw-r--r--imemo.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/imemo.c b/imemo.c
index 9bda039007..66428f39b4 100644
--- a/imemo.c
+++ b/imemo.c
@@ -215,9 +215,7 @@ rb_cc_table_mark(VALUE klass)
static bool
moved_or_living_object_strictly_p(VALUE obj)
{
- return obj &&
- rb_gc_is_ptr_to_obj((void *)obj) &&
- (rb_objspace_markable_object_p(obj) || BUILTIN_TYPE(obj) == T_MOVED);
+ return obj && (rb_objspace_markable_object_p(obj) || BUILTIN_TYPE(obj) == T_MOVED);
}
static void