diff options
author | Brent Dax <brentdax@cpan.org> | 2002-07-25 22:41:52 -0700 |
---|---|---|
committer | hv <hv@crypt.org> | 2002-08-05 15:04:54 +0000 |
commit | c963b151157dab5813a32fc6004b63916ad155e8 (patch) | |
tree | e88a528a16616c2f136f31b2c37b08e237b08799 /op.c | |
parent | d73f34fb2db5664941bbe71b34c335b0ae3b50b3 (diff) | |
download | perl-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.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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++; |