Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::ContextScopeSerializationCluster Class Reference
Inheritance diagram for dart::ContextScopeSerializationCluster:
dart::SerializationCluster dart::ZoneAllocated

Public Member Functions

 ContextScopeSerializationCluster ()
 
 ~ContextScopeSerializationCluster ()
 
void Trace (Serializer *s, ObjectPtr object)
 
void WriteAlloc (Serializer *s)
 
void WriteFill (Serializer *s)
 
- Public Member Functions inherited from dart::SerializationCluster
 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)
 

Additional Inherited Members

- Static Public Attributes inherited from dart::SerializationCluster
static constexpr intptr_t kSizeVaries = -1
 
- Protected Attributes inherited from dart::SerializationCluster
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 3917 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ ContextScopeSerializationCluster()

dart::ContextScopeSerializationCluster::ContextScopeSerializationCluster ( )
inline

Definition at line 3919 of file app_snapshot.cc.

3920 : SerializationCluster("ContextScope", kContextScopeCid) {}
SerializationCluster(const char *name, intptr_t cid, intptr_t target_instance_size=kSizeVaries, bool is_canonical=false)

◆ ~ContextScopeSerializationCluster()

dart::ContextScopeSerializationCluster::~ContextScopeSerializationCluster ( )
inline

Definition at line 3921 of file app_snapshot.cc.

3921{}

Member Function Documentation

◆ Trace()

void dart::ContextScopeSerializationCluster::Trace ( Serializer s,
ObjectPtr  object 
)
inlinevirtual

Implements dart::SerializationCluster.

Definition at line 3923 of file app_snapshot.cc.

3923 {
3924 ContextScopePtr scope = ContextScope::RawCast(object);
3925 objects_.Add(scope);
3926
3927 const intptr_t length = scope->untag()->num_variables_;
3928 PushFromTo(scope, length);
3929 }
#define PushFromTo(obj,...)
void Add(const T &value)
static ObjectPtr RawCast(ObjectPtr obj)
Definition: object.h:325
size_t length

◆ WriteAlloc()

void dart::ContextScopeSerializationCluster::WriteAlloc ( Serializer s)
inlinevirtual

Implements dart::SerializationCluster.

Definition at line 3931 of file app_snapshot.cc.

3931 {
3932 const intptr_t count = objects_.length();
3933 s->WriteUnsigned(count);
3934 for (intptr_t i = 0; i < count; i++) {
3935 ContextScopePtr scope = objects_[i];
3936 s->AssignRef(scope);
3937 AutoTraceObject(scope);
3938 const intptr_t length = scope->untag()->num_variables_;
3939 s->WriteUnsigned(length);
3942 }
3943 }
int count
Definition: FontMgrTest.cpp:50
#define AutoTraceObject(obj)
intptr_t length() const
struct MyStruct s

◆ WriteFill()

void dart::ContextScopeSerializationCluster::WriteFill ( Serializer s)
inlinevirtual

Implements dart::SerializationCluster.

Definition at line 3945 of file app_snapshot.cc.

3945 {
3946 const intptr_t count = objects_.length();
3947 for (intptr_t i = 0; i < count; i++) {
3948 ContextScopePtr scope = objects_[i];
3949 AutoTraceObject(scope);
3950 const intptr_t length = scope->untag()->num_variables_;
3951 s->WriteUnsigned(length);
3952 s->Write<bool>(scope->untag()->is_implicit_);
3953 WriteFromTo(scope, length);
3954 }
3955 }
#define WriteFromTo(obj,...)

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