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

Public Member Functions

 GetInstancesVisitor (ZoneGrowableHandlePtrArray< Object > *storage, intptr_t limit)
 
virtual Direction VisitObject (ObjectGraph::StackIterator *it)
 
intptr_t count () const
 

Detailed Description

Definition at line 3500 of file service.cc.

Constructor & Destructor Documentation

◆ GetInstancesVisitor()

dart::GetInstancesVisitor::GetInstancesVisitor ( ZoneGrowableHandlePtrArray< Object > *  storage,
intptr_t  limit 
)
inline

Definition at line 3502 of file service.cc.

3504 : table_(IsolateGroup::Current()->class_table()),
3505 storage_(storage),
3506 limit_(limit),
3507 count_(0) {}
static IsolateGroup * Current()
Definition: isolate.h:539

Member Function Documentation

◆ count()

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

Definition at line 3523 of file service.cc.

3523{ return count_; }

◆ VisitObject()

virtual Direction dart::GetInstancesVisitor::VisitObject ( ObjectGraph::StackIterator *  it)
inlinevirtual

Definition at line 3509 of file service.cc.

3509 {
3510 ObjectPtr raw_obj = it->Get();
3511 if (raw_obj->IsPseudoObject()) {
3512 return kProceed;
3513 }
3514 if (table_->CollectInstancesFor(raw_obj->GetClassId())) {
3515 if (count_ < limit_) {
3516 storage_->Add(Object::Handle(raw_obj));
3517 }
3518 ++count_;
3519 }
3520 return kProceed;
3521 }
bool CollectInstancesFor(intptr_t cid)
Definition: class_table.h:418
static Object & Handle()
Definition: object.h:407

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