MCPcopy Create free account
hub / github.com/NativeScript/android / Probe

Method Probe

test-app/runtime/src/main/cpp/v8_inspector/src/base/hashmap.h:360–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358 class AllocationPolicy>
359template <typename LookupKey>
360typename TemplateHashMapImpl<Key, Value, MatchFun, AllocationPolicy>::Entry*
361TemplateHashMapImpl<Key, Value, MatchFun, AllocationPolicy>::Probe(
362 const LookupKey& key, uint32_t hash) const {
363 DCHECK(base::bits::IsPowerOfTwo(capacity()));
364 size_t i = hash & (capacity() - 1);
365 DCHECK(i < capacity());
366
367 DCHECK(occupancy() < capacity()); // Guarantees loop termination.
368 Entry* map = impl_.map_;
369 while (map[i].exists() &&
370 !impl_.match()(hash, map[i].hash, key, map[i].key)) {
371 i = (i + 1) & (capacity() - 1);
372 }
373
374 return &map[i];
375}
376
377template <typename Key, typename Value, typename MatchFun,
378 class AllocationPolicy>

Callers

nothing calls this directly

Calls 3

IsPowerOfTwoFunction · 0.85
existsMethod · 0.45
matchMethod · 0.45

Tested by

no test coverage detected