Avoid using inconsistent coding style
Other `_mjit_compile_*.erb` files don't use goto. These files'd better
be consistent for readability.
---
tool/ruby_vm/views/_mjit_compile_getinlinecache.erb | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
Fix broken JIT of getinlinecache
e7fc353f04 reverted vm_ic_hit_p's signature change made in 53babf35ef,
which broke JIT compilation of getinlinecache.
To make sure it doesn't happen again, I separated vm_inlined_ic_hit_p to
make the intention clear.
---
test/ruby/test_jit.rb | 12 +++++++++++
.../ruby_vm/views/_mjit_compile_getinlinecache.erb | 2 +-
vm_insnhelper.c | 25 ++++++++++++++--------
3 files changed, 29 insertions(+), 10 deletions(-)
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.