diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-04-06 23:31:14 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-04-06 23:31:14 +0000 |
commit | 29f2e9126439df904e8eb9163e136caf022dede1 (patch) | |
tree | 19b9f0f0af35aae0b6c655d66d42c7cd0659b47b /op.c | |
parent | 0477511c8fa7fbe068dff644e8b8d94e2d5c78c9 (diff) | |
download | perl-29f2e9126439df904e8eb9163e136caf022dede1.tar.gz |
Merge op_pmreplstart and op_pmstash/op_pmstashpv into a union in
PMOP, as both pointers never need to be set at the same time.
p4raw-id: //depot/perl@30860
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -3525,7 +3525,8 @@ Perl_pmruntime(pTHX_ OP *o, OP *expr, bool isreg) repl->op_next = (OP*)rcop; pm->op_pmreplroot = scalar((OP*)rcop); - pm->op_pmreplstart = LINKLIST(rcop); + assert(!(pm->op_pmflags & PMf_ONCE)); + pm->op_pmstashstartu.op_pmreplstart = LINKLIST(rcop); rcop->op_next = 0; } } @@ -8033,10 +8034,12 @@ Perl_peep(pTHX_ register OP *o) case OP_SUBST: o->op_opt = 1; - while (cPMOP->op_pmreplstart && - cPMOP->op_pmreplstart->op_type == OP_NULL) - cPMOP->op_pmreplstart = cPMOP->op_pmreplstart->op_next; - peep(cPMOP->op_pmreplstart); + assert(!(cPMOP->op_pmflags & PMf_ONCE)); + while (cPMOP->op_pmstashstartu.op_pmreplstart && + cPMOP->op_pmstashstartu.op_pmreplstart->op_type == OP_NULL) + cPMOP->op_pmstashstartu.op_pmreplstart + = cPMOP->op_pmstashstartu.op_pmreplstart->op_next; + peep(cPMOP->op_pmstashstartu.op_pmreplstart); break; case OP_EXEC: @@ -8427,7 +8430,9 @@ Perl_peep(pTHX_ register OP *o) case OP_QR: case OP_MATCH: - assert (!cPMOP->op_pmreplstart); + if (!(cPMOP->op_pmflags & PMf_ONCE)) { + assert (!cPMOP->op_pmstashstartu.op_pmreplstart); + } /* FALL THROUGH */ default: o->op_opt = 1; |