Lines Matching refs:entry

15 #include "src/base/hashmap-entry.h"
64 // If an entry with matching key is found, returns that entry.
68 // If an entry with matching key is found, returns that entry.
69 // If no matching entry is found, a new entry is inserted with
73 // If an entry with matching key is found, returns that entry.
74 // If no matching entry is found, a new entry is inserted with
85 // If an entry with matching key is found, returns that entry.
86 // If no matching entry is found, a new entry is inserted with
95 // Removes the entry with matching key.
96 // It returns the value of the deleted entry
127 Entry* Next(Entry* entry) const;
138 Entry* FillEmptyEntry(Entry* entry, const Key& key, const Value& value,
216 Entry* entry = Probe(key, hash);
217 return entry->exists() ? entry : nullptr;
245 // Find a matching entry.
246 Entry* entry = Probe(lookup_key, hash);
247 if (entry->exists()) {
248 return entry;
251 return FillEmptyEntry(entry, key_func(), value_func(), hash);
259 Entry* entry = Probe(key, hash);
260 return FillEmptyEntry(entry, key, Value(), hash);
267 // Lookup the entry for the key to remove.
275 // To remove an entry we need to ensure that it does not create an empty
276 // entry that will cause the search for another entry to stop too soon. If all
277 // the entries between the entry to remove and the next empty slot have their
278 // initial position inside this interval, clearing the entry to remove will
279 // not break the search. If, while searching for the next empty entry, an
280 // entry is encountered which does not have its initial position between the
281 // entry to remove and the position looked at, then this entry can be moved to
282 // the place of the entry to remove without breaking the search for it. The
283 // entry made vacant by this move is now the entry to remove and the process
287 // This guarantees loop termination as there is at least one empty entry so
288 // eventually the removed entry will have an empty entry after it.
291 // p is the candidate entry to clear. q is used to scan forwards.
292 Entry* q = p; // Start at the entry to remove.
294 // Move q to the next entry.
301 // and the entry p can be cleared without breaking the search for these
307 // Find the initial position for the entry at position q.
310 // If the entry at position q has its initial position outside the range
312 // found. There is now a new candidate entry for clearing.
319 // Clear the entry which is allowed to en emptied.
346 Entry* entry) const {
348 DCHECK(impl_.map_ - 1 <= entry && entry < end);
349 for (entry++; entry < end; entry++) {
350 if (entry->exists()) {
351 return entry;
381 Entry* entry, const Key& key, const Value& value, uint32_t hash) {
382 DCHECK(!entry->exists());
384 new (entry) Entry(key, value, hash);
390 entry = Probe(key, hash);
393 return entry;
421 for (Entry* entry = old_map; n > 0; entry++) {
422 if (entry->exists()) {
423 Entry* new_entry = Probe(entry->key, entry->hash);
425 FillEmptyEntry(new_entry, entry->key, entry->value, entry->hash);
551 Iterator(const Base* map, typename Base::Entry* entry)
552 : map_(map), entry_(entry) {}