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

Public Member Functions

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

Constructor & Destructor Documentation

◆ PatchClassSerializationCluster()

dart::PatchClassSerializationCluster::PatchClassSerializationCluster ( )
inline

Definition at line 1621 of file app_snapshot.cc.

1622 : SerializationCluster("PatchClass",
1623 kPatchClassCid,
SerializationCluster(const char *name, intptr_t cid, intptr_t target_instance_size=kSizeVaries, bool is_canonical=false)

◆ ~PatchClassSerializationCluster()

dart::PatchClassSerializationCluster::~PatchClassSerializationCluster ( )
inline

Definition at line 1625 of file app_snapshot.cc.

1625{}

Member Function Documentation

◆ Trace()

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

Implements dart::SerializationCluster.

Definition at line 1627 of file app_snapshot.cc.

1627 {
1628 PatchClassPtr cls = PatchClass::RawCast(object);
1629 objects_.Add(cls);
1630 PushFromTo(cls);
1631 }
#define PushFromTo(obj,...)
void Add(const T &value)
static ObjectPtr RawCast(ObjectPtr obj)
Definition: object.h:325

◆ WriteAlloc()

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

Implements dart::SerializationCluster.

Definition at line 1633 of file app_snapshot.cc.

1633 {
1634 const intptr_t count = objects_.length();
1635 s->WriteUnsigned(count);
1636 for (intptr_t i = 0; i < count; i++) {
1637 PatchClassPtr cls = objects_[i];
1638 s->AssignRef(cls);
1639 }
1640 }
int count
Definition: FontMgrTest.cpp:50
intptr_t length() const
struct MyStruct s

◆ WriteFill()

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

Implements dart::SerializationCluster.

Definition at line 1642 of file app_snapshot.cc.

1642 {
1643 const intptr_t count = objects_.length();
1644 for (intptr_t i = 0; i < count; i++) {
1645 PatchClassPtr cls = objects_[i];
1646 AutoTraceObject(cls);
1647 WriteFromTo(cls);
1648 if (s->kind() != Snapshot::kFullAOT) {
1649 s->Write<int32_t>(cls->untag()->kernel_library_index_);
1650 }
1651 }
1652 }
#define AutoTraceObject(obj)
#define WriteFromTo(obj,...)

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