This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
defer op_seq allocation
authorAbhijit Menon-Sen <ams@wiw.org>
Thu, 19 Jul 2001 22:12:24 +0000 (03:42 +0530)
committerNick Ing-Simmons <nik@tiuk.ti.com>
Fri, 20 Jul 2001 06:35:11 +0000 (06:35 +0000)
Message-Id:  <20010719221224.A13786@lustre.dyn.wiw.org>

p4raw-id: //depot/perl@11415

op.c

diff --git a/op.c b/op.c
index 98239d9..33374e9 100644 (file)
--- a/op.c
+++ b/op.c
@@ -6779,7 +6779,15 @@ Perl_peep(pTHX_ register OP *o)
            {
                PL_curcop = ((COP*)o);
            }
-           goto nothin;
+           /* XXX: We avoid setting op_seq here to prevent later calls
+              to peep() from mistakenly concluding that optimisation
+              has already occurred. This doesn't fix the real problem,
+              though (See 20010220.007). AMS 20010719 */
+           if (oldop && o->op_next) {
+               oldop->op_next = o->op_next;
+               continue;
+           }
+           break;
        case OP_SCALAR:
        case OP_LINESEQ:
        case OP_SCOPE: