4274 |
Lisp_Object key; |
Lisp_Object key; |
4275 |
{ |
{ |
4276 |
unsigned hash = XUINT (key) ^ XGCTYPE (key); |
unsigned hash = XUINT (key) ^ XGCTYPE (key); |
4277 |
xassert ((hash & ~VALMASK) == 0); |
xassert ((hash & ~INTMASK) == 0); |
4278 |
return hash; |
return hash; |
4279 |
} |
} |
4280 |
|
|
4293 |
hash = sxhash (key, 0); |
hash = sxhash (key, 0); |
4294 |
else |
else |
4295 |
hash = XUINT (key) ^ XGCTYPE (key); |
hash = XUINT (key) ^ XGCTYPE (key); |
4296 |
xassert ((hash & ~VALMASK) == 0); |
xassert ((hash & ~INTMASK) == 0); |
4297 |
return hash; |
return hash; |
4298 |
} |
} |
4299 |
|
|
4308 |
Lisp_Object key; |
Lisp_Object key; |
4309 |
{ |
{ |
4310 |
unsigned hash = sxhash (key, 0); |
unsigned hash = sxhash (key, 0); |
4311 |
xassert ((hash & ~VALMASK) == 0); |
xassert ((hash & ~INTMASK) == 0); |
4312 |
return hash; |
return hash; |
4313 |
} |
} |
4314 |
|
|
4495 |
index_size = next_almost_prime ((int) |
index_size = next_almost_prime ((int) |
4496 |
(new_size |
(new_size |
4497 |
/ XFLOATINT (h->rehash_threshold))); |
/ XFLOATINT (h->rehash_threshold))); |
4498 |
if (max (index_size, 2 * new_size) & ~VALMASK) |
if (max (index_size, 2 * new_size) > MOST_POSITIVE_FIXNUM) |
4499 |
error ("Hash table too large to resize"); |
error ("Hash table too large to resize"); |
4500 |
|
|
4501 |
h->key_and_value = larger_vector (h->key_and_value, 2 * new_size, Qnil); |
h->key_and_value = larger_vector (h->key_and_value, 2 * new_size, Qnil); |
4585 |
{ |
{ |
4586 |
int start_of_bucket, i; |
int start_of_bucket, i; |
4587 |
|
|
4588 |
xassert ((hash & ~VALMASK) == 0); |
xassert ((hash & ~INTMASK) == 0); |
4589 |
|
|
4590 |
/* Increment count after resizing because resizing may fail. */ |
/* Increment count after resizing because resizing may fail. */ |
4591 |
maybe_resize_hash_table (h); |
maybe_resize_hash_table (h); |
4870 |
hash = ((hash << 3) + (hash >> 28) + c); |
hash = ((hash << 3) + (hash >> 28) + c); |
4871 |
} |
} |
4872 |
|
|
4873 |
return hash & VALMASK; |
return hash & INTMASK; |
4874 |
} |
} |
4875 |
|
|
4876 |
|
|
4938 |
|
|
4939 |
|
|
4940 |
/* Return a hash code for OBJ. DEPTH is the current depth in the Lisp |
/* Return a hash code for OBJ. DEPTH is the current depth in the Lisp |
4941 |
structure. Value is an unsigned integer clipped to VALMASK. */ |
structure. Value is an unsigned integer clipped to INTMASK. */ |
4942 |
|
|
4943 |
unsigned |
unsigned |
4944 |
sxhash (obj, depth) |
sxhash (obj, depth) |
5002 |
abort (); |
abort (); |
5003 |
} |
} |
5004 |
|
|
5005 |
return hash & VALMASK; |
return hash & INTMASK; |
5006 |
} |
} |
5007 |
|
|
5008 |
|
|