|
V8 Project
|
#include <serialize.h>
Inheritance diagram for v8::internal::Serializer:
Collaboration diagram for v8::internal::Serializer:Classes | |
| class | ObjectSerializer |
Public Member Functions | |
| Serializer (Isolate *isolate, SnapshotByteSink *sink) | |
| ~Serializer () | |
| void | VisitPointers (Object **start, Object **end) |
| int | CurrentAllocationAddress (int space) const |
| Isolate * | isolate () const |
| SerializationAddressMapper * | address_mapper () |
| void | PutRoot (int index, HeapObject *object, HowToCode how, WhereToPoint where, int skip) |
Protected Member Functions | |
| int | RootIndex (HeapObject *heap_object, HowToCode from) |
| intptr_t | root_index_wave_front () |
| void | set_root_index_wave_front (intptr_t value) |
| virtual void | SerializeObject (Object *o, HowToCode how_to_code, WhereToPoint where_to_point, int skip)=0 |
| void | SerializeReferenceToPreviousObject (HeapObject *heap_object, HowToCode how_to_code, WhereToPoint where_to_point, int skip) |
| void | InitializeAllocators () |
| int | AllocateLargeObject (int size) |
| int | Allocate (int space, int size) |
| int | EncodeExternalReference (Address addr) |
| int | SpaceAreaSize (int space) |
| bool | ShouldBeSkipped (Object **current) |
| void | Pad () |
| void | InitializeCodeAddressMap () |
Protected Member Functions inherited from v8::internal::SerializerDeserializer | |
| STATIC_ASSERT (kNumberOfSpaces<=kSpaceMask+1) | |
Static Protected Member Functions | |
| static int | SpaceOfObject (HeapObject *object) |
Static Protected Member Functions inherited from v8::internal::SerializerDeserializer | |
| static int | CodeForRepeats (int repeats) |
| static int | RepeatsForCode (int byte_code) |
| static int | RootArrayConstantFromByteCode (int byte_code) |
Protected Attributes | |
| Isolate * | isolate_ |
| int | fullness_ [kNumberOfSpaces] |
| SnapshotByteSink * | sink_ |
| ExternalReferenceEncoder * | external_reference_encoder_ |
| SerializationAddressMapper | address_mapper_ |
| intptr_t | root_index_wave_front_ |
Static Protected Attributes | |
| static const int | kInvalidRootIndex = -1 |
Static Protected Attributes inherited from v8::internal::SerializerDeserializer | |
| static const int | kRawData = 0x20 |
| static const int | kSynchronize = 0x70 |
| static const int | kNativesStringResource = 0x71 |
| static const int | kRepeat = 0x72 |
| static const int | kConstantRepeat = 0x73 |
| static const int | kMaxRepeats = 0x7f - 0x72 |
| static const int | kRootArrayConstants = 0xa0 |
| static const int | kRootArrayNumberOfConstantEncodings = 0x20 |
| static const int | kAnyOldSpace = -1 |
| static const int | kSpaceMask = 7 |
Private Member Functions | |
| DISALLOW_COPY_AND_ASSIGN (Serializer) | |
Private Attributes | |
| CodeAddressMap * | code_address_map_ |
| int | seen_large_objects_index_ |
Friends | |
| class | ObjectSerializer |
| class | Deserializer |
Additional Inherited Members | |
Static Public Member Functions inherited from v8::internal::SerializerDeserializer | |
| static void | Iterate (Isolate *isolate, ObjectVisitor *visitor) |
| static int | nop () |
Static Public Attributes inherited from v8::internal::SerializerDeserializer | |
| static const int | kNumberOfPreallocatedSpaces = LO_SPACE |
| static const int | kNumberOfSpaces = INVALID_SPACE |
Protected Types inherited from v8::internal::SerializerDeserializer | |
| enum | Where { kNewObject = 0 , kRootArray = 0x9 , kPartialSnapshotCache = 0xa , kExternalReference = 0xb , kSkip = 0xc , kBuiltin = 0xd , kAttachedReference = 0xe , kNop = 0xf , kBackref = 0x10 , kBackrefWithSkip = 0x18 , kPointedToMask = 0x3f } |
| enum | HowToCode { kPlain = 0 , kFromCode = 0x40 , kHowToCodeMask = 0x40 } |
| enum | WithSkip { kNoSkipDistance = 0 , kHasSkipDistance = 0x40 , kWithSkipMask = 0x40 } |
| enum | WhereToPoint { kStartOfObject = 0 , kInnerPointer = 0x80 , kWhereToPointMask = 0x80 } |
Definition at line 378 of file serialize.h.
| v8::internal::Serializer::Serializer | ( | Isolate * | isolate, |
| SnapshotByteSink * | sink | ||
| ) |
Definition at line 1214 of file serialize.cc.
References fullness_, and v8::internal::SerializerDeserializer::kNumberOfSpaces.
| v8::internal::Serializer::~Serializer | ( | ) |
Definition at line 1227 of file serialize.cc.
References code_address_map_, external_reference_encoder_, and NULL.
|
inline |
Definition at line 392 of file serialize.h.
References address_mapper_.
Referenced by v8::internal::Serializer::ObjectSerializer::Serialize(), and v8::internal::PartialSerializer::SerializeObject().
Here is the caller graph for this function:Definition at line 1804 of file serialize.cc.
References CHECK, fullness_, v8::internal::SerializerDeserializer::kNumberOfPreallocatedSpaces, size, and space().
Referenced by v8::internal::Serializer::ObjectSerializer::Serialize().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1798 of file serialize.cc.
References fullness_, v8::internal::LO_SPACE, seen_large_objects_index_, and size.
Referenced by v8::internal::Serializer::ObjectSerializer::Serialize().
Here is the caller graph for this function:Definition at line 385 of file serialize.h.
References DCHECK, fullness_, v8::internal::SerializerDeserializer::kNumberOfSpaces, and space().
Referenced by SnapshotWriter::MaybeWriteStartupBlob(), SerializeReferenceToPreviousObject(), and SnapshotWriter::WriteSizeVar().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 471 of file serialize.h.
References v8::internal::ExternalReferenceEncoder::Encode(), and external_reference_encoder_.
Here is the call graph for this function:
|
protected |
|
protected |
Definition at line 1830 of file serialize.cc.
References code_address_map_, v8::internal::Isolate::InitializeLoggingAndCounters(), and isolate_.
Referenced by v8::internal::CodeSerializer::CodeSerializer(), v8::internal::PartialSerializer::PartialSerializer(), and v8::internal::StartupSerializer::StartupSerializer().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 390 of file serialize.h.
References isolate_.
Referenced by v8::internal::CodeSerializer::Deserialize(), v8::internal::PartialSerializer::PartialSnapshotCacheIndex(), PutRoot(), RootIndex(), v8::internal::CodeSerializer::Serialize(), v8::internal::CodeSerializer::SerializeBuiltin(), v8::internal::CodeSerializer::SerializeObject(), v8::internal::StartupSerializer::SerializeStrongReferences(), v8::internal::StartupSerializer::SerializeWeakReferences(), v8::internal::PartialSerializer::ShouldBeInThePartialSnapshotCache(), ShouldBeSkipped(), v8::internal::StartupSerializer::StartupSerializer(), and VisitPointers().
Here is the caller graph for this function:
|
protected |
Definition at line 1821 of file serialize.cc.
References v8::internal::SerializerDeserializer::kNop, v8::internal::SnapshotByteSink::Put(), and sink_.
Referenced by v8::internal::StartupSerializer::Serialize(), v8::internal::PartialSerializer::Serialize(), and v8::internal::StartupSerializer::SerializeWeakReferences().
Here is the call graph for this function:
Here is the caller graph for this function:| void v8::internal::Serializer::PutRoot | ( | int | index, |
| HeapObject * | object, | ||
| SerializerDeserializer::HowToCode | how_to_code, | ||
| SerializerDeserializer::WhereToPoint | where_to_point, | ||
| int | skip | ||
| ) |
Definition at line 1428 of file serialize.cc.
References isolate(), v8::internal::SerializerDeserializer::kHasSkipDistance, v8::internal::SerializerDeserializer::kNoSkipDistance, v8::internal::SerializerDeserializer::kPlain, v8::internal::SerializerDeserializer::kRootArray, v8::internal::SerializerDeserializer::kRootArrayConstants, v8::internal::SerializerDeserializer::kRootArrayNumberOfConstantEncodings, v8::internal::SerializerDeserializer::kSkip, v8::internal::SerializerDeserializer::kStartOfObject, v8::internal::SnapshotByteSink::Put(), v8::internal::SnapshotByteSink::PutInt(), and sink_.
Referenced by 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:
|
inlineprotected |
|
protected |
Definition at line 1336 of file serialize.cc.
References v8::internal::Isolate::heap(), v8::internal::Heap::InNewSpace(), isolate(), kInvalidRootIndex, root_index_wave_front_, and v8::internal::Heap::roots_array_start().
Referenced by 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:
|
protectedpure virtual |
Implemented in v8::internal::CodeSerializer, v8::internal::StartupSerializer, and v8::internal::PartialSerializer.
Referenced by v8::internal::Serializer::ObjectSerializer::Serialize(), and VisitPointers().
Here is the caller graph for this function:
|
protected |
Definition at line 1353 of file serialize.cc.
References address_mapper_, CurrentAllocationAddress(), v8::internal::SerializerDeserializer::kBackref, v8::internal::SerializerDeserializer::kBackrefWithSkip, v8::internal::kObjectAlignmentBits, v8::internal::LO_SPACE, v8::internal::SerializationAddressMapper::MappedTo(), v8::internal::SnapshotByteSink::Put(), v8::internal::SnapshotByteSink::PutInt(), sink_, space(), and SpaceOfObject().
Referenced by 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:
|
inlineprotected |
Definition at line 404 of file serialize.h.
References DCHECK, and root_index_wave_front_.
Referenced by v8::internal::CodeSerializer::CodeSerializer(), and v8::internal::PartialSerializer::PartialSerializer().
Here is the caller graph for this function:Definition at line 1254 of file serialize.cc.
References v8::internal::Isolate::heap(), isolate(), and v8::internal::Heap::roots_array_start().
Referenced by VisitPointers().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1812 of file serialize.cc.
References v8::internal::CODE_SPACE, v8::internal::MemoryAllocator::CodePageAreaSize(), isolate_, v8::internal::MemoryChunk::kObjectStartOffset, v8::internal::Page::kPageSize, v8::internal::Isolate::memory_allocator(), and space().
Here is the call graph for this function:
|
staticprotected |
Definition at line 1785 of file serialize.cc.
References DCHECK, v8::internal::FIRST_SPACE, v8::internal::HeapObject::GetHeap(), v8::internal::Heap::InSpace(), v8::internal::SerializerDeserializer::kNumberOfSpaces, v8::internal::LAST_SPACE, and UNREACHABLE.
Referenced by v8::internal::Serializer::ObjectSerializer::Serialize(), and SerializeReferenceToPreviousObject().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1262 of file serialize.cc.
References v8::internal::Isolate::heap(), isolate(), v8::internal::SerializerDeserializer::kPlain, v8::internal::kPointerSize, v8::internal::SerializerDeserializer::kRawData, v8::internal::SerializerDeserializer::kSkip, v8::internal::SerializerDeserializer::kStartOfObject, v8::internal::Max(), v8::internal::SnapshotByteSink::Put(), v8::internal::SnapshotByteSink::PutInt(), root_index_wave_front_, v8::internal::Heap::roots_array_start(), SerializeObject(), ShouldBeSkipped(), and sink_.
Here is the call graph for this function:
|
friend |
Definition at line 493 of file serialize.h.
|
friend |
Definition at line 492 of file serialize.h.
|
protected |
Definition at line 488 of file serialize.h.
Referenced by address_mapper(), v8::internal::PartialSerializer::SerializeObject(), v8::internal::StartupSerializer::SerializeObject(), v8::internal::CodeSerializer::SerializeObject(), and SerializeReferenceToPreviousObject().
|
private |
Definition at line 500 of file serialize.h.
Referenced by InitializeCodeAddressMap(), v8::internal::Serializer::ObjectSerializer::Serialize(), and ~Serializer().
|
protected |
Definition at line 486 of file serialize.h.
Referenced by EncodeExternalReference(), and ~Serializer().
|
protected |
Definition at line 484 of file serialize.h.
Referenced by Allocate(), AllocateLargeObject(), CurrentAllocationAddress(), and Serializer().
|
protected |
Definition at line 481 of file serialize.h.
Referenced by InitializeCodeAddressMap(), isolate(), v8::internal::Serializer::ObjectSerializer::Serialize(), and SpaceAreaSize().
|
staticprotected |
|
protected |
Definition at line 489 of file serialize.h.
Referenced by root_index_wave_front(), RootIndex(), set_root_index_wave_front(), and VisitPointers().
|
private |
Definition at line 502 of file serialize.h.
Referenced by AllocateLargeObject().
|
protected |
Definition at line 485 of file serialize.h.
Referenced by v8::internal::Serializer::ObjectSerializer::OutputRawData(), Pad(), PutRoot(), v8::internal::CodeSerializer::SerializeBuiltin(), v8::internal::CodeSerializer::SerializeCodeStub(), v8::internal::CodeSerializer::SerializeHeapObject(), v8::internal::PartialSerializer::SerializeObject(), v8::internal::StartupSerializer::SerializeObject(), v8::internal::CodeSerializer::SerializeObject(), SerializeReferenceToPreviousObject(), v8::internal::CodeSerializer::SerializeSourceObject(), v8::internal::Serializer::ObjectSerializer::VisitExternalOneByteString(), v8::internal::Serializer::ObjectSerializer::VisitExternalReference(), VisitPointers(), v8::internal::Serializer::ObjectSerializer::VisitPointers(), and v8::internal::Serializer::ObjectSerializer::VisitRuntimeEntry().