Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::DoubleSerializationCluster Class Reference
Inheritance diagram for dart::DoubleSerializationCluster:
dart::SerializationCluster dart::ZoneAllocated

Public Member Functions

 DoubleSerializationCluster (bool is_canonical)
 
 ~DoubleSerializationCluster ()
 
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 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 5377 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ DoubleSerializationCluster()

dart::DoubleSerializationCluster::DoubleSerializationCluster ( bool  is_canonical)
inlineexplicit

Definition at line 5379 of file app_snapshot.cc.

5380 : SerializationCluster("double",
5381 kDoubleCid,
5383 is_canonical) {}
SerializationCluster(const char *name, intptr_t cid, intptr_t target_instance_size=kSizeVaries, bool is_canonical=false)

◆ ~DoubleSerializationCluster()

dart::DoubleSerializationCluster::~DoubleSerializationCluster ( )
inline

Definition at line 5384 of file app_snapshot.cc.

5384{}

Member Function Documentation

◆ Trace()

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

Implements dart::SerializationCluster.

Definition at line 5386 of file app_snapshot.cc.

5386 {
5387 DoublePtr dbl = Double::RawCast(object);
5388 objects_.Add(dbl);
5389 }
void Add(const T &value)
static ObjectPtr RawCast(ObjectPtr obj)
Definition: object.h:325

◆ WriteAlloc()

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

Implements dart::SerializationCluster.

Definition at line 5391 of file app_snapshot.cc.

5391 {
5392 const intptr_t count = objects_.length();
5393 s->WriteUnsigned(count);
5394 for (intptr_t i = 0; i < count; i++) {
5395 DoublePtr dbl = objects_[i];
5396 s->AssignRef(dbl);
5397 }
5398 }
int count
Definition: FontMgrTest.cpp:50
intptr_t length() const
struct MyStruct s

◆ WriteFill()

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

Implements dart::SerializationCluster.

Definition at line 5400 of file app_snapshot.cc.

5400 {
5401 const intptr_t count = objects_.length();
5402 for (intptr_t i = 0; i < count; i++) {
5403 DoublePtr dbl = objects_[i];
5404 AutoTraceObject(dbl);
5405 s->Write<double>(dbl->untag()->value_);
5406 }
5407 }
#define AutoTraceObject(obj)

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