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

Public Member Functions

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

Constructor & Destructor Documentation

◆ ExceptionHandlersSerializationCluster()

dart::ExceptionHandlersSerializationCluster::ExceptionHandlersSerializationCluster ( )
inline

Definition at line 3739 of file app_snapshot.cc.

3740 : SerializationCluster("ExceptionHandlers", kExceptionHandlersCid) {}
SerializationCluster(const char *name, intptr_t cid, intptr_t target_instance_size=kSizeVaries, bool is_canonical=false)

◆ ~ExceptionHandlersSerializationCluster()

dart::ExceptionHandlersSerializationCluster::~ExceptionHandlersSerializationCluster ( )
inline

Definition at line 3741 of file app_snapshot.cc.

3741{}

Member Function Documentation

◆ Trace()

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

Implements dart::SerializationCluster.

Definition at line 3743 of file app_snapshot.cc.

3743 {
3744 ExceptionHandlersPtr handlers = ExceptionHandlers::RawCast(object);
3745 objects_.Add(handlers);
3746
3747 s->Push(handlers->untag()->handled_types_data());
3748 }
void Add(const T &value)
static ObjectPtr RawCast(ObjectPtr obj)
Definition: object.h:325
struct MyStruct s

◆ WriteAlloc()

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

Implements dart::SerializationCluster.

Definition at line 3750 of file app_snapshot.cc.

3750 {
3751 const intptr_t count = objects_.length();
3752 s->WriteUnsigned(count);
3753 for (intptr_t i = 0; i < count; i++) {
3754 ExceptionHandlersPtr handlers = objects_[i];
3755 s->AssignRef(handlers);
3756 AutoTraceObject(handlers);
3757 const intptr_t length = handlers->untag()->num_entries();
3758 s->WriteUnsigned(length);
3761 }
3762 }
int count
Definition: FontMgrTest.cpp:50
#define AutoTraceObject(obj)
intptr_t length() const
size_t length

◆ WriteFill()

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

Implements dart::SerializationCluster.

Definition at line 3764 of file app_snapshot.cc.

3764 {
3765 const intptr_t count = objects_.length();
3766 for (intptr_t i = 0; i < count; i++) {
3767 ExceptionHandlersPtr handlers = objects_[i];
3768 AutoTraceObject(handlers);
3769 const intptr_t packed_fields = handlers->untag()->packed_fields_;
3770 const intptr_t length =
3772 s->WriteUnsigned(packed_fields);
3773 WriteCompressedField(handlers, handled_types_data);
3774 for (intptr_t j = 0; j < length; j++) {
3775 const ExceptionHandlerInfo& info = handlers->untag()->data()[j];
3776 s->Write<uint32_t>(info.handler_pc_offset);
3777 s->Write<int16_t>(info.outer_try_index);
3778 s->Write<int8_t>(info.needs_stacktrace);
3779 s->Write<int8_t>(info.has_catch_all);
3780 s->Write<int8_t>(info.is_generated);
3781 }
3782 }
3783 }
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
#define WriteCompressedField(obj, name)
static constexpr T decode(S value)
Definition: bitfield.h:171

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