mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
vm_eval.c: use RARRAY_CONST_PTR to aid RGenGC performance
Pointed out by ko1. * vm_eval.c (vm_call0_body): use RARRAY_CONST_PTR (check_funcall_exec): ditto [ruby-core:61360] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bd1104f3dd
commit
9c236f1140
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
Fri Mar 7 19:29:13 2014 Eric Wong <e@80x24.org>
|
||||
|
||||
* vm_eval.c (vm_call0_body): use RARRAY_CONST_PTR
|
||||
(check_funcall_exec): ditto
|
||||
[ruby-core:61360]
|
||||
|
||||
Fri Mar 7 19:14:11 2014 Eric Wong <e@80x24.org>
|
||||
|
||||
* vm_eval.c (vm_call0_body): fix RB_GC_GUARD location
|
||||
|
|
|
@ -212,7 +212,8 @@ vm_call0_body(rb_thread_t* th, rb_call_info_t *ci, const VALUE *argv)
|
|||
|
||||
rb_ary_unshift(new_args, ID2SYM(ci->mid));
|
||||
th->passed_block = ci->blockptr;
|
||||
ret = rb_funcall2(ci->recv, idMethodMissing, ci->argc+1, RARRAY_PTR(new_args));
|
||||
ret = rb_funcall2(ci->recv, idMethodMissing, ci->argc+1,
|
||||
RARRAY_CONST_PTR(new_args));
|
||||
RB_GC_GUARD(new_args);
|
||||
return ret;
|
||||
}
|
||||
|
@ -343,7 +344,7 @@ check_funcall_exec(struct rescue_funcall_args *args)
|
|||
|
||||
rb_ary_unshift(new_args, args->sym);
|
||||
ret = rb_funcall2(args->recv, idMethodMissing,
|
||||
args->argc+1, RARRAY_PTR(new_args));
|
||||
args->argc+1, RARRAY_CONST_PTR(new_args));
|
||||
RB_GC_GUARD(new_args);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue