Lines Matching refs:keyHash
314 * Reserve keyHash 0 for free entries and 1 for removed-entry sentinels. Note
318 * uses the high order bits of keyHash, so this least-significant reservation
326 #define MARK_ENTRY_FREE(entry) ((entry)->keyHash = 0)
327 #define MARK_ENTRY_REMOVED(entry) ((entry)->keyHash = 1)
328 #define ENTRY_IS_REMOVED(entry) ((entry)->keyHash == 1)
332 /* Match an entry's keyHash against an unstored one computed from a key. */
334 (((entry)->keyHash & ~COLLISION_FLAG) == (hash0))
380 SearchTable(PLDHashTable *table, const void *key, PLDHashNumber keyHash,
390 PR_ASSERT(!(keyHash & COLLISION_FLAG));
394 hash1 = HASH1(keyHash, hashShift);
405 if (MATCH_ENTRY_KEYHASH(entry, keyHash) && matchEntry(table, entry, key)) {
412 hash2 = HASH2(keyHash, sizeLog2, hashShift);
421 entry->keyHash |= COLLISION_FLAG;
435 if (MATCH_ENTRY_KEYHASH(entry, keyHash) &&
446 entry->keyHash |= COLLISION_FLAG;
505 oldEntry->keyHash &= ~COLLISION_FLAG;
507 oldEntry->keyHash, PL_DHASH_ADD);
510 newEntry->keyHash = oldEntry->keyHash;
522 PLDHashNumber keyHash;
527 keyHash = table->ops->hashKey(table, key);
528 keyHash *= PL_DHASH_GOLDEN_RATIO;
531 ENSURE_LIVE_KEYHASH(keyHash);
532 keyHash &= ~COLLISION_FLAG;
537 entry = SearchTable(table, key, keyHash, op);
572 entry = SearchTable(table, key, keyHash, op);
579 keyHash |= COLLISION_FLAG;
587 entry->keyHash = keyHash;
594 entry = SearchTable(table, key, keyHash, op);
627 PLDHashNumber keyHash; /* load first in case clearEntry goofs it */
630 keyHash = entry->keyHash;
632 if (keyHash & COLLISION_FLAG) {
745 hash1 = HASH1(entry->keyHash & ~COLLISION_FLAG, hashShift);
753 hash2 = HASH2(entry->keyHash & ~COLLISION_FLAG, sizeLog2,