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

Public Member Functions

 ClosureDataSerializationCluster ()
 
 ~ClosureDataSerializationCluster ()
 
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 1992 of file app_snapshot.cc.

Constructor & Destructor Documentation

◆ ClosureDataSerializationCluster()

dart::ClosureDataSerializationCluster::ClosureDataSerializationCluster ( )
inline

Definition at line 1994 of file app_snapshot.cc.

1995 : SerializationCluster("ClosureData",
1996 kClosureDataCid,
SerializationCluster(const char *name, intptr_t cid, intptr_t target_instance_size=kSizeVaries, bool is_canonical=false)

◆ ~ClosureDataSerializationCluster()

dart::ClosureDataSerializationCluster::~ClosureDataSerializationCluster ( )
inline

Definition at line 1998 of file app_snapshot.cc.

1998{}

Member Function Documentation

◆ Trace()

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

Implements dart::SerializationCluster.

Definition at line 2000 of file app_snapshot.cc.

2000 {
2001 ClosureDataPtr data = ClosureData::RawCast(object);
2002 objects_.Add(data);
2003
2004 if (s->kind() != Snapshot::kFullAOT) {
2005 s->Push(data->untag()->context_scope());
2006 }
2007 s->Push(data->untag()->parent_function());
2008 s->Push(data->untag()->closure());
2009 }
void Add(const T &value)
static ObjectPtr RawCast(ObjectPtr obj)
Definition: object.h:325
struct MyStruct s
static int8_t data[kExtLength]

◆ WriteAlloc()

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

Implements dart::SerializationCluster.

Definition at line 2011 of file app_snapshot.cc.

2011 {
2012 const intptr_t count = objects_.length();
2013 s->WriteUnsigned(count);
2014 for (intptr_t i = 0; i < count; i++) {
2015 ClosureDataPtr data = objects_[i];
2016 s->AssignRef(data);
2017 }
2018 }
int count
Definition: FontMgrTest.cpp:50
intptr_t length() const

◆ WriteFill()

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

Implements dart::SerializationCluster.

Definition at line 2020 of file app_snapshot.cc.

2020 {
2021 const intptr_t count = objects_.length();
2022 for (intptr_t i = 0; i < count; i++) {
2023 ClosureDataPtr data = objects_[i];
2025 if (s->kind() != Snapshot::kFullAOT) {
2026 WriteCompressedField(data, context_scope);
2027 }
2028 WriteCompressedField(data, parent_function);
2030 s->WriteUnsigned(static_cast<uint32_t>(data->untag()->packed_fields_));
2031 }
2032 }
#define AutoTraceObject(obj)
#define WriteCompressedField(obj, name)
std::function< void()> closure
Definition: closure.h:14

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