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.
This commit is contained in:
Alan Wu 2021-03-24 18:07:26 -04:00
parent e81d1f4ae3
commit b626dd7211
9 changed files with 146 additions and 73 deletions

5
yjit.h
View file

@ -5,9 +5,7 @@
#ifndef YJIT_H
#define YJIT_H 1
#include "stddef.h"
#include "stdint.h"
#include "stdbool.h"
#include "vm_core.h"
#include "method.h"
#ifdef _WIN32
@ -61,5 +59,6 @@ void rb_yjit_iseq_mark(const struct rb_iseq_constant_body *body);
void rb_yjit_iseq_update_references(const struct rb_iseq_constant_body *body);
void rb_yjit_iseq_free(const struct rb_iseq_constant_body *body);
void rb_yjit_before_ractor_spawn(void);
void yjit_constant_ic_update(const rb_iseq_t *iseq, IC ic);
#endif // #ifndef YJIT_H