v8
3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
|
#include <serialize.h>
Public Member Functions | |
StartupSerializer (SnapshotByteSink *sink) | |
virtual void | SerializeStrongReferences () |
virtual void | SerializeObject (Object *o, HowToCode how_to_code, WhereToPoint where_to_point, int skip) |
void | SerializeWeakReferences () |
void | Serialize () |
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, int skip) |
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 int | nop () |
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 } |
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, int skip) |
void | InitializeAllocators () |
int | Allocate (int space, int size) |
int | EncodeExternalReference (Address addr) |
int | SpaceAreaSize (int space) |
void | Pad () |
Static Protected Member Functions inherited from Serializer | |
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 inherited from Serializer | |
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 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 = 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 |
Definition at line 627 of file serialize.h.
|
inlineexplicit |
Definition at line 629 of file serialize.h.
|
inline |
Definition at line 646 of file serialize.h.
References Serializer::Pad(), StartupSerializer::SerializeStrongReferences(), and StartupSerializer::SerializeWeakReferences().
|
virtual |
Implements Serializer.
Definition at line 1207 of file serialize.cc.
References Serializer::address_mapper_, HeapObject::cast(), CHECK, SerializationAddressMapper::IsMapped(), Serializer::kInvalidRootIndex, SerializerDeserializer::kSkip, SerializationAddressMapper::MappedTo(), SnapshotByteSink::Put(), SnapshotByteSink::PutInt(), Serializer::PutRoot(), Serializer::RootIndex(), Serializer::ObjectSerializer::Serialize(), Serializer::SerializeReferenceToPreviousObject(), Serializer::sink_, and Serializer::SpaceOfObject().
|
virtual |
Definition at line 1066 of file serialize.cc.
References HandleScopeImplementer::blocks(), CHECK, CHECK_EQ, Isolate::global_handles(), Isolate::handle_scope_implementer(), Isolate::has_installed_extensions(), HEAP, v8::internal::NULL, GlobalHandles::NumberOfWeakHandles(), and v8::internal::VISIT_ONLY_STRONG.
Referenced by main(), and StartupSerializer::Serialize().
void SerializeWeakReferences | ( | ) |
Definition at line 1246 of file serialize.cc.
References Isolate::heap(), HEAP, Serializer::Pad(), and v8::internal::VISIT_ALL.
Referenced by main(), and StartupSerializer::Serialize().