v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <serialize.h>
Data Structures | |
class | ObjectSerializer |
Public Member Functions | |
Serializer (Isolate *isolate, SnapshotByteSink *sink) | |
~Serializer () | |
void | VisitPointers (Object **start, Object **end) |
int | CurrentAllocationAddress (int space) |
Isolate * | isolate () const |
SerializationAddressMapper * | address_mapper () |
void | PutRoot (int index, HeapObject *object, HowToCode how, WhereToPoint where, int skip) |
Static Public Member Functions | |
static void | Enable (Isolate *isolate) |
static void | Disable () |
static void | TooLateToEnableNow () |
static bool | enabled () |
Static Public Member Functions inherited from SerializerDeserializer | |
static void | Iterate (Isolate *isolate, ObjectVisitor *visitor) |
static int | nop () |
Protected Member Functions | |
int | RootIndex (HeapObject *heap_object, HowToCode from) |
virtual bool | ShouldBeInThePartialSnapshotCache (HeapObject *o)=0 |
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 (int space, int address, HowToCode how_to_code, WhereToPoint where_to_point, int skip) |
void | InitializeAllocators () |
int | Allocate (int space, int size) |
int | EncodeExternalReference (Address addr) |
int | SpaceAreaSize (int space) |
bool | ShouldBeSkipped (Object **current) |
void | Pad () |
Static Protected Member Functions | |
static int | SpaceOfObject (HeapObject *object) |
Static Protected Member Functions inherited from SerializerDeserializer | |
static int | CodeForRepeats (int repeats) |
static int | RepeatsForCode (int byte_code) |
static int | RootArrayConstantFromByteCode (int byte_code) |
Protected Attributes | |
Isolate * | isolate_ |
int | fullness_ [LAST_SPACE+1] |
SnapshotByteSink * | sink_ |
ExternalReferenceEncoder * | external_reference_encoder_ |
SerializationAddressMapper | address_mapper_ |
intptr_t | root_index_wave_front_ |
Static Protected Attributes | |
static const int | kInvalidRootIndex = -1 |
static bool | serialization_enabled_ = false |
static bool | too_late_to_enable_now_ = false |
Static Protected Attributes inherited from 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 | kNumberOfSpaces = LO_SPACE |
static const int | kAnyOldSpace = -1 |
static const int | kSpaceMask = 7 |
Friends | |
class | ObjectSerializer |
class | Deserializer |
Additional Inherited Members | |
Protected Types inherited from SerializerDeserializer | |
enum | Where { kNewObject = 0, kRootArray = 0x9, kPartialSnapshotCache = 0xa, kExternalReference = 0xb, kSkip = 0xc, kNop = 0xd, 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 466 of file serialize.h.
Serializer | ( | Isolate * | isolate, |
SnapshotByteSink * | sink | ||
) |
Definition at line 1272 of file serialize.cc.
References Serializer::fullness_, and v8::internal::LAST_SPACE.
~Serializer | ( | ) |
Definition at line 1285 of file serialize.cc.
References Serializer::external_reference_encoder_.
|
inline |
Definition at line 486 of file serialize.h.
References Serializer::address_mapper_.
Referenced by Serializer::ObjectSerializer::Serialize(), and PartialSerializer::SerializeObject().
|
protected |
Definition at line 1851 of file serialize.cc.
References CHECK, Serializer::fullness_, SerializerDeserializer::kNumberOfSpaces, and v8::internal::size.
Referenced by Serializer::ObjectSerializer::Serialize().
|
inline |
Definition at line 473 of file serialize.h.
References ASSERT, Serializer::fullness_, and SerializerDeserializer::kNumberOfSpaces.
Referenced by main(), Serializer::SerializeReferenceToPreviousObject(), and TEST().
|
static |
Definition at line 772 of file serialize.cc.
References v8::internal::NULL, and Serializer::serialization_enabled_.
|
static |
Definition at line 761 of file serialize.cc.
References ASSERT, Isolate::InitializeLoggingAndCounters(), Serializer::serialization_enabled_, and Serializer::too_late_to_enable_now_.
|
inlinestatic |
Definition at line 485 of file serialize.h.
References Serializer::serialization_enabled_.
Referenced by Heap::IdleNotification(), FullCodeGenerator::Initialize(), CpuFeatures::IsSafeForSnapshot(), SerializerDeserializer::Iterate(), StandardFrame::IterateCompiledFrame(), NoTrackDoubleFieldsForSerializerScope::NoTrackDoubleFieldsForSerializerScope(), v8::internal::SetExpectedNofPropertiesFromEstimate(), IncrementalMarking::Start(), SharedFunctionInfo::StartInobjectSlackTracking(), IncrementalMarking::WorthActivating(), and NoTrackDoubleFieldsForSerializerScope::~NoTrackDoubleFieldsForSerializerScope().
|
inlineprotected |
Definition at line 567 of file serialize.h.
References ExternalReferenceEncoder::Encode(), and Serializer::external_reference_encoder_.
|
protected |
|
inline |
Definition at line 478 of file serialize.h.
References Serializer::isolate_.
Referenced by PartialSerializer::PartialSnapshotCacheIndex(), Serializer::PutRoot(), Serializer::RootIndex(), StartupSerializer::SerializeStrongReferences(), StartupSerializer::SerializeWeakReferences(), PartialSerializer::ShouldBeInThePartialSnapshotCache(), Serializer::ShouldBeSkipped(), and Serializer::VisitPointers().
|
protected |
Definition at line 1868 of file serialize.cc.
References SerializerDeserializer::kNop, SnapshotByteSink::Put(), and Serializer::sink_.
Referenced by PartialSerializer::Serialize(), StartupSerializer::Serialize(), and StartupSerializer::SerializeWeakReferences().
void PutRoot | ( | int | index, |
HeapObject * | object, | ||
SerializerDeserializer::HowToCode | how_to_code, | ||
SerializerDeserializer::WhereToPoint | where_to_point, | ||
int | skip | ||
) |
Definition at line 1490 of file serialize.cc.
References Serializer::isolate(), SerializerDeserializer::kRootArrayConstants, SerializerDeserializer::kRootArrayNumberOfConstantEncodings, SerializerDeserializer::kSkip, SnapshotByteSink::Put(), SnapshotByteSink::PutInt(), and Serializer::sink_.
Referenced by PartialSerializer::SerializeObject(), and StartupSerializer::SerializeObject().
|
inlineprotected |
Definition at line 498 of file serialize.h.
References Serializer::root_index_wave_front_.
|
protected |
Definition at line 1393 of file serialize.cc.
References Isolate::heap(), Heap::InNewSpace(), Serializer::isolate(), Serializer::kInvalidRootIndex, Serializer::root_index_wave_front_, and Heap::roots_array_start().
Referenced by PartialSerializer::SerializeObject(), and StartupSerializer::SerializeObject().
|
protectedpure virtual |
Implemented in StartupSerializer, and PartialSerializer.
Referenced by Serializer::ObjectSerializer::Serialize(), and Serializer::VisitPointers().
|
protected |
Definition at line 1418 of file serialize.cc.
References Serializer::CurrentAllocationAddress(), v8::internal::kObjectAlignmentBits, SnapshotByteSink::Put(), SnapshotByteSink::PutInt(), and Serializer::sink_.
Referenced by PartialSerializer::SerializeObject(), and StartupSerializer::SerializeObject().
|
inlineprotected |
Definition at line 499 of file serialize.h.
References ASSERT, and Serializer::root_index_wave_front_.
Referenced by PartialSerializer::PartialSerializer().
|
protectedpure virtual |
Implemented in PartialSerializer.
|
protected |
Definition at line 1311 of file serialize.cc.
References Isolate::heap(), Serializer::isolate(), and Heap::roots_array_start().
Referenced by Serializer::VisitPointers().
|
protected |
Definition at line 1859 of file serialize.cc.
References v8::internal::CODE_SPACE, MemoryAllocator::CodePageAreaSize(), Serializer::isolate_, MemoryChunk::kObjectStartOffset, Page::kPageSize, and Isolate::memory_allocator().
|
staticprotected |
Definition at line 1838 of file serialize.cc.
References ASSERT, v8::internal::FIRST_SPACE, HeapObject::GetHeap(), Heap::InSpace(), SerializerDeserializer::kNumberOfSpaces, v8::internal::LAST_SPACE, and UNREACHABLE.
Referenced by Serializer::ObjectSerializer::Serialize(), PartialSerializer::SerializeObject(), and StartupSerializer::SerializeObject().
|
inlinestatic |
Definition at line 484 of file serialize.h.
References Serializer::too_late_to_enable_now_.
Definition at line 1319 of file serialize.cc.
References Isolate::heap(), Serializer::isolate(), v8::internal::kPointerSize, SerializerDeserializer::kRawData, SerializerDeserializer::kSkip, v8::internal::Max(), SnapshotByteSink::Put(), SnapshotByteSink::PutInt(), Serializer::root_index_wave_front_, Heap::roots_array_start(), Serializer::SerializeObject(), Serializer::ShouldBeSkipped(), and Serializer::sink_.
|
friend |
Definition at line 591 of file serialize.h.
|
friend |
Definition at line 590 of file serialize.h.
|
protected |
Definition at line 586 of file serialize.h.
Referenced by Serializer::address_mapper(), PartialSerializer::SerializeObject(), and StartupSerializer::SerializeObject().
|
protected |
Definition at line 582 of file serialize.h.
Referenced by Serializer::EncodeExternalReference(), and Serializer::~Serializer().
|
protected |
Definition at line 580 of file serialize.h.
Referenced by Serializer::Allocate(), Serializer::CurrentAllocationAddress(), and Serializer::Serializer().
|
protected |
Definition at line 577 of file serialize.h.
Referenced by Serializer::isolate(), Serializer::ObjectSerializer::Serialize(), and Serializer::SpaceAreaSize().
|
staticprotected |
Definition at line 494 of file serialize.h.
Referenced by Serializer::RootIndex(), PartialSerializer::SerializeObject(), StartupSerializer::SerializeObject(), and Serializer::ObjectSerializer::VisitPointers().
|
protected |
Definition at line 587 of file serialize.h.
Referenced by Serializer::root_index_wave_front(), Serializer::RootIndex(), Serializer::set_root_index_wave_front(), and Serializer::VisitPointers().
|
staticprotected |
Definition at line 583 of file serialize.h.
Referenced by Serializer::Disable(), Serializer::Enable(), and Serializer::enabled().
|
protected |
Definition at line 581 of file serialize.h.
Referenced by Serializer::Pad(), Serializer::PutRoot(), PartialSerializer::SerializeObject(), StartupSerializer::SerializeObject(), Serializer::SerializeReferenceToPreviousObject(), Serializer::ObjectSerializer::VisitExternalAsciiString(), Serializer::ObjectSerializer::VisitExternalReference(), Serializer::VisitPointers(), Serializer::ObjectSerializer::VisitPointers(), and Serializer::ObjectSerializer::VisitRuntimeEntry().
|
staticprotected |
Definition at line 585 of file serialize.h.
Referenced by Serializer::Enable(), and Serializer::TooLateToEnableNow().