V8 Project
v8::internal::SerializationAddressMapper Class Reference

#include <serialize.h>

+ Collaboration diagram for v8::internal::SerializationAddressMapper:

Public Member Functions

 SerializationAddressMapper ()
 
 ~SerializationAddressMapper ()
 
bool IsMapped (HeapObject *obj)
 
int MappedTo (HeapObject *obj)
 
void AddMapping (HeapObject *obj, int to)
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (SerializationAddressMapper)
 

Static Private Member Functions

static uint32_t Hash (HeapObject *obj)
 
static void * Key (HeapObject *obj)
 
static void * Value (int v)
 

Private Attributes

DisallowHeapAllocation no_allocation_
 
HashMapserialization_map_
 

Detailed Description

Definition at line 329 of file serialize.h.

Constructor & Destructor Documentation

◆ SerializationAddressMapper()

v8::internal::SerializationAddressMapper::SerializationAddressMapper ( )
inline

Definition at line 331 of file serialize.h.

332  : no_allocation_(),
DisallowHeapAllocation no_allocation_
Definition: serialize.h:369
static bool PointersMatch(void *key1, void *key2)
Definition: hashmap.h:80
TemplateHashMapImpl< FreeStoreAllocationPolicy > HashMap
Definition: hashmap.h:96

◆ ~SerializationAddressMapper()

v8::internal::SerializationAddressMapper::~SerializationAddressMapper ( )
inline

Definition at line 335 of file serialize.h.

335  {
336  delete serialization_map_;
337  }

References serialization_map_.

Member Function Documentation

◆ AddMapping()

void v8::internal::SerializationAddressMapper::AddMapping ( HeapObject obj,
int  to 
)
inline

Definition at line 349 of file serialize.h.

349  {
350  DCHECK(!IsMapped(obj));
351  HashMap::Entry* entry =
352  serialization_map_->Lookup(Key(obj), Hash(obj), true);
353  entry->value = Value(to);
354  }
static uint32_t Hash(HeapObject *obj)
Definition: serialize.h:357
static void * Key(HeapObject *obj)
Definition: serialize.h:361
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 expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, Hash(), IsMapped(), Key(), v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), serialization_map_, to(), and Value().

Referenced by v8::internal::Serializer::ObjectSerializer::Serialize().

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

◆ DISALLOW_COPY_AND_ASSIGN()

v8::internal::SerializationAddressMapper::DISALLOW_COPY_AND_ASSIGN ( SerializationAddressMapper  )
private

◆ Hash()

static uint32_t v8::internal::SerializationAddressMapper::Hash ( HeapObject obj)
inlinestaticprivate

Definition at line 357 of file serialize.h.

357  {
358  return static_cast<int32_t>(reinterpret_cast<intptr_t>(obj->address()));
359  }
int int32_t
Definition: unicode.cc:24

References v8::internal::HeapObject::address().

Referenced by AddMapping(), IsMapped(), and MappedTo().

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

◆ IsMapped()

bool v8::internal::SerializationAddressMapper::IsMapped ( HeapObject obj)
inline

Definition at line 339 of file serialize.h.

339  {
340  return serialization_map_->Lookup(Key(obj), Hash(obj), false) != NULL;
341  }
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 Hash(), Key(), v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), NULL, and serialization_map_.

Referenced by AddMapping(), MappedTo(), v8::internal::PartialSerializer::SerializeObject(), v8::internal::StartupSerializer::SerializeObject(), and v8::internal::CodeSerializer::SerializeObject().

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

◆ Key()

static void* v8::internal::SerializationAddressMapper::Key ( HeapObject obj)
inlinestaticprivate

Definition at line 361 of file serialize.h.

361  {
362  return reinterpret_cast<void*>(obj->address());
363  }

References v8::internal::HeapObject::address().

Referenced by AddMapping(), IsMapped(), and MappedTo().

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

◆ MappedTo()

int v8::internal::SerializationAddressMapper::MappedTo ( HeapObject obj)
inline

Definition at line 343 of file serialize.h.

343  {
344  DCHECK(IsMapped(obj));
345  return static_cast<int>(reinterpret_cast<intptr_t>(
346  serialization_map_->Lookup(Key(obj), Hash(obj), false)->value));
347  }

References DCHECK, Hash(), IsMapped(), Key(), v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), and serialization_map_.

Referenced by v8::internal::Serializer::SerializeReferenceToPreviousObject().

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

◆ Value()

static void* v8::internal::SerializationAddressMapper::Value ( int  v)
inlinestaticprivate

Definition at line 365 of file serialize.h.

365  {
366  return reinterpret_cast<void*>(v);
367  }

Referenced by AddMapping().

+ Here is the caller graph for this function:

Member Data Documentation

◆ no_allocation_

DisallowHeapAllocation v8::internal::SerializationAddressMapper::no_allocation_
private

Definition at line 369 of file serialize.h.

◆ serialization_map_

HashMap* v8::internal::SerializationAddressMapper::serialization_map_
private

Definition at line 370 of file serialize.h.

Referenced by AddMapping(), IsMapped(), MappedTo(), and ~SerializationAddressMapper().


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