Skip to content

Commit edc7b73

Browse files
committed
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.
1 parent 7c4bf61 commit edc7b73

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

imemo.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,7 @@ rb_cc_table_mark(VALUE klass)
215215
static bool
216216
moved_or_living_object_strictly_p(VALUE obj)
217217
{
218-
return obj &&
219-
rb_gc_is_ptr_to_obj((void *)obj) &&
220-
(rb_objspace_markable_object_p(obj) || BUILTIN_TYPE(obj) == T_MOVED);
218+
return obj && (rb_objspace_markable_object_p(obj) || BUILTIN_TYPE(obj) == T_MOVED);
221219
}
222220

223221
static void

0 commit comments

Comments
 (0)