From b10500b72b2a696608015c2a2e60422a296d8614 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 10 Sep 2024 11:25:47 -0400 Subject: [PATCH] Assume VM is locked in rb_vm_ci_free The GC always locks the VM, so we don't need to lock it in rb_vm_ci_free. --- vm_method.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/vm_method.c b/vm_method.c index 4f82efbf00..bda3837f74 100644 --- a/vm_method.c +++ b/vm_method.c @@ -434,14 +434,12 @@ rb_vm_ci_lookup(ID mid, unsigned int flag, unsigned int argc, const struct rb_ca void rb_vm_ci_free(const struct rb_callinfo *ci) { + ASSERT_vm_locking(); + rb_vm_t *vm = GET_VM(); - RB_VM_LOCK_ENTER(); - { - st_data_t key = (st_data_t)ci; - st_delete(vm->ci_table, &key, NULL); - } - RB_VM_LOCK_LEAVE(); + st_data_t key = (st_data_t)ci; + st_delete(vm->ci_table, &key, NULL); } void