In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/33a4312b882ab5f5396974a8fe8f5235559c2d82?hp=6a29646efd2b54a6feec66ee83d2852418bfb748>

- Log -----------------------------------------------------------------
commit 33a4312b882ab5f5396974a8fe8f5235559c2d82
Author: Father Chrysostomos <spr...@cpan.org>
Date:   Sun Aug 7 15:53:40 2016 -0700

    Unify mark macros
    
    Use static inline functions to avoid having different code paths
    for GCC and non-GCC.  INCMARK is unused on CPAN and only used as
    a statement in core, so it can become a statement.
-----------------------------------------------------------------------

Summary of changes:
 inline.h | 23 +++++++++++++++++++++++
 pp.h     | 42 ++++++------------------------------------
 2 files changed, 29 insertions(+), 36 deletions(-)

diff --git a/inline.h b/inline.h
index 14e9dbe..4cc6a74 100644
--- a/inline.h
+++ b/inline.h
@@ -125,6 +125,29 @@ PadnameIN_SCOPE(const PADNAME * const pn, const U32 seq)
 }
 #endif
 
+/* ------------------------------- pp.h ------------------------------- */
+
+PERL_STATIC_INLINE I32
+S_TOPMARK(pTHX)
+{
+    DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log,
+                                "MARK top  %p %"IVdf"\n",
+                                 PL_markstack_ptr,
+                                 (IV)*PL_markstack_ptr)));
+    return *PL_markstack_ptr;
+}
+
+PERL_STATIC_INLINE I32
+S_POPMARK(pTHX)
+{
+    DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log,
+                                "MARK pop  %p %"IVdf"\n",
+                                 (PL_markstack_ptr-1),
+                                 (IV)*(PL_markstack_ptr-1))));
+    assert((PL_markstack_ptr > PL_markstack) || !"MARK underflow");
+    return *PL_markstack_ptr--;
+}
+
 /* ----------------------------- regexp.h ----------------------------- */
 
 PERL_STATIC_INLINE struct regexp *
diff --git a/pp.h b/pp.h
index d3d8f98..98d1a43 100644
--- a/pp.h
+++ b/pp.h
@@ -55,9 +55,7 @@ Refetch the stack pointer.  Used after a callback.  See 
L<perlcall>.
 #define MARK mark
 #define TARG targ
 
-#if defined(DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS)
-
-#  define PUSHMARK(p) \
+#define PUSHMARK(p) \
     STMT_START {                                                      \
         I32 * mark_stack_entry;                                       \
         if (UNLIKELY((mark_stack_entry = ++PL_markstack_ptr)          \
@@ -69,44 +67,16 @@ Refetch the stack pointer.  Used after a callback.  See 
L<perlcall>.
                 PL_markstack_ptr, (IV)*mark_stack_entry)));           \
     } STMT_END
 
-#  define TOPMARK \
-    ({                                                                \
-        DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log,                 \
-                "MARK top  %p %"IVdf"\n",                             \
-                PL_markstack_ptr, (IV)*PL_markstack_ptr)));           \
-        *PL_markstack_ptr;                                            \
-    })
+#define TOPMARK S_TOPMARK(aTHX)
+#define POPMARK S_POPMARK(aTHX)
 
-#  define POPMARK \
-    ({                                                                \
-        DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log,                 \
-                "MARK pop  %p %"IVdf"\n",                             \
-                (PL_markstack_ptr-1), (IV)*(PL_markstack_ptr-1))));   \
-        assert((PL_markstack_ptr > PL_markstack) || !"MARK underflow");\
-        *PL_markstack_ptr--;                                          \
-    })
-
-#  define INCMARK \
-    ({                                                                \
+#define INCMARK \
+    STMT_START {                                                      \
         DEBUG_s(DEBUG_v(PerlIO_printf(Perl_debug_log,                 \
                 "MARK inc  %p %"IVdf"\n",                             \
                 (PL_markstack_ptr+1), (IV)*(PL_markstack_ptr+1))));   \
-        *PL_markstack_ptr++;                                          \
-    })
-
-#else
-
-#  define PUSHMARK(p)                                                   \
-    STMT_START {                                                     \
-        I32 * mark_stack_entry;                                       \
-        if (UNLIKELY((mark_stack_entry = ++PL_markstack_ptr) == 
PL_markstack_max)) \
-           mark_stack_entry = markstack_grow();                      \
-        *mark_stack_entry  = (I32)((p) - PL_stack_base);              \
+        PL_markstack_ptr++;                                           \
     } STMT_END
-#  define TOPMARK                (*PL_markstack_ptr)
-#  define POPMARK                (*PL_markstack_ptr--)
-#  define INCMARK                (*PL_markstack_ptr++)
-#endif
 
 #define dSP            SV **sp = PL_stack_sp
 #define djSP           dSP

--
Perl5 Master Repository

Reply via email to