diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2021-03-24 18:07:26 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:33 -0400 |
commit | b626dd7211b9d45f1dab6f82057445781f34f20f (patch) | |
tree | 76f107f1a2b79b4be590eea99aa98f97bd6eed14 /yjit_iface.h | |
parent | e81d1f4ae31086c19b936bb8d0bf4650b0c36f44 (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 'yjit_iface.h')
-rw-r--r-- | yjit_iface.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/yjit_iface.h b/yjit_iface.h index 63871d24c2..b7af40cfd7 100644 --- a/yjit_iface.h +++ b/yjit_iface.h @@ -85,9 +85,9 @@ RUBY_EXTERN struct rb_yjit_runtime_counters yjit_runtime_counters; void cb_write_pre_call_bytes(codeblock_t* cb); void cb_write_post_call_bytes(codeblock_t* cb); -VALUE *iseq_pc_at_idx(const rb_iseq_t *iseq, uint32_t insn_idx); -void map_addr2insn(void *code_ptr, int insn); -int opcode_at_pc(const rb_iseq_t *iseq, const VALUE *pc); +void yjit_map_addr2insn(void *code_ptr, int insn); +VALUE *yjit_iseq_pc_at_idx(const rb_iseq_t *iseq, uint32_t insn_idx); +int yjit_opcode_at_pc(const rb_iseq_t *iseq, const VALUE *pc); void check_cfunc_dispatch(VALUE receiver, struct rb_callinfo *ci, void *callee, rb_callable_method_entry_t *compile_time_cme); bool cfunc_needs_frame(const rb_method_cfunc_t *cfunc); @@ -95,7 +95,7 @@ bool cfunc_needs_frame(const rb_method_cfunc_t *cfunc); RBIMPL_ATTR_NODISCARD() bool assume_bop_not_redefined(block_t *block, int redefined_flag, enum ruby_basic_operators bop); void assume_method_lookup_stable(VALUE receiver_klass, const rb_callable_method_entry_t *cme, block_t *block); RBIMPL_ATTR_NODISCARD() bool assume_single_ractor_mode(block_t *block); -RBIMPL_ATTR_NODISCARD() bool assume_stable_global_constant_state(block_t *block); +void assume_stable_global_constant_state(block_t *block); // this function *must* return passed exit_pc const VALUE *rb_yjit_count_side_exit_op(const VALUE *exit_pc); |