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

ruby-changes:40845

From: ko1 <ko1@a...>
Date: Tue, 8 Dec 2015 03:46:35 +0900 (JST)
Subject: [ruby-changes:40845] ko1:r52924 (trunk): * iseq.c (iseq_load): disable peephole optimization option

ko1	2015-12-08 03:46:27 +0900 (Tue, 08 Dec 2015)

  New Revision: 52924

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

  Log:
    * iseq.c (iseq_load): disable peephole optimization option
      because apply it multiple times change the sequence.
      (iseq != peephole_optimize(load(iseq.to_a)))

  Modified files:
    trunk/ChangeLog
    trunk/iseq.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52923)
+++ ChangeLog	(revision 52924)
@@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Dec  8 03:44:51 2015  Koichi Sasada  <ko1@a...>
+
+	* iseq.c (iseq_load): disable peephole optimization option
+	  because apply it multiple times change the sequence.
+	  (iseq != peephole_optimize(load(iseq.to_a)))
+
 Tue Dec  8 03:43:21 2015  Koichi Sasada  <ko1@a...>
 
 	* compile.c (rb_iseq_build_from_ary): do not allocate table
Index: iseq.c
===================================================================
--- iseq.c	(revision 52923)
+++ iseq.c	(revision 52924)
@@ -565,6 +565,7 @@ iseq_load(VALUE data, const rb_iseq_t *p https://github.com/ruby/ruby/blob/trunk/iseq.c#L565
     }
 
     make_compile_option(&option, opt);
+    option.peephole_optimization = FALSE; /* because peephole optimization can modify original iseq */
     prepare_iseq_build(iseq, name, path, absolute_path, first_lineno,
 		       parent, (enum iseq_type)iseq_type, &option);
 

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

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