diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-12-17 15:46:36 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2020-12-17 16:53:41 +0900 |
commit | 92137718170118030a1f56303764d08201bf5c33 (patch) | |
tree | c7c6113125522d14c066a942bde8f30d230bf0b9 /insns.def | |
parent | 5d74894f2bc4a3a18aec952d946ead3d784cb4b4 (diff) |
encourage inlining for vm_sendish()
Some tunings.
* add `inline` for vm_sendish()
* pass enum instead of func ptr to vm_sendish()
* reorder initial order of `calling` struct.
* add ALWAYS_INLINE for vm_search_method_fastpath()
* call vm_search_method_fastpath() from vm_sendish()
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3922
Diffstat (limited to 'insns.def')
-rw-r--r-- | insns.def | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -767,7 +767,7 @@ send // attr rb_snum_t comptime_sp_inc = sp_inc_of_sendish(ci); { VALUE bh = vm_caller_setup_arg_block(ec, GET_CFP(), cd->ci, blockiseq, false); - val = vm_sendish(ec, GET_CFP(), cd, bh, vm_search_method_wrap); + val = vm_sendish(ec, GET_CFP(), cd, bh, mexp_search_method); if (val == Qundef) { RESTORE_REGS(); @@ -786,7 +786,7 @@ opt_send_without_block // attr rb_snum_t comptime_sp_inc = sp_inc_of_sendish(ci); { VALUE bh = VM_BLOCK_HANDLER_NONE; - val = vm_sendish(ec, GET_CFP(), cd, bh, vm_search_method_wrap); + val = vm_sendish(ec, GET_CFP(), cd, bh, mexp_search_method); if (val == Qundef) { RESTORE_REGS(); @@ -873,7 +873,7 @@ invokesuper // attr rb_snum_t comptime_sp_inc = sp_inc_of_sendish(ci); { VALUE bh = vm_caller_setup_arg_block(ec, GET_CFP(), cd->ci, blockiseq, true); - val = vm_sendish(ec, GET_CFP(), cd, bh, vm_search_super_method); + val = vm_sendish(ec, GET_CFP(), cd, bh, mexp_search_super); if (val == Qundef) { RESTORE_REGS(); @@ -892,7 +892,7 @@ invokeblock // attr rb_snum_t comptime_sp_inc = sp_inc_of_invokeblock(ci); { VALUE bh = VM_BLOCK_HANDLER_NONE; - val = vm_sendish(ec, GET_CFP(), cd, bh, vm_search_invokeblock); + val = vm_sendish(ec, GET_CFP(), cd, bh, mexp_search_invokeblock); if (val == Qundef) { RESTORE_REGS(); |