v8
3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
|
#include <serialize.h>
Data Structures | |
class | ObjectSerializer |
Public Member Functions | |
Serializer (SnapshotByteSink *sink) | |
~Serializer () | |
void | VisitPointers (Object **start, Object **end) |
int | CurrentAllocationAddress (int space) |
SerializationAddressMapper * | address_mapper () |
void | PutRoot (int index, HeapObject *object, HowToCode how, WhereToPoint where, int skip) |
Static Public Member Functions | |
static void | Enable () |
static void | Disable () |
static void | TooLateToEnableNow () |
static bool | enabled () |
Static Public Member Functions inherited from SerializerDeserializer | |
static void | Iterate (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) |
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_ |
int | current_root_index_ |
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 458 of file serialize.h.
|
explicit |
Definition at line 1046 of file serialize.cc.
References ASSERT, Serializer::fullness_, Isolate::IsDefaultIsolate(), Serializer::isolate_, and v8::internal::LAST_SPACE.
~Serializer | ( | ) |
Definition at line 1061 of file serialize.cc.
References Serializer::external_reference_encoder_.
|
inline |
Definition at line 482 of file serialize.h.
References Serializer::address_mapper_.
Referenced by Serializer::ObjectSerializer::Serialize(), and PartialSerializer::SerializeObject().
|
protected |
Definition at line 1594 of file serialize.cc.
References CHECK, Serializer::fullness_, and SerializerDeserializer::kNumberOfSpaces.
Referenced by Serializer::ObjectSerializer::Serialize().
|
inline |
Definition at line 465 of file serialize.h.
References ASSERT, Serializer::fullness_, and SerializerDeserializer::kNumberOfSpaces.
Referenced by main(), Serializer::SerializeReferenceToPreviousObject(), and TEST().
|
inlinestatic |
Definition at line 477 of file serialize.h.
References Serializer::serialization_enabled_.
|
inlinestatic |
Definition at line 470 of file serialize.h.
References ASSERT, Serializer::serialization_enabled_, and Serializer::too_late_to_enable_now_.
|
inlinestatic |
Definition at line 481 of file serialize.h.
References Serializer::serialization_enabled_.
Referenced by Logger::CodeCreateEvent(), Logger::CodeDeleteEvent(), Logger::CodeMoveEvent(), Heap::IdleNotification(), FullCodeGenerator::Initialize(), SerializerDeserializer::Iterate(), Logger::RegExpCodeCreateEvent(), Logger::SnapshotPositionEvent(), SharedFunctionInfo::StartInobjectSlackTracking(), StaticMarkingVisitor< StaticVisitor >::VisitCodeTarget(), and IncrementalMarking::WorthActivating().
|
inlineprotected |
Definition at line 563 of file serialize.h.
References ExternalReferenceEncoder::Encode(), and Serializer::external_reference_encoder_.
|
protected |
|
protected |
Definition at line 1611 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 1260 of file serialize.cc.
References HEAP, SerializerDeserializer::kRootArrayConstants, SerializerDeserializer::kRootArrayNumberOfConstantEncodings, SerializerDeserializer::kSkip, SnapshotByteSink::Put(), SnapshotByteSink::PutInt(), and Serializer::sink_.
Referenced by PartialSerializer::SerializeObject(), and StartupSerializer::SerializeObject().
|
inlineprotected |
Definition at line 494 of file serialize.h.
References Serializer::root_index_wave_front_.
|
protected |
Definition at line 1161 of file serialize.cc.
References HEAP, Heap::InNewSpace(), 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 1187 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 495 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 1602 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 1581 of file serialize.cc.
References ASSERT, v8::internal::FIRST_SPACE, HEAP, SerializerDeserializer::kNumberOfSpaces, v8::internal::LAST_SPACE, and UNREACHABLE.
Referenced by Serializer::ObjectSerializer::Serialize(), PartialSerializer::SerializeObject(), and StartupSerializer::SerializeObject().
|
inlinestatic |
Definition at line 480 of file serialize.h.
References Serializer::too_late_to_enable_now_.
Definition at line 1086 of file serialize.cc.
References Isolate::heap(), 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::sink_, Heap::store_buffer(), and StoreBuffer::TopAddress().
|
friend |
Definition at line 584 of file serialize.h.
|
friend |
Definition at line 583 of file serialize.h.
|
protected |
Definition at line 579 of file serialize.h.
Referenced by Serializer::address_mapper(), PartialSerializer::SerializeObject(), and StartupSerializer::SerializeObject().
|
protected |
Definition at line 574 of file serialize.h.
|
protected |
Definition at line 575 of file serialize.h.
Referenced by Serializer::EncodeExternalReference(), and Serializer::~Serializer().
|
protected |
Definition at line 572 of file serialize.h.
Referenced by Serializer::Allocate(), Serializer::CurrentAllocationAddress(), and Serializer::Serializer().
|
protected |
Definition at line 569 of file serialize.h.
Referenced by Serializer::Serializer(), and Serializer::SpaceAreaSize().
|
staticprotected |
Definition at line 490 of file serialize.h.
Referenced by Serializer::RootIndex(), PartialSerializer::SerializeObject(), StartupSerializer::SerializeObject(), and Serializer::ObjectSerializer::VisitPointers().
|
protected |
Definition at line 580 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 576 of file serialize.h.
Referenced by Serializer::Disable(), Serializer::Enable(), and Serializer::enabled().
|
protected |
Definition at line 573 of file serialize.h.
Referenced by Serializer::Pad(), Serializer::PutRoot(), PartialSerializer::SerializeObject(), StartupSerializer::SerializeObject(), Serializer::SerializeReferenceToPreviousObject(), Serializer::ObjectSerializer::VisitExternalAsciiString(), Serializer::ObjectSerializer::VisitExternalReference(), Serializer::ObjectSerializer::VisitExternalReferences(), Serializer::VisitPointers(), Serializer::ObjectSerializer::VisitPointers(), and Serializer::ObjectSerializer::VisitRuntimeEntry().
|
staticprotected |
Definition at line 578 of file serialize.h.
Referenced by Serializer::Enable(), and Serializer::TooLateToEnableNow().