Fix typo in description.
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index 03ca56e..6c32f66 100644 (file)
--- a/op.c
+++ b/op.c
@@ -407,7 +407,7 @@ Perl_op_clear(pTHX_ OP *o)
 clear_pmop:
        {
            HV * const pmstash = PmopSTASH(cPMOPo);
-           if (pmstash && SvREFCNT(pmstash)) {
+           if (pmstash && !SvIS_FREED(pmstash)) {
                MAGIC * const mg = mg_find((SV*)pmstash, PERL_MAGIC_symtab);
                if (mg) {
                    PMOP *pmop = (PMOP*) mg->mg_obj;
@@ -2058,7 +2058,6 @@ Perl_fold_constants(pTHX_ register OP *o)
        /* XXX might want a ck_negate() for this */
        cUNOPo->op_first->op_private &= ~OPpCONST_STRICT;
        break;
-    case OP_SPRINTF:
     case OP_UCFIRST:
     case OP_LCFIRST:
     case OP_UC:
@@ -3300,15 +3299,6 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right)
            /* Result of assignment is always 1 (or we'd be dead already) */
            return newSVOP(OP_CONST, 0, newSViv(1));
        }
-       /* optimise C<my @x = ()> to C<my @x>, and likewise for hashes */
-       if ((left->op_type == OP_PADAV || left->op_type == OP_PADHV)
-               && right->op_type == OP_STUB
-               && (left->op_private & OPpLVAL_INTRO))
-       {
-           op_free(right);
-           left->op_flags &= ~(OPf_REF|OPf_SPECIAL);
-           return left;
-       }
        curop = list(force_list(left));
        o = newBINOP(OP_AASSIGN, flags, list(force_list(right)), curop);
        o->op_private = (U8)(0 | (flags >> 8));
@@ -4625,9 +4615,10 @@ Perl_newCONSTSUB(pTHX_ HV *stash, const char *name, SV *sv)
     CvCONST_on(cv);
     sv_setpvn((SV*)cv, "", 0);  /* prototype is "" */
 
+#ifdef USE_ITHREADS
     if (stash)
        CopSTASH_free(PL_curcop);
-
+#endif
     LEAVE;
 
     return cv;
@@ -5798,19 +5789,6 @@ Perl_ck_sassign(pTHX_ OP *o)
            return kid;
        }
     }
-    /* optimise C<my $x = undef> to C<my $x> */
-    if (kid->op_type == OP_UNDEF) {
-       OP * const kkid = kid->op_sibling;
-       if (kkid && kkid->op_type == OP_PADSV
-               && (kkid->op_private & OPpLVAL_INTRO))
-       {
-           cLISTOPo->op_first = NULL;
-           kid->op_sibling = NULL;
-           op_free(o);
-           op_free(kid);
-           return kkid;
-       }
-    }
     return o;
 }