This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
rpeep() assert oldoldop -> oldop -> o form a chain
authorDavid Mitchell <davem@iabyn.com>
Wed, 9 Dec 2015 14:30:05 +0000 (14:30 +0000)
committerDavid Mitchell <davem@iabyn.com>
Wed, 9 Dec 2015 14:30:05 +0000 (14:30 +0000)
commit2fdd76928f116a6e52e8f66669e8d76fcbe65ec6
treeb8052580a8b05d710e34aef45eb26bbc38a45db9
parent44de5490cef8e95fb52b4a4e4747646f6550121e
rpeep() assert oldoldop -> oldop -> o form a chain

In rpeep(), in a loop, the var o becomes each op in the op_next chain in
turn. At the same time, oldop is set to the previous value of o, and
oldoldop the previous but one.

Some places that modify the op_next chain weren't correctly upodating
oldop and oldoldop at the same time. Last few commits have fixed those
places.

This commit adds an assert at the top of loop to check that oldoldop and
oldop are in fact consistent.

(This assert was used to find the faults fixed in the previous couple of
commits).
op.c