PERLVAR(I, compcv, CV *) /* currently compiling subroutine */
PERLVAR(I, comppad_name, PADNAMELIST *) /* variable names for "my" variables */
-PERLVAR(I, comppad_name_fill, I32) /* last "introduced" variable offset */
-PERLVAR(I, comppad_name_floor, I32) /* start of vars in innermost block */
+PERLVAR(I, comppad_name_fill, PADOFFSET)/* last "introduced" variable offset */
+PERLVAR(I, comppad_name_floor, PADOFFSET)/* start of vars in innermost block */
#ifdef HAVE_INTERP_INTERN
PERLVAR(I, sys_intern, struct interp_intern)
PERLVAR(I, subname, SV *) /* name of current subroutine */
PERLVAR(I, subline, I32) /* line this subroutine began on */
-PERLVAR(I, min_intro_pending, I32) /* start of vars to introduce */
+PERLVAR(I, min_intro_pending, PADOFFSET)/* start of vars to introduce */
-PERLVAR(I, max_intro_pending, I32) /* end of vars to introduce */
-PERLVAR(I, padix, I32) /* lowest unused index - 1
+PERLVAR(I, max_intro_pending, PADOFFSET)/* end of vars to introduce */
+PERLVAR(I, padix, PADOFFSET) /* lowest unused index - 1
in current "register" pad */
-PERLVAR(I, constpadix, I32) /* lowest unused for constants */
+PERLVAR(I, constpadix, PADOFFSET) /* lowest unused for constants */
-PERLVAR(I, padix_floor, I32) /* how low may inner block reset padix */
+PERLVAR(I, padix_floor, PADOFFSET) /* how low may inner block reset padix */
#ifdef USE_LOCALE_COLLATE
PERLVAR(I, collation_name, char *) /* Name of current collation */
SAVECOMPPAD();
if (! (flags & padnew_CLONE)) {
SAVESPTR(PL_comppad_name);
- SAVEI32(PL_padix);
- SAVEI32(PL_constpadix);
- SAVEI32(PL_comppad_name_fill);
- SAVEI32(PL_min_intro_pending);
- SAVEI32(PL_max_intro_pending);
+ save_strlen((STRLEN *)&PL_padix);
+ save_strlen((STRLEN *)&PL_constpadix);
+ save_strlen((STRLEN *)&PL_comppad_name_fill);
+ save_strlen((STRLEN *)&PL_min_intro_pending);
+ save_strlen((STRLEN *)&PL_max_intro_pending);
SAVEBOOL(PL_cv_has_eval);
if (flags & padnew_SAVESUB) {
SAVEBOOL(PL_pad_reset_pending);
pad_peg("pad_undef");
if (!CvISXSUB(&cvbody) && CvPADLIST(&cvbody)) {
- I32 ix;
+ PADOFFSET ix;
const PADLIST *padlist = CvPADLIST(&cvbody);
/* Free the padlist associated with a CV.
Perl_pad_alloc(pTHX_ I32 optype, U32 tmptype)
{
SV *sv;
- I32 retval;
+ PADOFFSET retval;
PERL_UNUSED_ARG(optype);
ASSERT_CURPAD_ACTIVE("pad_alloc");
if (tmptype == SVs_PADMY) { /* Not & because this ‘flag’ is 0. */
/* For a my, simply push a null SV onto the end of PL_comppad. */
sv = *av_fetch(PL_comppad, AvFILLp(PL_comppad) + 1, TRUE);
- retval = AvFILLp(PL_comppad);
+ retval = (PADOFFSET)AvFILLp(PL_comppad);
}
else {
/* For a tmp, scan the pad from PL_padix upwards
sv->sv_debug_optype = optype;
sv->sv_debug_inpad = 1;
#endif
- return (PADOFFSET)retval;
+ return retval;
}
/*
svp = PadnamelistARRAY(PL_comppad_name);
top = PadnamelistMAX(PL_comppad_name);
/* check the current scope */
- /* XXX DAPM - why the (I32) cast - shouldn't we ensure they're the same
- * type ? */
- for (off = top; (I32)off > PL_comppad_name_floor; off--) {
+ for (off = top; off > PL_comppad_name_floor; off--) {
PADNAME * const sv = svp[off];
if (sv
&& PadnameLEN(sv) == PadnameLEN(name)
{
Perl_warner(aTHX_ packWARN(WARN_MISC),
"\"our\" variable %"PNf" redeclared", PNfARG(sv));
- if ((I32)off <= PL_comppad_name_floor)
+ if (off <= PL_comppad_name_floor)
Perl_warner(aTHX_ packWARN(WARN_MISC),
"\t(Did you mean \"local\" instead of \"our\"?)\n");
break;
{
PADNAME *out_pn;
int out_flags;
- I32 offset;
+ PADOFFSET offset;
const PADNAMELIST *namelist;
PADNAME **name_p;
offset = pad_findlex(namepv, namelen, flags,
PL_compcv, PL_cop_seqmax, 1, NULL, &out_pn, &out_flags);
- if ((PADOFFSET)offset != NOT_IN_PAD)
+ if (offset != NOT_IN_PAD)
return offset;
/* Skip the ‘our’ hack for subroutines, as the warning does not apply.
S_pad_findlex(pTHX_ const char *namepv, STRLEN namelen, U32 flags, const CV* cv, U32 seq,
int warn, SV** out_capture, PADNAME** out_name, int *out_flags)
{
- I32 offset, new_offset;
+ PADOFFSET offset, new_offset;
SV *new_capture;
SV **new_capturep;
const PADLIST * const padlist = CvPADLIST(cv);
/* first, search this pad */
if (padlist) { /* not an undef CV */
- I32 fake_offset = 0;
+ PADOFFSET fake_offset = 0;
const PADNAMELIST * const names = PadlistNAMES(padlist);
PADNAME * const * const name_p = PadnamelistARRAY(names);
flags | padadd_STALEOK*(new_capturep == &new_capture),
CvOUTSIDE(cv), CvOUTSIDE_SEQ(cv), 1,
new_capturep, out_name, out_flags);
- if ((PADOFFSET)offset == NOT_IN_PAD)
+ if (offset == NOT_IN_PAD)
return NOT_IN_PAD;
/* found in an outer CV. Add appropriate fake entry to this pad */
Perl_pad_block_start(pTHX_ int full)
{
ASSERT_CURPAD_ACTIVE("pad_block_start");
- SAVEI32(PL_comppad_name_floor);
+ save_strlen((STRLEN *)&PL_comppad_name_floor);
PL_comppad_name_floor = PadnamelistMAX(PL_comppad_name);
if (full)
PL_comppad_name_fill = PL_comppad_name_floor;
if (PL_comppad_name_floor < 0)
PL_comppad_name_floor = 0;
- SAVEI32(PL_min_intro_pending);
- SAVEI32(PL_max_intro_pending);
+ save_strlen((STRLEN *)&PL_min_intro_pending);
+ save_strlen((STRLEN *)&PL_max_intro_pending);
PL_min_intro_pending = 0;
- SAVEI32(PL_comppad_name_fill);
- SAVEI32(PL_padix_floor);
+ save_strlen((STRLEN *)&PL_comppad_name_fill);
+ save_strlen((STRLEN *)&PL_padix_floor);
/* PL_padix_floor is what PL_padix is reset to at the start of each
statement, by pad_reset(). We set it when entering a new scope
to keep things like this working:
Perl_intro_my(pTHX)
{
PADNAME **svp;
- I32 i;
+ PADOFFSET i;
U32 seq;
ASSERT_CURPAD_ACTIVE("intro_my");
OP *
Perl_pad_leavemy(pTHX)
{
- I32 off;
+ PADOFFSET off;
OP *o = NULL;
PADNAME * const * const svp = PadnamelistARRAY(PL_comppad_name);
/* Use PL_constpadix here, not PL_padix. The latter may have been
reset by pad_reset. We don’t want pad_alloc to have to scan the
whole pad when allocating a constant. */
- if ((I32)po < PL_constpadix)
+ if (po < PL_constpadix)
PL_constpadix = po - 1;
}
if (sv && sv != &PL_sv_undef && !SvPADMY(sv))
SvFLAGS(sv) &= ~SVs_PADTMP;
- if ((I32)po < PL_padix)
+ if (po < PL_padix)
PL_padix = po - 1;
#endif
}
const AV *pad;
PADNAME **pname;
SV **ppad;
- I32 ix;
+ PADOFFSET ix;
PERL_ARGS_ASSERT_DO_DUMP_PAD;
S_cv_clone_pad(pTHX_ CV *proto, CV *cv, CV *outside, HV *cloned,
bool newcv)
{
- I32 ix;
+ PADOFFSET ix;
PADLIST* const protopadlist = CvPADLIST(proto);
PADNAMELIST *const protopad_name = PadlistNAMES(protopadlist);
const PAD *const protopad = PadlistARRAY(protopadlist)[1];
PADNAME** const pname = PadnamelistARRAY(protopad_name);
SV** const ppad = AvARRAY(protopad);
- const I32 fname = PadnamelistMAX(protopad_name);
- const I32 fpad = AvFILLp(protopad);
+ const PADOFFSET fname = PadnamelistMAX(protopad_name);
+ const PADOFFSET fpad = AvFILLp(protopad);
SV** outpad;
long depth;
U32 subclones = 0;
void
Perl_pad_fixup_inner_anons(pTHX_ PADLIST *padlist, CV *old_cv, CV *new_cv)
{
- I32 ix;
+ PADOFFSET ix;
PADNAMELIST * const comppad_name = PadlistNAMES(padlist);
AV * const comppad = PadlistARRAY(padlist)[1];
PADNAME ** const namepad = PadnamelistARRAY(comppad_name);
PAD** const svp = PadlistARRAY(padlist);
AV* const newpad = newAV();
SV** const oldpad = AvARRAY(svp[depth-1]);
- I32 ix = AvFILLp((const AV *)svp[1]);
- const I32 names_fill = PadnamelistMAX((PADNAMELIST *)svp[0]);
+ PADOFFSET ix = AvFILLp((const AV *)svp[1]);
+ const PADOFFSET names_fill = PadnamelistMAX((PADNAMELIST *)svp[0]);
PADNAME ** const names = PadnamelistARRAY((PADNAMELIST *)svp[0]);
AV *av;
} else {
/* CvDEPTH() on our subroutine will be set to 0, so there's no need
to build anything other than the first level of pads. */
- I32 ix = AvFILLp(PadlistARRAY(srcpad)[1]);
+ PADOFFSET ix = AvFILLp(PadlistARRAY(srcpad)[1]);
AV *pad1;
- const I32 names_fill = PadnamelistMAX(PadlistNAMES(srcpad));
+ const PADOFFSET names_fill = PadnamelistMAX(PadlistNAMES(srcpad));
const PAD *const srcpad1 = PadlistARRAY(srcpad)[1];
SV **oldpad = AvARRAY(srcpad1);
PADNAME ** const names = PadnamelistARRAY(PadlistNAMES(dstpad));