v8
3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
|
#include <serialize.h>
Public Member Functions | |
PartialSerializer (Serializer *startup_snapshot_serializer, SnapshotByteSink *sink) | |
virtual void | Serialize (Object **o) |
virtual void | SerializeObject (Object *o, HowToCode how_to_code, WhereToPoint where_to_point) |
Public Member Functions inherited from Serializer | |
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) |
Protected Member Functions | |
virtual int | PartialSnapshotCacheIndex (HeapObject *o) |
virtual bool | ShouldBeInThePartialSnapshotCache (HeapObject *o) |
Protected Member Functions inherited from Serializer | |
int | RootIndex (HeapObject *heap_object, HowToCode from) |
intptr_t | root_index_wave_front () |
void | set_root_index_wave_front (intptr_t value) |
void | SerializeReferenceToPreviousObject (int space, int address, HowToCode how_to_code, WhereToPoint where_to_point) |
void | InitializeAllocators () |
int | Allocate (int space, int size, bool *new_page_started) |
int | EncodeExternalReference (Address addr) |
int | SpaceAreaSize (int space) |
Additional Inherited Members | |
Static Public Member Functions inherited from Serializer | |
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 void | SetSnapshotCacheSize (int size) |
Protected Types inherited from SerializerDeserializer | |
enum | Where { kNewObject = 0, kRootArray = 0x9, kPartialSnapshotCache = 0xa, kExternalReference = 0xb, kSkip = 0xc, kBackref = 0x10, kFromStart = 0x20, kPointedToMask = 0x3f } |
enum | HowToCode { kPlain = 0, kFromCode = 0x40, kHowToCodeMask = 0x40 } |
enum | WhereToPoint { kStartOfObject = 0, kFirstInstruction = 0x80, kWhereToPointMask = 0x80 } |
Static Protected Member Functions inherited from Serializer | |
static int | SpaceOfObject (HeapObject *object) |
static int | SpaceOfAlreadySerializedObject (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) |
static bool | SpaceIsLarge (int space) |
static bool | SpaceIsPaged (int space) |
Protected Attributes inherited from Serializer | |
Isolate * | isolate_ |
int | fullness_ [LAST_SPACE+1] |
SnapshotByteSink * | sink_ |
int | current_root_index_ |
ExternalReferenceEncoder * | external_reference_encoder_ |
int | large_object_total_ |
SerializationAddressMapper | address_mapper_ |
intptr_t | root_index_wave_front_ |
Static Protected Attributes inherited from Serializer | |
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 = 0x30 |
static const int | kSynchronize = 0x70 |
static const int | kNativesStringResource = 0x71 |
static const int | kNewPage = 0x72 |
static const int | kRepeat = 0x73 |
static const int | kConstantRepeat = 0x74 |
static const int | kMaxRepeats = 0x7f - 0x73 |
static const int | kRootArrayLowConstants = 0xb0 |
static const int | kRootArrayHighConstants = 0xf0 |
static const int | kRootArrayNumberOfConstantEncodings = 0x20 |
static const int | kRootArrayNumberOfLowConstantEncodings = 0x10 |
static const int | kLargeData = LAST_SPACE |
static const int | kLargeCode = kLargeData + 1 |
static const int | kLargeFixedArray = kLargeCode + 1 |
static const int | kNumberOfSpaces = kLargeFixedArray + 1 |
static const int | kAnyOldSpace = -1 |
static const int | kSpaceMask = 15 |
Definition at line 585 of file serialize.h.
|
inline |
Definition at line 587 of file serialize.h.
References Heap::kStrongRootListLength, and Serializer::set_root_index_wave_front().
|
protectedvirtual |
Definition at line 1220 of file serialize.cc.
References ASSERT, CHECK, and Isolate::kPartialSnapshotCacheCapacity.
Referenced by PartialSerializer::SerializeObject().
|
virtual |
Definition at line 1150 of file serialize.cc.
References Isolate::heap(), and Isolate::kPartialSnapshotCacheCapacity.
|
virtual |
Implements Serializer.
Definition at line 1372 of file serialize.cc.
References Serializer::address_mapper(), Serializer::address_mapper_, ASSERT, HeapObject::cast(), Map::cast(), CHECK, HeapObject::GetHeap(), SerializationAddressMapper::IsMapped(), Serializer::kInvalidRootIndex, SerializerDeserializer::kPartialSnapshotCache, SerializationAddressMapper::MappedTo(), PartialSerializer::PartialSnapshotCacheIndex(), SnapshotByteSink::Put(), SnapshotByteSink::PutInt(), Serializer::PutRoot(), Serializer::RootIndex(), Serializer::ObjectSerializer::Serialize(), Serializer::SerializeReferenceToPreviousObject(), PartialSerializer::ShouldBeInThePartialSnapshotCache(), Serializer::sink_, and Serializer::SpaceOfAlreadySerializedObject().
|
inlineprotectedvirtual |
Implements Serializer.
Definition at line 602 of file serialize.h.
References ASSERT, HEAP, and HeapObject::map().
Referenced by PartialSerializer::SerializeObject().