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

ruby-changes:15615

From: nobu <ko1@a...>
Date: Wed, 28 Apr 2010 09:49:44 +0900 (JST)
Subject: [ruby-changes:15615] Ruby:r27524 (trunk): * tool/compile_prelude.rb: enable optimization.

nobu	2010-04-28 09:49:25 +0900 (Wed, 28 Apr 2010)

  New Revision: 27524

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

  Log:
    * tool/compile_prelude.rb: enable optimization.

  Modified files:
    trunk/ChangeLog
    trunk/tool/compile_prelude.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 27523)
+++ ChangeLog	(revision 27524)
@@ -1,3 +1,7 @@
+Wed Apr 28 09:49:21 2010  Nobuyoshi Nakada  <nobu@r...>
+
+	* tool/compile_prelude.rb: enable optimization.
+
 Wed Apr 28 09:43:24 2010  Nobuyoshi Nakada  <nobu@r...>
 
 	* parse.y (warn_balanced): do not warn for EXPR_ENDFN.
Index: tool/compile_prelude.rb
===================================================================
--- tool/compile_prelude.rb	(revision 27523)
+++ tool/compile_prelude.rb	(revision 27524)
@@ -113,6 +113,16 @@
 }
 % end
 
+% unless preludes.empty?
+VALUE rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE filepath, VALUE line, VALUE opt);
+
+static void
+prelude_eval(VALUE code, VALUE name, VALUE line)
+{
+    rb_iseq_eval(rb_iseq_compile_with_option(code, name, Qnil, line, Qtrue));
+}
+% end
+
 % if @have_sublib
 static VALUE
 prelude_require(VALUE self, VALUE nth)
@@ -136,7 +146,7 @@
       default:
 	return Qfalse;
     }
-    rb_iseq_eval(rb_iseq_compile(code, name, INT2FIX(1)));
+    prelude_eval(code, name, INT2FIX(1));
     return Qtrue;
 }
 
@@ -159,10 +169,10 @@
 % end
 % preludes.each do |i, prelude, lines, sub|
 %   next if sub
-    rb_iseq_eval(rb_iseq_compile(
+    prelude_eval(
       rb_usascii_str_new(prelude_code<%=i%>, sizeof(prelude_code<%=i%>) - 1),
       rb_usascii_str_new(prelude_name<%=i%>, sizeof(prelude_name<%=i%>) - 1),
-      INT2FIX(1)));
+      INT2FIX(1));
 % end
 % if @have_sublib or @need_ruby_prefix
     rb_gc_force_recycle(prelude);

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

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