summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorBrent Dax <brentdax@cpan.org>2002-07-25 22:41:52 -0700
committerhv <hv@crypt.org>2002-08-05 15:04:54 +0000
commitc963b151157dab5813a32fc6004b63916ad155e8 (patch)
treee88a528a16616c2f136f31b2c37b08e237b08799 /op.c
parentd73f34fb2db5664941bbe71b34c335b0ae3b50b3 (diff)
downloadperl-c963b151157dab5813a32fc6004b63916ad155e8.tar.gz
Defined-or patch (cleaned up)
From: "Brent Dax" <brentdax@cpan.org> Message-id: <000001c234a1$d1ca72c0$6501a8c0@deepblue> p4raw-id: //depot/perl@17682
Diffstat (limited to 'op.c')
-rw-r--r--op.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/op.c b/op.c
index 5a60a1cd8d..c8dba1bd19 100644
--- a/op.c
+++ b/op.c
@@ -1243,6 +1243,7 @@ Perl_scalarvoid(pTHX_ OP *o)
case OP_OR:
case OP_AND:
+ case OP_DOR:
case OP_COND_EXPR:
for (kid = cUNOPo->op_first->op_sibling; kid; kid = kid->op_sibling)
scalarvoid(kid);
@@ -1626,6 +1627,7 @@ Perl_mod(pTHX_ OP *o, I32 type)
case OP_SASSIGN:
case OP_ANDASSIGN:
case OP_ORASSIGN:
+ case OP_DORASSIGN:
case OP_AELEMFAST:
PL_modcount++;
break;
@@ -3617,7 +3619,7 @@ Perl_newASSIGNOP(pTHX_ I32 flags, OP *left, I32 optype, OP *right)
OP *o;
if (optype) {
- if (optype == OP_ANDASSIGN || optype == OP_ORASSIGN) {
+ if (optype == OP_ANDASSIGN || optype == OP_ORASSIGN || optype == OP_DORASSIGN) {
return newLOGOP(optype, 0,
mod(scalar(left), optype),
newUNOP(OP_SASSIGN, 0, scalar(right)));
@@ -3940,7 +3942,7 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp)
if (!other)
return first;
- if (type == OP_ANDASSIGN || type == OP_ORASSIGN)
+ if (type == OP_ANDASSIGN || type == OP_ORASSIGN || type == OP_DORASSIGN)
other->op_private |= OPpASSIGN_BACKWARDS; /* other is an OP_SASSIGN */
NewOp(1101, logop, 1, LOGOP);
@@ -7145,8 +7147,10 @@ Perl_peep(pTHX_ register OP *o)
case OP_GREPWHILE:
case OP_AND:
case OP_OR:
+ case OP_DOR:
case OP_ANDASSIGN:
case OP_ORASSIGN:
+ case OP_DORASSIGN:
case OP_COND_EXPR:
case OP_RANGE:
o->op_seq = PL_op_seqmax++;