rpeep(): elide just-nulled ops
authorDavid Mitchell <davem@iabyn.com>
Wed, 5 Mar 2014 19:42:36 +0000 (19:42 +0000)
committerDavid Mitchell <davem@iabyn.com>
Sun, 16 Mar 2014 18:34:37 +0000 (18:34 +0000)
commite42737055d5d2ce05a8416a08c424c0d246ba839
tree88ea299fbb587133fbe3296ce3459fa01915e95d
parent1022336546c7c8280b26bac6ed9c55bfd217804f
rpeep(): elide just-nulled ops

Perl_rpeep() currently spots "empty" ops like OP_NULL, OP_SCOPE
and elides them from the op_next chain (by setting oldop->op_next to point
to the op following the current op). However, if rpeep() itself
op_null()'s the current op, then when the main loop is re-entered, that
mechanism is bypassed. Modify re-entry to the loop in this case so that
the just nulled op re-processed and thus elided.

(Also document what the OP_SASSIGN/OP_SUBSTR optimisation is doing;
studying that was what originally led me to this general fix.)
op.c