| OLD | NEW |
| 1 part of dart._internal; | 1 part of dart._internal; |
| 2 abstract class EfficientLength {int get length; | 2 abstract class EfficientLength {int get length; |
| 3 } | 3 } |
| 4 abstract class ListIterable<E> extends IterableBase<E> implements EfficientLeng
th {int get length; | 4 abstract class ListIterable<E> extends IterableBase<E> implements EfficientLeng
th {int get length; |
| 5 E elementAt(int i); | 5 E elementAt(int i); |
| 6 const ListIterable(); | 6 const ListIterable(); |
| 7 Iterator<E> get iterator => new ListIterator<E>(this); | 7 Iterator<E> get iterator => new ListIterator<E>(this); |
| 8 void forEach(void action(E element)) { | 8 void forEach(void action(E element)) { |
| 9 int length = this.length; | 9 int length = this.length; |
| 10 for (int i = 0; i < length; i++) { | 10 for (int i = 0; i < length; i++) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 if (test(element)) return element; | 81 if (test(element)) return element; |
| 82 if (length != this.length) { | 82 if (length != this.length) { |
| 83 throw new ConcurrentModificationError(this); | 83 throw new ConcurrentModificationError(this); |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 if (orElse != null) return orElse(); | 86 if (orElse != null) return orElse(); |
| 87 throw IterableElementError.noElement(); | 87 throw IterableElementError.noElement(); |
| 88 } | 88 } |
| 89 E singleWhere(bool test(E element)) { | 89 E singleWhere(bool test(E element)) { |
| 90 int length = this.length; | 90 int length = this.length; |
| 91 E match = ((__x0) => DDC$RT.cast(__x0, Null, E, "CastLiteral", """line 125, col
umn 15 of dart:_internal/iterable.dart: """, __x0 is E, false))(null); | 91 E match = null; |
| 92 bool matchFound = false; | 92 bool matchFound = false; |
| 93 for (int i = 0; i < length; i++) { | 93 for (int i = 0; i < length; i++) { |
| 94 E element = elementAt(i); | 94 E element = elementAt(i); |
| 95 if (test(element)) { | 95 if (test(element)) { |
| 96 if (matchFound) { | 96 if (matchFound) { |
| 97 throw IterableElementError.tooMany(); | 97 throw IterableElementError.tooMany(); |
| 98 } | 98 } |
| 99 matchFound = true; | 99 matchFound = true; |
| 100 match = element; | 100 match = element; |
| 101 } | 101 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 129 for (int i = 0; i < length; i++) { | 129 for (int i = 0; i < length; i++) { |
| 130 buffer.write(elementAt(i)); | 130 buffer.write(elementAt(i)); |
| 131 if (length != this.length) { | 131 if (length != this.length) { |
| 132 throw new ConcurrentModificationError(this); | 132 throw new ConcurrentModificationError(this); |
| 133 } | 133 } |
| 134 } | 134 } |
| 135 return buffer.toString(); | 135 return buffer.toString(); |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 Iterable<E> where(bool test(E element)) => super.where(test); | 138 Iterable<E> where(bool test(E element)) => super.where(test); |
| 139 Iterable map(f(E element)) => new MappedListIterable(this, DDC$RT.wrap((dynamic
f(E __u1)) { | 139 Iterable map(f(E element)) => new MappedListIterable(this, DDC$RT.wrap((dynamic
f(E __u0)) { |
| 140 dynamic c(E x0) => f(DDC$RT.cast(x0, dynamic, E, "CastParam", """line 175, colum
n 62 of dart:_internal/iterable.dart: """, x0 is E, false)); | 140 dynamic c(E x0) => f(DDC$RT.cast(x0, dynamic, E, "CastParam", """line 175, colum
n 62 of dart:_internal/iterable.dart: """, x0 is E, false)); |
| 141 return f == null ? null : c; | 141 return f == null ? null : c; |
| 142 } | 142 } |
| 143 , f, null, __t2, "Wrap", """line 175, column 62 of dart:_internal/iterable.dart:
""", f is __t2)); | 143 , f, null, __t1, "Wrap", """line 175, column 62 of dart:_internal/iterable.dart:
""", f is __t1)); |
| 144 E reduce(E combine(var value, E element)) { | 144 E reduce(E combine(var value, E element)) { |
| 145 int length = this.length; | 145 int length = this.length; |
| 146 if (length == 0) throw IterableElementError.noElement(); | 146 if (length == 0) throw IterableElementError.noElement(); |
| 147 E value = elementAt(0); | 147 E value = elementAt(0); |
| 148 for (int i = 1; i < length; i++) { | 148 for (int i = 1; i < length; i++) { |
| 149 value = combine(value, elementAt(i)); | 149 value = combine(value, elementAt(i)); |
| 150 if (length != this.length) { | 150 if (length != this.length) { |
| 151 throw new ConcurrentModificationError(this); | 151 throw new ConcurrentModificationError(this); |
| 152 } | 152 } |
| 153 } | 153 } |
| 154 return value; | 154 return value; |
| 155 } | 155 } |
| 156 fold(var initialValue, combine(var previousValue, E element)) { | 156 fold(var initialValue, combine(var previousValue, E element)) { |
| 157 var value = initialValue; | 157 var value = initialValue; |
| 158 int length = this.length; | 158 int length = this.length; |
| 159 for (int i = 0; i < length; i++) { | 159 for (int i = 0; i < length; i++) { |
| 160 value = combine(value, elementAt(i)); | 160 value = combine(value, elementAt(i)); |
| 161 if (length != this.length) { | 161 if (length != this.length) { |
| 162 throw new ConcurrentModificationError(this); | 162 throw new ConcurrentModificationError(this); |
| 163 } | 163 } |
| 164 } | 164 } |
| 165 return value; | 165 return value; |
| 166 } | 166 } |
| 167 Iterable<E> skip(int count) => new SubListIterable<E>(this, count, ((__x6) => D
DC$RT.cast(__x6, Null, int, "CastLiteral", """line 203, column 70 of dart:_inter
nal/iterable.dart: """, __x6 is int, true))(null)); | 167 Iterable<E> skip(int count) => new SubListIterable<E>(this, count, null); |
| 168 Iterable<E> skipWhile(bool test(E element)) => super.skipWhile(test); | 168 Iterable<E> skipWhile(bool test(E element)) => super.skipWhile(test); |
| 169 Iterable<E> take(int count) => new SubListIterable<E>(this, 0, count); | 169 Iterable<E> take(int count) => new SubListIterable<E>(this, 0, count); |
| 170 Iterable<E> takeWhile(bool test(E element)) => super.takeWhile(test); | 170 Iterable<E> takeWhile(bool test(E element)) => super.takeWhile(test); |
| 171 List<E> toList({ | 171 List<E> toList({ |
| 172 bool growable : true} | 172 bool growable : true} |
| 173 ) { | 173 ) { |
| 174 List<E> result; | 174 List<E> result; |
| 175 if (growable) { | 175 if (growable) { |
| 176 result = new List<E>()..length = length; | 176 result = new List<E>()..length = length; |
| 177 } | 177 } |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 int _index; | 272 int _index; |
| 273 E _current; | 273 E _current; |
| 274 ListIterator(Iterable<E> iterable) : _iterable = iterable, _length = iterable.l
ength, _index = 0; | 274 ListIterator(Iterable<E> iterable) : _iterable = iterable, _length = iterable.l
ength, _index = 0; |
| 275 E get current => _current; | 275 E get current => _current; |
| 276 bool moveNext() { | 276 bool moveNext() { |
| 277 int length = _iterable.length; | 277 int length = _iterable.length; |
| 278 if (_length != length) { | 278 if (_length != length) { |
| 279 throw new ConcurrentModificationError(_iterable); | 279 throw new ConcurrentModificationError(_iterable); |
| 280 } | 280 } |
| 281 if (_index >= length) { | 281 if (_index >= length) { |
| 282 _current = ((__x7) => DDC$RT.cast(__x7, Null, E, "CastLiteral", """line 338, col
umn 18 of dart:_internal/iterable.dart: """, __x7 is E, false))(null); | 282 _current = null; |
| 283 return false; | 283 return false; |
| 284 } | 284 } |
| 285 _current = _iterable.elementAt(_index); | 285 _current = _iterable.elementAt(_index); |
| 286 _index++; | 286 _index++; |
| 287 return true; | 287 return true; |
| 288 } | 288 } |
| 289 } | 289 } |
| 290 typedef T _Transformation<S, T>(S value); | 290 typedef T _Transformation<S, T>(S value); |
| 291 class MappedIterable<S, T> extends IterableBase<T> {final Iterable<S> _iterable
; | 291 class MappedIterable<S, T> extends IterableBase<T> {final Iterable<S> _iterable
; |
| 292 final _Transformation<S, T> _f; | 292 final _Transformation<S, T> _f; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 317 } | 317 } |
| 318 class MappedIterator<S, T> extends Iterator<T> {T _current; | 318 class MappedIterator<S, T> extends Iterator<T> {T _current; |
| 319 final Iterator<S> _iterator; | 319 final Iterator<S> _iterator; |
| 320 final _Transformation<S, T> _f; | 320 final _Transformation<S, T> _f; |
| 321 MappedIterator(this._iterator, T this._f(S element)); | 321 MappedIterator(this._iterator, T this._f(S element)); |
| 322 bool moveNext() { | 322 bool moveNext() { |
| 323 if (_iterator.moveNext()) { | 323 if (_iterator.moveNext()) { |
| 324 _current = _f(_iterator.current); | 324 _current = _f(_iterator.current); |
| 325 return true; | 325 return true; |
| 326 } | 326 } |
| 327 _current = ((__x8) => DDC$RT.cast(__x8, Null, T, "CastLiteral", """line 393, co
lumn 16 of dart:_internal/iterable.dart: """, __x8 is T, false))(null); | 327 _current = null; |
| 328 return false; | 328 return false; |
| 329 } | 329 } |
| 330 T get current => _current; | 330 T get current => _current; |
| 331 } | 331 } |
| 332 class MappedListIterable<S, T> extends ListIterable<T> implements EfficientLeng
th {final Iterable<S> _source; | 332 class MappedListIterable<S, T> extends ListIterable<T> implements EfficientLeng
th {final Iterable<S> _source; |
| 333 final _Transformation<S, T> _f; | 333 final _Transformation<S, T> _f; |
| 334 MappedListIterable(this._source, T this._f(S value)); | 334 MappedListIterable(this._source, T this._f(S value)); |
| 335 int get length => _source.length; | 335 int get length => _source.length; |
| 336 T elementAt(int index) => _f(_source.elementAt(index)); | 336 T elementAt(int index) => _f(_source.elementAt(index)); |
| 337 } | 337 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 351 } | 351 } |
| 352 } | 352 } |
| 353 return false; | 353 return false; |
| 354 } | 354 } |
| 355 E get current => _iterator.current; | 355 E get current => _iterator.current; |
| 356 } | 356 } |
| 357 typedef Iterable<T> _ExpandFunction<S, T>(S sourceElement); | 357 typedef Iterable<T> _ExpandFunction<S, T>(S sourceElement); |
| 358 class ExpandIterable<S, T> extends IterableBase<T> {final Iterable<S> _iterable
; | 358 class ExpandIterable<S, T> extends IterableBase<T> {final Iterable<S> _iterable
; |
| 359 final _ExpandFunction _f; | 359 final _ExpandFunction _f; |
| 360 ExpandIterable(this._iterable, Iterable<T> this._f(S element)); | 360 ExpandIterable(this._iterable, Iterable<T> this._f(S element)); |
| 361 Iterator<T> get iterator => new ExpandIterator<S, T>(_iterable.iterator, DDC$RT
.wrap((Iterable<dynamic> f(dynamic __u10)) { | 361 Iterator<T> get iterator => new ExpandIterator<S, T>(_iterable.iterator, DDC$RT
.wrap((Iterable<dynamic> f(dynamic __u6)) { |
| 362 Iterable<dynamic> c(dynamic x0) => ((__x9) => DDC$RT.cast(__x9, DDC$RT.type((Ite
rable<dynamic> _) { | 362 Iterable<dynamic> c(dynamic x0) => ((__x5) => DDC$RT.cast(__x5, DDC$RT.type((Ite
rable<dynamic> _) { |
| 363 } | 363 } |
| 364 ), DDC$RT.type((Iterable<T> _) { | 364 ), DDC$RT.type((Iterable<T> _) { |
| 365 } | 365 } |
| 366 ), "CastResult", """line 454, column 76 of dart:_internal/iterable.dart: """, __
x9 is Iterable<T>, false))(f(x0)); | 366 ), "CastResult", """line 454, column 76 of dart:_internal/iterable.dart: """, __
x5 is Iterable<T>, false))(f(x0)); |
| 367 return f == null ? null : c; | 367 return f == null ? null : c; |
| 368 } | 368 } |
| 369 , _f, null, DDC$RT.type((__t11<S, T> _) { | 369 , _f, null, DDC$RT.type((__t7<S, T> _) { |
| 370 } | 370 } |
| 371 ), "Wrap", """line 454, column 76 of dart:_internal/iterable.dart: """, _f is __
t11<S, T>)); | 371 ), "Wrap", """line 454, column 76 of dart:_internal/iterable.dart: """, _f is __
t7<S, T>)); |
| 372 } | 372 } |
| 373 class ExpandIterator<S, T> implements Iterator<T> {final Iterator<S> _iterator; | 373 class ExpandIterator<S, T> implements Iterator<T> {final Iterator<S> _iterator; |
| 374 final _ExpandFunction _f; | 374 final _ExpandFunction _f; |
| 375 Iterator<T> _currentExpansion = ((__x15) => DDC$RT.cast(__x15, null, DDC$RT.typ
e((Iterator<T> _) { | 375 Iterator<T> _currentExpansion = ((__x11) => DDC$RT.cast(__x11, null, DDC$RT.typ
e((Iterator<T> _) { |
| 376 } | 376 } |
| 377 ), "CastExact", """line 463, column 35 of dart:_internal/iterable.dart: """, __x
15 is Iterator<T>, false))(const EmptyIterator()); | 377 ), "CastExact", """line 463, column 35 of dart:_internal/iterable.dart: """, __x
11 is Iterator<T>, false))(const EmptyIterator()); |
| 378 T _current; | 378 T _current; |
| 379 ExpandIterator(this._iterator, Iterable<T> this._f(S element)); | 379 ExpandIterator(this._iterator, Iterable<T> this._f(S element)); |
| 380 void _nextExpansion() { | 380 void _nextExpansion() { |
| 381 } | 381 } |
| 382 T get current => _current; | 382 T get current => _current; |
| 383 bool moveNext() { | 383 bool moveNext() { |
| 384 if (_currentExpansion == null) return false; | 384 if (_currentExpansion == null) return false; |
| 385 while (!_currentExpansion.moveNext()) { | 385 while (!_currentExpansion.moveNext()) { |
| 386 _current = ((__x16) => DDC$RT.cast(__x16, Null, T, "CastLiteral", """line 476, c
olumn 18 of dart:_internal/iterable.dart: """, __x16 is T, false))(null); | 386 _current = null; |
| 387 if (_iterator.moveNext()) { | 387 if (_iterator.moveNext()) { |
| 388 _currentExpansion = null; | 388 _currentExpansion = null; |
| 389 _currentExpansion = ((__x17) => DDC$RT.cast(__x17, DDC$RT.type((Iterator<dynami
c> _) { | 389 _currentExpansion = ((__x12) => DDC$RT.cast(__x12, DDC$RT.type((Iterator<dynami
c> _) { |
| 390 } | 390 } |
| 391 ), DDC$RT.type((Iterator<T> _) { | 391 ), DDC$RT.type((Iterator<T> _) { |
| 392 } | 392 } |
| 393 ), "CastDynamic", """line 481, column 29 of dart:_internal/iterable.dart: """, _
_x17 is Iterator<T>, false))(_f(_iterator.current).iterator); | 393 ), "CastDynamic", """line 481, column 29 of dart:_internal/iterable.dart: """, _
_x12 is Iterator<T>, false))(_f(_iterator.current).iterator); |
| 394 } | 394 } |
| 395 else { | 395 else { |
| 396 return false; | 396 return false; |
| 397 } | 397 } |
| 398 } | 398 } |
| 399 _current = _currentExpansion.current; | 399 _current = _currentExpansion.current; |
| 400 return true; | 400 return true; |
| 401 } | 401 } |
| 402 } | 402 } |
| 403 class TakeIterable<E> extends IterableBase<E> {final Iterable<E> _iterable; | 403 class TakeIterable<E> extends IterableBase<E> {final Iterable<E> _iterable; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 429 assert (_remaining is int && _remaining >= 0);} | 429 assert (_remaining is int && _remaining >= 0);} |
| 430 bool moveNext() { | 430 bool moveNext() { |
| 431 _remaining--; | 431 _remaining--; |
| 432 if (_remaining >= 0) { | 432 if (_remaining >= 0) { |
| 433 return _iterator.moveNext(); | 433 return _iterator.moveNext(); |
| 434 } | 434 } |
| 435 _remaining = -1; | 435 _remaining = -1; |
| 436 return false; | 436 return false; |
| 437 } | 437 } |
| 438 E get current { | 438 E get current { |
| 439 if (_remaining < 0) return ((__x18) => DDC$RT.cast(__x18, Null, E, "CastLiteral"
, """line 543, column 32 of dart:_internal/iterable.dart: """, __x18 is E, false
))(null); | 439 if (_remaining < 0) return null; |
| 440 return _iterator.current; | 440 return _iterator.current; |
| 441 } | 441 } |
| 442 } | 442 } |
| 443 class TakeWhileIterable<E> extends IterableBase<E> {final Iterable<E> _iterable
; | 443 class TakeWhileIterable<E> extends IterableBase<E> {final Iterable<E> _iterable
; |
| 444 final _ElementPredicate _f; | 444 final _ElementPredicate _f; |
| 445 TakeWhileIterable(this._iterable, bool this._f(E element)); | 445 TakeWhileIterable(this._iterable, bool this._f(E element)); |
| 446 Iterator<E> get iterator { | 446 Iterator<E> get iterator { |
| 447 return new TakeWhileIterator<E>(_iterable.iterator, _f); | 447 return new TakeWhileIterator<E>(_iterable.iterator, _f); |
| 448 } | 448 } |
| 449 } | 449 } |
| 450 class TakeWhileIterator<E> extends Iterator<E> {final Iterator<E> _iterator; | 450 class TakeWhileIterator<E> extends Iterator<E> {final Iterator<E> _iterator; |
| 451 final _ElementPredicate _f; | 451 final _ElementPredicate _f; |
| 452 bool _isFinished = false; | 452 bool _isFinished = false; |
| 453 TakeWhileIterator(this._iterator, bool this._f(E element)); | 453 TakeWhileIterator(this._iterator, bool this._f(E element)); |
| 454 bool moveNext() { | 454 bool moveNext() { |
| 455 if (_isFinished) return false; | 455 if (_isFinished) return false; |
| 456 if (!_iterator.moveNext() || !_f(_iterator.current)) { | 456 if (!_iterator.moveNext() || !_f(_iterator.current)) { |
| 457 _isFinished = true; | 457 _isFinished = true; |
| 458 return false; | 458 return false; |
| 459 } | 459 } |
| 460 return true; | 460 return true; |
| 461 } | 461 } |
| 462 E get current { | 462 E get current { |
| 463 if (_isFinished) return ((__x19) => DDC$RT.cast(__x19, Null, E, "CastLiteral", "
""line 576, column 29 of dart:_internal/iterable.dart: """, __x19 is E, false))(
null); | 463 if (_isFinished) return null; |
| 464 return _iterator.current; | 464 return _iterator.current; |
| 465 } | 465 } |
| 466 } | 466 } |
| 467 class SkipIterable<E> extends IterableBase<E> {final Iterable<E> _iterable; | 467 class SkipIterable<E> extends IterableBase<E> {final Iterable<E> _iterable; |
| 468 final int _skipCount; | 468 final int _skipCount; |
| 469 factory SkipIterable(Iterable<E> iterable, int count) { | 469 factory SkipIterable(Iterable<E> iterable, int count) { |
| 470 if (iterable is EfficientLength) { | 470 if (iterable is EfficientLength) { |
| 471 return new EfficientLengthSkipIterable<E>(iterable, count); | 471 return new EfficientLengthSkipIterable<E>(iterable, count); |
| 472 } | 472 } |
| 473 return new SkipIterable<E>._(iterable, count); | 473 return new SkipIterable<E>._(iterable, count); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 _hasSkipped = true; | 523 _hasSkipped = true; |
| 524 while (_iterator.moveNext()) { | 524 while (_iterator.moveNext()) { |
| 525 if (!_f(_iterator.current)) return true; | 525 if (!_f(_iterator.current)) return true; |
| 526 } | 526 } |
| 527 } | 527 } |
| 528 return _iterator.moveNext(); | 528 return _iterator.moveNext(); |
| 529 } | 529 } |
| 530 E get current => _iterator.current; | 530 E get current => _iterator.current; |
| 531 } | 531 } |
| 532 class EmptyIterable<E> extends IterableBase<E> implements EfficientLength {cons
t EmptyIterable(); | 532 class EmptyIterable<E> extends IterableBase<E> implements EfficientLength {cons
t EmptyIterable(); |
| 533 Iterator<E> get iterator => ((__x20) => DDC$RT.cast(__x20, null, DDC$RT.type((I
terator<E> _) { | 533 Iterator<E> get iterator => ((__x13) => DDC$RT.cast(__x13, null, DDC$RT.type((I
terator<E> _) { |
| 534 } | 534 } |
| 535 ), "CastExact", """line 678, column 31 of dart:_internal/iterable.dart: """, __x
20 is Iterator<E>, false))(const EmptyIterator()); | 535 ), "CastExact", """line 678, column 31 of dart:_internal/iterable.dart: """, __x
13 is Iterator<E>, false))(const EmptyIterator()); |
| 536 void forEach(void action(E element)) { | 536 void forEach(void action(E element)) { |
| 537 } | 537 } |
| 538 bool get isEmpty => true; | 538 bool get isEmpty => true; |
| 539 int get length => 0; | 539 int get length => 0; |
| 540 E get first { | 540 E get first { |
| 541 throw IterableElementError.noElement(); | 541 throw IterableElementError.noElement(); |
| 542 } | 542 } |
| 543 E get last { | 543 E get last { |
| 544 throw IterableElementError.noElement(); | 544 throw IterableElementError.noElement(); |
| 545 } | 545 } |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 return this; | 589 return this; |
| 590 } | 590 } |
| 591 Iterable<E> takeWhile(bool test(E element)) => this; | 591 Iterable<E> takeWhile(bool test(E element)) => this; |
| 592 List toList({ | 592 List toList({ |
| 593 bool growable : true} | 593 bool growable : true} |
| 594 ) => growable ? <E> [] : new List<E>(0); | 594 ) => growable ? <E> [] : new List<E>(0); |
| 595 Set toSet() => new Set<E>(); | 595 Set toSet() => new Set<E>(); |
| 596 } | 596 } |
| 597 class EmptyIterator<E> implements Iterator<E> {const EmptyIterator(); | 597 class EmptyIterator<E> implements Iterator<E> {const EmptyIterator(); |
| 598 bool moveNext() => false; | 598 bool moveNext() => false; |
| 599 E get current => ((__x21) => DDC$RT.cast(__x21, Null, E, "CastLiteral", """line
752, column 20 of dart:_internal/iterable.dart: """, __x21 is E, false))(null); | 599 E get current => null; |
| 600 } | 600 } |
| 601 abstract class BidirectionalIterator<T> implements Iterator<T> {bool movePrevio
us(); | 601 abstract class BidirectionalIterator<T> implements Iterator<T> {bool movePrevio
us(); |
| 602 } | 602 } |
| 603 class IterableMixinWorkaround<T> {static bool contains(Iterable iterable, var e
lement) { | 603 class IterableMixinWorkaround<T> {static bool contains(Iterable iterable, var e
lement) { |
| 604 for (final e in iterable) { | 604 for (final e in iterable) { |
| 605 if (e == element) return true; | 605 if (e == element) return true; |
| 606 } | 606 } |
| 607 return false; | 607 return false; |
| 608 } | 608 } |
| 609 static void forEach(Iterable iterable, void f(o)) { | 609 static void forEach(Iterable iterable, void f(o)) { |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 } | 787 } |
| 788 ), DDC$RT.type((Iterable<T> _) { | 788 ), DDC$RT.type((Iterable<T> _) { |
| 789 } | 789 } |
| 790 ), "CastDynamic", """line 983, column 37 of dart:_internal/iterable.dart: """, i
terable is Iterable<T>, false), test); | 790 ), "CastDynamic", """line 983, column 37 of dart:_internal/iterable.dart: """, i
terable is Iterable<T>, false), test); |
| 791 } | 791 } |
| 792 Iterable<T> skipList(List list, int n) { | 792 Iterable<T> skipList(List list, int n) { |
| 793 return new SubListIterable<T>(DDC$RT.cast(list, DDC$RT.type((List<dynamic> _) { | 793 return new SubListIterable<T>(DDC$RT.cast(list, DDC$RT.type((List<dynamic> _) { |
| 794 } | 794 } |
| 795 ), DDC$RT.type((Iterable<T> _) { | 795 ), DDC$RT.type((Iterable<T> _) { |
| 796 } | 796 } |
| 797 ), "CastDynamic", """line 988, column 35 of dart:_internal/iterable.dart: """, l
ist is Iterable<T>, false), n, ((__x22) => DDC$RT.cast(__x22, Null, int, "CastLi
teral", """line 988, column 44 of dart:_internal/iterable.dart: """, __x22 is in
t, true))(null)); | 797 ), "CastDynamic", """line 988, column 35 of dart:_internal/iterable.dart: """, l
ist is Iterable<T>, false), n, null); |
| 798 } | 798 } |
| 799 Iterable<T> skipWhile(Iterable iterable, bool test(var value)) { | 799 Iterable<T> skipWhile(Iterable iterable, bool test(var value)) { |
| 800 return new SkipWhileIterable<T>(DDC$RT.cast(iterable, DDC$RT.type((Iterable<dyna
mic> _) { | 800 return new SkipWhileIterable<T>(DDC$RT.cast(iterable, DDC$RT.type((Iterable<dyna
mic> _) { |
| 801 } | 801 } |
| 802 ), DDC$RT.type((Iterable<T> _) { | 802 ), DDC$RT.type((Iterable<T> _) { |
| 803 } | 803 } |
| 804 ), "CastDynamic", """line 993, column 37 of dart:_internal/iterable.dart: """, i
terable is Iterable<T>, false), test); | 804 ), "CastDynamic", """line 993, column 37 of dart:_internal/iterable.dart: """, i
terable is Iterable<T>, false), test); |
| 805 } | 805 } |
| 806 Iterable<T> reversedList(List list) { | 806 Iterable<T> reversedList(List list) { |
| 807 return new ReversedListIterable<T>(DDC$RT.cast(list, DDC$RT.type((List<dynamic>
_) { | 807 return new ReversedListIterable<T>(DDC$RT.cast(list, DDC$RT.type((List<dynamic>
_) { |
| 808 } | 808 } |
| 809 ), DDC$RT.type((Iterable<T> _) { | 809 ), DDC$RT.type((Iterable<T> _) { |
| 810 } | 810 } |
| 811 ), "CastDynamic", """line 997, column 40 of dart:_internal/iterable.dart: """, l
ist is Iterable<T>, false)); | 811 ), "CastDynamic", """line 997, column 40 of dart:_internal/iterable.dart: """, l
ist is Iterable<T>, false)); |
| 812 } | 812 } |
| 813 static void sortList(List list, int compare(a, b)) { | 813 static void sortList(List list, int compare(a, b)) { |
| 814 if (compare == null) compare = DDC$RT.wrap((int f(Comparable<dynamic> __u23, Com
parable<dynamic> __u24)) { | 814 if (compare == null) compare = DDC$RT.wrap((int f(Comparable<dynamic> __u14, Com
parable<dynamic> __u15)) { |
| 815 int c(Comparable<dynamic> x0, Comparable<dynamic> x1) => f(DDC$RT.cast(x0, dynam
ic, DDC$RT.type((Comparable<dynamic> _) { | 815 int c(Comparable<dynamic> x0, Comparable<dynamic> x1) => f(DDC$RT.cast(x0, dynam
ic, DDC$RT.type((Comparable<dynamic> _) { |
| 816 } | 816 } |
| 817 ), "CastParam", """line 1001, column 36 of dart:_internal/iterable.dart: """, x0
is Comparable<dynamic>, true), DDC$RT.cast(x1, dynamic, DDC$RT.type((Comparable
<dynamic> _) { | 817 ), "CastParam", """line 1001, column 36 of dart:_internal/iterable.dart: """, x0
is Comparable<dynamic>, true), DDC$RT.cast(x1, dynamic, DDC$RT.type((Comparable
<dynamic> _) { |
| 818 } | 818 } |
| 819 ), "CastParam", """line 1001, column 36 of dart:_internal/iterable.dart: """, x1
is Comparable<dynamic>, true)); | 819 ), "CastParam", """line 1001, column 36 of dart:_internal/iterable.dart: """, x1
is Comparable<dynamic>, true)); |
| 820 return f == null ? null : c; | 820 return f == null ? null : c; |
| 821 } | 821 } |
| 822 , Comparable.compare, __t28, __t25, "Wrap", """line 1001, column 36 of dart:_int
ernal/iterable.dart: """, Comparable.compare is __t25); | 822 , Comparable.compare, __t19, __t16, "Wrap", """line 1001, column 36 of dart:_int
ernal/iterable.dart: """, Comparable.compare is __t16); |
| 823 Sort.sort(list, compare); | 823 Sort.sort(list, compare); |
| 824 } | 824 } |
| 825 static void shuffleList(List list, Random random) { | 825 static void shuffleList(List list, Random random) { |
| 826 if (random == null) random = new Random(); | 826 if (random == null) random = new Random(); |
| 827 int length = list.length; | 827 int length = list.length; |
| 828 while (length > 1) { | 828 while (length > 1) { |
| 829 int pos = random.nextInt(length); | 829 int pos = random.nextInt(length); |
| 830 length -= 1; | 830 length -= 1; |
| 831 var tmp = list[length]; | 831 var tmp = list[length]; |
| 832 list[length] = list[pos]; | 832 list[length] = list[pos]; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 result.add(element); | 962 result.add(element); |
| 963 } | 963 } |
| 964 } | 964 } |
| 965 return result; | 965 return result; |
| 966 } | 966 } |
| 967 } | 967 } |
| 968 abstract class IterableElementError {static StateError noElement() => new State
Error("No element"); | 968 abstract class IterableElementError {static StateError noElement() => new State
Error("No element"); |
| 969 static StateError tooMany() => new StateError("Too many elements"); | 969 static StateError tooMany() => new StateError("Too many elements"); |
| 970 static StateError tooFew() => new StateError("Too few elements"); | 970 static StateError tooFew() => new StateError("Too few elements"); |
| 971 } | 971 } |
| 972 typedef dynamic __t2(dynamic __u3); | 972 typedef dynamic __t1(dynamic __u2); |
| 973 typedef dynamic __t4<E>(E __u5); | 973 typedef dynamic __t3<E>(E __u4); |
| 974 typedef Iterable<T> __t11<S, T>(S __u12); | 974 typedef Iterable<T> __t7<S, T>(S __u8); |
| 975 typedef Iterable<dynamic> __t13(dynamic __u14); | 975 typedef Iterable<dynamic> __t9(dynamic __u10); |
| 976 typedef int __t25(dynamic __u26, dynamic __u27); | 976 typedef int __t16(dynamic __u17, dynamic __u18); |
| 977 typedef int __t28(Comparable<dynamic> __u29, Comparable<dynamic> __u30); | 977 typedef int __t19(Comparable<dynamic> __u20, Comparable<dynamic> __u21); |
| OLD | NEW |