#define OP_GIMME_REVERSE(G) su_op_gimme_reverse(G)
#endif
+#ifndef OP_SIBLING
+# define OP_SIBLING(O) ((O)->op_sibling)
+#endif
+
#ifndef PERL_MAGIC_tied
# define PERL_MAGIC_tied 'P'
#endif
PERL_UNUSED_VAR(ud_);
PL_stack_sp = MY_CXT.unwind_storage.savesp;
+#if SU_HAS_PERL(5, 19, 4)
+ {
+ I32 i;
+ SV **sp = PL_stack_sp;
+ for (i = -items + 1; i <= 0; ++i)
+ if (!SvTEMP(sp[i]))
+ sv_2mortal(SvREFCNT_inc(sp[i]));
+ }
+#endif
if (cxstack_ix > cxix)
dounwind(cxix);
}
PL_stack_sp = MY_CXT.yield_storage.savesp;
+#if SU_HAS_PERL(5, 19, 4)
+ {
+ I32 i;
+ SV **sp = PL_stack_sp;
+ for (i = -items + 1; i <= 0; ++i)
+ if (!SvTEMP(sp[i]))
+ sv_2mortal(SvREFCNT_inc(sp[i]));
+ }
+#endif
if (cxstack_ix > cxix)
dounwind(cxix);
}
STATIC int su_uplevel_goto_static(const OP *o) {
- for (; o; o = o->op_sibling) {
+ for (; o; o = OP_SIBLING(o)) {
/* goto ops are unops with kids. */
if (!(o->op_flags & OPf_KIDS))
continue;
#endif
CvGV_set(cv, gv);
+#if SU_RELEASE && SU_HAS_PERL_EXACT(5, 21, 4)
+ CvNAMED_off(cv);
+#endif
CvSTASH_set(cv, CvSTASH(proto));
/* Commit 4c74a7df, publicized with perl 5.13.3, began to add backrefs to
* stashes. CvSTASH_set() started to do it as well with commit c68d95645
return cxix - 1;
break;
case CXt_SUBST:
- if (cx->blk_oldcop && cx->blk_oldcop->op_sibling
- && cx->blk_oldcop->op_sibling->op_type == OP_SUBST)
+ if (cx->blk_oldcop && OP_SIBLING(cx->blk_oldcop)
+ && OP_SIBLING(cx->blk_oldcop)->op_type == OP_SUBST)
return cxix - 1;
break;
}
return cxix + 1;
break;
case CXt_SUBST:
- if (next->blk_oldcop && next->blk_oldcop->op_sibling
- && next->blk_oldcop->op_sibling->op_type == OP_SUBST)
+ if (next->blk_oldcop && OP_SIBLING(next->blk_oldcop)
+ && OP_SIBLING(next->blk_oldcop)->op_type == OP_SUBST)
return cxix + 1;
break;
}
#endif
case CXt_SUBST: {
const COP *cop = cx->blk_oldcop;
- if (cop && cop->op_sibling) {
- switch (cop->op_sibling->op_flags & OPf_WANT) {
+ if (cop && OP_SIBLING(cop)) {
+ switch (OP_SIBLING(cop)->op_flags & OPf_WANT) {
case OPf_WANT_VOID:
return G_VOID;
case OPf_WANT_SCALAR:
cx = cxstack + cxix;
dbcx = cx;
if (PL_DBsub && cxix && (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT)) {
- I32 i = su_context_skip_db(cxix - 1) + 1;;
+ I32 i = su_context_skip_db(cxix - 1) + 1;
if (i < cxix && CxTYPE(cxstack + i) == CXt_SUB)
cx = cxstack + i;
}
if (PL_dowarn & G_WARN_ON)
goto context_info_warnings_on;
else
+#if SU_HAS_PERL(5, 17, 4)
+ mask = &PL_sv_undef;
+#else
goto context_info_warnings_off;
+#endif
} else if (old_warnings == pWARN_NONE) {
context_info_warnings_off:
mask = su_newmortal_pvn(WARN_NONEstring, WARNsize);
} else if (old_warnings == pWARN_ALL) {
HV *bits;
context_info_warnings_on:
+#if SU_HAS_PERL(5, 8, 7)
bits = get_hv("warnings::Bits", 0);
if (bits) {
SV **bits_all = hv_fetchs(bits, "all", FALSE);
if (bits_all)
mask = sv_mortalcopy(*bits_all);
}
+#endif
if (!mask)
mask = su_newmortal_pvn(WARN_ALLstring, WARNsize);
} else {