Lines Matching refs:hash
35 2. keep a simple hash table mirroring the order of dict's, mapping each key
50 The catch with mirroring the hash table ordering is that we have to keep
91 * _odict_add_new_node(od, key, hash)
95 * _odict_clear_node(od, node, key, hash)
100 * _odict_find_node_hash(od, key, hash)
491 _ODictNode **od_fast_nodes; /* hash table that mirrors the dict table */
507 Py_hash_t hash;
515 (node->hash)
528 /* Return the index into the hash table, regardless of a valid node. */
530 _odict_get_index_raw(PyODictObject *od, PyObject *key, Py_hash_t hash)
536 ix = _Py_dict_lookup((PyDictObject *)od, key, hash, &value);
584 /* Return the index into the hash table, regardless of a valid node. */
586 _odict_get_index(PyODictObject *od, PyObject *key, Py_hash_t hash)
601 return _odict_get_index_raw(od, key, hash);
606 _odict_find_node_hash(PyODictObject *od, PyObject *key, Py_hash_t hash)
612 index = _odict_get_index(od, key, hash);
623 Py_hash_t hash;
627 hash = PyObject_Hash(key);
628 if (hash == -1)
630 index = _odict_get_index(od, key, hash);
665 _odict_add_new_node(PyODictObject *od, PyObject *key, Py_hash_t hash)
671 i = _odict_get_index(od, key, hash);
694 _odictnode_HASH(node) = hash;
731 [A, B, C], where the hash of C collides with A and the next possible
732 index in the hash table is occupied by B. If we remove B then for C
744 Py_hash_t hash)
754 i = _odict_get_index(od, key, hash);
1039 Py_hash_t hash)
1043 _ODictNode *node = _odict_find_node_hash((PyODictObject *)od, key, hash);
1046 eval loop reentrancy) and complications due to hash collision
1048 int res = _odict_clear_node((PyODictObject *)od, node, key, hash);
1053 value = _PyDict_Pop_KnownHash(od, key, hash, failobj);
1087 Py_hash_t hash = PyObject_Hash(key);
1088 if (hash == -1)
1090 return _odict_popkey_hash((PyObject *)self, key, default_value, hash);
1598 Py_hash_t hash)
1600 int res = _PyDict_SetItem_KnownHash(od, key, value, hash);
1602 res = _odict_add_new_node((PyODictObject *)od, key, hash);
1607 (void) _PyDict_DelItem_KnownHash(od, key, hash);
1617 Py_hash_t hash = PyObject_Hash(key);
1618 if (hash == -1)
1620 return _PyODict_SetItem_KnownHash(od, key, value, hash);
1627 Py_hash_t hash = PyObject_Hash(key);
1628 if (hash == -1)
1630 res = _odict_clear_node((PyODictObject *)od, NULL, key, hash);
1633 return _PyDict_DelItem_KnownHash(od, key, hash);