ruby-changes:33204
From: normal <ko1@a...>
Date: Fri, 7 Mar 2014 19:30:56 +0900 (JST)
Subject: [ruby-changes:33204] normal:r45283 (trunk): vm_eval.c: use RARRAY_CONST_PTR to aid RGenGC performance
normal 2014-03-07 19:30:51 +0900 (Fri, 07 Mar 2014) New Revision: 45283 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45283 Log: 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] Modified files: trunk/ChangeLog trunk/vm_eval.c Index: ChangeLog =================================================================== --- ChangeLog (revision 45282) +++ ChangeLog (revision 45283) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Mar 7 19:29:13 2014 Eric Wong <e@8...> + + * 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@8...> * vm_eval.c (vm_call0_body): fix RB_GC_GUARD location Index: vm_eval.c =================================================================== --- vm_eval.c (revision 45282) +++ vm_eval.c (revision 45283) @@ -212,7 +212,8 @@ vm_call0_body(rb_thread_t* th, rb_call_i https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L212 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 https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L344 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; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/