ruby/defs
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
..
gmake.mk [Bug #19182] Unicode updating targets do not need to run for each files 2022-12-11 11:55:28 +09:00
id.def Use a BOP for Hash#default 2022-12-17 14:51:49 -08:00
keywords reserved_word: just use gperf 3.1 declaration 2022-09-21 11:44:09 +09:00
known_errors.def defs/known_errors.def: update on macOS Mojave Xcode 10.1 2018-11-14 02:27:17 +00:00
lex.c.src reserved_word: just use gperf 3.1 declaration 2022-09-21 11:44:09 +09:00
opt_insn_unif.def setdynamic is obsoleted 2016-04-27 07:11:06 +00:00
opt_operand.def * defs/opt_operand.def: Fix typo 2013-12-22 01:11:07 +00:00
separated_version.mk Fixed misspellings 2019-12-20 09:32:42 +09:00
universal.mk mjit headers for universal binary 2018-02-06 03:19:42 +00:00