[前][次][番号順一覧][スレッド一覧]

ruby-changes:36337

From: normal <ko1@a...>
Date: Fri, 14 Nov 2014 10:24:14 +0900 (JST)
Subject: [ruby-changes:36337] normal:r48418 (trunk): vm_eval.c (rb_eval_cmd): use pre-defined idCall

normal	2014-11-14 10:23:58 +0900 (Fri, 14 Nov 2014)

  New Revision: 48418

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=48418

  Log:
    vm_eval.c (rb_eval_cmd): use pre-defined idCall
    
    No need to use rb_intern, here.  Reduces size slightly on x86-64:
    
    $ ~/linux/scripts/bloat-o-meter ruby.before ruby.after
    add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-31 (-31)
    function                                     old     new   delta
    rb_eval_cmd                                  813     782     -31

  Modified files:
    trunk/ChangeLog
    trunk/vm_eval.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 48417)
+++ ChangeLog	(revision 48418)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Fri Nov 14 10:23:35 2014  Eric Wong  <e@8...>
+
+	* vm_eval.c (rb_eval_cmd): use pre-defined idCall
+
 Fri Nov 14 09:25:44 2014  Eric Wong  <e@8...>
 
 	* vm_eval.c (rb_yield_splat): add missing GC guard
Index: vm_eval.c
===================================================================
--- vm_eval.c	(revision 48417)
+++ vm_eval.c	(revision 48418)
@@ -1481,7 +1481,7 @@ rb_eval_cmd(VALUE cmd, VALUE arg, int le https://github.com/ruby/ruby/blob/trunk/vm_eval.c#L1481
 	PUSH_TAG();
 	rb_set_safe_level_force(level);
 	if ((state = EXEC_TAG()) == 0) {
-	    val = rb_funcall2(cmd, rb_intern("call"), RARRAY_LENINT(arg),
+	    val = rb_funcall2(cmd, idCall, RARRAY_LENINT(arg),
 			      RARRAY_CONST_PTR(arg));
 	}
 	POP_TAG();

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]