SSPUSHINT(SAVEt_GP);
if (empty) {
- register GP *gp;
-
- Newxz(gp, 1, GP);
+ GP *gp = Perl_newGP(aTHX_ gv);
if (GvCVu(gv))
PL_sub_generation++; /* taking a method out of circulation */
gp->gp_io = newIO();
IoFLAGS(gp->gp_io) |= IOf_ARGV|IOf_START;
}
- GvGP(gv) = gp_ref(gp);
-#ifndef PERL_DONT_CREATE_GVSV
- GvSV(gv) = newSV(0);
-#endif
- GvLINE(gv) = CopLINE(PL_curcop);
- /* XXX Ideally this cast would be replaced with a change to const char*
- in the struct. */
- GvFILE(gv) = CopFILE(PL_curcop) ? CopFILE(PL_curcop) : (char *) "";
- GvEGV(gv) = gv;
+ GvGP(gv) = gp;
}
else {
gp_ref(GvGP(gv));
value = (SV*)SSPOPPTR;
i = SSPOPINT;
av = (AV*)SSPOPPTR;
+ ptr = av_fetch(av,i,1);
if (!AvREAL(av) && AvREIFY(av)) /* undo reify guard */
SvREFCNT_dec(value);
- ptr = av_fetch(av,i,1);
if (ptr) {
sv = *(SV**)ptr;
if (sv && sv != &PL_sv_undef) {
GvHV(PL_hintgv) = NULL;
}
*(I32*)&PL_hints = (I32)SSPOPINT;
- Perl_refcounted_he_free(aTHX_ PL_compiling.cop_hints);
- PL_compiling.cop_hints = (struct refcounted_he *) SSPOPPTR;
+ Perl_refcounted_he_free(aTHX_ PL_compiling.cop_hints_hash);
+ PL_compiling.cop_hints_hash = (struct refcounted_he *) SSPOPPTR;
if (PL_hints & HINT_LOCALIZE_HH) {
SvREFCNT_dec((SV*)GvHV(PL_hintgv));
GvHV(PL_hintgv) = (HV*)SSPOPPTR;
i = SSPOPINT;
CopARYBASE_set((COP *)ptr, i);
break;
- case SAVEt_COP_WARNINGS:
- {
- COP *const cop = SSPOPPTR;
- ptr = SSPOPPTR;
+ case SAVEt_COMPILE_WARNINGS:
+ ptr = SSPOPPTR;
- if (!specialWARN(cop->cop_warnings))
- PerlMemShared_free(cop->cop_warnings);
+ if (!specialWARN(PL_compiling.cop_warnings))
+ PerlMemShared_free(PL_compiling.cop_warnings);
- cop->cop_warnings = ptr;
- }
+ PL_compiling.cop_warnings = (STRLEN*)ptr;
break;
case SAVEt_RE_STATE:
{