Integrate MIME::Base64 2.16 from CPAN. (Do we really want the
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index f693dfc..abd9417 100644 (file)
--- a/op.c
+++ b/op.c
@@ -6063,8 +6063,10 @@ Perl_peep(pTHX_ register OP *o)
     for (; o; o = o->op_next) {
        if (o->op_seq)
            break;
-       if (!PL_op_seqmax)
-           PL_op_seqmax++;
+        /* The special value -1 is used by the B::C compiler backend to indicate
+         * that an op is statically defined and should not be freed */
+       if (!PL_op_seqmax || PL_op_seqmax == (U16)-1)
+           PL_op_seqmax = 1;
        PL_op = o;
        switch (o->op_type) {
        case OP_SETSTATE:
@@ -6078,12 +6080,13 @@ Perl_peep(pTHX_ register OP *o)
            if (cSVOPo->op_private & OPpCONST_STRICT)
                no_bareword_allowed(o);
 #ifdef USE_ITHREADS
+       case OP_METHOD_NAMED:
            /* Relocate sv to the pad for thread safety.
             * Despite being a "constant", the SV is written to,
             * for reference counts, sv_upgrade() etc. */
            if (cSVOP->op_sv) {
                PADOFFSET ix = pad_alloc(OP_CONST, SVs_PADTMP);
-               if (SvPADTMP(cSVOPo->op_sv)) {
+               if (o->op_type == OP_CONST && SvPADTMP(cSVOPo->op_sv)) {
                    /* If op_sv is already a PADTMP then it is being used by
                     * some pad, so make a copy. */
                    sv_setsv(PAD_SVl(ix),cSVOPo->op_sv);