From 69967ee64eac9ce65b83533a566d69d12a6046d0 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Fri, 25 Mar 2022 20:29:09 +0900 Subject: Revert "Finer-grained inline constant cache invalidation" This reverts commits for [Feature #18589]: * 8008fb7352abc6fba433b99bf20763cf0d4adb38 "Update formatting per feedback" * 8f6eaca2e19828e92ecdb28b0fe693d606a03f96 "Delete ID from constant cache table if it becomes empty on ISEQ free" * 629908586b4bead1103267652f8b96b1083573a8 "Finer-grained inline constant cache invalidation" MSWin builds on AppVeyor have been crashing since the merger. --- vm_method.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'vm_method.c') 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 -- cgit v1.2.1