This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_op_lvalue_flags(): skip OPf_WANT_VOID ops.
authorDavid Mitchell <davem@iabyn.com>
Wed, 12 Jun 2019 10:57:54 +0000 (11:57 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 24 Jun 2019 10:40:07 +0000 (11:40 +0100)
commit05ba7c096a1637812610fe686e02f626fa5a39f0
treef3440c987f9375d71b3ea617be337775fbb765fd
parente709958e34204643641c90201e2734d0b3014d99
Perl_op_lvalue_flags(): skip OPf_WANT_VOID ops.

Currently this function asserts that its 'o' argument is non-VOID;
later when recursing an OP_LIST, it skips any kids which are VOID.

This commit changes it so that the assert becomes a return, and
OP_LIST doesn't check whether its kids are VOID.

Doing it this way makes it easier to shortly make Perl_op_lvalue_flags()
non-recursive.

The only functional difference is that on debugging builds,
Perl_op_lvalue_flags() will no longer fail an assert if inadvertently
called with a VOID op.
op.c