Remove objspace->flags.has_newobj_hook

We aren't using this anymore and the hook is called in gc.c
This commit is contained in:
John Hawthorn 2026-01-16 12:01:15 -08:00
parent 87147ba5e9
commit c56ce8a6c1
Notes: git 2026-01-16 20:46:46 +00:00

View File

@ -505,7 +505,6 @@ typedef struct rb_objspace {
unsigned int during_compacting : 1;
unsigned int during_reference_updating : 1;
unsigned int gc_stressful: 1;
unsigned int has_newobj_hook: 1;
unsigned int during_minor_gc : 1;
unsigned int during_incremental_marking : 1;
unsigned int measure_gc : 1;
@ -1520,7 +1519,6 @@ rb_gc_impl_set_event_hook(void *objspace_ptr, const rb_event_flag_t event)
{
rb_objspace_t *objspace = objspace_ptr;
objspace->hook_events = event & RUBY_INTERNAL_EVENT_OBJSPACE_MASK;
objspace->flags.has_newobj_hook = !!(objspace->hook_events & RUBY_INTERNAL_EVENT_NEWOBJ);
}
unsigned long long