v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PartialSerializer Class Reference

#include <serialize.h>

Inheritance diagram for PartialSerializer:
Collaboration diagram for PartialSerializer:

Public Member Functions

 PartialSerializer (Isolate *isolate, Serializer *startup_snapshot_serializer, SnapshotByteSink *sink)
 
virtual void Serialize (Object **o)
 
virtual void SerializeObject (Object *o, HowToCode how_to_code, WhereToPoint where_to_point, int skip)
 
- Public Member Functions inherited from Serializer
 Serializer (Isolate *isolate, SnapshotByteSink *sink)
 
 ~Serializer ()
 
void VisitPointers (Object **start, Object **end)
 
int CurrentAllocationAddress (int space)
 
Isolateisolate () const
 
SerializationAddressMapperaddress_mapper ()
 
void PutRoot (int index, HeapObject *object, HowToCode how, WhereToPoint where, int skip)
 

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, int skip)
 
void InitializeAllocators ()
 
int Allocate (int space, int size)
 
int EncodeExternalReference (Address addr)
 
int SpaceAreaSize (int space)
 
bool ShouldBeSkipped (Object **current)
 
void Pad ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Serializer
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 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 }
 
- 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
Isolateisolate_
 
int fullness_ [LAST_SPACE+1]
 
SnapshotByteSinksink_
 
ExternalReferenceEncoderexternal_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
 

Detailed Description

Definition at line 599 of file serialize.h.

Constructor & Destructor Documentation

PartialSerializer ( Isolate isolate,
Serializer startup_snapshot_serializer,
SnapshotByteSink sink 
)
inline

Member Function Documentation

int PartialSnapshotCacheIndex ( HeapObject o)
protectedvirtual
void Serialize ( Object **  o)
virtual

Definition at line 1305 of file serialize.cc.

References Serializer::Pad().

Referenced by main(), and TEST().

virtual bool ShouldBeInThePartialSnapshotCache ( HeapObject o)
inlineprotectedvirtual

Implements Serializer.

Definition at line 618 of file serialize.h.

References ASSERT, Isolate::heap(), Serializer::isolate(), and HeapObject::map().

Referenced by PartialSerializer::SerializeObject().


The documentation for this class was generated from the following files: