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

Public Member Functions

 RecordDeserializationCluster (bool is_canonical, bool is_root_unit)
 
 ~RecordDeserializationCluster ()
 
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::AbstractInstanceDeserializationCluster
 AbstractInstanceDeserializationCluster (const char *name, bool is_canonical, bool is_root_unit)
 
- Protected Member Functions inherited from dart::DeserializationCluster
void ReadAllocFixedSize (Deserializer *deserializer, intptr_t instance_size)
 
- Protected Attributes inherited from dart::AbstractInstanceDeserializationCluster
const bool is_root_unit_
 
- 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 5629 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ RecordDeserializationCluster()

dart::RecordDeserializationCluster::RecordDeserializationCluster ( bool  is_canonical,
bool  is_root_unit 
)
inlineexplicit

Definition at line 5632 of file app_snapshot.cc.

5635 is_root_unit) {}
AbstractInstanceDeserializationCluster(const char *name, bool is_canonical, bool is_root_unit)

◆ ~RecordDeserializationCluster()

dart::RecordDeserializationCluster::~RecordDeserializationCluster ( )
inline

Definition at line 5636 of file app_snapshot.cc.

5636{}

Member Function Documentation

◆ ReadAlloc()

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

Implements dart::DeserializationCluster.

Definition at line 5638 of file app_snapshot.cc.

5638 {
5639 start_index_ = d->next_index();
5640 const intptr_t count = d->ReadUnsigned();
5641 for (intptr_t i = 0; i < count; i++) {
5642 const intptr_t num_fields = d->ReadUnsigned();
5643 d->AssignRef(d->Allocate(Record::InstanceSize(num_fields)));
5644 }
5645 stop_index_ = d->next_index();
5646 }
int count
Definition: FontMgrTest.cpp:50
static intptr_t InstanceSize()
Definition: object.h:11460
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition: main.cc:19

◆ ReadFill()

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

Implements dart::DeserializationCluster.

Definition at line 5648 of file app_snapshot.cc.

5648 {
5649 Deserializer::Local d(d_);
5650
5651 const bool stamp_canonical = is_root_unit_ && is_canonical();
5652 for (intptr_t id = start_index_, n = stop_index_; id < n; id++) {
5653 RecordPtr record = static_cast<RecordPtr>(d.Ref(id));
5654 const intptr_t shape = d.ReadUnsigned();
5655 const intptr_t num_fields = RecordShape(shape).num_fields();
5656 Deserializer::InitializeHeader(record, kRecordCid,
5657 Record::InstanceSize(num_fields),
5658 stamp_canonical);
5659 record->untag()->shape_ = Smi::New(shape);
5660 for (intptr_t j = 0; j < num_fields; ++j) {
5661 record->untag()->data()[j] = d.ReadRef();
5662 }
5663 }
5664 }
static void InitializeHeader(ObjectPtr raw, intptr_t cid, intptr_t size, bool is_canonical=false)
static SmiPtr New(intptr_t value)
Definition: object.h:10006

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