Home | History | Annotate | Download | only in src

Lines Matching refs:Key

34   // HashMap entries are (key, value, hash) triplets.
36 // (e.g. implementers of sets, where the key is the value).
38 void* key;
40 uint32_t hash; // The full hash value for key
44 // If an entry with matching key is found, returns that entry.
46 Entry* Lookup(void* key, uint32_t hash) const;
48 // If an entry with matching key is found, returns that entry.
50 // corresponding key, key hash, and NULL value.
51 Entry* LookupOrInsert(void* key, uint32_t hash,
54 // Removes the entry with matching key.
56 // or null if there is no value for such key.
57 void* Remove(void* key, uint32_t hash);
93 Entry* Probe(void* key, uint32_t hash) const;
116 TemplateHashMapImpl<AllocationPolicy>::Lookup(void* key, uint32_t hash) const {
117 Entry* p = Probe(key, hash);
118 return p->key != NULL ? p : NULL;
125 void* key, uint32_t hash, AllocationPolicy allocator) {
127 Entry* p = Probe(key, hash);
128 if (p->key != NULL) {
133 p->key = key;
142 p = Probe(key, hash);
150 void* TemplateHashMapImpl<AllocationPolicy>::Remove(void* key, uint32_t hash) {
151 // Lookup the entry for the key to remove.
152 Entry* p = Probe(key, hash);
153 if (p->key == NULL) {
154 // Key not found nothing to remove.
187 if (q->key == NULL) {
205 p->key = NULL;
216 p->key = NULL;
235 if (p->key != NULL) {
245 TemplateHashMapImpl<AllocationPolicy>::Probe(void* key, uint32_t hash) const {
246 DCHECK(key != NULL);
254 while (p->key != NULL && (hash != p->hash || !match_(key, p->key))) {
289 if (p->key != NULL) {
290 Entry* entry = LookupOrInsert(p->key, p->hash, allocator);
303 template<class Key, class Value, class AllocationPolicy>
306 STATIC_ASSERT(sizeof(Key*) == sizeof(void*)); // NOLINT
309 Key* first;
344 Iterator find(Key* key, bool insert = false,
347 return Iterator(this, this->LookupOrInsert(key, key->Hash(), allocator));
349 return Iterator(this, this->Lookup(key, key->Hash()));