| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 } | 347 } |
| 348 } | 348 } |
| 349 return false; | 349 return false; |
| 350 } | 350 } |
| 351 E get current => _iterator.current; | 351 E get current => _iterator.current; |
| 352 } | 352 } |
| 353 typedef Iterable<T> _ExpandFunction<S, T>(S sourceElement); | 353 typedef Iterable<T> _ExpandFunction<S, T>(S sourceElement); |
| 354 class ExpandIterable<S, T> extends IterableBase<T> {final Iterable<S> _iterable
; | 354 class ExpandIterable<S, T> extends IterableBase<T> {final Iterable<S> _iterable
; |
| 355 final _ExpandFunction _f; | 355 final _ExpandFunction _f; |
| 356 ExpandIterable(this._iterable, Iterable<T> this._f(S element)); | 356 ExpandIterable(this._iterable, Iterable<T> this._f(S element)); |
| 357 Iterator<T> get iterator => new ExpandIterator<S, T>(_iterable.iterator, DEVC$R
T.wrap((Iterable<dynamic> f(dynamic __u1)) { | 357 Iterator<T> get iterator => new ExpandIterator<S, T>(_iterable.iterator, DEVC$R
T.cast(_f, null, DEVC$RT.type((__t0<S, T> _) { |
| 358 Iterable<dynamic> c(dynamic x0) => ((__x0) => DEVC$RT.cast(__x0, DEVC$RT.type((I
terable<dynamic> _) { | |
| 359 } | 358 } |
| 360 ), DEVC$RT.type((Iterable<T> _) { | 359 ), "CompositeCast", """line 454, column 76 of dart:_internal/iterable.dart: """,
_f is __t0<S, T>, false)); |
| 361 } | |
| 362 ), "CastResult", """line 454, column 76 of dart:_internal/iterable.dart: """, __
x0 is Iterable<T>, false))(f(x0)); | |
| 363 return f == null ? null : c; | |
| 364 } | |
| 365 , _f, null, DEVC$RT.type((__t2<S, T> _) { | |
| 366 } | |
| 367 ), "Wrap", """line 454, column 76 of dart:_internal/iterable.dart: """, _f is __
t2<S, T>)); | |
| 368 } | 360 } |
| 369 class ExpandIterator<S, T> implements Iterator<T> {final Iterator<S> _iterator; | 361 class ExpandIterator<S, T> implements Iterator<T> {final Iterator<S> _iterator; |
| 370 final _ExpandFunction _f; | 362 final _ExpandFunction _f; |
| 371 Iterator<T> _currentExpansion = const EmptyIterator<T>(); | 363 Iterator<T> _currentExpansion = const EmptyIterator<T>(); |
| 372 T _current; | 364 T _current; |
| 373 ExpandIterator(this._iterator, Iterable<T> this._f(S element)); | 365 ExpandIterator(this._iterator, Iterable<T> this._f(S element)); |
| 374 void _nextExpansion() { | 366 void _nextExpansion() { |
| 375 } | 367 } |
| 376 T get current => _current; | 368 T get current => _current; |
| 377 bool moveNext() { | 369 bool moveNext() { |
| 378 if (_currentExpansion == null) return false; | 370 if (_currentExpansion == null) return false; |
| 379 while (!_currentExpansion.moveNext()) { | 371 while (!_currentExpansion.moveNext()) { |
| 380 _current = null; | 372 _current = null; |
| 381 if (_iterator.moveNext()) { | 373 if (_iterator.moveNext()) { |
| 382 _currentExpansion = null; | 374 _currentExpansion = null; |
| 383 _currentExpansion = ((__x6) => DEVC$RT.cast(__x6, DEVC$RT.type((Iterator<dynami
c> _) { | 375 _currentExpansion = ((__x4) => DEVC$RT.cast(__x4, DEVC$RT.type((Iterator<dynami
c> _) { |
| 384 } | 376 } |
| 385 ), DEVC$RT.type((Iterator<T> _) { | 377 ), DEVC$RT.type((Iterator<T> _) { |
| 386 } | 378 } |
| 387 ), "CompositeCast", """line 481, column 29 of dart:_internal/iterable.dart: """,
__x6 is Iterator<T>, false))(_f(_iterator.current).iterator); | 379 ), "CompositeCast", """line 481, column 29 of dart:_internal/iterable.dart: """,
__x4 is Iterator<T>, false))(_f(_iterator.current).iterator); |
| 388 } | 380 } |
| 389 else { | 381 else { |
| 390 return false; | 382 return false; |
| 391 } | 383 } |
| 392 } | 384 } |
| 393 _current = _currentExpansion.current; | 385 _current = _currentExpansion.current; |
| 394 return true; | 386 return true; |
| 395 } | 387 } |
| 396 } | 388 } |
| 397 class TakeIterable<E> extends IterableBase<E> {final Iterable<E> _iterable; | 389 class TakeIterable<E> extends IterableBase<E> {final Iterable<E> _iterable; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 } | 423 } |
| 432 E get current { | 424 E get current { |
| 433 if (_remaining < 0) return null; | 425 if (_remaining < 0) return null; |
| 434 return _iterator.current; | 426 return _iterator.current; |
| 435 } | 427 } |
| 436 } | 428 } |
| 437 class TakeWhileIterable<E> extends IterableBase<E> {final Iterable<E> _iterable
; | 429 class TakeWhileIterable<E> extends IterableBase<E> {final Iterable<E> _iterable
; |
| 438 final _ElementPredicate _f; | 430 final _ElementPredicate _f; |
| 439 TakeWhileIterable(this._iterable, bool this._f(E element)); | 431 TakeWhileIterable(this._iterable, bool this._f(E element)); |
| 440 Iterator<E> get iterator { | 432 Iterator<E> get iterator { |
| 441 return new TakeWhileIterator<E>(_iterable.iterator, DEVC$RT.wrap((bool f(dynamic
__u7)) { | 433 return new TakeWhileIterator<E>(_iterable.iterator, DEVC$RT.cast(_f, null, DEVC$
RT.type((__t5<E> _) { |
| 442 bool c(dynamic x0) => f(x0); | |
| 443 return f == null ? null : c; | |
| 444 } | 434 } |
| 445 , _f, null, DEVC$RT.type((__t8<E> _) { | 435 ), "CompositeCast", """line 555, column 57 of dart:_internal/iterable.dart: """,
_f is __t5<E>, false)); |
| 446 } | |
| 447 ), "Wrap", """line 555, column 57 of dart:_internal/iterable.dart: """, _f is __
t8<E>)); | |
| 448 } | 436 } |
| 449 } | 437 } |
| 450 class TakeWhileIterator<E> extends Iterator<E> {final Iterator<E> _iterator; | 438 class TakeWhileIterator<E> extends Iterator<E> {final Iterator<E> _iterator; |
| 451 final _ElementPredicate _f; | 439 final _ElementPredicate _f; |
| 452 bool _isFinished = false; | 440 bool _isFinished = false; |
| 453 TakeWhileIterator(this._iterator, bool this._f(E element)); | 441 TakeWhileIterator(this._iterator, bool this._f(E element)); |
| 454 bool moveNext() { | 442 bool moveNext() { |
| 455 if (_isFinished) return false; | 443 if (_isFinished) return false; |
| 456 if (!_iterator.moveNext() || !_f(_iterator.current)) { | 444 if (!_iterator.moveNext() || !_f(_iterator.current)) { |
| 457 _isFinished = true; | 445 _isFinished = true; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 for (int i = 0; i < _skipCount; i++) _iterator.moveNext(); | 492 for (int i = 0; i < _skipCount; i++) _iterator.moveNext(); |
| 505 _skipCount = 0; | 493 _skipCount = 0; |
| 506 return _iterator.moveNext(); | 494 return _iterator.moveNext(); |
| 507 } | 495 } |
| 508 E get current => _iterator.current; | 496 E get current => _iterator.current; |
| 509 } | 497 } |
| 510 class SkipWhileIterable<E> extends IterableBase<E> {final Iterable<E> _iterable
; | 498 class SkipWhileIterable<E> extends IterableBase<E> {final Iterable<E> _iterable
; |
| 511 final _ElementPredicate _f; | 499 final _ElementPredicate _f; |
| 512 SkipWhileIterable(this._iterable, bool this._f(E element)); | 500 SkipWhileIterable(this._iterable, bool this._f(E element)); |
| 513 Iterator<E> get iterator { | 501 Iterator<E> get iterator { |
| 514 return new SkipWhileIterator<E>(_iterable.iterator, DEVC$RT.wrap((bool f(dynamic
__u12)) { | 502 return new SkipWhileIterator<E>(_iterable.iterator, DEVC$RT.cast(_f, null, DEVC$
RT.type((__t9<E> _) { |
| 515 bool c(dynamic x0) => f(x0); | |
| 516 return f == null ? null : c; | |
| 517 } | 503 } |
| 518 , _f, null, DEVC$RT.type((__t13<E> _) { | 504 ), "CompositeCast", """line 648, column 57 of dart:_internal/iterable.dart: """,
_f is __t9<E>, false)); |
| 519 } | |
| 520 ), "Wrap", """line 648, column 57 of dart:_internal/iterable.dart: """, _f is __
t13<E>)); | |
| 521 } | 505 } |
| 522 } | 506 } |
| 523 class SkipWhileIterator<E> extends Iterator<E> {final Iterator<E> _iterator; | 507 class SkipWhileIterator<E> extends Iterator<E> {final Iterator<E> _iterator; |
| 524 final _ElementPredicate _f; | 508 final _ElementPredicate _f; |
| 525 bool _hasSkipped = false; | 509 bool _hasSkipped = false; |
| 526 SkipWhileIterator(this._iterator, bool this._f(E element)); | 510 SkipWhileIterator(this._iterator, bool this._f(E element)); |
| 527 bool moveNext() { | 511 bool moveNext() { |
| 528 if (!_hasSkipped) { | 512 if (!_hasSkipped) { |
| 529 _hasSkipped = true; | 513 _hasSkipped = true; |
| 530 while (_iterator.moveNext()) { | 514 while (_iterator.moveNext()) { |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 buffer.write(list[i]); | 745 buffer.write(list[i]); |
| 762 } | 746 } |
| 763 } | 747 } |
| 764 return buffer.toString(); | 748 return buffer.toString(); |
| 765 } | 749 } |
| 766 Iterable<T> where(Iterable iterable, bool f(var element)) { | 750 Iterable<T> where(Iterable iterable, bool f(var element)) { |
| 767 return new WhereIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dynami
c> _) { | 751 return new WhereIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dynami
c> _) { |
| 768 } | 752 } |
| 769 ), DEVC$RT.type((Iterable<T> _) { | 753 ), DEVC$RT.type((Iterable<T> _) { |
| 770 } | 754 } |
| 771 ), "CompositeCast", """line 961, column 33 of dart:_internal/iterable.dart: """,
iterable is Iterable<T>, false), DEVC$RT.wrap((bool f(dynamic __u15)) { | 755 ), "CompositeCast", """line 961, column 33 of dart:_internal/iterable.dart: """,
iterable is Iterable<T>, false), DEVC$RT.cast(f, null, DEVC$RT.type((__t11<T> _
) { |
| 772 bool c(dynamic x0) => f(x0); | |
| 773 return f == null ? null : c; | |
| 774 } | 756 } |
| 775 , f, null, DEVC$RT.type((__t16<T> _) { | 757 ), "CompositeCast", """line 961, column 43 of dart:_internal/iterable.dart: """,
f is __t11<T>, false)); |
| 776 } | |
| 777 ), "Wrap", """line 961, column 43 of dart:_internal/iterable.dart: """, f is __t
16<T>)); | |
| 778 } | 758 } |
| 779 static Iterable map(Iterable iterable, f(var element)) { | 759 static Iterable map(Iterable iterable, f(var element)) { |
| 780 return new MappedIterable(iterable, f); | 760 return new MappedIterable(iterable, f); |
| 781 } | 761 } |
| 782 static Iterable mapList(List list, f(var element)) { | 762 static Iterable mapList(List list, f(var element)) { |
| 783 return new MappedListIterable(list, f); | 763 return new MappedListIterable(list, f); |
| 784 } | 764 } |
| 785 static Iterable expand(Iterable iterable, Iterable f(var element)) { | 765 static Iterable expand(Iterable iterable, Iterable f(var element)) { |
| 786 return new ExpandIterable(iterable, f); | 766 return new ExpandIterable(iterable, f); |
| 787 } | 767 } |
| 788 Iterable<T> takeList(List list, int n) { | 768 Iterable<T> takeList(List list, int n) { |
| 789 return new SubListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic> _)
{ | 769 return new SubListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic> _)
{ |
| 790 } | 770 } |
| 791 ), DEVC$RT.type((Iterable<T> _) { | 771 ), DEVC$RT.type((Iterable<T> _) { |
| 792 } | 772 } |
| 793 ), "CompositeCast", """line 978, column 35 of dart:_internal/iterable.dart: """,
list is Iterable<T>, false), 0, n); | 773 ), "CompositeCast", """line 978, column 35 of dart:_internal/iterable.dart: """,
list is Iterable<T>, false), 0, n); |
| 794 } | 774 } |
| 795 Iterable<T> takeWhile(Iterable iterable, bool test(var value)) { | 775 Iterable<T> takeWhile(Iterable iterable, bool test(var value)) { |
| 796 return new TakeWhileIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dy
namic> _) { | 776 return new TakeWhileIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dy
namic> _) { |
| 797 } | 777 } |
| 798 ), DEVC$RT.type((Iterable<T> _) { | 778 ), DEVC$RT.type((Iterable<T> _) { |
| 799 } | 779 } |
| 800 ), "CompositeCast", """line 983, column 37 of dart:_internal/iterable.dart: """,
iterable is Iterable<T>, false), DEVC$RT.wrap((bool f(dynamic __u18)) { | 780 ), "CompositeCast", """line 983, column 37 of dart:_internal/iterable.dart: """,
iterable is Iterable<T>, false), DEVC$RT.cast(test, null, DEVC$RT.type((__t11<T
> _) { |
| 801 bool c(dynamic x0) => f(x0); | |
| 802 return f == null ? null : c; | |
| 803 } | 781 } |
| 804 , test, null, DEVC$RT.type((__t16<T> _) { | 782 ), "CompositeCast", """line 983, column 47 of dart:_internal/iterable.dart: """,
test is __t11<T>, false)); |
| 805 } | |
| 806 ), "Wrap", """line 983, column 47 of dart:_internal/iterable.dart: """, test is
__t16<T>)); | |
| 807 } | 783 } |
| 808 Iterable<T> skipList(List list, int n) { | 784 Iterable<T> skipList(List list, int n) { |
| 809 return new SubListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic> _)
{ | 785 return new SubListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic> _)
{ |
| 810 } | 786 } |
| 811 ), DEVC$RT.type((Iterable<T> _) { | 787 ), DEVC$RT.type((Iterable<T> _) { |
| 812 } | 788 } |
| 813 ), "CompositeCast", """line 988, column 35 of dart:_internal/iterable.dart: """,
list is Iterable<T>, false), n, null); | 789 ), "CompositeCast", """line 988, column 35 of dart:_internal/iterable.dart: """,
list is Iterable<T>, false), n, null); |
| 814 } | 790 } |
| 815 Iterable<T> skipWhile(Iterable iterable, bool test(var value)) { | 791 Iterable<T> skipWhile(Iterable iterable, bool test(var value)) { |
| 816 return new SkipWhileIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dy
namic> _) { | 792 return new SkipWhileIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dy
namic> _) { |
| 817 } | 793 } |
| 818 ), DEVC$RT.type((Iterable<T> _) { | 794 ), DEVC$RT.type((Iterable<T> _) { |
| 819 } | 795 } |
| 820 ), "CompositeCast", """line 993, column 37 of dart:_internal/iterable.dart: """,
iterable is Iterable<T>, false), DEVC$RT.wrap((bool f(dynamic __u19)) { | 796 ), "CompositeCast", """line 993, column 37 of dart:_internal/iterable.dart: """,
iterable is Iterable<T>, false), DEVC$RT.cast(test, null, DEVC$RT.type((__t11<T
> _) { |
| 821 bool c(dynamic x0) => f(x0); | |
| 822 return f == null ? null : c; | |
| 823 } | 797 } |
| 824 , test, null, DEVC$RT.type((__t16<T> _) { | 798 ), "CompositeCast", """line 993, column 47 of dart:_internal/iterable.dart: """,
test is __t11<T>, false)); |
| 825 } | |
| 826 ), "Wrap", """line 993, column 47 of dart:_internal/iterable.dart: """, test is
__t16<T>)); | |
| 827 } | 799 } |
| 828 Iterable<T> reversedList(List list) { | 800 Iterable<T> reversedList(List list) { |
| 829 return new ReversedListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic
> _) { | 801 return new ReversedListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic
> _) { |
| 830 } | 802 } |
| 831 ), DEVC$RT.type((Iterable<T> _) { | 803 ), DEVC$RT.type((Iterable<T> _) { |
| 832 } | 804 } |
| 833 ), "CompositeCast", """line 997, column 40 of dart:_internal/iterable.dart: """,
list is Iterable<T>, false)); | 805 ), "CompositeCast", """line 997, column 40 of dart:_internal/iterable.dart: """,
list is Iterable<T>, false)); |
| 834 } | 806 } |
| 835 static void sortList(List list, int compare(a, b)) { | 807 static void sortList(List list, int compare(a, b)) { |
| 836 if (compare == null) compare = Comparable.compare; | 808 if (compare == null) compare = Comparable.compare; |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 result.add(element); | 948 result.add(element); |
| 977 } | 949 } |
| 978 } | 950 } |
| 979 return result; | 951 return result; |
| 980 } | 952 } |
| 981 } | 953 } |
| 982 abstract class IterableElementError {static StateError noElement() => new State
Error("No element"); | 954 abstract class IterableElementError {static StateError noElement() => new State
Error("No element"); |
| 983 static StateError tooMany() => new StateError("Too many elements"); | 955 static StateError tooMany() => new StateError("Too many elements"); |
| 984 static StateError tooFew() => new StateError("Too few elements"); | 956 static StateError tooFew() => new StateError("Too few elements"); |
| 985 } | 957 } |
| 986 typedef Iterable<T> __t2<S, T>(S __u3); | 958 typedef Iterable<T> __t0<S, T>(S __u1); |
| 987 typedef Iterable<dynamic> __t4(dynamic __u5); | 959 typedef Iterable<dynamic> __t2(dynamic __u3); |
| 988 typedef bool __t8<E>(E __u9); | 960 typedef bool __t5<E>(E __u6); |
| 989 typedef bool __t10(dynamic __u11); | 961 typedef bool __t7(dynamic __u8); |
| 990 typedef bool __t13<E>(E __u14); | 962 typedef bool __t9<E>(E __u10); |
| 991 typedef bool __t16<T>(T __u17); | 963 typedef bool __t11<T>(T __u12); |
| OLD | NEW |