Change 34964 by [EMAIL PROTECTED] on 2008/12/01 10:36:44

        For SAVEHINTS(), re-order the savestack to be (?:PTR, )? INT, PTR.
        This brings it to the same order as save_aelem() or save_pushi32ptr().

Affected files ...

... //depot/perl/scope.c#242 edit
... //depot/perl/scope.h#99 edit
... //depot/perl/sv.c#1580 edit

Differences ...

==== //depot/perl/scope.c#242 (text) ====
Index: perl/scope.c
--- perl/scope.c#241~34963~     2008-12-01 01:46:15.000000000 -0800
+++ perl/scope.c        2008-12-01 02:36:44.000000000 -0800
@@ -902,9 +902,9 @@
                SvREFCNT_dec(MUTABLE_SV(GvHV(PL_hintgv)));
                GvHV(PL_hintgv) = NULL;
            }
-           *(I32*)&PL_hints = (I32)SSPOPINT;
            Perl_refcounted_he_free(aTHX_ PL_compiling.cop_hints_hash);
            PL_compiling.cop_hints_hash = (struct refcounted_he *) SSPOPPTR;
+           *(I32*)&PL_hints = (I32)SSPOPINT;
            if (PL_hints & HINT_LOCALIZE_HH) {
                SvREFCNT_dec(MUTABLE_SV(GvHV(PL_hintgv)));
                GvHV(PL_hintgv) = MUTABLE_HV(SSPOPPTR);

==== //depot/perl/scope.h#99 (text) ====
Index: perl/scope.h
--- perl/scope.h#98~34963~      2008-12-01 01:46:15.000000000 -0800
+++ perl/scope.h        2008-12-01 02:36:44.000000000 -0800
@@ -159,18 +159,18 @@
 
 #define SAVEHINTS() \
     STMT_START {                                       \
-       SSCHECK(4);                                     \
-       if (PL_hints & HINT_LOCALIZE_HH) {              \
-           SSPUSHPTR(GvHV(PL_hintgv));                 \
-           GvHV(PL_hintgv) = Perl_hv_copy_hints_hv(aTHX_ GvHV(PL_hintgv)); \
-       }                                               \
        if (PL_compiling.cop_hints_hash) {              \
            HINTS_REFCNT_LOCK;                          \
            PL_compiling.cop_hints_hash->refcounted_he_refcnt++;        \
            HINTS_REFCNT_UNLOCK;                        \
        }                                               \
-       SSPUSHPTR(PL_compiling.cop_hints_hash);         \
+       SSCHECK(4);                                     \
+       if (PL_hints & HINT_LOCALIZE_HH) {              \
+           SSPUSHPTR(GvHV(PL_hintgv));                 \
+           GvHV(PL_hintgv) = Perl_hv_copy_hints_hv(aTHX_ GvHV(PL_hintgv)); \
+       }                                               \
        SSPUSHINT(PL_hints);                            \
+       SSPUSHPTR(PL_compiling.cop_hints_hash);         \
        SSPUSHINT(SAVEt_HINTS);                         \
     } STMT_END
 

==== //depot/perl/sv.c#1580 (text) ====
Index: perl/sv.c
--- perl/sv.c#1579~34938~       2008-11-26 15:02:47.000000000 -0800
+++ perl/sv.c   2008-12-01 02:36:44.000000000 -0800
@@ -11303,8 +11303,6 @@
            TOPPTR(nss,ix) = ptr;
            break;
        case SAVEt_HINTS:
-           i = POPINT(ss,ix);
-           TOPINT(nss,ix) = i;
            ptr = POPPTR(ss,ix);
            if (ptr) {
                HINTS_REFCNT_LOCK;
@@ -11312,6 +11310,8 @@
                HINTS_REFCNT_UNLOCK;
            }
            TOPPTR(nss,ix) = ptr;
+           i = POPINT(ss,ix);
+           TOPINT(nss,ix) = i;
            if (i & HINT_LOCALIZE_HH) {
                hv = (const HV *)POPPTR(ss,ix);
                TOPPTR(nss,ix) = hv_dup_inc(hv, param);
End of Patch.

Reply via email to