#define CxOLD_IN_EVAL(cx) (((cx)->blk_u16) & 0x7F)
#define CxOLD_OP_TYPE(cx) (((cx)->blk_u16) >> 7)
-#define PUSHEVAL(cx,n) \
+#define PUSHEVAL(cx, op, n) \
STMT_START { \
assert(!(PL_in_eval & ~0x7F)); \
assert(!(PL_op->op_type & ~0x1FF)); \
cx->blk_eval.old_eval_root = PL_eval_root; \
cx->blk_eval.cur_text = PL_parser ? PL_parser->linestr : NULL; \
cx->blk_eval.cv = NULL; /* set by doeval_compile() as applicable */ \
- cx->blk_eval.retop = NULL; \
+ cx->blk_eval.retop = op; \
cx->blk_eval.cur_top_env = PL_top_env; \
} STMT_END
: Used in perly.y
ApdR |OP* |op_convert_list |I32 optype|I32 flags|NULLOK OP* o
: Used in op.c and perl.c
-pM |PERL_CONTEXT* |create_eval_scope|U32 flags
+pM |void |create_eval_scope|NULLOK OP *retop|U32 flags
Aprd |void |croak_sv |NN SV *baseex
: croak()'s first parm can be NULL. Otherwise, mod_perl breaks.
Afprd |void |croak |NULLOK const char* pat|...
#define closest_cop(a,b,c,d) Perl_closest_cop(aTHX_ a,b,c,d)
#define core_prototype(a,b,c,d) Perl_core_prototype(aTHX_ a,b,c,d)
#define coresub_op(a,b,c) Perl_coresub_op(aTHX_ a,b,c)
-#define create_eval_scope(a) Perl_create_eval_scope(aTHX_ a)
+#define create_eval_scope(a,b) Perl_create_eval_scope(aTHX_ a,b)
#define croak_no_mem Perl_croak_no_mem
#define croak_popstack Perl_croak_popstack
#define custom_op_get_field(a,b) Perl_custom_op_get_field(aTHX_ a,b)
PL_op = curop;
old_cxix = cxstack_ix;
- create_eval_scope(G_FAKINGEVAL);
+ create_eval_scope(NULL, G_FAKINGEVAL);
/* Verify that we don't need to save it: */
assert(PL_curcop == &PL_compiling);
myop.op_other = (OP*)&myop;
(void)POPMARK;
old_cxix = cxstack_ix;
- create_eval_scope(flags|G_FAKINGEVAL);
+ create_eval_scope(NULL, flags|G_FAKINGEVAL);
(void)INCMARK;
JMPENV_PUSH(ret);
/* switch to eval mode */
PUSHBLOCK(cx, CXt_EVAL, gimme, SP, old_savestack_ix);
- PUSHEVAL(cx, name);
- cx->blk_eval.retop = PL_op->op_next;
+ PUSHEVAL(cx, PL_op->op_next, name);
SAVECOPLINE(&PL_compiling);
CopLINE_set(&PL_compiling, 0);
runcv = find_runcv(&seq);
PUSHBLOCK(cx, (CXt_EVAL|CXp_REAL), gimme, SP, old_savestack_ix);
- PUSHEVAL(cx, 0);
- cx->blk_eval.retop = PL_op->op_next;
+ PUSHEVAL(cx, PL_op->op_next, 0);
/* prepare to compile string */
/* Common-ish code salvaged from Perl_call_sv and pp_entertry, because it was
also needed by Perl_fold_constants. */
-PERL_CONTEXT *
-Perl_create_eval_scope(pTHX_ U32 flags)
+void
+Perl_create_eval_scope(pTHX_ OP *retop, U32 flags)
{
PERL_CONTEXT *cx;
const I32 gimme = GIMME_V;
PUSHBLOCK(cx, (CXt_EVAL|CXp_TRYBLOCK), gimme, PL_stack_sp, PL_savestack_ix);
- PUSHEVAL(cx, 0);
+ PUSHEVAL(cx, retop, 0);
PL_in_eval = EVAL_INEVAL;
if (flags & G_KEEPERR)
if (flags & G_FAKINGEVAL) {
PL_eval_root = PL_op; /* Only needed so that goto works right. */
}
- return cx;
}
PP(pp_entertry)
{
- PERL_CONTEXT * const cx = create_eval_scope(0);
- cx->blk_eval.retop = cLOGOP->op_other->op_next;
+ create_eval_scope(cLOGOP->op_other->op_next, 0);
return DOCATCH(PL_op->op_next);
}
PERL_CALLCONV OP * Perl_coresub_op(pTHX_ SV *const coreargssv, const int code, const int opnum);
#define PERL_ARGS_ASSERT_CORESUB_OP \
assert(coreargssv)
-PERL_CALLCONV PERL_CONTEXT* Perl_create_eval_scope(pTHX_ U32 flags);
+PERL_CALLCONV void Perl_create_eval_scope(pTHX_ OP *retop, U32 flags);
PERL_CALLCONV_NO_RET void Perl_croak(pTHX_ const char* pat, ...)
__attribute__noreturn__
__attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);