compile.c: eliminate getinstancevariable -> pop sequences
This case wasn't eliminated before because `getinstancevariable` could emit a warning, but that's no longer the case since Ruby 3.0.
This commit is contained in:
parent
ecd0cdaf82
commit
0459eaec95
Notes:
git
2023-02-20 18:04:29 +00:00
@ -3319,7 +3319,7 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
|
||||
previ == BIN(getlocal) ||
|
||||
previ == BIN(getblockparam) ||
|
||||
previ == BIN(getblockparamproxy) ||
|
||||
/* getinstancevariable may issue a warning */
|
||||
previ == BIN(getinstancevariable) ||
|
||||
previ == BIN(duparray)) {
|
||||
/* just push operand or static value and pop soon, no
|
||||
* side effects */
|
||||
|
Loading…
x
Reference in New Issue
Block a user