mirror of
https://github.com/ruby/ruby.git
synced 2026-11-09 08:42:18 +08:00
In 7eab8b5d488da8474d7b31196e3d06b2ff90399d I wanted to avoid extra work. Since we don't actually use any profile information in ZJIT for compiling `opt_case_dispatch`, I decided not to call the profiling instruction. However, this caused a regression in `mail` and `rubocop`: this call to the profiler is also our hook to the function lifecycle code, which triggers a rewrite from the ZJIT version of the instruction back to the normal bare opcode. My commit stopped rewriting back to the original opcode when the ZJIT machinery should have. Because in the interpreter the bare opcode path is much faster for integer-only case/when dispatch, this regressed `mail` and `rubocop`. We'll have to figure out why we are spending a lot of time in interpreter case/when dispatch for those benchmarks (code size?), but for now this fixes the regression.