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

Public Member Functions

 PcDescriptorsSerializationCluster ()
 
 ~PcDescriptorsSerializationCluster ()
 
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 3380 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ PcDescriptorsSerializationCluster()

dart::PcDescriptorsSerializationCluster::PcDescriptorsSerializationCluster ( )
inline

Definition at line 3382 of file app_snapshot.cc.

3383 : SerializationCluster("PcDescriptors", kPcDescriptorsCid) {}
SerializationCluster(const char *name, intptr_t cid, intptr_t target_instance_size=kSizeVaries, bool is_canonical=false)

◆ ~PcDescriptorsSerializationCluster()

dart::PcDescriptorsSerializationCluster::~PcDescriptorsSerializationCluster ( )
inline

Definition at line 3384 of file app_snapshot.cc.

3384{}

Member Function Documentation

◆ Trace()

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

Implements dart::SerializationCluster.

Definition at line 3386 of file app_snapshot.cc.

3386 {
3387 PcDescriptorsPtr desc = PcDescriptors::RawCast(object);
3388 objects_.Add(desc);
3389 }
void Add(const T &value)
static ObjectPtr RawCast(ObjectPtr obj)
Definition: object.h:325

◆ WriteAlloc()

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

Implements dart::SerializationCluster.

Definition at line 3391 of file app_snapshot.cc.

3391 {
3392 const intptr_t count = objects_.length();
3393 s->WriteUnsigned(count);
3394 for (intptr_t i = 0; i < count; i++) {
3395 PcDescriptorsPtr desc = objects_[i];
3396 s->AssignRef(desc);
3398 const intptr_t length = desc->untag()->length_;
3399 s->WriteUnsigned(length);
3402 }
3403 }
int count
Definition: FontMgrTest.cpp:50
#define AutoTraceObject(obj)
intptr_t length() const
struct MyStruct s
size_t length

◆ WriteFill()

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

Implements dart::SerializationCluster.

Definition at line 3405 of file app_snapshot.cc.

3405 {
3406 const intptr_t count = objects_.length();
3407 for (intptr_t i = 0; i < count; i++) {
3408 PcDescriptorsPtr desc = objects_[i];
3410 const intptr_t length = desc->untag()->length_;
3411 s->WriteUnsigned(length);
3412 uint8_t* cdata = reinterpret_cast<uint8_t*>(desc->untag()->data());
3413 s->WriteBytes(cdata, length);
3414 }
3415 }

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