Index: runtime/vm/object.h |
=================================================================== |
--- runtime/vm/object.h (revision 26124) |
+++ runtime/vm/object.h (working copy) |
@@ -2246,14 +2246,26 @@ |
class ClassDictionaryIterator : public DictionaryIterator { |
public: |
- explicit ClassDictionaryIterator(const Library& library); |
+ enum IterationKind { |
+ kIteratePrivate, |
+ kNoIteratePrivate |
+ }; |
+ ClassDictionaryIterator(const Library& library, |
+ IterationKind kind = kNoIteratePrivate); |
+ |
+ bool HasNext() const { return (next_ix_ < size_) || (anon_ix_ < anon_size_); } |
+ |
// Returns a non-null raw class. |
RawClass* GetNextClass(); |
private: |
void MoveToNextClass(); |
+ const Array& anon_array_; |
+ const int anon_size_; // Number of anonymous classes to iterate over. |
+ int anon_ix_; // Index of next anonymous class. |
+ |
DISALLOW_COPY_AND_ASSIGN(ClassDictionaryIterator); |
}; |
@@ -2336,6 +2348,9 @@ |
void AddLibraryMetadata(const Class& cls, intptr_t token_pos) const; |
RawObject* GetMetadata(const Object& obj) const; |
+ intptr_t num_anonymous_classes() const { return raw_ptr()->num_anonymous_; } |
+ RawArray* anonymous_classes() const { return raw_ptr()->anonymous_classes_; } |
+ |
// Library imports. |
void AddImport(const Namespace& ns) const; |
intptr_t num_imports() const { return raw_ptr()->num_imports_; } |