diff options
author | Stephen McCamant <smcc@mit.edu> | 2001-01-03 05:31:53 -0800 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-04 18:52:27 +0000 |
commit | 58cccf98a8ed478d6cf084cb2de62268c379cbc6 (patch) | |
tree | fd573417d719c695a280fbdca7061aeff7f5d307 /op.c | |
parent | 862382c78acdf83858c45ec3514945ca83ea34d6 (diff) | |
download | perl-58cccf98a8ed478d6cf084cb2de62268c379cbc6.tar.gz |
Continue blocks and B::Deparse
Message-ID: <14931.37732.62835.279605@soda.csua.berkeley.edu>
Make the peephole optimizer to bypass more null ops and
and rewrite the deparse handling of continue blocks.
p4raw-id: //depot/perl@8313
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -3907,7 +3907,6 @@ Perl_newWHILEOP(pTHX_ I32 flags, I32 debuggable, LOOP *loop, I32 whileline, OP * if (cont) { next = LINKLIST(cont); - loopflags |= OPpLOOP_CONTINUE; } if (expr) { OP *unstack = newOP(OP_UNSTACK, 0); @@ -6702,8 +6701,14 @@ Perl_peep(pTHX_ register OP *o) case OP_ENTERLOOP: o->op_seq = PL_op_seqmax++; + while (cLOOP->op_redoop->op_type == OP_NULL) + cLOOP->op_redoop = cLOOP->op_redoop->op_next; peep(cLOOP->op_redoop); + while (cLOOP->op_nextop->op_type == OP_NULL) + cLOOP->op_nextop = cLOOP->op_nextop->op_next; peep(cLOOP->op_nextop); + while (cLOOP->op_lastop->op_type == OP_NULL) + cLOOP->op_lastop = cLOOP->op_lastop->op_next; peep(cLOOP->op_lastop); break; @@ -6711,6 +6716,9 @@ Perl_peep(pTHX_ register OP *o) case OP_MATCH: case OP_SUBST: o->op_seq = PL_op_seqmax++; + while (cPMOP->op_pmreplstart && + cPMOP->op_pmreplstart->op_type == OP_NULL) + cPMOP->op_pmreplstart = cPMOP->op_pmreplstart->op_next; peep(cPMOP->op_pmreplstart); break; |