From b626dd7211b9d45f1dab6f82057445781f34f20f Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Wed, 24 Mar 2021 18:07:26 -0400 Subject: 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. --- vm_insnhelper.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'vm_insnhelper.c') 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 -- cgit v1.2.3