assert() that OP_QR and OP_MATCH never set op_pmreplstart, which
Nicholas Clark [Fri, 6 Apr 2007 22:32:02 +0000 (22:32 +0000)]
simplifies the peep hole optimiser slightly.

p4raw-id: //depot/perl@30859

op.c

diff --git a/op.c b/op.c
index 56b9d9f..bb9dc60 100644 (file)
--- a/op.c
+++ b/op.c
@@ -8031,8 +8031,6 @@ Perl_peep(pTHX_ register OP *o)
            peep(cLOOP->op_lastop);
            break;
 
-       case OP_QR:
-       case OP_MATCH:
        case OP_SUBST:
            o->op_opt = 1;
            while (cPMOP->op_pmreplstart &&
@@ -8427,6 +8425,10 @@ Perl_peep(pTHX_ register OP *o)
        }
 
        
+       case OP_QR:
+       case OP_MATCH:
+           assert (!cPMOP->op_pmreplstart);
+           /* FALL THROUGH */
        default:
            o->op_opt = 1;
            break;