summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorGerard Goossen <gerard@tty.nl>2007-05-08 18:09:17 +0200
committerDave Mitchell <davem@fdisolutions.com>2007-05-12 22:41:17 +0000
commitb6214b8055070156c0c94b1aa6eb1e157422064b (patch)
tree5dcd50cc9c18aaf8842990599e4a301bc44bd94b /op.c
parent1b438339fe4a79ea019ab3758be0993b9b0b71df (diff)
downloadperl-b6214b8055070156c0c94b1aa6eb1e157422064b.tar.gz
Disable !a&&b, !b||a optimalization when PL_madskills
Message-Id: <20070508164556.GB15860@ostwald> p4raw-id: //depot/perl@31205
Diffstat (limited to 'op.c')
-rw-r--r--op.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/op.c b/op.c
index 30fb7fc21d..60537ad5f0 100644
--- a/op.c
+++ b/op.c
@@ -4240,7 +4240,8 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp)
/* optimize "!a && b" to "a || b", and "!a || b" to "a && b" */
if (first->op_type == OP_NOT
&& (first->op_flags & OPf_SPECIAL)
- && (first->op_flags & OPf_KIDS)) {
+ && (first->op_flags & OPf_KIDS)
+ && !PL_madskills) {
if (type == OP_AND || type == OP_OR) {
if (type == OP_AND)
type = OP_OR;
@@ -4251,11 +4252,7 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp)
if (o->op_next)
first->op_next = o->op_next;
cUNOPo->op_first = NULL;
-#ifdef PERL_MAD
- op_getmad(o,first,'O');
-#else
op_free(o);
-#endif
}
}
if (first->op_type == OP_CONST) {