| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #library("dart:coreimpl"); | 5 #library("dart:coreimpl"); |
| 6 | 6 |
| 7 #source("../../corelib/src/implementation/dual_pivot_quicksort.dart"); | 7 #source("../../corelib/src/implementation/dual_pivot_quicksort.dart"); |
| 8 #source("../../corelib/src/implementation/duration_implementation.dart"); | 8 #source("../../corelib/src/implementation/duration_implementation.dart"); |
| 9 #source("../../corelib/src/implementation/exceptions.dart"); | 9 #source("../../corelib/src/implementation/exceptions.dart"); |
| 10 #source("../../corelib/src/implementation/future_implementation.dart"); | 10 #source("../../corelib/src/implementation/future_implementation.dart"); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 ListIterator(List<T> array) | 87 ListIterator(List<T> array) |
| 88 : _array = array, | 88 : _array = array, |
| 89 _pos = 0 { | 89 _pos = 0 { |
| 90 } | 90 } |
| 91 | 91 |
| 92 bool hasNext() { | 92 bool hasNext() { |
| 93 return _array.length > _pos; | 93 return _array.length > _pos; |
| 94 } | 94 } |
| 95 | 95 |
| 96 T next() { | 96 T next() { |
| 97 // TODO(jmesserly): this check is redundant in a for-in loop |
| 98 // Must we do it? |
| 97 if (!hasNext()) { | 99 if (!hasNext()) { |
| 98 throw const NoMoreElementsException(); | 100 throw const NoMoreElementsException(); |
| 99 } | 101 } |
| 100 return _array[_pos++]; | 102 return _array[_pos++]; |
| 101 } | 103 } |
| 102 | 104 |
| 103 final List<T> _array; | 105 final List<T> _array; |
| 104 int _pos; | 106 int _pos; |
| 105 } | 107 } |
| 106 | 108 |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 } else if (isNaN()) { | 412 } else if (isNaN()) { |
| 411 if (other.isNaN()) { | 413 if (other.isNaN()) { |
| 412 return 0; | 414 return 0; |
| 413 } | 415 } |
| 414 return 1; | 416 return 1; |
| 415 } else { | 417 } else { |
| 416 return -1; | 418 return -1; |
| 417 } | 419 } |
| 418 } | 420 } |
| 419 } | 421 } |
| OLD | NEW |