ruby-changes:51039
From: nobu <ko1@a...>
Date: Mon, 23 Apr 2018 18:52:29 +0900 (JST)
Subject: [ruby-changes:51039] nobu:r63246 (trunk): compile.c: insn before pop
nobu 2018-04-23 18:52:23 +0900 (Mon, 23 Apr 2018) New Revision: 63246 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63246 Log: compile.c: insn before pop * compile.c (iseq_peephole_optimize): more eliminatable instructions before `pop` without side effects. Modified files: trunk/compile.c Index: compile.c =================================================================== --- compile.c (revision 63245) +++ compile.c (revision 63246) @@ -2909,6 +2909,11 @@ iseq_peephole_optimize(rb_iseq_t *iseq, https://github.com/ruby/ruby/blob/trunk/compile.c#L2909 enum ruby_vminsn_type previ = ((INSN *)prev)->insn_id; if (previ == BIN(putobject) || previ == BIN(putnil) || previ == BIN(putself) || previ == BIN(putstring) || + previ == BIN(dup) || + previ == BIN(getlocal) || + previ == BIN(getblockparam) || + previ == BIN(getblockparamproxy) || + /* getinstancevariable may issue a warning */ previ == BIN(duparray)) { /* just push operand or static value and pop soon, no * side effects */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/