Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: runtime/vm/object.cc

Issue 10657048: Debugger support to display global variables (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 9118)
+++ runtime/vm/object.cc (working copy)
@@ -4692,6 +4692,32 @@
}
+LibraryPrefixIterator::LibraryPrefixIterator(const Library& library)
+ : DictionaryIterator(library) {
+ MoveToNext();
siva 2012/06/26 18:46:28 Your suggestion of 'Advance' in another context se
+}
+
+
+RawLibraryPrefix* LibraryPrefixIterator::GetNext() {
+ ASSERT(HasNext());
+ int ix = next_ix_++;
+ Object& obj = Object::Handle(array_.At(ix));
+ MoveToNext();
+ LibraryPrefix& prefix = LibraryPrefix::Handle();
+ prefix ^= obj.raw();
+ return prefix.raw();
+}
+
+
+void LibraryPrefixIterator::MoveToNext() {
+ Object& obj = Object::Handle(array_.At(next_ix_));
+ while (!obj.IsLibraryPrefix() && HasNext()) {
+ next_ix_++;
+ obj = array_.At(next_ix_);
+ }
+}
+
+
void Library::SetName(const String& name) const {
// Only set name once.
ASSERT(!Loaded());

Powered by Google App Engine
This is Rietveld 408576698