diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-23 09:52:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-23 09:52:23 +0000 |
commit | c6ad7a6272ad3f43f9efffda61040ab9f46add47 (patch) | |
tree | 3d31648ba316cc62752b11a6402c1b727d5ef106 /compile.c | |
parent | 87ca4f3065c76a0994ea13071b9f6641df8c03db (diff) | |
download | ruby-c6ad7a6272ad3f43f9efffda61040ab9f46add47.tar.gz |
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
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 5 |
1 files changed, 5 insertions, 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 */ |