diff options
author | Peter Zhu <peter@peterzhu.ca> | 2023-03-16 15:13:32 -0400 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2023-03-17 11:12:45 -0400 |
commit | a206ee670969ce213ec0da4d1d5b65d24259efd4 (patch) | |
tree | 9fa10ac47942a8dd41c896b8b75ece3cf6031103 /gc.c | |
parent | 11f299fab749bd2e0c5e49ca4db8c9c84b8e5970 (diff) |
Assume that FL_FINALIZE is in finalizer_table
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7545
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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)); |