diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-06-01 15:02:44 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-06-09 09:52:46 +0900 |
commit | 367263c3dd7df3c412e29cefb55561d10715a96a (patch) | |
tree | eaed73bf23a303a3a651e6635bca00e768c8a3de | |
parent | fb3f1f95e88218fed75593af4058bb8e65a7ffb7 (diff) | |
download | ruby-367263c3dd7df3c412e29cefb55561d10715a96a.tar.gz |
vm_call_method: no call vm_cc_fill
This changeset reduces the generated binary of vm_call_method from 600
bytes to 566 bytes on my machine, accroding to nm(1).
-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 9a97c7da37..3024a2c381 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -3181,12 +3181,10 @@ vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_ca else { /* caching method info to dummy cc */ VM_ASSERT(vm_cc_cme(cc) != NULL); - struct rb_callcache cc_body; - struct rb_call_data cd_body = { + return vm_call_method_each_type(ec, cfp, calling, &(struct rb_call_data) { .ci = ci, - .cc = vm_cc_fill(&cc_body, cc->klass, vm_cc_cme(cc), vm_cc_call(cc)), - }; - return vm_call_method_each_type(ec, cfp, calling, &cd_body); + .cc = &VM_CC_ON_STACK(cc->klass, vm_cc_call(cc), { 0 }, vm_cc_cme(cc)), + }); } } return vm_call_method_each_type(ec, cfp, calling, cd); |