Apd |char* |savesharedpv |const char* pv
Apd |char* |savepvn |const char* pv|I32 len
Ap |void |savestack_grow
+Ap |void |savestack_grow_cnt |I32 need
Ap |void |save_aelem |AV* av|I32 idx|SV **sptr
Ap |I32 |save_alloc |I32 size|I32 pad
Ap |void |save_aptr |AV** aptr
#define savesharedpv Perl_savesharedpv
#define savepvn Perl_savepvn
#define savestack_grow Perl_savestack_grow
+#define savestack_grow_cnt Perl_savestack_grow_cnt
#define save_aelem Perl_save_aelem
#define save_alloc Perl_save_alloc
#define save_aptr Perl_save_aptr
#define savesharedpv(a) Perl_savesharedpv(aTHX_ a)
#define savepvn(a,b) Perl_savepvn(aTHX_ a,b)
#define savestack_grow() Perl_savestack_grow(aTHX)
+#define savestack_grow_cnt(a) Perl_savestack_grow_cnt(aTHX_ a)
#define save_aelem(a,b,c) Perl_save_aelem(aTHX_ a,b,c)
#define save_alloc(a,b) Perl_save_alloc(aTHX_ a,b)
#define save_aptr(a) Perl_save_aptr(aTHX_ a)
Perl_savesharedpv
Perl_savepvn
Perl_savestack_grow
+Perl_savestack_grow_cnt
Perl_save_aelem
Perl_save_alloc
Perl_save_aptr
PERL_CALLCONV char* Perl_savesharedpv(pTHX_ const char* pv);
PERL_CALLCONV char* Perl_savepvn(pTHX_ const char* pv, I32 len);
PERL_CALLCONV void Perl_savestack_grow(pTHX);
+PERL_CALLCONV void Perl_savestack_grow_cnt(pTHX_ I32 need);
PERL_CALLCONV void Perl_save_aelem(pTHX_ AV* av, I32 idx, SV **sptr);
PERL_CALLCONV I32 Perl_save_alloc(pTHX_ I32 size, I32 pad);
PERL_CALLCONV void Perl_save_aptr(pTHX_ AV** aptr);
Perl_croak(aTHX_ "panic: paren_elems_to_push < 0");
#define REGCP_OTHER_ELEMS 6
- SSCHECK(paren_elems_to_push + REGCP_OTHER_ELEMS);
+ SSGROW(paren_elems_to_push + REGCP_OTHER_ELEMS);
for (p = PL_regsize; p > parenfloor; p--) {
/* REGCP_PARENS_ELEMS are pushed per pairs of parentheses. */
SSPUSHINT(PL_regendp[p]);
Renew(PL_savestack, PL_savestack_max, ANY);
}
+void
+Perl_savestack_grow_cnt(pTHX_ I32 need)
+{
+ PL_savestack_max = PL_savestack_ix + need;
+ Renew(PL_savestack, PL_savestack_max, ANY);
+}
+
#undef GROW
void
void
Perl_save_gp(pTHX_ GV *gv, I32 empty)
{
- SSCHECK(6);
+ SSGROW(6);
SSPUSHIV((IV)SvLEN(gv));
SvLEN(gv) = 0; /* forget that anything was allocated here */
SSPUSHIV((IV)SvCUR(gv));
#define SCOPE_SAVES_SIGNAL_MASK 0
#endif
-#define SSCHECK(need) if (PL_savestack_ix + need > PL_savestack_max) savestack_grow()
+#define SSCHECK(need) if (PL_savestack_ix + (need) > PL_savestack_max) savestack_grow()
+#define SSGROW(need) if (PL_savestack_ix + (need) > PL_savestack_max) savestack_grow_cnt(need)
#define SSPUSHINT(i) (PL_savestack[PL_savestack_ix++].any_i32 = (I32)(i))
#define SSPUSHLONG(i) (PL_savestack[PL_savestack_ix++].any_long = (long)(i))
#define SSPUSHBOOL(p) (PL_savestack[PL_savestack_ix++].any_bool = (p))