This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Ensure that op_last always points to last sibling
authorDavid Mitchell <davem@iabyn.com>
Wed, 25 Jun 2014 17:09:14 +0000 (18:09 +0100)
committerDavid Mitchell <davem@iabyn.com>
Tue, 8 Jul 2014 15:40:03 +0000 (16:40 +0100)
commitc4b209751862a812e3cb3d6951c4f9411b0ca0af
tree789141a649fdb937b25fee42a18103f10a6b1aaa
parent3253bf854af27f38b67fb3a8dfeee758885f3ae9
Ensure that op_last always points to last sibling

Add a big DEBUGGING-only check to S_finalize_op() that for list ops,
checks whether op_last points to the last sibling. Then fix up the places
where this isn't true.

It turns out that convert() and force_list() didn't update op_first, so
fix them. Also, the 'x' (repeat) op in list context is a binary op with
op_last set to null, which is a bit bizarre, but too complex to fix for
now. So just skip the test on that one.
op.c