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

Public Member Functions

 MapSerializationCluster (bool is_canonical, intptr_t cid)
 
 ~MapSerializationCluster ()
 
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 6221 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ MapSerializationCluster()

dart::MapSerializationCluster::MapSerializationCluster ( bool  is_canonical,
intptr_t  cid 
)
inline

Definition at line 6223 of file app_snapshot.cc.

6224 : SerializationCluster("Map",
6225 cid,
6227 is_canonical) {}
SerializationCluster(const char *name, intptr_t cid, intptr_t target_instance_size=kSizeVaries, bool is_canonical=false)

◆ ~MapSerializationCluster()

dart::MapSerializationCluster::~MapSerializationCluster ( )
inline

Definition at line 6228 of file app_snapshot.cc.

6228{}

Member Function Documentation

◆ Trace()

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

Implements dart::SerializationCluster.

Definition at line 6230 of file app_snapshot.cc.

6230 {
6231 MapPtr map = Map::RawCast(object);
6232 // We never have mutable hashmaps in snapshots.
6233 ASSERT(map->untag()->IsCanonical());
6234 ASSERT_EQUAL(map.GetClassId(), kConstMapCid);
6235 objects_.Add(map);
6236 PushFromTo(map);
6237 }
#define PushFromTo(obj,...)
#define ASSERT_EQUAL(expected, actual)
Definition: assert.h:309
void Add(const T &value)
static ObjectPtr RawCast(ObjectPtr obj)
Definition: object.h:325
#define ASSERT(E)
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>
Definition: SkVx.h:680

◆ WriteAlloc()

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

Implements dart::SerializationCluster.

Definition at line 6239 of file app_snapshot.cc.

6239 {
6240 const intptr_t count = objects_.length();
6241 s->WriteUnsigned(count);
6242 for (intptr_t i = 0; i < count; i++) {
6243 MapPtr map = objects_[i];
6244 s->AssignRef(map);
6245 }
6246 }
int count
Definition: FontMgrTest.cpp:50
intptr_t length() const
struct MyStruct s

◆ WriteFill()

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

Implements dart::SerializationCluster.

Definition at line 6248 of file app_snapshot.cc.

6248 {
6249 const intptr_t count = objects_.length();
6250 for (intptr_t i = 0; i < count; i++) {
6251 MapPtr map = objects_[i];
6254 }
6255 }
#define AutoTraceObject(obj)
#define WriteFromTo(obj,...)

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