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

Side by Side Diff: test/dart_codegen/expect/collection/iterator.dart

Issue 1148283010: Remove dart backend (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 part of dart.collection;
2 class HasNextIterator<E> {static const int _HAS_NEXT_AND_NEXT_IN_CURRENT = 0;
3 static const int _NO_NEXT = 1;
4 static const int _NOT_MOVED_YET = 2;
5 Iterator _iterator;
6 int _state = _NOT_MOVED_YET;
7 HasNextIterator(this._iterator);
8 bool get hasNext {
9 if (_state == _NOT_MOVED_YET) _move();
10 return _state == _HAS_NEXT_AND_NEXT_IN_CURRENT;
11 }
12 E next() {
13 if (!hasNext) throw new StateError("No more elements");
14 assert (_state == _HAS_NEXT_AND_NEXT_IN_CURRENT); E result = DEVC$RT.cast(_it erator.current, dynamic, E, "CompositeCast", """line 33, column 16 of dart:colle ction/iterator.dart: """, _iterator.current is E, false);
15 _move();
16 return result;
17 }
18 void _move() {
19 if (_iterator.moveNext()) {
20 _state = _HAS_NEXT_AND_NEXT_IN_CURRENT;
21 }
22 else {
23 _state = _NO_NEXT;
24 }
25 }
26 }
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/collection/iterable.dart ('k') | test/dart_codegen/expect/collection/linked_hash_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698