Branch: Tag:

2016-06-24

2016-06-24 09:49:17 by Per Hedbor <ph@opera.com>

Simplified hash_svalue somewhat

o The return value is now 64bit on 64bit systems
o Utilize the already-existing union if sizeof(float)==sizeof(int)
o Remove check that checks if apply_* works correctly. (debug only, but rather un-needed)

887:    const struct svalue *val,    int overwrite)   { -  unsigned INT32 h,h2; +  size_t h,h2;    struct keypair *k, **prev;    struct mapping_data *md, *omd;   
1007:    const struct svalue *key,    TYPE_T t)   { -  unsigned INT32 h, h2; +  size_t h, h2;    struct keypair *k, **prev;    struct mapping_data *md,*omd;   
1121:    const struct svalue *key,    struct svalue *to)   { -  unsigned INT32 h,h2; +  size_t h,h2;    struct keypair *k, **prev;    struct mapping_data *md,*omd;   
1274:   PMOD_EXPORT struct svalue *low_mapping_lookup(struct mapping *m,    const struct svalue *key)   { -  unsigned INT32 h,h2; +  size_t h,h2;    struct keypair *k=0, **prev=0;    struct mapping_data *md, *omd;   
2399:       if(md->size)    { -  unsigned INT32 h2,h=0; +  size_t h2,h=0;    struct keypair *k=md->hash[0], **prev;       if(key)
2561: Inside #if defined(PIKE_DEBUG)
      check_svalue(& k->ind);    check_svalue(& k->val); -  -  /* FIXME add check for k->hval -  * beware that hash_svalue may be threaded and locking -  * is required!! -  */ +     }       if(md->size != num)