Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::TypeArgumentsSerializationCluster Class Reference
Inheritance diagram for dart::TypeArgumentsSerializationCluster:
dart::CanonicalSetSerializationCluster< CanonicalTypeArgumentsSet, TypeArguments, TypeArgumentsPtr > dart::SerializationCluster dart::ZoneAllocated

Public Member Functions

 TypeArgumentsSerializationCluster (bool is_canonical, bool represents_canonical_set)
 
 ~TypeArgumentsSerializationCluster ()
 
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 Member Functions inherited from dart::CanonicalSetSerializationCluster< CanonicalTypeArgumentsSet, TypeArguments, TypeArgumentsPtr >
 CanonicalSetSerializationCluster (intptr_t cid, bool is_canonical, bool represents_canonical_set, const char *name, intptr_t target_instance_size=0)
 
virtual bool IsInCanonicalSet (Serializer *s, TypeArgumentsPtr ptr)
 
void ReorderObjects (Serializer *s)
 
void WriteCanonicalSetLayout (Serializer *s)
 
- Protected Attributes inherited from dart::CanonicalSetSerializationCluster< CanonicalTypeArgumentsSet, TypeArguments, TypeArgumentsPtr >
GrowableArray< TypeArgumentsPtr > objects_
 
- 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 1498 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ TypeArgumentsSerializationCluster()

dart::TypeArgumentsSerializationCluster::TypeArgumentsSerializationCluster ( bool  is_canonical,
bool  represents_canonical_set 
)
inline

Definition at line 1503 of file app_snapshot.cc.

1505 : CanonicalSetSerializationCluster(kTypeArgumentsCid,
1507 represents_canonical_set,
1508 "TypeArguments") {}
CanonicalSetSerializationCluster(intptr_t cid, bool is_canonical, bool represents_canonical_set, const char *name, intptr_t target_instance_size=0)

◆ ~TypeArgumentsSerializationCluster()

dart::TypeArgumentsSerializationCluster::~TypeArgumentsSerializationCluster ( )
inline

Definition at line 1509 of file app_snapshot.cc.

1509{}

Member Function Documentation

◆ Trace()

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

Implements dart::SerializationCluster.

Definition at line 1511 of file app_snapshot.cc.

1511 {
1512 TypeArgumentsPtr type_args = TypeArguments::RawCast(object);
1513 objects_.Add(type_args);
1514
1515 s->Push(type_args->untag()->instantiations());
1516 const intptr_t length = Smi::Value(type_args->untag()->length());
1517 for (intptr_t i = 0; i < length; i++) {
1518 s->Push(type_args->untag()->element(i));
1519 }
1520 }
void Add(const T &value)
static ObjectPtr RawCast(ObjectPtr obj)
Definition: object.h:325
intptr_t Value() const
Definition: object.h:9990
struct MyStruct s
size_t length

◆ WriteAlloc()

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

Implements dart::SerializationCluster.

Definition at line 1522 of file app_snapshot.cc.

1522 {
1523 const intptr_t count = objects_.length();
1524 s->WriteUnsigned(count);
1526 for (intptr_t i = 0; i < count; i++) {
1527 TypeArgumentsPtr type_args = objects_[i];
1528 s->AssignRef(type_args);
1529 AutoTraceObject(type_args);
1530 const intptr_t length = Smi::Value(type_args->untag()->length());
1531 s->WriteUnsigned(length);
1534 }
1536 }
int count
Definition: FontMgrTest.cpp:50
#define AutoTraceObject(obj)
intptr_t length() const

◆ WriteFill()

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

Implements dart::SerializationCluster.

Definition at line 1538 of file app_snapshot.cc.

1538 {
1539 const intptr_t count = objects_.length();
1540 for (intptr_t i = 0; i < count; i++) {
1541 TypeArgumentsPtr type_args = objects_[i];
1542 AutoTraceObject(type_args);
1543 const intptr_t length = Smi::Value(type_args->untag()->length());
1544 s->WriteUnsigned(length);
1545 intptr_t hash = Smi::Value(type_args->untag()->hash());
1546 s->Write<int32_t>(hash);
1547 const intptr_t nullability =
1548 Smi::Value(type_args->untag()->nullability());
1549 s->WriteUnsigned(nullability);
1550 WriteField(type_args, instantiations());
1551 for (intptr_t j = 0; j < length; j++) {
1552 s->WriteElementRef(type_args->untag()->element(j), j);
1553 }
1554 }
1555 }
static uint32_t hash(const SkShaderBase::GradientInfo &v)
#define WriteField(obj, field)

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