ruby-changes:40513
From: nobu <ko1@a...>
Date: Mon, 16 Nov 2015 17:41:02 +0900 (JST)
Subject: [ruby-changes:40513] nobu:r52594 (trunk): compile.c: optimize leave
nobu 2015-11-16 17:40:42 +0900 (Mon, 16 Nov 2015) New Revision: 52594 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52594 Log: compile.c: optimize leave * compile.c (iseq_peephole_optimize): optimize replaced leave instruction copied to jump instruction too. Modified files: trunk/ChangeLog trunk/compile.c Index: ChangeLog =================================================================== --- ChangeLog (revision 52593) +++ ChangeLog (revision 52594) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Nov 16 17:40:39 2015 Nobuyoshi Nakada <nobu@r...> + + * compile.c (iseq_peephole_optimize): optimize replaced leave + instruction copied to jump instruction too. + Mon Nov 16 16:39:38 2015 Akinori MUSHA <knu@i...> * lib/set.rb: Enable frozen_string_literal. Index: compile.c =================================================================== --- compile.c (revision 52593) +++ compile.c (revision 52594) @@ -1956,7 +1956,8 @@ iseq_peephole_optimize(rb_iseq_t *iseq, https://github.com/ruby/ruby/blob/trunk/compile.c#L1956 unref_destination(iobj); REPLACE_ELEM((LINK_ELEMENT *)iobj, (LINK_ELEMENT *)eiobj); INSERT_ELEM_NEXT((LINK_ELEMENT *)eiobj, (LINK_ELEMENT *)popiobj); - iobj = popiobj; + iobj = eiobj; + goto again; } /* * useless jump elimination (if/unless destination): -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/