Skip to content

Commit 0215b78

Browse files
committed
psweep: Add assume in gc.c
1 parent 3da4ec5 commit 0215b78

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

gc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2422,7 +2422,9 @@ obj_free_object_id(VALUE obj, bool in_user_gc_thread)
24222422
bool
24232423
rb_gc_obj_free_concurrency_safe_vm_weak_references(VALUE obj)
24242424
{
2425+
ASSUME(!RB_SPECIAL_CONST_P(obj));
24252426
bool result = obj_free_object_id(obj, false);
2427+
24262428
if (RB_UNLIKELY(rb_obj_gen_fields_p(obj))) {
24272429
bool freed_generic = rb_free_generic_ivar(obj);
24282430
if (!freed_generic) result = false;

0 commit comments

Comments
 (0)