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

Public Member Functions

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

Constructor & Destructor Documentation

◆ GrowableObjectArrayMessageSerializationCluster()

dart::GrowableObjectArrayMessageSerializationCluster::GrowableObjectArrayMessageSerializationCluster ( )
inline

Definition at line 1024 of file message_snapshot.cc.

1025 : MessageSerializationCluster("GrowableObjectArray",
1027 kGrowableObjectArrayCid) {}
MessageSerializationCluster(const char *name, MessagePhase phase, intptr_t cid, bool is_canonical=false)

◆ ~GrowableObjectArrayMessageSerializationCluster()

dart::GrowableObjectArrayMessageSerializationCluster::~GrowableObjectArrayMessageSerializationCluster ( )
inline

Definition at line 1028 of file message_snapshot.cc.

1028{}

Member Function Documentation

◆ Trace()

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

Implements dart::MessageSerializationCluster.

Definition at line 1030 of file message_snapshot.cc.

1030 {
1031 GrowableObjectArray* array = static_cast<GrowableObjectArray*>(object);
1032 objects_.Add(array);
1033
1034 // Compensation for bogus type prefix optimization.
1035 TypeArguments& args =
1036 TypeArguments::Handle(s->zone(), array->untag()->type_arguments());
1037 if (!args.IsNull() && (args.Length() != 1)) {
1038 args = args.TruncatedTo(1);
1039 array->untag()->set_type_arguments(args.ptr());
1040 }
1041
1042 s->Push(array->untag()->type_arguments());
1043 for (intptr_t i = 0, n = array->Length(); i < n; i++) {
1044 s->Push(array->At(i));
1045 }
1046 }
static Object & Handle()
Definition: object.h:407
struct MyStruct s
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args

◆ WriteEdges()

void dart::GrowableObjectArrayMessageSerializationCluster::WriteEdges ( MessageSerializer s)
inlinevirtual

Reimplemented from dart::MessageSerializationCluster.

Definition at line 1058 of file message_snapshot.cc.

1058 {
1059 const intptr_t count = objects_.length();
1060 for (intptr_t i = 0; i < count; i++) {
1061 GrowableObjectArray* array = objects_[i];
1062 s->WriteRef(array->untag()->type_arguments());
1063 for (intptr_t i = 0, n = array->Length(); i < n; i++) {
1064 s->WriteRef(array->At(i));
1065 }
1066 }
1067 }
int count
Definition: FontMgrTest.cpp:50

◆ WriteNodes()

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

Implements dart::MessageSerializationCluster.

Definition at line 1048 of file message_snapshot.cc.

1048 {
1049 const intptr_t count = objects_.length();
1050 s->WriteUnsigned(count);
1051 for (intptr_t i = 0; i < count; i++) {
1052 GrowableObjectArray* array = objects_[i];
1053 s->WriteUnsigned(array->Length());
1054 s->AssignRef(array);
1055 }
1056 }

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