From: Dave Mitchell Date: Thu, 1 Apr 2004 20:27:14 +0000 (+0000) Subject: Fix change #22376. Only mark a const as short-circuited X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d6fee5c7ac0d802f9b176ac2d9ce8ec59b68f49f;p=p5sagit%2Fp5-mst-13.2.git Fix change #22376. Only mark a const as short-circuited if it's actually a const! p4raw-link: @22376 on //depot/perl: e7fec78e344a7fdea63b9a2551a3c57cc1a50f4d p4raw-id: //depot/perl@22635 --- diff --git a/op.c b/op.c index 25db092..b38c892 100644 --- a/op.c +++ b/op.c @@ -3373,7 +3373,8 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp) (type == OP_DOR && !SvOK(((SVOP*)first)->op_sv))) { op_free(first); *firstp = Nullop; - other->op_private |= OPpCONST_SHORTCIRCUIT; + if (other->op_type == OP_CONST) + other->op_private |= OPpCONST_SHORTCIRCUIT; return other; } else { @@ -3396,7 +3397,8 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp) op_free(other); *otherp = Nullop; - first->op_private |= OPpCONST_SHORTCIRCUIT; + if (first->op_type == OP_CONST) + first->op_private |= OPpCONST_SHORTCIRCUIT; return first; } }