Front page | perl.perl5.porters |
Postings from December 2011
sprout/POPBLOCK_normal
Thread Next
From:
Reini Urban
Date:
December 6, 2011 15:02
Subject:
sprout/POPBLOCK_normal
Message ID:
4EDCDE1D.703@cpanel.net
gives me with DEBUGGING and not threaded:
cpan/Devel-PPPort/t/variables.t perl: pp_ctl.c:2135: Perl_pp_leave:
Assertion `PL_markstack_ptr == PL_markstack +
cx->cx_u.cx_blk.blku_oldmarksp' failed.
cpan/Time-HiRes/t/stat.t perl: pp_ctl.c:2296: Perl_pp_leaveloop:
Assertion `PL_markstack_ptr == PL_markstack +
cx->cx_u.cx_blk.blku_oldmarksp' failed
And I don't like that this patch replaces the assert with an unneeded
assignment. Less security and slower for two macros being removed.
--- a/cop.h
+++ b/cop.h
@@ -867,22 +867,13 @@ struct block {
cx->blk_gimme = (U8)gimme; \
DEBUG_CX("PUSH");
-/* Exit a block at the end of its normal lifetime */
-#define POPBLOCK_normal(cx,pm) POPBLOCK_common(cx,pm,1)
-
/* Exit a block (RETURN and LAST). */
-#define POPBLOCK(cx,pm) POPBLOCK_common(cx,pm,0)
-
-/* Do not use this macro, as its name may change, or it may vanish in a
- puff of smoke. */
-#define POPBLOCK_common(cx,pm,normalcy)
\
+#define POPBLOCK(cx,pm)
\
DEBUG_CX("POP"); \
cx = &cxstack[cxstack_ix--], \
newsp = PL_stack_base + cx->blk_oldsp, \
PL_curcop = cx->blk_oldcop, \
- normalcy \
- ? assert(PL_markstack_ptr == PL_markstack + cx->blk_oldmarksp) \
- : (PL_markstack_ptr = PL_markstack + cx->blk_oldmarksp), \
+ PL_markstack_ptr = PL_markstack + cx->blk_oldmarksp, \
PL_scopestack_ix = cx->blk_oldscopesp, \
pm = cx->blk_oldpm, \
gimme = cx->blk_gimme;
--
Reini
Thread Next
-
sprout/POPBLOCK_normal
by Reini Urban