зеркало из https://github.com/github/ruby.git
* vm_insnhelper.c: refactoring.
- move all `call' related functions to the last of file. - make functions for respective method types in vm_call_method(). (all functions have same function parameters) * vm_core.h: add `opt_pc' filed in `rb_call_info_t' as temporal variable. * vm_eval.c (vm_call0_body): catch up above cahnges. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
fd3b0dec4a
Коммит
8f08e61bad
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
Mon Oct 15 04:51:55 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* vm_insnhelper.c: refactoring.
|
||||
- move all `call' related functions to the last of file.
|
||||
- make functions for respective method types in vm_call_method().
|
||||
(all functions have same function parameters)
|
||||
|
||||
* vm_core.h: add `opt_pc' filed in `rb_call_info_t'
|
||||
as temporal variable.
|
||||
|
||||
* vm_eval.c (vm_call0_body): catch up above cahnges.
|
||||
|
||||
Mon Oct 15 03:51:46 2012 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* benchmark/bm_vm1_attr_ivar(_set).rb: added (for method dispatch speed).
|
||||
|
|
|
@ -160,8 +160,10 @@ typedef struct rb_call_info_struct {
|
|||
|
||||
/* temporary values for method calling */
|
||||
int argc;
|
||||
int opt_pc;
|
||||
struct rb_block_struct *blockptr;
|
||||
VALUE recv;
|
||||
|
||||
VALUE (*call)(struct rb_thread_struct *th, struct rb_control_frame_struct *cfp, struct rb_call_info_struct *ci);
|
||||
} rb_call_info_t;
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ vm_call0_body(rb_thread_t* th, rb_call_info_t *ci, const VALUE *argv)
|
|||
*reg_cfp->sp++ = argv[i];
|
||||
}
|
||||
|
||||
vm_setup_method(th, reg_cfp, ci);
|
||||
vm_call_iseq_setup(th, reg_cfp, ci);
|
||||
th->cfp->flag |= VM_FRAME_FLAG_FINISH;
|
||||
val = vm_exec(th);
|
||||
break;
|
||||
|
@ -115,7 +115,7 @@ vm_call0_body(rb_thread_t* th, rb_call_info_t *ci, const VALUE *argv)
|
|||
break;
|
||||
}
|
||||
case VM_METHOD_TYPE_BMETHOD: {
|
||||
val = vm_call_bmethod(th, ci->recv, ci->argc, argv, ci->blockptr, ci->me, ci->defined_class);
|
||||
val = vm_call_bmethod_body(th, ci, argv);
|
||||
break;
|
||||
}
|
||||
case VM_METHOD_TYPE_ZSUPER:
|
||||
|
|
1506
vm_insnhelper.c
1506
vm_insnhelper.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче