V8 Project
v8::internal::HeapEntriesMap Class Reference

#include <heap-snapshot-generator.h>

+ Collaboration diagram for v8::internal::HeapEntriesMap:

Public Member Functions

 HeapEntriesMap ()
 
int Map (HeapThing thing)
 
void Pair (HeapThing thing, int entry)
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (HeapEntriesMap)
 

Static Private Member Functions

static uint32_t Hash (HeapThing thing)
 

Private Attributes

HashMap entries_
 

Friends

class HeapObjectsSet
 

Detailed Description

Definition at line 280 of file heap-snapshot-generator.h.

Constructor & Destructor Documentation

◆ HeapEntriesMap()

v8::internal::HeapEntriesMap::HeapEntriesMap ( )

Member Function Documentation

◆ DISALLOW_COPY_AND_ASSIGN()

v8::internal::HeapEntriesMap::DISALLOW_COPY_AND_ASSIGN ( HeapEntriesMap  )
private

◆ Hash()

static uint32_t v8::internal::HeapEntriesMap::Hash ( HeapThing  thing)
inlinestaticprivate

Definition at line 288 of file heap-snapshot-generator.h.

288  {
289  return ComputeIntegerHash(
290  static_cast<uint32_t>(reinterpret_cast<uintptr_t>(thing)),
292  }
static const uint32_t kZeroHashSeed
Definition: utils.h:245
uint32_t ComputeIntegerHash(uint32_t key, uint32_t seed)
Definition: utils.h:249

References v8::internal::ComputeIntegerHash(), and v8::internal::kZeroHashSeed.

Referenced by v8::internal::HeapObjectsSet::Contains(), v8::internal::HeapObjectsSet::GetTag(), v8::internal::HeapObjectsSet::Insert(), Map(), Pair(), and v8::internal::HeapObjectsSet::SetTag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Map()

int v8::internal::HeapEntriesMap::Map ( HeapThing  thing)

Definition at line 724 of file heap-snapshot-generator.cc.

724  {
725  HashMap::Entry* cache_entry = entries_.Lookup(thing, Hash(thing), false);
726  if (cache_entry == NULL) return HeapEntry::kNoEntry;
727  return static_cast<int>(reinterpret_cast<intptr_t>(cache_entry->value));
728 }
static uint32_t Hash(HeapThing thing)
Entry * Lookup(void *key, uint32_t hash, bool insert, AllocationPolicy allocator=AllocationPolicy())
Definition: hashmap.h:114
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL

References entries_, Hash(), v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), and NULL.

Referenced by v8::internal::SnapshotFiller::FindEntry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Pair()

void v8::internal::HeapEntriesMap::Pair ( HeapThing  thing,
int  entry 
)

Definition at line 731 of file heap-snapshot-generator.cc.

731  {
732  HashMap::Entry* cache_entry = entries_.Lookup(thing, Hash(thing), true);
733  DCHECK(cache_entry->value == NULL);
734  cache_entry->value = reinterpret_cast<void*>(static_cast<intptr_t>(entry));
735 }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, entries_, Hash(), v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), and NULL.

Referenced by v8::internal::SnapshotFiller::AddEntry().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ HeapObjectsSet

friend class HeapObjectsSet
friend

Definition at line 296 of file heap-snapshot-generator.h.

Member Data Documentation

◆ entries_

HashMap v8::internal::HeapEntriesMap::entries_
private

Definition at line 294 of file heap-snapshot-generator.h.

Referenced by Map(), and Pair().


The documentation for this class was generated from the following files: