op.c:ck_spair: Remove redundant checks
authorFather Chrysostomos <sprout@cpan.org>
Sat, 20 Sep 2014 20:27:47 +0000 (13:27 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 11 Oct 2014 04:53:49 +0000 (21:53 -0700)
Neither the av nor the hv ops have the OA_RETSCALAR flag, so these
checks are unreachable.

These checks go all the way back to a0d0e21e (perl 5.000).

op.c

diff --git a/op.c b/op.c
index 1496db5..2b17d3e 100644 (file)
--- a/op.c
+++ b/op.c
@@ -8867,9 +8867,7 @@ Perl_ck_spair(pTHX_ OP *o)
        newop = OP_SIBLING(kidkid);
        if (newop) {
            const OPCODE type = newop->op_type;
-           if (OP_HAS_SIBLING(newop) || !(PL_opargs[type] & OA_RETSCALAR) ||
-                   type == OP_PADAV || type == OP_PADHV ||
-                   type == OP_RV2AV || type == OP_RV2HV)
+           if (OP_HAS_SIBLING(newop) || !(PL_opargs[type] & OA_RETSCALAR))
                return o;
        }
         /* excise first sibling */