summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-07-27 12:54:49 +0200
committerNicholas Clark <nick@ccl4.org>2012-07-28 09:56:58 +0200
commit75a8cd125e994761848db7aca480a8aa108078a0 (patch)
tree17bcfae823e0f785813a5907fa32c2716bb0b901
parent32ed16fc7457f21807774447f05a5db39ea198c7 (diff)
downloadperl-75a8cd125e994761848db7aca480a8aa108078a0.tar.gz
Replace the macro RETURNX() with its expansion in FT_RETURN_{FALSE,TRUE}
The macros FT_RETURN_FALSE and FT_RETURN_TRUE in pp_ctl.c are already very complex, sufficient to trigger an internal failure in HP's compiler [and possibly also some humans :-)]. Replacing RETURNX() with the 3 statements it expands to makes the intent of macros clearer, and exposes more refactoring possibilities.
-rw-r--r--pp_sys.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 549256b572..3368d5fcad 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2925,16 +2925,22 @@ S_ft_stacking_return_false(pTHX_ SV *ret) {
STMT_START { \
if (PL_op->op_private & OPpFT_STACKING) \
return S_ft_stacking_return_false(aTHX_ X); \
- RETURNX(PL_op->op_flags & OPf_REF ? XPUSHs(X) : SETs(X)); \
+ PL_op->op_flags & OPf_REF ? XPUSHs(X) : SETs(X); \
+ PUTBACK; \
+ return NORMAL; \
} STMT_END
-#define FT_RETURN_TRUE(X) \
- RETURNX((void)( \
- PL_op->op_flags & OPf_REF \
- ? (bool)XPUSHs( \
+#define FT_RETURN_TRUE(X) \
+ STMT_START { \
+ (void)( \
+ PL_op->op_flags & OPf_REF \
+ ? (bool)XPUSHs( \
PL_op->op_private & OPpFT_STACKING ? (SV *)cGVOP_gv : (X) \
- ) \
- : (PL_op->op_private & OPpFT_STACKING || SETs(X)) \
- ))
+ ) \
+ : (PL_op->op_private & OPpFT_STACKING || SETs(X)) \
+ ); \
+ PUTBACK; \
+ return NORMAL; \
+ } STMT_END
#define FT_RETURNNO FT_RETURN_FALSE(&PL_sv_no)
#define FT_RETURNUNDEF FT_RETURN_FALSE(&PL_sv_undef)