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

Public Member Functions

 ClassMessageSerializationCluster ()
 
 ~ClassMessageSerializationCluster ()
 
void Trace (MessageSerializer *s, Object *object)
 
void WriteNodes (MessageSerializer *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 498 of file message_snapshot.cc.

Constructor & Destructor Documentation

◆ ClassMessageSerializationCluster()

dart::ClassMessageSerializationCluster::ClassMessageSerializationCluster ( )
inline

Definition at line 500 of file message_snapshot.cc.

503 kClassCid),
504 objects_() {}
MessageSerializationCluster(const char *name, MessagePhase phase, intptr_t cid, bool is_canonical=false)

◆ ~ClassMessageSerializationCluster()

dart::ClassMessageSerializationCluster::~ClassMessageSerializationCluster ( )
inline

Definition at line 505 of file message_snapshot.cc.

505{}

Member Function Documentation

◆ Trace()

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

Implements dart::MessageSerializationCluster.

Definition at line 507 of file message_snapshot.cc.

507 {
508 Class* cls = static_cast<Class*>(object);
509 objects_.Add(cls);
510 }

◆ WriteNodes()

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

Implements dart::MessageSerializationCluster.

Definition at line 512 of file message_snapshot.cc.

512 {
513 const intptr_t count = objects_.length();
514 s->WriteUnsigned(count);
515 Library& lib = Library::Handle(s->zone());
516 String& str = String::Handle(s->zone());
517 for (intptr_t i = 0; i < count; i++) {
518 Class* cls = objects_[i];
519 s->AssignRef(cls);
520 intptr_t cid = cls->id();
521 if (cid < kNumPredefinedCids) {
522 ASSERT(cid != 0);
523 s->WriteUnsigned(cid);
524 } else {
525 s->WriteUnsigned(0);
526 lib = cls->library();
527 str = lib.url();
528 s->WriteAscii(str);
529 str = cls->Name();
530 s->WriteAscii(str);
531 }
532 }
533 }
int count
Definition: FontMgrTest.cpp:50
static Object & Handle()
Definition: object.h:407
#define ASSERT(E)
struct MyStruct s
@ kNumPredefinedCids
Definition: class_id.h:257

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