Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::SubtypeFinder Class Reference

Public Member Functions

 SubtypeFinder (Zone *zone, GrowableArray< intptr_t > *cids, bool include_abstract)
 
void ScanImplementorClasses (const Class &klass)
 

Detailed Description

Definition at line 65 of file il.cc.

Constructor & Destructor Documentation

◆ SubtypeFinder()

dart::SubtypeFinder::SubtypeFinder ( Zone zone,
GrowableArray< intptr_t > *  cids,
bool  include_abstract 
)
inline

Definition at line 67 of file il.cc.

70 : array_handles_(zone),
71 class_handles_(zone),
72 cids_(cids),
73 include_abstract_(include_abstract) {}

Member Function Documentation

◆ ScanImplementorClasses()

void dart::SubtypeFinder::ScanImplementorClasses ( const Class klass)
inline

Definition at line 75 of file il.cc.

75 {
76 // An implementor of [klass] is
77 // * the [klass] itself.
78 // * all implementors of the direct subclasses of [klass].
79 // * all implementors of the direct implementors of [klass].
80 if (include_abstract_ || !klass.is_abstract()) {
81 cids_->Add(klass.id());
82 }
83
84 ScopedHandle<GrowableObjectArray> array(&array_handles_);
85 ScopedHandle<Class> subclass_or_implementor(&class_handles_);
86
87 *array = klass.direct_subclasses();
88 if (!array->IsNull()) {
89 for (intptr_t i = 0; i < array->Length(); ++i) {
90 *subclass_or_implementor ^= (*array).At(i);
91 ScanImplementorClasses(*subclass_or_implementor);
92 }
93 }
94 *array = klass.direct_implementors();
95 if (!array->IsNull()) {
96 for (intptr_t i = 0; i < array->Length(); ++i) {
97 *subclass_or_implementor ^= (*array).At(i);
98 ScanImplementorClasses(*subclass_or_implementor);
99 }
100 }
101 }
void Add(const T &value)
void ScanImplementorClasses(const Class &klass)
Definition: il.cc:75

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