# endif
s |void* |parse_body |NULLOK char **env|XSINIT_t xsinit
rs |void |run_body |I32 oldscope
-s |void |call_body |NN const OP *myop|bool is_eval
-s |void* |call_list_body |NN CV *cv
s |SV * |incpush_if_exists|NN SV *dir
#endif
#ifdef PERL_CORE
#define parse_body S_parse_body
#define run_body S_run_body
-#define call_body S_call_body
-#define call_list_body S_call_list_body
#define incpush_if_exists S_incpush_if_exists
#endif
#endif
#ifdef PERL_CORE
#define parse_body(a,b) S_parse_body(aTHX_ a,b)
#define run_body(a) S_run_body(aTHX_ a)
-#define call_body(a,b) S_call_body(aTHX_ a,b)
-#define call_list_body(a) S_call_list_body(aTHX_ a)
#define incpush_if_exists(a) S_incpush_if_exists(aTHX_ a)
#endif
#endif
#endif
#endif
+#define CALL_BODY_EVAL(myop) \
+ if (PL_op == (myop)) \
+ PL_op = Perl_pp_entereval(aTHX); \
+ if (PL_op) \
+ CALLRUNOPS(aTHX);
+
+#define CALL_BODY_SUB(myop) \
+ if (PL_op == (myop)) \
+ PL_op = Perl_pp_entersub(aTHX); \
+ if (PL_op) \
+ CALLRUNOPS(aTHX);
+
+#define CALL_LIST_BODY(cv) \
+ PUSHMARK(PL_stack_sp); \
+ call_sv((SV*)(cv), G_EVAL|G_DISCARD);
+
static void
S_init_tls_and_interp(PerlInterpreter *my_perl)
{
if (!(flags & G_EVAL)) {
CATCH_SET(TRUE);
- call_body((OP*)&myop, FALSE);
+ CALL_BODY_SUB((OP*)&myop);
retval = PL_stack_sp - (PL_stack_base + oldmark);
CATCH_SET(oldcatch);
}
switch (ret) {
case 0:
redo_body:
- call_body((OP*)&myop, FALSE);
+ CALL_BODY_SUB((OP*)&myop);
retval = PL_stack_sp - (PL_stack_base + oldmark);
if (!(flags & G_KEEPERR))
sv_setpvn(ERRSV,"",0);
return retval;
}
-STATIC void
-S_call_body(pTHX_ const OP *myop, bool is_eval)
-{
- dVAR;
- if (PL_op == myop) {
- if (is_eval)
- PL_op = Perl_pp_entereval(aTHX); /* this doesn't do a POPMARK */
- else
- PL_op = Perl_pp_entersub(aTHX); /* this does */
- }
- if (PL_op)
- CALLRUNOPS(aTHX);
-}
-
/* Eval a string. The G_EVAL flag is always assumed. */
/*
switch (ret) {
case 0:
redo_body:
- call_body((OP*)&myop,TRUE);
+ CALL_BODY_EVAL((OP*)&myop);
retval = PL_stack_sp - (PL_stack_base + oldmark);
if (!(flags & G_KEEPERR))
sv_setpvn(ERRSV,"",0);
if (PL_madskills)
PL_madskills |= 16384;
#endif
- call_list_body(cv);
+ CALL_LIST_BODY(cv);
#ifdef PERL_MAD
if (PL_madskills)
PL_madskills &= ~16384;
}
}
-STATIC void *
-S_call_list_body(pTHX_ CV *cv)
-{
- dVAR;
- PUSHMARK(PL_stack_sp);
- call_sv((SV*)cv, G_EVAL|G_DISCARD);
- return NULL;
-}
-
void
Perl_my_exit(pTHX_ U32 status)
{
STATIC void S_run_body(pTHX_ I32 oldscope)
__attribute__noreturn__;
-STATIC void S_call_body(pTHX_ const OP *myop, bool is_eval)
- __attribute__nonnull__(pTHX_1);
-
-STATIC void* S_call_list_body(pTHX_ CV *cv)
- __attribute__nonnull__(pTHX_1);
-
STATIC SV * S_incpush_if_exists(pTHX_ SV *dir)
__attribute__nonnull__(pTHX_1);