aboutsummaryrefslogtreecommitdiffstats
path: root/mjit.h
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2021-01-04 18:08:25 +0900
committerKoichi Sasada <ko1@atdot.net>2021-01-05 02:27:58 +0900
commite7fc353f044f9280222ca41b029b1368d2bf2fe3 (patch)
tree3e3a8e464dbc3767d5b71f17675d3f0dba6ac43f /mjit.h
parentbf21faec1521540f2be05df400c37600b4316a0f (diff)
downloadruby-e7fc353f044f9280222ca41b029b1368d2bf2fe3.tar.gz
enable constant cache on ractors
constant cache `IC` is accessed by non-atomic manner and there are thread-safety issues, so Ruby 3.0 disables to use const cache on non-main ractors. This patch enables it by introducing `imemo_constcache` and allocates it by every re-fill of const cache like `imemo_callcache`. [Bug #17510] Now `IC` only has one entry `IC::entry` and it points to `iseq_inline_constant_cache_entry`, managed by T_IMEMO object. `IC` is atomic data structure so `rb_mjit_before_vm_ic_update()` and `rb_mjit_after_vm_ic_update()` is not needed.
Diffstat (limited to 'mjit.h')
-rw-r--r--mjit.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/mjit.h b/mjit.h
index 3ef3379485..986a3adb92 100644
--- a/mjit.h
+++ b/mjit.h
@@ -83,8 +83,6 @@ RUBY_EXTERN bool mjit_call_p;
extern void rb_mjit_add_iseq_to_process(const rb_iseq_t *iseq);
extern VALUE rb_mjit_wait_call(rb_execution_context_t *ec, struct rb_iseq_constant_body *body);
extern struct rb_mjit_compile_info* rb_mjit_iseq_compile_info(const struct rb_iseq_constant_body *body);
-extern void rb_mjit_before_vm_ic_update(void);
-extern void rb_mjit_after_vm_ic_update(void);
extern void rb_mjit_recompile_send(const rb_iseq_t *iseq);
extern void rb_mjit_recompile_ivar(const rb_iseq_t *iseq);
extern void rb_mjit_recompile_exivar(const rb_iseq_t *iseq);
@@ -187,8 +185,6 @@ void mjit_finish(bool close_handle_p);
# else // USE_MJIT
-static inline void rb_mjit_before_vm_ic_update(void){}
-static inline void rb_mjit_after_vm_ic_update(void){}
static inline struct mjit_cont *mjit_cont_new(rb_execution_context_t *ec){return NULL;}
static inline void mjit_cont_free(struct mjit_cont *cont){}
static inline void mjit_gc_start_hook(void){}