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

Public Member Functions

 WeakArrayDeserializationCluster ()
 
 ~WeakArrayDeserializationCluster ()
 
void ReadAlloc (Deserializer *d) override
 
void ReadFill (Deserializer *d_) override
 
- Public Member Functions inherited from dart::DeserializationCluster
 DeserializationCluster (const char *name, bool is_canonical=false, bool is_immutable=false)
 
virtual ~DeserializationCluster ()
 
virtual void ReadAlloc (Deserializer *deserializer)=0
 
virtual void ReadFill (Deserializer *deserializer)=0
 
virtual void PostLoad (Deserializer *deserializer, const Array &refs)
 
const char * name () const
 
bool is_canonical () 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

- Protected Member Functions inherited from dart::DeserializationCluster
void ReadAllocFixedSize (Deserializer *deserializer, intptr_t instance_size)
 
- Protected Attributes inherited from dart::DeserializationCluster
const char *const name_
 
const bool is_canonical_
 
const bool is_immutable_
 
intptr_t start_index_
 
intptr_t stop_index_
 

Detailed Description

Definition at line 6577 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ WeakArrayDeserializationCluster()

dart::WeakArrayDeserializationCluster::WeakArrayDeserializationCluster ( )
inline

Definition at line 6579 of file app_snapshot.cc.

6579: DeserializationCluster("WeakArray") {}
DeserializationCluster(const char *name, bool is_canonical=false, bool is_immutable=false)

◆ ~WeakArrayDeserializationCluster()

dart::WeakArrayDeserializationCluster::~WeakArrayDeserializationCluster ( )
inline

Definition at line 6580 of file app_snapshot.cc.

6580{}

Member Function Documentation

◆ ReadAlloc()

void dart::WeakArrayDeserializationCluster::ReadAlloc ( Deserializer d)
inlineoverridevirtual

Implements dart::DeserializationCluster.

Definition at line 6582 of file app_snapshot.cc.

6582 {
6583 start_index_ = d->next_index();
6584 const intptr_t count = d->ReadUnsigned();
6585 for (intptr_t i = 0; i < count; i++) {
6586 const intptr_t length = d->ReadUnsigned();
6587 d->AssignRef(d->Allocate(WeakArray::InstanceSize(length)));
6588 }
6589 stop_index_ = d->next_index();
6590 }
int count
Definition: FontMgrTest.cpp:50
static intptr_t InstanceSize()
Definition: object.h:6742
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition: main.cc:19
size_t length

◆ ReadFill()

void dart::WeakArrayDeserializationCluster::ReadFill ( Deserializer d_)
inlineoverridevirtual

Implements dart::DeserializationCluster.

Definition at line 6592 of file app_snapshot.cc.

6592 {
6593 Deserializer::Local d(d_);
6594
6595 for (intptr_t id = start_index_, n = stop_index_; id < n; id++) {
6596 WeakArrayPtr array = static_cast<WeakArrayPtr>(d.Ref(id));
6597 const intptr_t length = d.ReadUnsigned();
6598 Deserializer::InitializeHeader(array, kWeakArrayCid,
6600 array->untag()->next_seen_by_gc_ = WeakArray::null();
6601 array->untag()->length_ = Smi::New(length);
6602 for (intptr_t j = 0; j < length; j++) {
6603 array->untag()->data()[j] = d.ReadRef();
6604 }
6605 }
6606 }
static void InitializeHeader(ObjectPtr raw, intptr_t cid, intptr_t size, bool is_canonical=false)
static ObjectPtr null()
Definition: object.h:433
static SmiPtr New(intptr_t value)
Definition: object.h:10006

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