Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::TypeArgumentsDeserializationCluster Class Reference
Inheritance diagram for dart::TypeArgumentsDeserializationCluster:
dart::CanonicalSetDeserializationCluster< CanonicalTypeArgumentsSet > dart::DeserializationCluster dart::ZoneAllocated

Public Member Functions

 TypeArgumentsDeserializationCluster (bool is_canonical, bool is_root_unit)
 
 ~TypeArgumentsDeserializationCluster ()
 
void ReadAlloc (Deserializer *d) override
 
void ReadFill (Deserializer *d_) override
 
void PostLoad (Deserializer *d, const Array &refs) override
 
- Public Member Functions inherited from dart::CanonicalSetDeserializationCluster< CanonicalTypeArgumentsSet >
 CanonicalSetDeserializationCluster (bool is_canonical, bool is_root_unit, const char *name)
 
void BuildCanonicalSetFromLayout (Deserializer *d)
 
- 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::CanonicalSetDeserializationCluster< CanonicalTypeArgumentsSet >
void VerifyCanonicalSet (Deserializer *d, const Array &refs, const typename SetType::ArrayHandle &current_table)
 
- Protected Member Functions inherited from dart::DeserializationCluster
void ReadAllocFixedSize (Deserializer *deserializer, intptr_t instance_size)
 
- Protected Attributes inherited from dart::CanonicalSetDeserializationCluster< CanonicalTypeArgumentsSet >
const bool is_root_unit_
 
intptr_t first_element_
 
SetType::ArrayHandle & table_
 
- 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 1559 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ TypeArgumentsDeserializationCluster()

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

Definition at line 1562 of file app_snapshot.cc.

1565 is_root_unit,
1566 "TypeArguments") {}
CanonicalSetDeserializationCluster(bool is_canonical, bool is_root_unit, const char *name)

◆ ~TypeArgumentsDeserializationCluster()

dart::TypeArgumentsDeserializationCluster::~TypeArgumentsDeserializationCluster ( )
inline

Definition at line 1567 of file app_snapshot.cc.

1567{}

Member Function Documentation

◆ PostLoad()

void dart::TypeArgumentsDeserializationCluster::PostLoad ( Deserializer d,
const Array refs 
)
inlineoverridevirtual

Reimplemented from dart::DeserializationCluster.

Definition at line 1601 of file app_snapshot.cc.

1601 {
1602 if (!table_.IsNull()) {
1603 auto object_store = d->isolate_group()->object_store();
1605 d, refs, Array::Handle(object_store->canonical_type_arguments()));
1606 object_store->set_canonical_type_arguments(table_);
1607 } else if (!is_root_unit_ && is_canonical()) {
1608 TypeArguments& type_arg = TypeArguments::Handle(d->zone());
1609 for (intptr_t i = start_index_, n = stop_index_; i < n; i++) {
1610 type_arg ^= refs.At(i);
1611 type_arg = type_arg.Canonicalize(d->thread());
1612 refs.SetAt(i, type_arg);
1613 }
1614 }
1615 }
void VerifyCanonicalSet(Deserializer *d, const Array &refs, const typename SetType::ArrayHandle &current_table)
static Object & Handle()
Definition: object.h:407
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition: main.cc:19

◆ ReadAlloc()

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

Implements dart::DeserializationCluster.

Definition at line 1569 of file app_snapshot.cc.

1569 {
1570 start_index_ = d->next_index();
1571 const intptr_t count = d->ReadUnsigned();
1572 for (intptr_t i = 0; i < count; i++) {
1573 const intptr_t length = d->ReadUnsigned();
1574 d->AssignRef(d->Allocate(TypeArguments::InstanceSize(length)));
1575 }
1576 stop_index_ = d->next_index();
1578 }
int count
Definition: FontMgrTest.cpp:50
static intptr_t InstanceSize()
Definition: object.h:8988
size_t length

◆ ReadFill()

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

Implements dart::DeserializationCluster.

Definition at line 1580 of file app_snapshot.cc.

1580 {
1581 Deserializer::Local d(d_);
1582
1583 const bool mark_canonical = is_root_unit_ && is_canonical();
1584 for (intptr_t id = start_index_, n = stop_index_; id < n; id++) {
1585 TypeArgumentsPtr type_args = static_cast<TypeArgumentsPtr>(d.Ref(id));
1586 const intptr_t length = d.ReadUnsigned();
1587 Deserializer::InitializeHeader(type_args, kTypeArgumentsCid,
1589 mark_canonical);
1590 type_args->untag()->length_ = Smi::New(length);
1591 type_args->untag()->hash_ = Smi::New(d.Read<int32_t>());
1592 type_args->untag()->nullability_ = Smi::New(d.ReadUnsigned());
1593 type_args->untag()->instantiations_ = static_cast<ArrayPtr>(d.ReadRef());
1594 for (intptr_t j = 0; j < length; j++) {
1595 type_args->untag()->types()[j] =
1596 static_cast<AbstractTypePtr>(d.ReadRef());
1597 }
1598 }
1599 }
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: