diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-06-01 14:16:55 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-06-09 09:52:46 +0900 |
commit | fb3f1f95e88218fed75593af4058bb8e65a7ffb7 (patch) | |
tree | 798e07fb38e2f20f87d89b4bb866b8eda7fd46b1 /vm_insnhelper.c | |
parent | be5dfdd8a2d67dd845081c63b6994148930c5c53 (diff) |
vm_call_refined: no call vm_cc_fill
This changeset reduces the generated binary of vm_call_method_each_type
from 2,442 bytes to 2,378 bytes on my machine, accroding to nm(1).
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3179
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index c4d12aaa7e..9a97c7da37 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -3042,12 +3042,10 @@ vm_call_refined(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_c const rb_callable_method_entry_t *cme = search_refined_method(ec, cfp, cd); if (cme != NULL) { - struct rb_callcache cc_body; - struct rb_call_data cd_body = { + return vm_call_method(ec, cfp, calling, &(struct rb_call_data) { .ci = cd->ci, - .cc = vm_cc_fill(&cc_body, Qundef, cme, 0), - }; - return vm_call_method(ec, cfp, calling, &cd_body); + .cc = &VM_CC_ON_STACK(Qundef, vm_call_general, { 0 }, cme), + }); } else { return vm_call_method_nome(ec, cfp, calling, cd); |