mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
compile.c: tailcall in conditinal block
* compile.c (iseq_peephole_optimize): enable tail call optimization inside a conditional block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9ec75a259d
commit
7382eb7e38
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Sep 23 12:15:29 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* compile.c (iseq_peephole_optimize): enable tail call
|
||||
optimization inside a conditional block.
|
||||
|
||||
Thu Sep 22 13:00:04 2016 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||
|
||||
* gc.c (gc_start_internal): [DOC] methods without arguments
|
||||
|
|
|
@ -2281,6 +2281,13 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
|
|||
/*case BIN(trace):*/
|
||||
next = next->next;
|
||||
break;
|
||||
case BIN(jump):
|
||||
/* if cond
|
||||
* return tailcall
|
||||
* end
|
||||
*/
|
||||
next = get_destination_insn((INSN *)next);
|
||||
break;
|
||||
case BIN(leave):
|
||||
piobj = iobj;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue