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

Public Member Functions

 ArrayDeserializationCluster (intptr_t cid, bool is_canonical, bool is_root_unit)
 
 ~ArrayDeserializationCluster ()
 
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 6477 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ ArrayDeserializationCluster()

dart::ArrayDeserializationCluster::ArrayDeserializationCluster ( intptr_t  cid,
bool  is_canonical,
bool  is_root_unit 
)
inlineexplicit

Definition at line 6480 of file app_snapshot.cc.

6485 is_root_unit),
6486 cid_(cid) {}
AbstractInstanceDeserializationCluster(const char *name, bool is_canonical, bool is_root_unit)
const intptr_t cid

◆ ~ArrayDeserializationCluster()

dart::ArrayDeserializationCluster::~ArrayDeserializationCluster ( )
inline

Definition at line 6487 of file app_snapshot.cc.

6487{}

Member Function Documentation

◆ ReadAlloc()

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

Implements dart::DeserializationCluster.

Definition at line 6489 of file app_snapshot.cc.

6489 {
6490 start_index_ = d->next_index();
6491 const intptr_t count = d->ReadUnsigned();
6492 for (intptr_t i = 0; i < count; i++) {
6493 const intptr_t length = d->ReadUnsigned();
6494 d->AssignRef(d->Allocate(Array::InstanceSize(length)));
6495 }
6496 stop_index_ = d->next_index();
6497 }
int count
Definition: FontMgrTest.cpp:50
static intptr_t InstanceSize()
Definition: object.h:10936
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition: main.cc:19
size_t length

◆ ReadFill()

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

Implements dart::DeserializationCluster.

Definition at line 6499 of file app_snapshot.cc.

6499 {
6500 Deserializer::Local d(d_);
6501
6502 const intptr_t cid = cid_;
6503 const bool stamp_canonical = is_root_unit_ && is_canonical();
6504 for (intptr_t id = start_index_, n = stop_index_; id < n; id++) {
6505 ArrayPtr array = static_cast<ArrayPtr>(d.Ref(id));
6506 const intptr_t length = d.ReadUnsigned();
6508 stamp_canonical);
6510 array->untag()->SetCardRememberedBitUnsynchronized();
6511 }
6512 array->untag()->type_arguments_ =
6513 static_cast<TypeArgumentsPtr>(d.ReadRef());
6514 array->untag()->length_ = Smi::New(length);
6515 for (intptr_t j = 0; j < length; j++) {
6516 array->untag()->data()[j] = d.ReadRef();
6517 }
6518 }
6519 }
static constexpr bool UseCardMarkingForAllocation(const intptr_t array_length)
Definition: object.h:10818
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: