summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2015-04-15 16:05:05 +0100
committerDavid Mitchell <davem@iabyn.com>2015-04-19 18:42:00 +0100
commit93059c1aaf5fd5adc05efe29bdcc6c719aef3108 (patch)
tree7f6280f48aa2bc55d9578f27cb9f4337224f6ef8 /op.c
parentba7f043cd8beaaa711b275c2a15eb10e1f9ab7f8 (diff)
downloadperl-93059c1aaf5fd5adc05efe29bdcc6c719aef3108.tar.gz
skip some asserts on non-PERL_OP_PARENT builds
Some asserts I added for for the op_lastsib stuff, while correct on non-PERL_OP_PARENT builds, aren't necessary, and just increase the risk of breakage of some hypothetical CPAN module that is doing strange things.
Diffstat (limited to 'op.c')
-rw-r--r--op.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/op.c b/op.c
index c136a1a4eb..f912dd91db 100644
--- a/op.c
+++ b/op.c
@@ -299,7 +299,9 @@ Perl_Slab_Alloc(pTHX_ size_t sz)
gotit:
/* lastsib == 1, op_sibling == 0 implies a solitary unattached op */
o->op_lastsib = 1;
+#ifdef PERL_OP_PARENT
assert(!o->op_sibling);
+#endif
return (void *)o;
}
@@ -2554,14 +2556,8 @@ S_finalize_op(pTHX_ OP* o)
assert(kid->op_sibling == o);
}
# else
- if (OpHAS_SIBLING(kid)) {
- assert(!kid->op_lastsib);
- }
- else {
- assert(kid->op_lastsib);
- if (has_last)
- assert(kid == cLISTOPo->op_last);
- }
+ if (has_last && !OpHAS_SIBLING(kid))
+ assert(kid == cLISTOPo->op_last);
# endif
}
#endif