| 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;
|
| }
|
| }
|
|
|
|
|