Efficiency patchlet for pp_aassign()
[p5sagit/p5-mst-13.2.git] / doop.c
diff --git a/doop.c b/doop.c
index 33726bf..cb5560c 100644 (file)
--- a/doop.c
+++ b/doop.c
@@ -535,8 +535,8 @@ SV *right;
     char *lsave;
     char *rsave;
 
-    if (sv == left && !SvOK(sv) && !SvGMAGICAL(sv) && SvTYPE(sv) <= SVt_PVMG)
-       sv_setpvn(sv, "", 0);   /* avoid warning on &= etc. */
+    if (sv != left || (optype != OP_BIT_AND && !SvOK(sv) && !SvGMAGICAL(sv)))
+       sv_setpvn(sv, "", 0);   /* avoid undef warning on |= and ^= */
     lsave = lc = SvPV(left, leftlen);
     rsave = rc = SvPV(right, rightlen);
     len = leftlen < rightlen ? leftlen : rightlen;