mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
compile.c: insn before pop
* compile.c (iseq_peephole_optimize): more eliminatable instructions before `pop` without side effects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
87ca4f3065
commit
c6ad7a6272
1 changed files with 5 additions and 0 deletions
|
@ -2909,6 +2909,11 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
|
|||
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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue