Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dart::ExternalTypedDataSerializationCluster Class Reference
Inheritance diagram for dart::ExternalTypedDataSerializationCluster:
dart::SerializationCluster dart::ZoneAllocated

Public Member Functions

 ExternalTypedDataSerializationCluster (intptr_t cid)
 
 ~ExternalTypedDataSerializationCluster ()
 
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 ()
 
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 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 5827 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ ExternalTypedDataSerializationCluster()

dart::ExternalTypedDataSerializationCluster::ExternalTypedDataSerializationCluster ( intptr_t  cid)
inlineexplicit

Definition at line 5829 of file app_snapshot.cc.

5831 "ExternalTypedData",
5832 cid,
5833 compiler::target::ExternalTypedData::InstanceSize()) {}
SerializationCluster(const char *name, intptr_t cid, intptr_t target_instance_size=kSizeVaries, bool is_canonical=false)

◆ ~ExternalTypedDataSerializationCluster()

dart::ExternalTypedDataSerializationCluster::~ExternalTypedDataSerializationCluster ( )
inline

Definition at line 5834 of file app_snapshot.cc.

5834{}

Member Function Documentation

◆ Trace()

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

Implements dart::SerializationCluster.

Definition at line 5836 of file app_snapshot.cc.

5836 {
5837 ExternalTypedDataPtr data = ExternalTypedData::RawCast(object);
5838 objects_.Add(data);
5839 }
void Add(const T &value)
static ObjectPtr RawCast(ObjectPtr obj)
Definition object.h:325
static int8_t data[kExtLength]

◆ WriteAlloc()

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

Implements dart::SerializationCluster.

Definition at line 5841 of file app_snapshot.cc.

5841 {
5842 const intptr_t count = objects_.length();
5843 s->WriteUnsigned(count);
5844 for (intptr_t i = 0; i < count; i++) {
5845 ExternalTypedDataPtr data = objects_[i];
5846 s->AssignRef(data);
5847 }
5848 }
int count
intptr_t length() const
struct MyStruct s

◆ WriteFill()

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

Implements dart::SerializationCluster.

Definition at line 5850 of file app_snapshot.cc.

5850 {
5851 const intptr_t count = objects_.length();
5853 for (intptr_t i = 0; i < count; i++) {
5854 ExternalTypedDataPtr data = objects_[i];
5856 const intptr_t length = Smi::Value(data->untag()->length());
5857 s->WriteUnsigned(length);
5858 uint8_t* cdata = reinterpret_cast<uint8_t*>(data->untag()->data_);
5860 s->WriteBytes(cdata, length * element_size);
5861 }
5862 }
static size_t element_size(Layout layout, SkSLType type)
#define AutoTraceObject(obj)
static constexpr int kDataSerializationAlignment
Definition object.h:11708
intptr_t Value() const
Definition object.h:9969
intptr_t ElementSizeInBytes() const
Definition object.h:11505
size_t length

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