Fix typo in description.
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index d9cb1d0..6c32f66 100644 (file)
--- a/op.c
+++ b/op.c
@@ -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));
@@ -4538,10 +4528,8 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
            goto done;
 
        if (strEQ(s, "BEGIN") && !PL_error_count) {
-           dSP;
            const I32 oldscope = PL_scopestack_ix;
            ENTER;
-           PUSHSTACKi(PERLSI_REQUIRE);
            SAVECOPFILE(&PL_compiling);
            SAVECOPLINE(&PL_compiling);
 
@@ -4554,7 +4542,6 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
 
            PL_curcop = &PL_compiling;
            PL_compiling.op_private = (U8)(PL_hints & HINT_PRIVATE_MASK);
-           POPSTACK;
            LEAVE;
        }
        else if (strEQ(s, "END") && !PL_error_count) {
@@ -4628,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;
@@ -5801,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;
 }