This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Correct the macros in the comments in hv.c. Given the improvements in
authorNicholas Clark <nick@ccl4.org>
Thu, 16 Mar 2006 21:52:49 +0000 (21:52 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 16 Mar 2006 21:52:49 +0000 (21:52 +0000)
compiler optimisation, and the almost irrelevance of instructions
executed over cache misses, maybe we should just remove the comments
by putting their code back in place of the o{ptimis,bfuscat}ed version.

p4raw-id: //depot/perl@27523

hv.c

diff --git a/hv.c b/hv.c
index 1f9cd29..86070e3 100644 (file)
--- a/hv.c
+++ b/hv.c
@@ -830,7 +830,7 @@ S_hv_fetch_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
     {
        const HE *counter = HeNEXT(entry);
 
-       xhv->xhv_keys++; /* HvKEYS(hv)++ */
+       xhv->xhv_keys++; /* HvTOTALKEYS(hv)++ */
        if (!counter) {                         /* initial entry? */
            xhv->xhv_fill++; /* HvFILL(hv)++ */
        } else if (xhv->xhv_keys > (IV)xhv->xhv_max) {
@@ -1108,7 +1108,7 @@ S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
                HvLAZYDEL_on(hv);
            else
                hv_free_ent(hv, entry);
-           xhv->xhv_keys--; /* HvKEYS(hv)-- */
+           xhv->xhv_keys--; /* HvTOTALKEYS(hv)-- */
            if (xhv->xhv_keys == 0)
                HvHASKFLAGS_off(hv);
        }
@@ -2343,7 +2343,7 @@ S_unshare_hek_or_pvn(pTHX_ const HEK *hek, const char *str, I32 len, U32 hash)
                 xhv->xhv_fill--; /* HvFILL(hv)-- */
            }
             Safefree(entry);
-            xhv->xhv_keys--; /* HvKEYS(hv)-- */
+            xhv->xhv_keys--; /* HvTOTALKEYS(hv)-- */
         }
     }
 
@@ -2456,7 +2456,7 @@ S_share_hek_flags(pTHX_ const char *str, I32 len, register U32 hash, int flags)
        HeNEXT(entry) = next;
        *head = entry;
 
-       xhv->xhv_keys++; /* HvKEYS(hv)++ */
+       xhv->xhv_keys++; /* HvTOTALKEYS(hv)++ */
        if (!next) {                    /* initial entry? */
            xhv->xhv_fill++; /* HvFILL(hv)++ */
        } else if (xhv->xhv_keys > (IV)xhv->xhv_max /* HvKEYS(hv) > HvMAX(hv) */) {