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

Public Member Functions

 GrowableObjectArrayMessageDeserializationCluster ()
 
 ~GrowableObjectArrayMessageDeserializationCluster ()
 
void ReadNodes (MessageDeserializer *d)
 
void ReadEdges (MessageDeserializer *d)
 
ObjectPtr PostLoad (MessageDeserializer *d)
 
void ReadNodesApi (ApiMessageDeserializer *d)
 
void ReadEdgesApi (ApiMessageDeserializer *d)
 
- Public Member Functions inherited from dart::MessageDeserializationCluster
 MessageDeserializationCluster (const char *name, bool is_canonical=false)
 
virtual ~MessageDeserializationCluster ()
 
virtual void ReadNodes (MessageDeserializer *d)=0
 
virtual void ReadEdges (MessageDeserializer *d)
 
virtual ObjectPtr PostLoad (MessageDeserializer *d)
 
virtual void ReadNodesApi (ApiMessageDeserializer *d)
 
virtual void ReadEdgesApi (ApiMessageDeserializer *d)
 
virtual void PostLoadApi (ApiMessageDeserializer *d)
 
void ReadNodesWrapped (MessageDeserializer *d)
 
void ReadNodesWrappedApi (ApiMessageDeserializer *d)
 
const char * name () 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::MessageDeserializationCluster
ObjectPtr PostLoadAbstractType (MessageDeserializer *d)
 
ObjectPtr PostLoadLinkedHash (MessageDeserializer *d)
 
 DISALLOW_COPY_AND_ASSIGN (MessageDeserializationCluster)
 
- Protected Attributes inherited from dart::MessageDeserializationCluster
const char *const name_
 
const bool is_canonical_
 
intptr_t start_index_
 
intptr_t stop_index_
 

Detailed Description

Definition at line 1073 of file message_snapshot.cc.

Constructor & Destructor Documentation

◆ GrowableObjectArrayMessageDeserializationCluster()

dart::GrowableObjectArrayMessageDeserializationCluster::GrowableObjectArrayMessageDeserializationCluster ( )
inline

Definition at line 1076 of file message_snapshot.cc.

1077 : MessageDeserializationCluster("GrowableObjectArray") {}
MessageDeserializationCluster(const char *name, bool is_canonical=false)

◆ ~GrowableObjectArrayMessageDeserializationCluster()

dart::GrowableObjectArrayMessageDeserializationCluster::~GrowableObjectArrayMessageDeserializationCluster ( )
inline

Definition at line 1078 of file message_snapshot.cc.

1078{}

Member Function Documentation

◆ PostLoad()

ObjectPtr dart::GrowableObjectArrayMessageDeserializationCluster::PostLoad ( MessageDeserializer d)
inlinevirtual

Reimplemented from dart::MessageDeserializationCluster.

Definition at line 1103 of file message_snapshot.cc.

1103 {
1104 ASSERT(!is_canonical());
1105 return nullptr;
1106 }
#define ASSERT(E)

◆ ReadEdges()

void dart::GrowableObjectArrayMessageDeserializationCluster::ReadEdges ( MessageDeserializer d)
inlinevirtual

Reimplemented from dart::MessageDeserializationCluster.

Definition at line 1091 of file message_snapshot.cc.

1091 {
1092 GrowableObjectArray& array = GrowableObjectArray::Handle(d->zone());
1093 for (intptr_t id = start_index_; id < stop_index_; id++) {
1094 array ^= d->Ref(id);
1095 array.untag()->set_type_arguments(
1096 static_cast<TypeArgumentsPtr>(d->ReadRef()));
1097 for (intptr_t i = 0, n = array.Length(); i < n; i++) {
1098 array.untag()->data()->untag()->set_element(i, d->ReadRef());
1099 }
1100 }
1101 }
static Object & Handle()
Definition: object.h:407
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition: main.cc:19

◆ ReadEdgesApi()

void dart::GrowableObjectArrayMessageDeserializationCluster::ReadEdgesApi ( ApiMessageDeserializer d)
inlinevirtual

Reimplemented from dart::MessageDeserializationCluster.

Definition at line 1124 of file message_snapshot.cc.

1124 {
1125 for (intptr_t id = start_index_; id < stop_index_; id++) {
1126 Dart_CObject* array = d->Ref(id);
1127 intptr_t length = array->value.as_array.length;
1128 d->ReadRef(); // type_arguments
1129 for (intptr_t i = 0; i < length; i++) {
1130 array->value.as_array.values[i] = d->ReadRef();
1131 }
1132 }
1133 }
size_t length
union _Dart_CObject::@86 value
struct _Dart_CObject::@86::@89 as_array
struct _Dart_CObject ** values

◆ ReadNodes()

void dart::GrowableObjectArrayMessageDeserializationCluster::ReadNodes ( MessageDeserializer d)
inlinevirtual

Implements dart::MessageDeserializationCluster.

Definition at line 1080 of file message_snapshot.cc.

1080 {
1081 const intptr_t count = d->ReadUnsigned();
1082 GrowableObjectArray& array = GrowableObjectArray::Handle(d->zone());
1083 for (intptr_t i = 0; i < count; i++) {
1084 intptr_t length = d->ReadUnsigned();
1085 array = GrowableObjectArray::New(length); // Here length is capacity.
1086 array.SetLength(length);
1087 d->AssignRef(array.ptr());
1088 }
1089 }
int count
Definition: FontMgrTest.cpp:50
static GrowableObjectArrayPtr New(Heap::Space space=Heap::kNew)
Definition: object.h:11144

◆ ReadNodesApi()

void dart::GrowableObjectArrayMessageDeserializationCluster::ReadNodesApi ( ApiMessageDeserializer d)
inlinevirtual

Reimplemented from dart::MessageDeserializationCluster.

Definition at line 1108 of file message_snapshot.cc.

1108 {
1109 intptr_t count = d->ReadUnsigned();
1110 for (intptr_t i = 0; i < count; i++) {
1111 Dart_CObject* array = d->Allocate(Dart_CObject_kArray);
1112 intptr_t length = d->ReadUnsigned();
1113 array->value.as_array.length = length;
1114 if (length > 0) {
1115 array->value.as_array.values = d->zone()->Alloc<Dart_CObject*>(length);
1116 } else {
1117 ASSERT(length == 0);
1118 array->value.as_array.values = nullptr;
1119 }
1120 d->AssignRef(array);
1121 }
1122 }
@ Dart_CObject_kArray

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