Skip to content

Commit

Permalink
Assume that FL_FINALIZE is in finalizer_table
Browse files Browse the repository at this point in the history
If the flag FL_FINALIZE is set, then it's guaranteed to be in the
finalizer_table, so we can directly assume that without checking.
  • Loading branch information
peterzhu2118 committed Mar 17, 2023
1 parent 11f299f commit a206ee6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gc.c
Expand Up @@ -9861,9 +9861,9 @@ gc_is_moveable_obj(rb_objspace_t *objspace, VALUE obj)
* prevent the objects from being collected. This check prevents
* objects that are keys in the finalizer table from being moved
* without directly pinning them. */
if (st_is_member(finalizer_table, obj)) {
return FALSE;
}
GC_ASSERT(st_is_member(finalizer_table, obj));

return FALSE;
}
GC_ASSERT(RVALUE_MARKED(obj));
GC_ASSERT(!RVALUE_PINNED(obj));
Expand Down

0 comments on commit a206ee6

Please sign in to comment.