Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::ObjectCounter Class Reference
Inheritance diagram for dart::ObjectCounter:
dart::ObjectPointerVisitor

Public Member Functions

 ObjectCounter (IsolateGroup *isolate_group, const Object *obj)
 
void VisitPointers (ObjectPtr *first, ObjectPtr *last) override
 
intptr_t count () const
 
- Public Member Functions inherited from dart::ObjectPointerVisitor
 ObjectPointerVisitor (IsolateGroup *isolate_group)
 
virtual ~ObjectPointerVisitor ()
 
IsolateGroupisolate_group () const
 
virtual void VisitTypedDataViewPointers (TypedDataViewPtr view, CompressedObjectPtr *first, CompressedObjectPtr *last)
 
virtual void VisitPointers (ObjectPtr *first, ObjectPtr *last)=0
 
void VisitCompressedPointers (uword heap_base, CompressedObjectPtr *first, CompressedObjectPtr *last)
 
void VisitPointers (ObjectPtr *p, intptr_t len)
 
void VisitPointer (ObjectPtr *p)
 
const char * gc_root_type () const
 
void set_gc_root_type (const char *gc_root_type)
 
void clear_gc_root_type ()
 
virtual bool visit_weak_persistent_handles () const
 
virtual bool trace_values_through_fields () const
 
const ClassTableclass_table () const
 
virtual bool CanVisitSuspendStatePointers (SuspendStatePtr suspend_state)
 

Detailed Description

Definition at line 83 of file thread_test.cc.

Constructor & Destructor Documentation

◆ ObjectCounter()

dart::ObjectCounter::ObjectCounter ( IsolateGroup isolate_group,
const Object obj 
)
inlineexplicit

Definition at line 85 of file thread_test.cc.

86 : ObjectPointerVisitor(isolate_group), obj_(obj), count_(0) {}
IsolateGroup * isolate_group() const
Definition: visitor.h:25
ObjectPointerVisitor(IsolateGroup *isolate_group)
Definition: visitor.cc:11

Member Function Documentation

◆ count()

intptr_t dart::ObjectCounter::count ( ) const
inline

Definition at line 108 of file thread_test.cc.

108{ return count_; }

◆ VisitPointers()

void dart::ObjectCounter::VisitPointers ( ObjectPtr first,
ObjectPtr last 
)
inlineoverridevirtual

Implements dart::ObjectPointerVisitor.

Definition at line 88 of file thread_test.cc.

88 {
89 for (ObjectPtr* current = first; current <= last; ++current) {
90 if (*current == obj_->ptr()) {
91 ++count_;
92 }
93 }
94 }
ObjectPtr ptr() const
Definition: object.h:332

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