up patchlevel to 74; introduce distinct archname for PERL_OBJECT
[p5sagit/p5-mst-13.2.git] / scope.c
diff --git a/scope.c b/scope.c
index 7a0a578..548ebdc 100644 (file)
--- a/scope.c
+++ b/scope.c
@@ -57,7 +57,7 @@ new_stackinfo(I32 stitems, I32 cxitems)
     si->si_next = 0;
     si->si_cxmax = cxitems - 1;
     si->si_cxix = -1;
-    si->si_type = SI_UNDEF;
+    si->si_type = PERLSI_UNDEF;
     New(56, si->si_cxstack, cxitems, PERL_CONTEXT);
     return si;
 }
@@ -222,6 +222,9 @@ save_gp(GV *gv, I32 empty)
 
     if (empty) {
        register GP *gp;
+
+       if (GvCVu(gv))
+           sub_generation++;   /* taking a method out of circulation */
        Newz(602, gp, 1, GP);
        GvGP(gv) = gp_ref(gp);
        GvSV(gv) = NEWSV(72,0);
@@ -678,6 +681,8 @@ leave_scope(I32 base)
             SvLEN(gv) = (STRLEN)SSPOPIV;
             gp_free(gv);
             GvGP(gv) = (GP*)ptr;
+           if (GvCVu(gv))
+               sub_generation++;  /* putting a method back into circulation */
            SvREFCNT_dec(gv);
             break;
        case SAVEt_FREESV:
@@ -801,6 +806,13 @@ leave_scope(I32 base)
        case SAVEt_OP:
            op = (OP*)SSPOPPTR;
            break;
+       case SAVEt_HINTS:
+           if (GvHV(hintgv)) {
+               SvREFCNT_dec((SV*)GvHV(hintgv));
+               GvHV(hintgv) = NULL;
+           }
+           *(I32*)&hints = (I32)SSPOPINT;
+           break;
        default:
            croak("panic: leave_scope inconsistency");
        }