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

Public Member Functions

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

Constructor & Destructor Documentation

◆ SetSerializationCluster()

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

Definition at line 6298 of file app_snapshot.cc.

6299 : SerializationCluster("Set",
6300 cid,
6302 is_canonical) {}
SerializationCluster(const char *name, intptr_t cid, intptr_t target_instance_size=kSizeVaries, bool is_canonical=false)

◆ ~SetSerializationCluster()

dart::SetSerializationCluster::~SetSerializationCluster ( )
inline

Definition at line 6303 of file app_snapshot.cc.

6303{}

Member Function Documentation

◆ Trace()

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

Implements dart::SerializationCluster.

Definition at line 6305 of file app_snapshot.cc.

6305 {
6306 SetPtr set = Set::RawCast(object);
6307 // We never have mutable hashsets in snapshots.
6308 ASSERT(set->untag()->IsCanonical());
6309 ASSERT_EQUAL(set.GetClassId(), kConstSetCid);
6310 objects_.Add(set);
6311 PushFromTo(set);
6312 }
#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)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not set
Definition: switches.h:76

◆ WriteAlloc()

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

Implements dart::SerializationCluster.

Definition at line 6314 of file app_snapshot.cc.

6314 {
6315 const intptr_t count = objects_.length();
6316 s->WriteUnsigned(count);
6317 for (intptr_t i = 0; i < count; i++) {
6318 SetPtr set = objects_[i];
6319 s->AssignRef(set);
6320 }
6321 }
int count
Definition: FontMgrTest.cpp:50
intptr_t length() const
struct MyStruct s

◆ WriteFill()

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

Implements dart::SerializationCluster.

Definition at line 6323 of file app_snapshot.cc.

6323 {
6324 const intptr_t count = objects_.length();
6325 for (intptr_t i = 0; i < count; i++) {
6326 SetPtr set = objects_[i];
6329 }
6330 }
#define AutoTraceObject(obj)
#define WriteFromTo(obj,...)

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