summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/vm_method.c b/vm_method.c
index 1f472efb91..03d2ed09d1 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -126,27 +126,11 @@ vm_cme_invalidate(rb_callable_method_entry_t *cme)
rb_yjit_cme_invalidate((VALUE)cme);
}
-static int
-rb_clear_constant_cache_for_id_i(st_data_t ic, st_data_t idx, st_data_t arg)
-{
- ((IC) ic)->entry = NULL;
- return ST_CONTINUE;
-}
-
-// Here for backward compat.
-void rb_clear_constant_cache(void) {}
-
void
-rb_clear_constant_cache_for_id(ID id)
+rb_clear_constant_cache(void)
{
- rb_vm_t *vm = GET_VM();
- st_table *ics;
-
- if (rb_id_table_lookup(vm->constant_cache, id, (VALUE *) &ics)) {
- st_foreach(ics, rb_clear_constant_cache_for_id_i, (st_data_t) NULL);
- }
-
rb_yjit_constant_state_changed();
+ INC_GLOBAL_CONSTANT_STATE();
}
static void