summaryrefslogtreecommitdiff
path: root/cop.h
diff options
context:
space:
mode:
authorMichael G Schwern <schwern@pobox.com>2021-05-05 07:18:01 -0600
committerKarl Williamson <khw@cpan.org>2021-05-31 10:56:32 -0600
commit1f4fbd3b4b26604673abca2a5f911744e826b1f3 (patch)
tree7773c49ab07c92cda1f284740365a13e835c1376 /cop.h
parent77a6d54c0deb1165b37dcf11c21cd334ae2579bb (diff)
downloadperl-1f4fbd3b4b26604673abca2a5f911744e826b1f3.tar.gz
Base *.[ch] files: Replace leading tabs with blanks
This is a rebasing by @khw of part of GH #18792, which I needed to get in now to proceed with other commits. It also strips trailing white space from the affected files.
Diffstat (limited to 'cop.h')
-rw-r--r--cop.h392
1 files changed, 196 insertions, 196 deletions
diff --git a/cop.h b/cop.h
index b5f30bd041..0c2f07950f 100644
--- a/cop.h
+++ b/cop.h
@@ -65,12 +65,12 @@ typedef struct jmpenv JMPENV;
#define JMPENV_BOOTSTRAP \
STMT_START { \
- PERL_POISON_EXPR(PoisonNew(&PL_start_env, 1, JMPENV));\
- PL_top_env = &PL_start_env; \
- PL_start_env.je_prev = NULL; \
- PL_start_env.je_ret = -1; \
- PL_start_env.je_mustcatch = TRUE; \
- PL_start_env.je_old_delaymagic = 0; \
+ PERL_POISON_EXPR(PoisonNew(&PL_start_env, 1, JMPENV));\
+ PL_top_env = &PL_start_env; \
+ PL_start_env.je_prev = NULL; \
+ PL_start_env.je_ret = -1; \
+ PL_start_env.je_mustcatch = TRUE; \
+ PL_start_env.je_old_delaymagic = 0; \
JE_OLD_STACK_HWM_zero; \
} STMT_END
@@ -112,57 +112,57 @@ typedef struct jmpenv JMPENV;
#define JMPENV_PUSH(v) \
STMT_START { \
- DEBUG_l({ \
- int i = 0; JMPENV *p = PL_top_env; \
- while (p) { i++; p = p->je_prev; } \
- Perl_deb(aTHX_ "JUMPENV_PUSH level=%d at %s:%d\n", \
- i, __FILE__, __LINE__);}) \
- cur_env.je_prev = PL_top_env; \
+ DEBUG_l({ \
+ int i = 0; JMPENV *p = PL_top_env; \
+ while (p) { i++; p = p->je_prev; } \
+ Perl_deb(aTHX_ "JUMPENV_PUSH level=%d at %s:%d\n", \
+ i, __FILE__, __LINE__);}) \
+ cur_env.je_prev = PL_top_env; \
JE_OLD_STACK_HWM_save(cur_env); \
- cur_env.je_ret = PerlProc_setjmp(cur_env.je_buf, SCOPE_SAVES_SIGNAL_MASK); \
+ cur_env.je_ret = PerlProc_setjmp(cur_env.je_buf, SCOPE_SAVES_SIGNAL_MASK); \
JE_OLD_STACK_HWM_restore(cur_env); \
- PL_top_env = &cur_env; \
- cur_env.je_mustcatch = FALSE; \
- cur_env.je_old_delaymagic = PL_delaymagic; \
- (v) = cur_env.je_ret; \
+ PL_top_env = &cur_env; \
+ cur_env.je_mustcatch = FALSE; \
+ cur_env.je_old_delaymagic = PL_delaymagic; \
+ (v) = cur_env.je_ret; \
} STMT_END
#define JMPENV_POP \
STMT_START { \
- DEBUG_l({ \
- int i = -1; JMPENV *p = PL_top_env; \
- while (p) { i++; p = p->je_prev; } \
- Perl_deb(aTHX_ "JUMPENV_POP level=%d at %s:%d\n", \
- i, __FILE__, __LINE__);}) \
- assert(PL_top_env == &cur_env); \
- PL_delaymagic = cur_env.je_old_delaymagic; \
- PL_top_env = cur_env.je_prev; \
+ DEBUG_l({ \
+ int i = -1; JMPENV *p = PL_top_env; \
+ while (p) { i++; p = p->je_prev; } \
+ Perl_deb(aTHX_ "JUMPENV_POP level=%d at %s:%d\n", \
+ i, __FILE__, __LINE__);}) \
+ assert(PL_top_env == &cur_env); \
+ PL_delaymagic = cur_env.je_old_delaymagic; \
+ PL_top_env = cur_env.je_prev; \
} STMT_END
#define JMPENV_JUMP(v) \
STMT_START { \
- DEBUG_l({ \
- int i = -1; JMPENV *p = PL_top_env; \
- while (p) { i++; p = p->je_prev; } \
- Perl_deb(aTHX_ "JUMPENV_JUMP(%d) level=%d at %s:%d\n", \
- (int)v, i, __FILE__, __LINE__);}) \
- if (PL_top_env->je_prev) \
- PerlProc_longjmp(PL_top_env->je_buf, (v)); \
- if ((v) == 2) \
- PerlProc_exit(STATUS_EXIT); \
- PerlIO_printf(PerlIO_stderr(), "panic: top_env, v=%d\n", (int)v); \
- PerlProc_exit(1); \
+ DEBUG_l({ \
+ int i = -1; JMPENV *p = PL_top_env; \
+ while (p) { i++; p = p->je_prev; } \
+ Perl_deb(aTHX_ "JUMPENV_JUMP(%d) level=%d at %s:%d\n", \
+ (int)v, i, __FILE__, __LINE__);}) \
+ if (PL_top_env->je_prev) \
+ PerlProc_longjmp(PL_top_env->je_buf, (v)); \
+ if ((v) == 2) \
+ PerlProc_exit(STATUS_EXIT); \
+ PerlIO_printf(PerlIO_stderr(), "panic: top_env, v=%d\n", (int)v); \
+ PerlProc_exit(1); \
} STMT_END
#define CATCH_GET (PL_top_env->je_mustcatch)
#define CATCH_SET(v) \
STMT_START { \
- DEBUG_l( \
- Perl_deb(aTHX_ \
- "JUMPLEVEL set catch %d => %d (for %p) at %s:%d\n", \
- PL_top_env->je_mustcatch, v, (void*)PL_top_env, \
- __FILE__, __LINE__);) \
- PL_top_env->je_mustcatch = (v); \
+ DEBUG_l( \
+ Perl_deb(aTHX_ \
+ "JUMPLEVEL set catch %d => %d (for %p) at %s:%d\n", \
+ PL_top_env->je_mustcatch, v, (void*)PL_top_env, \
+ __FILE__, __LINE__);) \
+ PL_top_env->je_mustcatch = (v); \
} STMT_END
/*
@@ -406,7 +406,7 @@ hash of the key string, or zero if it has not been precomputed.
#define cophh_delete_pvn(cophh, keypv, keylen, hash, flags) \
Perl_refcounted_he_new_pvn(aTHX_ cophh, keypv, keylen, hash, \
- (SV *)NULL, flags)
+ (SV *)NULL, flags)
/*
=for apidoc Amx|COPHH *|cophh_delete_pvs|COPHH *cophh|"key"|U32 flags
@@ -419,7 +419,7 @@ of a string/length pair, and no precomputed hash.
#define cophh_delete_pvs(cophh, key, flags) \
Perl_refcounted_he_new_pvn(aTHX_ cophh, STR_WITH_LEN(key), 0, \
- (SV *)NULL, flags)
+ (SV *)NULL, flags)
/*
=for apidoc Amx|COPHH *|cophh_delete_pv|COPHH *cophh|char *key|U32 hash|U32 flags
@@ -455,7 +455,7 @@ struct cop {
/* label for this construct is now stored in cop_hints_hash */
#ifdef USE_ITHREADS
PADOFFSET cop_stashoff; /* offset into PL_stashpad, for the
- package the line was compiled in */
+ package the line was compiled in */
char * cop_file; /* name of file this command is from */
#else
HV * cop_stash; /* package line was compiled in */
@@ -522,7 +522,7 @@ string C<p>, creating the package if necessary.
#ifdef USE_ITHREADS
# define CopFILE(c) ((c)->cop_file)
# define CopFILEGV(c) (CopFILE(c) \
- ? gv_fetchfile(CopFILE(c)) : NULL)
+ ? gv_fetchfile(CopFILE(c)) : NULL)
# ifdef NETWARE
# define CopFILE_set(c,pv) ((c)->cop_file = savepv(pv))
@@ -533,16 +533,16 @@ string C<p>, creating the package if necessary.
# endif
# define CopFILESV(c) (CopFILE(c) \
- ? GvSV(gv_fetchfile(CopFILE(c))) : NULL)
+ ? GvSV(gv_fetchfile(CopFILE(c))) : NULL)
# define CopFILEAV(c) (CopFILE(c) \
- ? GvAV(gv_fetchfile(CopFILE(c))) : NULL)
+ ? GvAV(gv_fetchfile(CopFILE(c))) : NULL)
# define CopFILEAVx(c) (assert_(CopFILE(c)) \
- GvAV(gv_fetchfile(CopFILE(c))))
+ GvAV(gv_fetchfile(CopFILE(c))))
# define CopSTASH(c) PL_stashpad[(c)->cop_stashoff]
# define CopSTASH_set(c,hv) ((c)->cop_stashoff = (hv) \
- ? alloccopstash(hv) \
- : 0)
+ ? alloccopstash(hv) \
+ : 0)
# ifdef NETWARE
# define CopFILE_free(c) SAVECOPFILE_FREE(c)
# else
@@ -561,7 +561,7 @@ string C<p>, creating the package if necessary.
# define CopFILEAVx(c) (GvAV(CopFILEGV(c)))
# endif
# define CopFILE(c) (CopFILEGV(c) /* +2 for '_<' */ \
- ? GvNAME(CopFILEGV(c))+2 : NULL)
+ ? GvNAME(CopFILEGV(c))+2 : NULL)
# define CopSTASH(c) ((c)->cop_stash)
# define CopSTASH_set(c,hv) ((c)->cop_stash = (hv))
# define CopFILE_free(c) (SvREFCNT_dec(CopFILEGV(c)),(CopFILEGV(c) = NULL))
@@ -728,8 +728,8 @@ C<*len>. Upon return, C<*flags> will be set to either C<SVf_UTF8> or 0.
#define CopHINTS_get(c) ((c)->cop_hints + 0)
#define CopHINTS_set(c, h) STMT_START { \
- (c)->cop_hints = (h); \
- } STMT_END
+ (c)->cop_hints = (h); \
+ } STMT_END
/*
* Here we have some enormously heavy (or at least ponderous) wizardry.
@@ -781,20 +781,20 @@ struct block_format {
#endif
#define CX_PUSHSUB_GET_LVALUE_MASK(func) \
- /* If the context is indeterminate, then only the lvalue */ \
- /* flags that the caller also has are applicable. */ \
- ( \
- (PL_op->op_flags & OPf_WANT) \
- ? OPpENTERSUB_LVAL_MASK \
- : !(PL_op->op_private & OPpENTERSUB_LVAL_MASK) \
- ? 0 : (U8)func(aTHX) \
- )
+ /* If the context is indeterminate, then only the lvalue */ \
+ /* flags that the caller also has are applicable. */ \
+ ( \
+ (PL_op->op_flags & OPf_WANT) \
+ ? OPpENTERSUB_LVAL_MASK \
+ : !(PL_op->op_private & OPpENTERSUB_LVAL_MASK) \
+ ? 0 : (U8)func(aTHX) \
+ )
/* Restore old @_ */
#define CX_POP_SAVEARRAY(cx) \
STMT_START { \
AV *cx_pop_savearray_av = GvAV(PL_defgv); \
- GvAV(PL_defgv) = cx->blk_sub.savearray; \
+ GvAV(PL_defgv) = cx->blk_sub.savearray; \
cx->blk_sub.savearray = NULL; \
SvREFCNT_dec(cx_pop_savearray_av); \
} STMT_END
@@ -803,9 +803,9 @@ struct block_format {
* leave any (a fast av_clear(ary), basically) */
#define CLEAR_ARGARRAY(ary) \
STMT_START { \
- AvMAX(ary) += AvARRAY(ary) - AvALLOC(ary); \
- AvARRAY(ary) = AvALLOC(ary); \
- AvFILLp(ary) = -1; \
+ AvMAX(ary) += AvARRAY(ary) - AvALLOC(ary); \
+ AvARRAY(ary) = AvALLOC(ary); \
+ AvFILLp(ary) = -1; \
} STMT_END
@@ -835,27 +835,27 @@ struct block_eval {
struct block_loop {
LOOP * my_op; /* My op, that contains redo, next and last ops. */
union { /* different ways of locating the iteration variable */
- SV **svp; /* for lexicals: address of pad slot */
- GV *gv; /* for package vars */
+ SV **svp; /* for lexicals: address of pad slot */
+ GV *gv; /* for package vars */
} itervar_u;
SV *itersave; /* the original iteration var */
union {
- struct { /* CXt_LOOP_ARY, C<for (@ary)> */
- AV *ary; /* array being iterated over */
- IV ix; /* index relative to base of array */
- } ary;
- struct { /* CXt_LOOP_LIST, C<for (list)> */
- I32 basesp; /* first element of list on stack */
- IV ix; /* index relative to basesp */
- } stack;
- struct { /* CXt_LOOP_LAZYIV, C<for (1..9)> */
- IV cur;
- IV end;
- } lazyiv;
- struct { /* CXt_LOOP_LAZYSV C<for ('a'..'z')> */
- SV * cur;
- SV * end; /* maxiumum value (or minimum in reverse) */
- } lazysv;
+ struct { /* CXt_LOOP_ARY, C<for (@ary)> */
+ AV *ary; /* array being iterated over */
+ IV ix; /* index relative to base of array */
+ } ary;
+ struct { /* CXt_LOOP_LIST, C<for (list)> */
+ I32 basesp; /* first element of list on stack */
+ IV ix; /* index relative to basesp */
+ } stack;
+ struct { /* CXt_LOOP_LAZYIV, C<for (1..9)> */
+ IV cur;
+ IV end;
+ } lazyiv;
+ struct { /* CXt_LOOP_LAZYSV C<for ('a'..'z')> */
+ SV * cur;
+ SV * end; /* maxiumum value (or minimum in reverse) */
+ } lazysv;
} state_u;
#ifdef USE_ITHREADS
PAD *oldcomppad; /* needed to map itervar_u.svp during thread clone */
@@ -891,7 +891,7 @@ struct block_loop {
/* given/when context */
struct block_givwhen {
- OP *leave_op;
+ OP *leave_op;
SV *defsv_save; /* the original $_ */
};
@@ -912,11 +912,11 @@ struct block {
I32 blku_oldscopesp; /* scope stack index */
union {
- struct block_sub blku_sub;
- struct block_format blku_format;
- struct block_eval blku_eval;
- struct block_loop blku_loop;
- struct block_givwhen blku_givwhen;
+ struct block_sub blku_sub;
+ struct block_format blku_format;
+ struct block_eval blku_eval;
+ struct block_loop blku_loop;
+ struct block_givwhen blku_givwhen;
} blk_u;
};
#define blk_oldsp cx_u.cx_blk.blku_oldsp
@@ -936,15 +936,15 @@ struct block {
#define CX_DEBUG(cx, action) \
DEBUG_l( \
- Perl_deb(aTHX_ "CX %ld %s %s (scope %ld,%ld) (save %ld,%ld) at %s:%d\n",\
- (long)cxstack_ix, \
- action, \
- PL_block_type[CxTYPE(cx)], \
- (long)PL_scopestack_ix, \
- (long)(cx->blk_oldscopesp), \
- (long)PL_savestack_ix, \
- (long)(cx->blk_oldsaveix), \
- __FILE__, __LINE__));
+ Perl_deb(aTHX_ "CX %ld %s %s (scope %ld,%ld) (save %ld,%ld) at %s:%d\n",\
+ (long)cxstack_ix, \
+ action, \
+ PL_block_type[CxTYPE(cx)], \
+ (long)PL_scopestack_ix, \
+ (long)(cx->blk_oldscopesp), \
+ (long)PL_savestack_ix, \
+ (long)(cx->blk_oldsaveix), \
+ __FILE__, __LINE__));
@@ -983,32 +983,32 @@ struct subst {
#define sb_rx cx_u.cx_subst.sbu_rx
# define CX_PUSHSUBST(cx) CXINC, cx = CX_CUR(), \
- cx->blk_oldsaveix = oldsave, \
- cx->sb_iters = iters, \
- cx->sb_maxiters = maxiters, \
- cx->sb_rflags = r_flags, \
- cx->sb_rxtainted = rxtainted, \
- cx->sb_orig = orig, \
- cx->sb_dstr = dstr, \
- cx->sb_targ = targ, \
- cx->sb_s = s, \
- cx->sb_m = m, \
- cx->sb_strend = strend, \
- cx->sb_rxres = NULL, \
- cx->sb_rx = rx, \
- cx->cx_type = CXt_SUBST | (once ? CXp_ONCE : 0); \
- rxres_save(&cx->sb_rxres, rx); \
- (void)ReREFCNT_inc(rx); \
+ cx->blk_oldsaveix = oldsave, \
+ cx->sb_iters = iters, \
+ cx->sb_maxiters = maxiters, \
+ cx->sb_rflags = r_flags, \
+ cx->sb_rxtainted = rxtainted, \
+ cx->sb_orig = orig, \
+ cx->sb_dstr = dstr, \
+ cx->sb_targ = targ, \
+ cx->sb_s = s, \
+ cx->sb_m = m, \
+ cx->sb_strend = strend, \
+ cx->sb_rxres = NULL, \
+ cx->sb_rx = rx, \
+ cx->cx_type = CXt_SUBST | (once ? CXp_ONCE : 0); \
+ rxres_save(&cx->sb_rxres, rx); \
+ (void)ReREFCNT_inc(rx); \
SvREFCNT_inc_void_NN(targ)
# define CX_POPSUBST(cx) \
STMT_START { \
REGEXP *re; \
assert(CxTYPE(cx) == CXt_SUBST); \
- rxres_free(&cx->sb_rxres); \
- re = cx->sb_rx; \
- cx->sb_rx = NULL; \
- ReREFCNT_dec(re); \
+ rxres_free(&cx->sb_rxres); \
+ re = cx->sb_rx; \
+ cx->sb_rx = NULL; \
+ ReREFCNT_dec(re); \
SvREFCNT_dec_NN(cx->sb_targ); \
} STMT_END
#endif
@@ -1017,8 +1017,8 @@ struct subst {
struct context {
union {
- struct block cx_blk;
- struct subst cx_subst;
+ struct block cx_blk;
+ struct subst cx_subst;
} cx_u;
};
#define cx_type cx_u.cx_subst.sbu_type
@@ -1080,9 +1080,9 @@ struct context {
&& CxTYPE(cx) <= CXt_LOOP_PLAIN)
#define CxMULTICALL(c) ((c)->cx_type & CXp_MULTICALL)
#define CxREALEVAL(c) (((c)->cx_type & (CXTYPEMASK|CXp_REAL)) \
- == (CXt_EVAL|CXp_REAL))
+ == (CXt_EVAL|CXp_REAL))
#define CxEVALBLOCK(c) (((c)->cx_type & (CXTYPEMASK|CXp_EVALBLOCK)) \
- == (CXt_EVAL|CXp_EVALBLOCK))
+ == (CXt_EVAL|CXp_EVALBLOCK))
#define CxTRY(c) (((c)->cx_type & (CXTYPEMASK|CXp_TRY)) \
== (CXt_EVAL|CXp_TRY))
#define CxFOREACH(c) ( CxTYPE(cx) >= CXt_LOOP_ARY \
@@ -1101,20 +1101,20 @@ struct context {
/* extra flags for Perl_call_* routines */
#define G_DISCARD 0x4 /* Call FREETMPS.
- Don't change this without consulting the
- hash actions codes defined in hv.h */
+ Don't change this without consulting the
+ hash actions codes defined in hv.h */
#define G_EVAL 0x8 /* Assume eval {} around subroutine call. */
#define G_NOARGS 0x10 /* Don't construct a @_ array. */
#define G_KEEPERR 0x20 /* Warn for errors, don't overwrite $@ */
#define G_NODEBUG 0x40 /* Disable debugging at toplevel. */
#define G_METHOD 0x80 /* Calling method. */
#define G_FAKINGEVAL 0x100 /* Faking an eval context for call_sv or
- fold_constants. */
+ fold_constants. */
#define G_UNDEF_FILL 0x200 /* Fill the stack with &PL_sv_undef
- A special case for UNSHIFT in
- Perl_magic_methcall(). */
+ A special case for UNSHIFT in
+ Perl_magic_methcall(). */
#define G_WRITING_TO_STDERR 0x400 /* Perl_write_to_stderr() is calling
- Perl_magic_methcall(). */
+ Perl_magic_methcall(). */
#define G_RE_REPARSING 0x800 /* compiling a run-time /(?{..})/ */
#define G_METHOD_NAMED 0x1000 /* calling named method, eg without :: or ' */
#define G_RETHROW 0x2000 /* eval_sv(): re-throw any error */
@@ -1158,8 +1158,8 @@ struct stackinfo {
I32 si_cxsubix; /* topmost sub/eval/format */
I32 si_type; /* type of runlevel */
I32 si_markoff; /* offset where markstack begins for us.
- * currently used only with DEBUGGING,
- * but not #ifdef-ed for bincompat */
+ * currently used only with DEBUGGING,
+ * but not #ifdef-ed for bincompat */
#if defined DEBUGGING && !defined DEBUGGING_RE_ONLY
/* high water mark: for checking if the stack was correctly extended /
* tested for extension by each pp function */
@@ -1195,25 +1195,25 @@ typedef struct stackinfo PERL_SI;
#define PUSHSTACKi(type) \
STMT_START { \
- PERL_SI *next = PL_curstackinfo->si_next; \
- DEBUG_l({ \
- int i = 0; PERL_SI *p = PL_curstackinfo; \
- while (p) { i++; p = p->si_prev; } \
- Perl_deb(aTHX_ "push STACKINFO %d at %s:%d\n", \
- i, __FILE__, __LINE__);}) \
- if (!next) { \
- next = new_stackinfo(32, 2048/sizeof(PERL_CONTEXT) - 1); \
- next->si_prev = PL_curstackinfo; \
- PL_curstackinfo->si_next = next; \
- } \
- next->si_type = type; \
- next->si_cxix = -1; \
- next->si_cxsubix = -1; \
+ PERL_SI *next = PL_curstackinfo->si_next; \
+ DEBUG_l({ \
+ int i = 0; PERL_SI *p = PL_curstackinfo; \
+ while (p) { i++; p = p->si_prev; } \
+ Perl_deb(aTHX_ "push STACKINFO %d at %s:%d\n", \
+ i, __FILE__, __LINE__);}) \
+ if (!next) { \
+ next = new_stackinfo(32, 2048/sizeof(PERL_CONTEXT) - 1); \
+ next->si_prev = PL_curstackinfo; \
+ PL_curstackinfo->si_next = next; \
+ } \
+ next->si_type = type; \
+ next->si_cxix = -1; \
+ next->si_cxsubix = -1; \
PUSHSTACK_INIT_HWM(next); \
- AvFILLp(next->si_stack) = 0; \
- SWITCHSTACK(PL_curstack,next->si_stack); \
- PL_curstackinfo = next; \
- SET_MARK_OFFSET; \
+ AvFILLp(next->si_stack) = 0; \
+ SWITCHSTACK(PL_curstack,next->si_stack); \
+ PL_curstackinfo = next; \
+ SET_MARK_OFFSET; \
} STMT_END
#define PUSHSTACK PUSHSTACKi(PERLSI_UNKNOWN)
@@ -1222,27 +1222,27 @@ typedef struct stackinfo PERL_SI;
* PUTBACK/SPAGAIN to flush/refresh any local SP that may be active */
#define POPSTACK \
STMT_START { \
- dSP; \
- PERL_SI * const prev = PL_curstackinfo->si_prev; \
- DEBUG_l({ \
- int i = -1; PERL_SI *p = PL_curstackinfo; \
- while (p) { i++; p = p->si_prev; } \
- Perl_deb(aTHX_ "pop STACKINFO %d at %s:%d\n", \
- i, __FILE__, __LINE__);}) \
- if (!prev) { \
- Perl_croak_popstack(); \
- } \
- SWITCHSTACK(PL_curstack,prev->si_stack); \
- /* don't free prev here, free them all at the END{} */ \
- PL_curstackinfo = prev; \
+ dSP; \
+ PERL_SI * const prev = PL_curstackinfo->si_prev; \
+ DEBUG_l({ \
+ int i = -1; PERL_SI *p = PL_curstackinfo; \
+ while (p) { i++; p = p->si_prev; } \
+ Perl_deb(aTHX_ "pop STACKINFO %d at %s:%d\n", \
+ i, __FILE__, __LINE__);}) \
+ if (!prev) { \
+ Perl_croak_popstack(); \
+ } \
+ SWITCHSTACK(PL_curstack,prev->si_stack); \
+ /* don't free prev here, free them all at the END{} */ \
+ PL_curstackinfo = prev; \
} STMT_END
#define POPSTACK_TO(s) \
STMT_START { \
- while (PL_curstack != s) { \
- dounwind(-1); \
- POPSTACK; \
- } \
+ while (PL_curstack != s) { \
+ dounwind(-1); \
+ POPSTACK; \
+ } \
} STMT_END
/*
@@ -1293,43 +1293,43 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>.
#define PUSH_MULTICALL_FLAGS(the_cv, flags) \
STMT_START { \
PERL_CONTEXT *cx; \
- CV * const _nOnclAshIngNamE_ = the_cv; \
- CV * const cv = _nOnclAshIngNamE_; \
- PADLIST * const padlist = CvPADLIST(cv); \
- multicall_oldcatch = CATCH_GET; \
- CATCH_SET(TRUE); \
- PUSHSTACKi(PERLSI_MULTICALL); \
- cx = cx_pushblock((CXt_SUB|CXp_MULTICALL|flags), (U8)gimme, \
+ CV * const _nOnclAshIngNamE_ = the_cv; \
+ CV * const cv = _nOnclAshIngNamE_; \
+ PADLIST * const padlist = CvPADLIST(cv); \
+ multicall_oldcatch = CATCH_GET; \
+ CATCH_SET(TRUE); \
+ PUSHSTACKi(PERLSI_MULTICALL); \
+ cx = cx_pushblock((CXt_SUB|CXp_MULTICALL|flags), (U8)gimme, \
PL_stack_sp, PL_savestack_ix); \
cx_pushsub(cx, cv, NULL, 0); \
- SAVEOP(); \
+ SAVEOP(); \
if (!(flags & CXp_SUB_RE_FAKE)) \
CvDEPTH(cv)++; \
- if (CvDEPTH(cv) >= 2) \
- Perl_pad_push(aTHX_ padlist, CvDEPTH(cv)); \
- PAD_SET_CUR_NOSAVE(padlist, CvDEPTH(cv)); \
- multicall_cop = CvSTART(cv); \
+ if (CvDEPTH(cv) >= 2) \
+ Perl_pad_push(aTHX_ padlist, CvDEPTH(cv)); \
+ PAD_SET_CUR_NOSAVE(padlist, CvDEPTH(cv)); \
+ multicall_cop = CvSTART(cv); \
} STMT_END
#define MULTICALL \
STMT_START { \
- PL_op = multicall_cop; \
- CALLRUNOPS(aTHX); \
+ PL_op = multicall_cop; \
+ CALLRUNOPS(aTHX); \
} STMT_END
#define POP_MULTICALL \
STMT_START { \
PERL_CONTEXT *cx; \
- cx = CX_CUR(); \
- CX_LEAVE_SCOPE(cx); \
+ cx = CX_CUR(); \
+ CX_LEAVE_SCOPE(cx); \
cx_popsub_common(cx); \
gimme = cx->blk_gimme; \
PERL_UNUSED_VAR(gimme); /* for API */ \
- cx_popblock(cx); \
- CX_POP(cx); \
- POPSTACK; \
- CATCH_SET(multicall_oldcatch); \
- SPAGAIN; \
+ cx_popblock(cx); \
+ CX_POP(cx); \
+ POPSTACK; \
+ CATCH_SET(multicall_oldcatch); \
+ SPAGAIN; \
} STMT_END
/* Change the CV of an already-pushed MULTICALL CxSUB block.
@@ -1337,20 +1337,20 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>.
#define CHANGE_MULTICALL_FLAGS(the_cv, flags) \
STMT_START { \
- CV * const _nOnclAshIngNamE_ = the_cv; \
- CV * const cv = _nOnclAshIngNamE_; \
- PADLIST * const padlist = CvPADLIST(cv); \
+ CV * const _nOnclAshIngNamE_ = the_cv; \
+ CV * const cv = _nOnclAshIngNamE_; \
+ PADLIST * const padlist = CvPADLIST(cv); \
PERL_CONTEXT *cx = CX_CUR(); \
- assert(CxMULTICALL(cx)); \
+ assert(CxMULTICALL(cx)); \
cx_popsub_common(cx); \
- cx->cx_type = (CXt_SUB|CXp_MULTICALL|flags); \
+ cx->cx_type = (CXt_SUB|CXp_MULTICALL|flags); \
cx_pushsub(cx, cv, NULL, 0); \
if (!(flags & CXp_SUB_RE_FAKE)) \
CvDEPTH(cv)++; \
- if (CvDEPTH(cv) >= 2) \
- Perl_pad_push(aTHX_ padlist, CvDEPTH(cv)); \
- PAD_SET_CUR_NOSAVE(padlist, CvDEPTH(cv)); \
- multicall_cop = CvSTART(cv); \
+ if (CvDEPTH(cv) >= 2) \
+ Perl_pad_push(aTHX_ padlist, CvDEPTH(cv)); \
+ PAD_SET_CUR_NOSAVE(padlist, CvDEPTH(cv)); \
+ multicall_cop = CvSTART(cv); \
} STMT_END
/*
* ex: set ts=8 sts=4 sw=4 et: