Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
dart::SerializationCluster Class Referenceabstract
Inheritance diagram for dart::SerializationCluster:
dart::ZoneAllocated dart::CanonicalSetSerializationCluster< CanonicalFunctionTypeSet, FunctionType, FunctionTypePtr > dart::CanonicalSetSerializationCluster< CanonicalStringSet, String, ObjectPtr > dart::CanonicalSetSerializationCluster< CanonicalRecordTypeSet, RecordType, RecordTypePtr > dart::CanonicalSetSerializationCluster< CanonicalStringSet, String, StringPtr > dart::CanonicalSetSerializationCluster< CanonicalTypeArgumentsSet, TypeArguments, TypeArgumentsPtr > dart::CanonicalSetSerializationCluster< CanonicalTypeParameterSet, TypeParameter, TypeParameterPtr > dart::CanonicalSetSerializationCluster< CanonicalTypeSet, Type, TypePtr, false > dart::ArraySerializationCluster dart::CanonicalSetSerializationCluster< SetType, HandleType, PointerType, kAllCanonicalObjectsAreIncludedIntoSet > dart::ClassSerializationCluster dart::ClosureDataSerializationCluster dart::ClosureSerializationCluster dart::CodeSerializationCluster dart::CodeSourceMapSerializationCluster dart::CompressedStackMapsSerializationCluster dart::ContextScopeSerializationCluster dart::ContextSerializationCluster dart::DeltaEncodedTypedDataSerializationCluster dart::DoubleSerializationCluster dart::ExceptionHandlersSerializationCluster dart::ExternalTypedDataSerializationCluster dart::FakeSerializationCluster dart::FfiTrampolineDataSerializationCluster dart::FieldSerializationCluster dart::FunctionSerializationCluster dart::GrowableObjectArraySerializationCluster dart::ICDataSerializationCluster dart::InstanceSerializationCluster dart::KernelProgramInfoSerializationCluster dart::LanguageErrorSerializationCluster dart::LibraryPrefixSerializationCluster dart::LibrarySerializationCluster dart::LoadingUnitSerializationCluster dart::MapSerializationCluster dart::MegamorphicCacheSerializationCluster dart::MintSerializationCluster dart::NamespaceSerializationCluster dart::ObjectPoolSerializationCluster dart::PatchClassSerializationCluster dart::PcDescriptorsSerializationCluster dart::RecordSerializationCluster dart::RegExpSerializationCluster dart::ScriptSerializationCluster dart::SetSerializationCluster dart::Simd128SerializationCluster dart::StackTraceSerializationCluster dart::SubtypeTestCacheSerializationCluster dart::TypeParametersSerializationCluster dart::TypedDataSerializationCluster dart::TypedDataViewSerializationCluster dart::UnhandledExceptionSerializationCluster dart::UnlinkedCallSerializationCluster dart::WeakArraySerializationCluster dart::WeakPropertySerializationCluster

Public Member Functions

 SerializationCluster (const char *name, intptr_t cid, intptr_t target_instance_size=kSizeVaries, bool is_canonical=false)
 
virtual ~SerializationCluster ()
 
virtual void Trace (Serializer *serializer, ObjectPtr object)=0
 
virtual void WriteAlloc (Serializer *serializer)=0
 
virtual void WriteFill (Serializer *serializer)=0
 
void WriteAndMeasureAlloc (Serializer *serializer)
 
void WriteAndMeasureFill (Serializer *serializer)
 
const char * name () const
 
intptr_t cid () const
 
bool is_canonical () const
 
bool is_immutable () const
 
intptr_t size () const
 
intptr_t num_objects () const
 
intptr_t target_memory_size () const
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Static Public Attributes

static constexpr intptr_t kSizeVaries = -1
 

Protected Attributes

const char *const name_
 
const intptr_t cid_
 
const intptr_t target_instance_size_
 
const bool is_canonical_
 
const bool is_immutable_
 
intptr_t size_ = 0
 
intptr_t num_objects_ = 0
 
intptr_t target_memory_size_ = 0
 

Detailed Description

Definition at line 160 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ SerializationCluster()

dart::SerializationCluster::SerializationCluster ( const char *  name,
intptr_t  cid,
intptr_t  target_instance_size = kSizeVaries,
bool  is_canonical = false 
)
inlineexplicit

Definition at line 163 of file app_snapshot.cc.

167 : name_(name),
168 cid_(cid),
169 target_instance_size_(target_instance_size),
172 ASSERT(target_instance_size == kSizeVaries || target_instance_size >= 0);
173 }
static bool ShouldHaveImmutabilityBitSet(classid_t class_id)
Definition: object.cc:2628
const char * name() const
static constexpr intptr_t kSizeVaries
const intptr_t target_instance_size_
const char *const name_
#define ASSERT(E)

◆ ~SerializationCluster()

virtual dart::SerializationCluster::~SerializationCluster ( )
inlinevirtual

Definition at line 174 of file app_snapshot.cc.

174{}

Member Function Documentation

◆ cid()

intptr_t dart::SerializationCluster::cid ( ) const
inline

Definition at line 191 of file app_snapshot.cc.

191{ return cid_; }

◆ is_canonical()

bool dart::SerializationCluster::is_canonical ( ) const
inline

Definition at line 192 of file app_snapshot.cc.

192{ return is_canonical_; }

◆ is_immutable()

bool dart::SerializationCluster::is_immutable ( ) const
inline

Definition at line 193 of file app_snapshot.cc.

193{ return is_immutable_; }

◆ name()

const char * dart::SerializationCluster::name ( ) const
inline

Definition at line 190 of file app_snapshot.cc.

190{ return name_; }

◆ num_objects()

intptr_t dart::SerializationCluster::num_objects ( ) const
inline

Definition at line 195 of file app_snapshot.cc.

195{ return num_objects_; }

◆ size()

intptr_t dart::SerializationCluster::size ( ) const
inline

Definition at line 194 of file app_snapshot.cc.

194{ return size_; }

◆ target_memory_size()

intptr_t dart::SerializationCluster::target_memory_size ( ) const
inline

Definition at line 204 of file app_snapshot.cc.

204{ return target_memory_size_; }

◆ Trace()

virtual void dart::SerializationCluster::Trace ( Serializer serializer,
ObjectPtr  object 
)
pure virtual

Implemented in dart::ClassSerializationCluster, dart::TypeParametersSerializationCluster, dart::TypeArgumentsSerializationCluster, dart::PatchClassSerializationCluster, dart::FunctionSerializationCluster, dart::ClosureDataSerializationCluster, dart::FfiTrampolineDataSerializationCluster, dart::FieldSerializationCluster, dart::ScriptSerializationCluster, dart::LibrarySerializationCluster, dart::NamespaceSerializationCluster, dart::KernelProgramInfoSerializationCluster, dart::CodeSerializationCluster, dart::ObjectPoolSerializationCluster, dart::PcDescriptorsSerializationCluster, dart::CodeSourceMapSerializationCluster, dart::CompressedStackMapsSerializationCluster, dart::RODataSerializationCluster, dart::ExceptionHandlersSerializationCluster, dart::ContextSerializationCluster, dart::ContextScopeSerializationCluster, dart::UnlinkedCallSerializationCluster, dart::ICDataSerializationCluster, dart::MegamorphicCacheSerializationCluster, dart::SubtypeTestCacheSerializationCluster, dart::LoadingUnitSerializationCluster, dart::LanguageErrorSerializationCluster, dart::UnhandledExceptionSerializationCluster, dart::InstanceSerializationCluster, dart::LibraryPrefixSerializationCluster, dart::TypeSerializationCluster, dart::FunctionTypeSerializationCluster, dart::RecordTypeSerializationCluster, dart::TypeParameterSerializationCluster, dart::ClosureSerializationCluster, dart::MintSerializationCluster, dart::DoubleSerializationCluster, dart::Simd128SerializationCluster, dart::GrowableObjectArraySerializationCluster, dart::RecordSerializationCluster, dart::TypedDataSerializationCluster, dart::TypedDataViewSerializationCluster, dart::ExternalTypedDataSerializationCluster, dart::DeltaEncodedTypedDataSerializationCluster, dart::StackTraceSerializationCluster, dart::RegExpSerializationCluster, dart::WeakPropertySerializationCluster, dart::MapSerializationCluster, dart::SetSerializationCluster, dart::ArraySerializationCluster, dart::WeakArraySerializationCluster, dart::StringSerializationCluster, and dart::FakeSerializationCluster.

◆ WriteAlloc()

virtual void dart::SerializationCluster::WriteAlloc ( Serializer serializer)
pure virtual

Implemented in dart::ClassSerializationCluster, dart::TypeParametersSerializationCluster, dart::TypeArgumentsSerializationCluster, dart::PatchClassSerializationCluster, dart::FunctionSerializationCluster, dart::ClosureDataSerializationCluster, dart::FfiTrampolineDataSerializationCluster, dart::FieldSerializationCluster, dart::ScriptSerializationCluster, dart::LibrarySerializationCluster, dart::NamespaceSerializationCluster, dart::KernelProgramInfoSerializationCluster, dart::CodeSerializationCluster, dart::ObjectPoolSerializationCluster, dart::PcDescriptorsSerializationCluster, dart::CodeSourceMapSerializationCluster, dart::CompressedStackMapsSerializationCluster, dart::RODataSerializationCluster, dart::ExceptionHandlersSerializationCluster, dart::ContextSerializationCluster, dart::ContextScopeSerializationCluster, dart::UnlinkedCallSerializationCluster, dart::ICDataSerializationCluster, dart::MegamorphicCacheSerializationCluster, dart::SubtypeTestCacheSerializationCluster, dart::LoadingUnitSerializationCluster, dart::LanguageErrorSerializationCluster, dart::UnhandledExceptionSerializationCluster, dart::InstanceSerializationCluster, dart::LibraryPrefixSerializationCluster, dart::TypeSerializationCluster, dart::FunctionTypeSerializationCluster, dart::RecordTypeSerializationCluster, dart::TypeParameterSerializationCluster, dart::ClosureSerializationCluster, dart::MintSerializationCluster, dart::DoubleSerializationCluster, dart::Simd128SerializationCluster, dart::GrowableObjectArraySerializationCluster, dart::RecordSerializationCluster, dart::TypedDataSerializationCluster, dart::TypedDataViewSerializationCluster, dart::ExternalTypedDataSerializationCluster, dart::DeltaEncodedTypedDataSerializationCluster, dart::StackTraceSerializationCluster, dart::RegExpSerializationCluster, dart::WeakPropertySerializationCluster, dart::MapSerializationCluster, dart::SetSerializationCluster, dart::ArraySerializationCluster, dart::WeakArraySerializationCluster, dart::StringSerializationCluster, and dart::FakeSerializationCluster.

◆ WriteAndMeasureAlloc()

void dart::SerializationCluster::WriteAndMeasureAlloc ( Serializer serializer)

Definition at line 902 of file app_snapshot.cc.

902 {
903 intptr_t start_size = serializer->bytes_written();
904 intptr_t start_data = serializer->GetDataSize();
905 intptr_t start_objects = serializer->next_ref_index();
909 serializer->Write<uint32_t>(tags);
910 WriteAlloc(serializer);
911 intptr_t stop_size = serializer->bytes_written();
912 intptr_t stop_data = serializer->GetDataSize();
913 intptr_t stop_objects = serializer->next_ref_index();
914 if (FLAG_print_cluster_information) {
915 OS::PrintErr("Snapshot 0x%" Pp " (%" Pd "), ", start_size,
916 stop_size - start_size);
917 OS::PrintErr("Data 0x%" Pp " (%" Pd "): ", start_data,
918 stop_data - start_data);
919 OS::PrintErr("Alloc %s (%" Pd ")\n", name(), stop_objects - start_objects);
920 }
921 size_ += (stop_size - start_size) + (stop_data - start_data);
922 num_objects_ += (stop_objects - start_objects);
925 }
926}
static constexpr uword encode(ClassIdTagType value)
Definition: bitfield.h:165
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
virtual void WriteAlloc(Serializer *serializer)=0
#define Pp
Definition: globals.h:425
#define Pd
Definition: globals.h:408

◆ WriteAndMeasureFill()

void dart::SerializationCluster::WriteAndMeasureFill ( Serializer serializer)

Definition at line 928 of file app_snapshot.cc.

928 {
929 intptr_t start = serializer->bytes_written();
930 WriteFill(serializer);
931 intptr_t stop = serializer->bytes_written();
932 if (FLAG_print_cluster_information) {
933 OS::PrintErr("Snapshot 0x%" Pp " (%" Pd "): Fill %s\n", start, stop - start,
934 name());
935 }
936 size_ += (stop - start);
937}
virtual void WriteFill(Serializer *serializer)=0

◆ WriteFill()

virtual void dart::SerializationCluster::WriteFill ( Serializer serializer)
pure virtual

Implemented in dart::ClassSerializationCluster, dart::TypeParametersSerializationCluster, dart::TypeArgumentsSerializationCluster, dart::PatchClassSerializationCluster, dart::FunctionSerializationCluster, dart::ClosureDataSerializationCluster, dart::FfiTrampolineDataSerializationCluster, dart::FieldSerializationCluster, dart::ScriptSerializationCluster, dart::LibrarySerializationCluster, dart::NamespaceSerializationCluster, dart::KernelProgramInfoSerializationCluster, dart::CodeSerializationCluster, dart::ObjectPoolSerializationCluster, dart::PcDescriptorsSerializationCluster, dart::CodeSourceMapSerializationCluster, dart::CompressedStackMapsSerializationCluster, dart::RODataSerializationCluster, dart::ExceptionHandlersSerializationCluster, dart::ContextSerializationCluster, dart::ContextScopeSerializationCluster, dart::UnlinkedCallSerializationCluster, dart::ICDataSerializationCluster, dart::MegamorphicCacheSerializationCluster, dart::SubtypeTestCacheSerializationCluster, dart::LoadingUnitSerializationCluster, dart::LanguageErrorSerializationCluster, dart::UnhandledExceptionSerializationCluster, dart::InstanceSerializationCluster, dart::LibraryPrefixSerializationCluster, dart::TypeSerializationCluster, dart::FunctionTypeSerializationCluster, dart::RecordTypeSerializationCluster, dart::TypeParameterSerializationCluster, dart::ClosureSerializationCluster, dart::MintSerializationCluster, dart::DoubleSerializationCluster, dart::Simd128SerializationCluster, dart::GrowableObjectArraySerializationCluster, dart::RecordSerializationCluster, dart::TypedDataSerializationCluster, dart::TypedDataViewSerializationCluster, dart::ExternalTypedDataSerializationCluster, dart::DeltaEncodedTypedDataSerializationCluster, dart::StackTraceSerializationCluster, dart::RegExpSerializationCluster, dart::WeakPropertySerializationCluster, dart::MapSerializationCluster, dart::SetSerializationCluster, dart::ArraySerializationCluster, dart::WeakArraySerializationCluster, dart::StringSerializationCluster, and dart::FakeSerializationCluster.

Member Data Documentation

◆ cid_

const intptr_t dart::SerializationCluster::cid_
protected

Definition at line 208 of file app_snapshot.cc.

◆ is_canonical_

const bool dart::SerializationCluster::is_canonical_
protected

Definition at line 210 of file app_snapshot.cc.

◆ is_immutable_

const bool dart::SerializationCluster::is_immutable_
protected

Definition at line 211 of file app_snapshot.cc.

◆ kSizeVaries

constexpr intptr_t dart::SerializationCluster::kSizeVaries = -1
staticconstexpr

Definition at line 162 of file app_snapshot.cc.

◆ name_

const char* const dart::SerializationCluster::name_
protected

Definition at line 207 of file app_snapshot.cc.

◆ num_objects_

intptr_t dart::SerializationCluster::num_objects_ = 0
protected

Definition at line 213 of file app_snapshot.cc.

◆ size_

intptr_t dart::SerializationCluster::size_ = 0
protected

Definition at line 212 of file app_snapshot.cc.

◆ target_instance_size_

const intptr_t dart::SerializationCluster::target_instance_size_
protected

Definition at line 209 of file app_snapshot.cc.

◆ target_memory_size_

intptr_t dart::SerializationCluster::target_memory_size_ = 0
protected

Definition at line 214 of file app_snapshot.cc.


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