save_freeop is not an expression, remove PL_Xpv
authorDaniel Dragan <bulk88@hotmail.com>
Thu, 15 Nov 2012 20:11:10 +0000 (15:11 -0500)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 16 Nov 2012 02:00:00 +0000 (18:00 -0800)
save_freeop and SAVEFREEOP are never used in expressions only statements.
Using PL_Xpv is never ideal. For me .text section dropped from 0xC1DFF to
0xC1DBF after applying this.

scope.h

index de18fe0..4373eac 100644 (file)
--- a/scope.h
+++ b/scope.h
@@ -272,23 +272,14 @@ scope has the given name. Name must be a literal string.
 
 #define save_freesv(op)                save_pushptr((void *)(op), SAVEt_FREESV)
 #define save_mortalizesv(op)   save_pushptr((void *)(op), SAVEt_MORTALIZESV)
-#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
+
 # define save_freeop(op)                    \
-    ({                                       \
+STMT_START {                                 \
       OP * const _o = (OP *)(op);             \
       assert(!_o->op_savefree);               \
       _o->op_savefree = 1;                     \
       save_pushptr((void *)(_o), SAVEt_FREEOP); \
-    })
-#else
-# define save_freeop(op)                       \
-    (                                           \
-      PL_Xpv = (XPV *)(op),                      \
-      assert_(!((OP *)PL_Xpv)->op_savefree)      \
-      ((OP *)PL_Xpv)->op_savefree = 1,            \
-      save_pushptr((void *)(PL_Xpv), SAVEt_FREEOP) \
-    )
-#endif
+    } STMT_END
 #define save_freepv(pv)                save_pushptr((void *)(pv), SAVEt_FREEPV)
 #define save_op()              save_pushptr((void *)(PL_op), SAVEt_OP)