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

Public Member Functions

 SmiMessageSerializationCluster (Zone *zone)
 
 ~SmiMessageSerializationCluster ()
 
void Trace (MessageSerializer *s, Object *object)
 
void WriteNodes (MessageSerializer *s)
 
void TraceApi (ApiMessageSerializer *s, Dart_CObject *object)
 
void WriteNodesApi (ApiMessageSerializer *s)
 
- Public Member Functions inherited from dart::MessageSerializationCluster
 MessageSerializationCluster (const char *name, MessagePhase phase, intptr_t cid, bool is_canonical=false)
 
virtual ~MessageSerializationCluster ()
 
virtual void Trace (MessageSerializer *s, Object *object)=0
 
virtual void WriteNodes (MessageSerializer *s)=0
 
virtual void WriteEdges (MessageSerializer *s)
 
virtual void TraceApi (ApiMessageSerializer *s, Dart_CObject *object)
 
virtual void WriteNodesApi (ApiMessageSerializer *s)
 
virtual void WriteEdgesApi (ApiMessageSerializer *s)
 
const char * name () const
 
MessagePhase phase () const
 
intptr_t cid () 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::MessageSerializationCluster
 DISALLOW_COPY_AND_ASSIGN (MessageSerializationCluster)
 
- Protected Attributes inherited from dart::MessageSerializationCluster
const char *const name_
 
const MessagePhase phase_
 
const intptr_t cid_
 
const bool is_canonical_
 

Detailed Description

Definition at line 799 of file message_snapshot.cc.

Constructor & Destructor Documentation

◆ SmiMessageSerializationCluster()

dart::SmiMessageSerializationCluster::SmiMessageSerializationCluster ( Zone zone)
inlineexplicit

Definition at line 801 of file message_snapshot.cc.

804 kSmiCid,
805 true),
806 objects_(zone, 0) {}
MessageSerializationCluster(const char *name, MessagePhase phase, intptr_t cid, bool is_canonical=false)

◆ ~SmiMessageSerializationCluster()

dart::SmiMessageSerializationCluster::~SmiMessageSerializationCluster ( )
inline

Definition at line 807 of file message_snapshot.cc.

807{}

Member Function Documentation

◆ Trace()

void dart::SmiMessageSerializationCluster::Trace ( MessageSerializer s,
Object object 
)
inlinevirtual

Implements dart::MessageSerializationCluster.

Definition at line 809 of file message_snapshot.cc.

809 {
810 Smi* smi = static_cast<Smi*>(object);
811 objects_.Add(smi);
812 }

◆ TraceApi()

void dart::SmiMessageSerializationCluster::TraceApi ( ApiMessageSerializer s,
Dart_CObject object 
)
inlinevirtual

Reimplemented from dart::MessageSerializationCluster.

Definition at line 824 of file message_snapshot.cc.

824 {
825 objects_.Add(reinterpret_cast<Smi*>(object));
826 }

◆ WriteNodes()

void dart::SmiMessageSerializationCluster::WriteNodes ( MessageSerializer s)
inlinevirtual

Implements dart::MessageSerializationCluster.

Definition at line 814 of file message_snapshot.cc.

814 {
815 const intptr_t count = objects_.length();
816 s->WriteUnsigned(count);
817 for (intptr_t i = 0; i < count; i++) {
818 Smi* smi = static_cast<Smi*>(objects_[i]);
819 s->AssignRef(smi);
820 s->Write<intptr_t>(smi->Value());
821 }
822 }
int count
Definition: FontMgrTest.cpp:50
struct MyStruct s

◆ WriteNodesApi()

void dart::SmiMessageSerializationCluster::WriteNodesApi ( ApiMessageSerializer s)
inlinevirtual

Reimplemented from dart::MessageSerializationCluster.

Definition at line 828 of file message_snapshot.cc.

828 {
829 intptr_t count = objects_.length();
830 s->WriteUnsigned(count);
831 for (intptr_t i = 0; i < count; i++) {
832 Dart_CObject* smi = reinterpret_cast<Dart_CObject*>(objects_[i]);
833 s->AssignRef(smi);
834 intptr_t value = smi->type == Dart_CObject_kInt32 ? smi->value.as_int32
835 : smi->value.as_int64;
836 s->Write<intptr_t>(value);
837 }
838 }
@ Dart_CObject_kInt32
uint8_t value
union _Dart_CObject::@86 value
Dart_CObject_Type type

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