v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::SerializerDeserializer Class Reference

#include <serializer-deserializer.h>

Inheritance diagram for v8::internal::SerializerDeserializer:
Collaboration diagram for v8::internal::SerializerDeserializer:

Classes

struct  BytecodeValueEncoder
 
struct  VariableRepeatRootCount
 

Static Public Member Functions

static void IterateStartupObjectCache (Isolate *isolate, RootVisitor *visitor)
 
static void IterateSharedHeapObjectCache (Isolate *isolate, RootVisitor *visitor)
 
- Static Public Member Functions inherited from v8::internal::RootVisitor
static const char * RootName (Root root)
 

Protected Types

enum class  SlotType { kAnySlot , kMapSlot }
 
enum  Bytecode : uint8_t {
  kNewObject = 0x00 , kBackref = 0x04 , kReadOnlyHeapRef , kStartupObjectCache ,
  kRootArray , kAttachedReference , kSharedHeapObjectCache , kNop ,
  kSynchronize , kVariableRepeatRoot , kOffHeapBackingStore , kOffHeapResizableBackingStore ,
  kEmbedderFieldsData , kApiWrapperFieldsData , kVariableRawData , kApiReference ,
  kExternalReference , kSandboxedApiReference , kSandboxedExternalReference , kSandboxedRawExternalReference ,
  kClearedWeakReference , kWeakPrefix , kRegisterPendingForwardRef , kResolvePendingForwardRef ,
  kNewContextlessMetaMap , kNewContextfulMetaMap , kIndirectPointerPrefix , kInitializeSelfIndirectPointer ,
  kAllocateJSDispatchEntry , kJSDispatchEntry , kProtectedPointerPrefix , kRootArrayConstants = 0x40 ,
  kFixedRawData = 0x60 , kFixedRepeatRoot = 0x80 , kHotObject = 0x90
}
 
template<Bytecode bytecode>
using SpaceEncoder
 
using NewObject = SpaceEncoder<kNewObject>
 
using FixedRawDataWithSize
 
using FixedRepeatRootWithCount
 
using RootArrayConstant
 
using HotObject = BytecodeValueEncoder<kHotObject, 0, kHotObjectCount - 1>
 

Protected Member Functions

void RestoreExternalReferenceRedirector (Isolate *isolate, Tagged< AccessorInfo > accessor_info)
 
void RestoreExternalReferenceRedirector (Isolate *isolate, Tagged< FunctionTemplateInfo > function_template_info)
 

Static Protected Member Functions

static bool CanBeDeferred (Tagged< HeapObject > o, SlotType slot_type)
 

Static Protected Attributes

static const int kRootArrayConstantsCount = 0x20
 
static const int kFixedRawDataCount = 0x20
 
static const int kFixedRepeatRootCount = 0x10
 
static const int kHotObjectCount = 8
 
static const int kDoubleAlignmentSentinel = 0
 
static const int kFirstEncodableFixedRawDataSize = 1
 
static const int kLastEncodableFixedRawDataSize
 
static const int kFirstEncodableRepeatRootCount = 2
 
static const int kLastEncodableFixedRepeatRootCount
 
static const int kFirstEncodableVariableRepeatRootCount
 
static const uint32_t kEmptyBackingStoreRefSentinel = 0
 

Additional Inherited Members

- Public Member Functions inherited from v8::internal::RootVisitor
virtual ~RootVisitor ()=default
 
virtual void VisitRootPointers (Root root, const char *description, FullObjectSlot start, FullObjectSlot end)=0
 
virtual void VisitRootPointer (Root root, const char *description, FullObjectSlot p)
 
virtual void VisitRootPointers (Root root, const char *description, OffHeapObjectSlot start, OffHeapObjectSlot end)
 
virtual void VisitRunningCode (FullObjectSlot code_slot, FullObjectSlot istream_or_smi_zero_slot)
 
virtual void Synchronize (VisitorSynchronization::SyncTag tag)
 
virtual GarbageCollector collector () const
 

Detailed Description

Definition at line 19 of file serializer-deserializer.h.

Member Typedef Documentation

◆ FixedRawDataWithSize

◆ FixedRepeatRootWithCount

◆ HotObject

◆ NewObject

◆ RootArrayConstant

◆ SpaceEncoder

Initial value:
BytecodeValueEncoder<bytecode, 0, kNumberOfSnapshotSpaces - 1,
interpreter::Bytecode bytecode
Definition builtins.cc:43
static constexpr int kNumberOfSnapshotSpaces
Definition references.h:24

Definition at line 224 of file serializer-deserializer.h.

Member Enumeration Documentation

◆ Bytecode

Enumerator
kNewObject 
kBackref 
kReadOnlyHeapRef 
kStartupObjectCache 
kRootArray 
kAttachedReference 
kSharedHeapObjectCache 
kNop 
kSynchronize 
kVariableRepeatRoot 
kOffHeapBackingStore 
kOffHeapResizableBackingStore 
kEmbedderFieldsData 
kApiWrapperFieldsData 
kVariableRawData 
kApiReference 
kExternalReference 
kSandboxedApiReference 
kSandboxedExternalReference 
kSandboxedRawExternalReference 
kClearedWeakReference 
kWeakPrefix 
kRegisterPendingForwardRef 
kResolvePendingForwardRef 
kNewContextlessMetaMap 
kNewContextfulMetaMap 
kIndirectPointerPrefix 
kInitializeSelfIndirectPointer 
kAllocateJSDispatchEntry 
kJSDispatchEntry 
kProtectedPointerPrefix 
kRootArrayConstants 
kFixedRawData 
kFixedRepeatRoot 
kHotObject 

Definition at line 84 of file serializer-deserializer.h.

◆ SlotType

Enumerator
kAnySlot 
kMapSlot 

Definition at line 27 of file serializer-deserializer.h.

Member Function Documentation

◆ CanBeDeferred()

bool v8::internal::SerializerDeserializer::CanBeDeferred ( Tagged< HeapObject > o,
SlotType slot_type )
staticprotected

Definition at line 48 of file serializer-deserializer.cc.

Here is the call graph for this function:

◆ IterateSharedHeapObjectCache()

void v8::internal::SerializerDeserializer::IterateSharedHeapObjectCache ( Isolate * isolate,
RootVisitor * visitor )
static

Definition at line 42 of file serializer-deserializer.cc.

Here is the caller graph for this function:

◆ IterateStartupObjectCache()

void v8::internal::SerializerDeserializer::IterateStartupObjectCache ( Isolate * isolate,
RootVisitor * visitor )
static

Definition at line 36 of file serializer-deserializer.cc.

Here is the caller graph for this function:

◆ RestoreExternalReferenceRedirector() [1/2]

void v8::internal::SerializerDeserializer::RestoreExternalReferenceRedirector ( Isolate * isolate,
Tagged< AccessorInfo > accessor_info )
protected

Definition at line 75 of file serializer-deserializer.cc.

Here is the caller graph for this function:

◆ RestoreExternalReferenceRedirector() [2/2]

void v8::internal::SerializerDeserializer::RestoreExternalReferenceRedirector ( Isolate * isolate,
Tagged< FunctionTemplateInfo > function_template_info )
protected

Definition at line 81 of file serializer-deserializer.cc.

Member Data Documentation

◆ kDoubleAlignmentSentinel

const int v8::internal::SerializerDeserializer::kDoubleAlignmentSentinel = 0
staticprotected

Definition at line 235 of file serializer-deserializer.h.

◆ kEmptyBackingStoreRefSentinel

const uint32_t v8::internal::SerializerDeserializer::kEmptyBackingStoreRefSentinel = 0
staticprotected

Definition at line 281 of file serializer-deserializer.h.

◆ kFirstEncodableFixedRawDataSize

const int v8::internal::SerializerDeserializer::kFirstEncodableFixedRawDataSize = 1
staticprotected

Definition at line 238 of file serializer-deserializer.h.

◆ kFirstEncodableRepeatRootCount

const int v8::internal::SerializerDeserializer::kFirstEncodableRepeatRootCount = 2
staticprotected

Definition at line 247 of file serializer-deserializer.h.

◆ kFirstEncodableVariableRepeatRootCount

const int v8::internal::SerializerDeserializer::kFirstEncodableVariableRepeatRootCount
staticprotected
Initial value:

Definition at line 250 of file serializer-deserializer.h.

◆ kFixedRawDataCount

const int v8::internal::SerializerDeserializer::kFixedRawDataCount = 0x20
staticprotected

Definition at line 77 of file serializer-deserializer.h.

◆ kFixedRepeatRootCount

const int v8::internal::SerializerDeserializer::kFixedRepeatRootCount = 0x10
staticprotected

Definition at line 79 of file serializer-deserializer.h.

◆ kHotObjectCount

const int v8::internal::SerializerDeserializer::kHotObjectCount = 8
staticprotected

Definition at line 82 of file serializer-deserializer.h.

◆ kLastEncodableFixedRawDataSize

const int v8::internal::SerializerDeserializer::kLastEncodableFixedRawDataSize
staticprotected

◆ kLastEncodableFixedRepeatRootCount

const int v8::internal::SerializerDeserializer::kLastEncodableFixedRepeatRootCount
staticprotected

◆ kRootArrayConstantsCount

const int v8::internal::SerializerDeserializer::kRootArrayConstantsCount = 0x20
staticprotected

Definition at line 74 of file serializer-deserializer.h.


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