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

Public Member Functions

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

Constructor & Destructor Documentation

◆ LoadingUnitSerializationCluster()

dart::LoadingUnitSerializationCluster::LoadingUnitSerializationCluster ( )
inline

Definition at line 4256 of file app_snapshot.cc.

4257 : SerializationCluster("LoadingUnit",
4258 kLoadingUnitCid,
SerializationCluster(const char *name, intptr_t cid, intptr_t target_instance_size=kSizeVaries, bool is_canonical=false)

◆ ~LoadingUnitSerializationCluster()

dart::LoadingUnitSerializationCluster::~LoadingUnitSerializationCluster ( )
inline

Definition at line 4260 of file app_snapshot.cc.

4260{}

Member Function Documentation

◆ Trace()

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

Implements dart::SerializationCluster.

Definition at line 4262 of file app_snapshot.cc.

4262 {
4263 LoadingUnitPtr unit = LoadingUnit::RawCast(object);
4264 objects_.Add(unit);
4265 s->Push(unit->untag()->parent());
4266 }
void Add(const T &value)
static ObjectPtr RawCast(ObjectPtr obj)
Definition: object.h:325
struct MyStruct s

◆ WriteAlloc()

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

Implements dart::SerializationCluster.

Definition at line 4268 of file app_snapshot.cc.

4268 {
4269 const intptr_t count = objects_.length();
4270 s->WriteUnsigned(count);
4271 for (intptr_t i = 0; i < count; i++) {
4272 LoadingUnitPtr unit = objects_[i];
4273 s->AssignRef(unit);
4274 }
4275 }
int count
Definition: FontMgrTest.cpp:50
intptr_t length() const

◆ WriteFill()

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

Implements dart::SerializationCluster.

Definition at line 4277 of file app_snapshot.cc.

4277 {
4278 const intptr_t count = objects_.length();
4279 for (intptr_t i = 0; i < count; i++) {
4280 LoadingUnitPtr unit = objects_[i];
4281 AutoTraceObject(unit);
4282 WriteCompressedField(unit, parent);
4283 s->Write<intptr_t>(
4284 unit->untag()->packed_fields_.Read<UntaggedLoadingUnit::IdBits>());
4285 }
4286 }
#define AutoTraceObject(obj)
#define WriteCompressedField(obj, name)

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