mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
compile.c: optimize leave
* compile.c (iseq_peephole_optimize): optimize replaced leave instruction copied to jump instruction too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5cf4310616
commit
6339ac02ac
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Nov 16 17:40:39 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* compile.c (iseq_peephole_optimize): optimize replaced leave
|
||||
instruction copied to jump instruction too.
|
||||
|
||||
Mon Nov 16 16:39:38 2015 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* lib/set.rb: Enable frozen_string_literal.
|
||||
|
|
|
@ -1956,7 +1956,8 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
|
|||
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):
|
||||
|
|
Loading…
Reference in a new issue