mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vm_call_method: use struct assignment
This further reduces the generated binary of vm_call_method from 566 bytes to 545 bytes on my machine, according to nm(1).
This commit is contained in:
parent
88e6799759
commit
4fbe86d0e2
Notes:
git
2020-06-09 09:53:16 +09:00
1 changed files with 2 additions and 1 deletions
|
|
@ -3159,9 +3159,10 @@ vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_ca
|
||||||
else {
|
else {
|
||||||
/* caching method info to dummy cc */
|
/* caching method info to dummy cc */
|
||||||
VM_ASSERT(vm_cc_cme(cc) != NULL);
|
VM_ASSERT(vm_cc_cme(cc) != NULL);
|
||||||
|
const struct rb_callcache cc_on_stack = *cc;
|
||||||
return vm_call_method_each_type(ec, cfp, calling, &(struct rb_call_data) {
|
return vm_call_method_each_type(ec, cfp, calling, &(struct rb_call_data) {
|
||||||
.ci = ci,
|
.ci = ci,
|
||||||
.cc = &VM_CC_ON_STACK(cc->klass, vm_cc_call(cc), { 0 }, vm_cc_cme(cc)),
|
.cc = &cc_on_stack,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue