ruby/yjit
John Hawthorn fbaa5db44a Use a BOP for Hash#default
On a hash miss we need to call default if it is redefined in order to
return the default value to be used. Previously we checked this with
rb_method_basic_definition_p, which avoids the method call but requires
a method lookup.

This commit replaces the previous check with BASIC_OP_UNREDEFINED_P and
a new BOP_DEFAULT. We still need to fall back to
rb_method_basic_definition_p when called on a subclasss of hash.

    |                |compare-ruby|built-ruby|
    |:---------------|-----------:|---------:|
    |hash_aref_miss  |       2.692|     3.531|
    |                |           -|     1.31x|

Co-authored-by: Daniel Colson <danieljamescolson@gmail.com>
Co-authored-by: "Ian C. Anderson" <ian@iancanderson.com>
Co-authored-by: Jack McCracken <me@jackmc.xyz>
2022-12-17 14:51:49 -08:00
..
bindgen Transition complex objects to "too complex" shape 2022-12-15 10:06:04 -08:00
src Use a BOP for Hash#default 2022-12-17 14:51:49 -08:00
.gitignore
Cargo.lock YJIT: Instrument global allocations on stats build (#6712) 2022-11-13 12:54:41 -05:00
Cargo.toml YJIT: Generate debug info in release builds (#6910) 2022-12-12 15:59:29 -05:00
not_gmake.mk YJIT: Support MAKE=bmake for release build 2022-09-20 14:17:27 -04:00
yjit.mk Suppress the output of `if [ 'xyes' = xyes ];` code 2022-12-13 22:26:24 -08:00