summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-03-25 20:29:09 +0900
committerGitHub <noreply@github.com>2022-03-25 20:29:09 +0900
commit69967ee64eac9ce65b83533a566d69d12a6046d0 (patch)
treeb7012ba8b7ad5b1c99d7b1f9b2345ecd8117f433 /vm_method.c
parent7ee26740e41f99d3da37df36b956237fbf36868e (diff)
downloadruby-69967ee64eac9ce65b83533a566d69d12a6046d0.tar.gz
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.
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