summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-03-24 18:07:26 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:33 -0400
commitb626dd7211b9d45f1dab6f82057445781f34f20f (patch)
tree76f107f1a2b79b4be590eea99aa98f97bd6eed14 /vm_insnhelper.c
parente81d1f4ae31086c19b936bb8d0bf4650b0c36f44 (diff)
YJIT: Fancier opt_getinlinecache
Make sure `opt_getinlinecache` is in a block all on its own, and invalidate it from the interpreter when `opt_setinlinecache`. It will recompile with a filled cache the second time around. This lets YJIT runs well when the IC for constant is cold.
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 16f46e50d3..00b352df3d 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -4743,6 +4743,9 @@ vm_ic_update(const rb_iseq_t *iseq, IC ic, VALUE val, const VALUE *reg_ep)
if (rb_ractor_shareable_p(val)) ice->flags |= IMEMO_CONST_CACHE_SHAREABLE;
ruby_vm_const_missing_count = 0;
RB_OBJ_WRITE(iseq, &ic->entry, ice);
+#ifndef MJIT_HEADER
+ yjit_constant_ic_update(iseq, ic);
+#endif
}
static VALUE