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

Unified Diff: sdk/lib/_internal/compiler/implementation/util/link_implementation.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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: sdk/lib/_internal/compiler/implementation/util/link_implementation.dart
diff --git a/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart b/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart
index 1a066b0b3c4bbfa3e7e7995db431b1a59a2102c0..491bd4438b81b8f91d52e302cd7deabe038baf1f 100644
--- a/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart
+++ b/sdk/lib/_internal/compiler/implementation/util/link_implementation.dart
@@ -5,13 +5,21 @@
part of util_implementation;
class LinkIterator<T> implements Iterator<T> {
- Link<T> current;
- LinkIterator(Link<T> this.current);
- bool get hasNext => !current.isEmpty;
- T next() {
- T result = current.head;
- current = current.tail;
- return result;
+ T _current;
+ Link<T> _link;
+
+ LinkIterator(Link<T> this._link);
+
+ T get current => _current;
+
+ bool moveNext() {
+ if (_link.isEmpty) {
+ _current = null;
+ return false;
+ }
+ _current = _link.head;
+ _link = _link.tail;
+ return true;
}
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/util/link.dart ('k') | sdk/lib/_internal/dartdoc/bin/dartdoc.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698