v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <hashmap.h>
Data Structures | |
struct | Entry |
Public Types | |
typedef bool(* | MatchFun )(void *key1, void *key2) |
Public Member Functions | |
TemplateHashMapImpl (MatchFun match, uint32_t capacity=kDefaultHashMapCapacity, AllocationPolicy allocator=AllocationPolicy()) | |
~TemplateHashMapImpl () | |
Entry * | Lookup (void *key, uint32_t hash, bool insert, AllocationPolicy allocator=AllocationPolicy()) |
void * | Remove (void *key, uint32_t hash) |
void | Clear () |
uint32_t | occupancy () const |
uint32_t | capacity () const |
Entry * | Start () const |
Entry * | Next (Entry *p) const |
Static Public Attributes | |
static const uint32_t | kDefaultHashMapCapacity = 8 |
TemplateHashMapImpl | ( | MatchFun | match, |
uint32_t | capacity = kDefaultHashMapCapacity , |
||
AllocationPolicy | allocator = AllocationPolicy() |
||
) |
~TemplateHashMapImpl | ( | ) |
|
inline |
Definition at line 88 of file hashmap.h.
Referenced by StringsStorage::GetUsedMemorySize(), and HeapObjectsMap::GetUsedMemorySize().
void Clear | ( | ) |
Definition at line 224 of file hashmap.h.
References v8::internal::NULL.
Referenced by HeapObjectsSet::Clear(), and LargeObjectSpace::SetUp().
TemplateHashMapImpl< AllocationPolicy >::Entry * Lookup | ( | void * | key, |
uint32_t | hash, | ||
bool | insert, | ||
AllocationPolicy | allocator = AllocationPolicy() |
||
) |
Definition at line 131 of file hashmap.h.
References TemplateHashMapImpl< AllocationPolicy >::Entry::hash, TemplateHashMapImpl< AllocationPolicy >::Entry::key, v8::internal::NULL, TemplateHashMapImpl< AllocationPolicy >::Entry::order, and TemplateHashMapImpl< AllocationPolicy >::Entry::value.
Referenced by SerializationAddressMapper::AddMapping(), LargeObjectSpace::AllocateRaw(), HeapObjectsSet::Contains(), TemplateHashMap< Literal, ObjectLiteral::Accessors, ZoneAllocationPolicy >::find(), ProfileNode::FindChild(), HeapObjectsMap::FindEntry(), ProfileNode::FindOrAddChild(), HeapObjectsMap::FindOrAddEntry(), LargeObjectSpace::FindPage(), HeapObjectsMap::FindUntrackedObjects(), HeapObjectsSet::GetTag(), HeapObjectsSet::Insert(), SerializationAddressMapper::IsMapped(), CounterMap::Lookup(), Interface::Lookup(), HeapEntriesMap::Map(), SerializationAddressMapper::MappedTo(), HeapObjectsMap::MoveObject(), HeapEntriesMap::Pair(), HeapObjectsMap::RemoveDeadEntries(), CounterMap::Set(), and HeapObjectsSet::SetTag().
TemplateHashMapImpl< AllocationPolicy >::Entry * Next | ( | Entry * | p | ) | const |
Definition at line 243 of file hashmap.h.
References ASSERT, TemplateHashMapImpl< AllocationPolicy >::Entry::key, and v8::internal::NULL.
Referenced by Interface::Iterator::Advance(), Scope::AllocateNonParameterLocals(), Scope::CollectStackAndContextLocals(), StringsStorage::GetUsedMemorySize(), NativeObjectsExplorer::IterateAndExtractReferences(), CounterMap::Iterator::Next(), ProfileNode::Print(), NativeObjectsExplorer::~NativeObjectsExplorer(), and StringsStorage::~StringsStorage().
|
inline |
Definition at line 83 of file hashmap.h.
Referenced by Scope::AllocateNonParameterLocals(), Scope::CollectStackAndContextLocals(), NativeObjectsExplorer::EstimateObjectsCount(), HeapObjectsMap::FindEntry(), HeapObjectsMap::FindOrAddEntry(), HeapObjectsMap::FindUntrackedObjects(), HeapObjectsSet::is_empty(), Interface::Length(), HeapObjectsMap::RemoveDeadEntries(), Interface::Unify(), UNINITIALIZED_TEST(), and HeapObjectsMap::UpdateHeapObjectsMap().
void * Remove | ( | void * | key, |
uint32_t | hash | ||
) |
Definition at line 162 of file hashmap.h.
References ASSERT, TemplateHashMapImpl< AllocationPolicy >::Entry::hash, TemplateHashMapImpl< AllocationPolicy >::Entry::key, v8::internal::NULL, and TemplateHashMapImpl< AllocationPolicy >::Entry::value.
Referenced by LargeObjectSpace::FreeUnmarkedObjects(), HeapObjectsMap::MoveObject(), and HeapObjectsMap::RemoveDeadEntries().
TemplateHashMapImpl< AllocationPolicy >::Entry * Start | ( | ) | const |
Definition at line 236 of file hashmap.h.
Referenced by Scope::AllocateNonParameterLocals(), TemplateHashMap< Literal, ObjectLiteral::Accessors, ZoneAllocationPolicy >::begin(), Scope::CollectStackAndContextLocals(), StringsStorage::GetUsedMemorySize(), NativeObjectsExplorer::IterateAndExtractReferences(), ProfileNode::Print(), NativeObjectsExplorer::~NativeObjectsExplorer(), and StringsStorage::~StringsStorage().