}
rxres_restore(&cx->sb_rxres, rx);
- RX_MATCH_UTF8_set(rx, SvUTF8(cx->sb_targ));
+ RX_MATCH_UTF8_set(rx, DO_UTF8(cx->sb_targ));
if (cx->sb_iters++) {
const I32 saviters = cx->sb_iters;
i = 6 + rx->nparens * 2;
#endif
if (!p)
- New(501, p, i, UV);
+ Newx(p, i, UV);
else
Renew(p, i, UV);
*rsp = (void*)p;
PUSHSUB_DB(cx);
cx->blk_sub.retop = PL_op->op_next;
CvDEPTH(cv)++;
- PAD_SET_CUR(CvPADLIST(cv),1);
+ SAVECOMPPAD();
+ PAD_SET_CUR_NOSAVE(CvPADLIST(cv), 1);
RETURNOP(CvSTART(cv));
}
else
STATIC OP *
S_dofindlabel(pTHX_ OP *o, const char *label, OP **opstack, OP **oplimit)
{
- OP *kid = Nullop;
OP **ops = opstack;
static const char too_deep[] = "Target of goto is too deeply nested";
}
*ops = 0;
if (o->op_flags & OPf_KIDS) {
+ OP *kid;
/* First try all the kids at this level, since that's likeliest. */
for (kid = cUNOPo->op_first; kid; kid = kid->op_sibling) {
if ((kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE) &&
}
}
else if (CvXSUB(cv)) { /* put GvAV(defgv) back onto stack */
- AV* av;
- av = GvAV(PL_defgv);
+ AV* const av = GvAV(PL_defgv);
items = AvFILLp(av) + 1;
EXTEND(SP, items+1); /* @_ could have been extended. */
Copy(AvARRAY(av), SP + 1, items, SV*);
sub_crush_depth(cv);
pad_push(padlist, CvDEPTH(cv));
}
- PAD_SET_CUR(padlist, CvDEPTH(cv));
+ SAVECOMPPAD();
+ PAD_SET_CUR_NOSAVE(padlist, CvDEPTH(cv));
if (cx->blk_sub.hasargs)
{
AV* av = (AV*)PAD_SVl(0);
* We do not care about using sv to call CV;
* it's for informational purposes only.
*/
- SV *sv = GvSV(PL_DBsub);
+ SV * const sv = GvSV(PL_DBsub);
CV *gotocv;
save_item(sv);
if (PERLDB_SUB_NN) {
- int type = SvTYPE(sv);
+ const int type = SvTYPE(sv);
if (type < SVt_PVIV && type != SVt_IV)
sv_upgrade(sv, SVt_PVIV);
(void)SvIOK_on(sv);
S_save_lines(pTHX_ AV *array, SV *sv)
{
const char *s = SvPVX_const(sv);
- const char *send = SvPVX_const(sv) + SvCUR(sv);
+ const char * const send = SvPVX_const(sv) + SvCUR(sv);
I32 line = 1;
while (s && s < send) {
const char *t;
- SV *tmpstr = NEWSV(85,0);
+ SV * const tmpstr = NEWSV(85,0);
sv_upgrade(tmpstr, SVt_PVMG);
t = strchr(s, '\n');
S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq)
{
dVAR; dSP;
- OP *saveop = PL_op;
+ OP * const saveop = PL_op;
PL_in_eval = ((saveop && saveop->op_type == OP_REQUIRE)
? (EVAL_INREQUIRE | (PL_in_eval & EVAL_INEVAL))
/* Register with debugger: */
if (PERLDB_INTER && saveop->op_type == OP_REQUIRE) {
- CV *cv = get_cv("DB::postponed", FALSE);
+ CV * const cv = get_cv("DB::postponed", FALSE);
if (cv) {
dSP;
PUSHMARK(SP);
PL_compiling.cop_io = Nullsv;
if (filter_sub || filter_child_proc) {
- SV *datasv = filter_add(run_user_filter, Nullsv);
+ SV * const datasv = filter_add(run_user_filter, Nullsv);
IoLINES(datasv) = filter_has_file;
IoFMT_GV(datasv) = (GV *)filter_child_proc;
IoTOP_GV(datasv) = (GV *)filter_state;
dVAR; dSP;
register PERL_CONTEXT *cx;
dPOPss;
- const I32 gimme = GIMME_V, was = PL_sub_generation;
+ const I32 gimme = GIMME_V;
+ const I32 was = PL_sub_generation;
char tbuf[TYPE_DIGITS(long) + 12];
char *tmpbuf = tbuf;
char *safestr;
/* switch to eval mode */
if (PERLDB_NAMEEVAL && CopLINE(PL_curcop)) {
- SV *sv = sv_newmortal();
+ SV * const sv = sv_newmortal();
Perl_sv_setpvf(aTHX_ sv, "_<(eval %lu)[%s:%"IVdf"]",
(unsigned long)++PL_evalseq,
CopFILE(PL_curcop), (IV)CopLINE(PL_curcop));
s = base;
base = Nullch;
- New(804, fops, maxops, U32);
+ Newx(fops, maxops, U32);
fpc = fops;
if (s < send) {