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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 __u0)) { | 139 Iterable map(f(E element)) => new MappedListIterable(this, DEVC$RT.wrap((dynami
c 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(DEVC$RT.cast(x0, dynamic, E, "CastParam", """line 175, colu
mn 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, __t1, "Wrap", """line 175, column 62 of dart:_internal/iterable.dart:
""", f is __t1)); | 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) { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 int start = _start; | 253 int start = _start; |
254 int end = _iterable.length; | 254 int end = _iterable.length; |
255 if (_endOrLength != null && _endOrLength < end) end = _endOrLength; | 255 if (_endOrLength != null && _endOrLength < end) end = _endOrLength; |
256 int length = end - start; | 256 int length = end - start; |
257 if (length < 0) length = 0; | 257 if (length < 0) length = 0; |
258 List result = growable ? (new List<E>()..length = length) : new List<E>(length)
; | 258 List result = growable ? (new List<E>()..length = length) : new List<E>(length)
; |
259 for (int i = 0; i < length; i++) { | 259 for (int i = 0; i < length; i++) { |
260 result[i] = _iterable.elementAt(start + i); | 260 result[i] = _iterable.elementAt(start + i); |
261 if (_iterable.length < end) throw new ConcurrentModificationError(this); | 261 if (_iterable.length < end) throw new ConcurrentModificationError(this); |
262 } | 262 } |
263 return DDC$RT.cast(result, DDC$RT.type((List<dynamic> _) { | 263 return DEVC$RT.cast(result, DEVC$RT.type((List<dynamic> _) { |
264 } | 264 } |
265 ), DDC$RT.type((List<E> _) { | 265 ), DEVC$RT.type((List<E> _) { |
266 } | 266 } |
267 ), "CastDynamic", """line 310, column 12 of dart:_internal/iterable.dart: """, r
esult is List<E>, false); | 267 ), "CastDynamic", """line 310, column 12 of dart:_internal/iterable.dart: """, r
esult is List<E>, false); |
268 } | 268 } |
269 } | 269 } |
270 class ListIterator<E> implements Iterator<E> {final Iterable<E> _iterable; | 270 class ListIterator<E> implements Iterator<E> {final Iterable<E> _iterable; |
271 final int _length; | 271 final int _length; |
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; |
(...skipping 11 matching lines...) Expand all Loading... |
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; |
293 factory MappedIterable(Iterable iterable, T function(S value)) { | 293 factory MappedIterable(Iterable iterable, T function(S value)) { |
294 if (iterable is EfficientLength) { | 294 if (iterable is EfficientLength) { |
295 return new EfficientLengthMappedIterable<S, T>(iterable, function); | 295 return new EfficientLengthMappedIterable<S, T>(iterable, function); |
296 } | 296 } |
297 return new MappedIterable<S, T>._(DDC$RT.cast(iterable, DDC$RT.type((Iterable<d
ynamic> _) { | 297 return new MappedIterable<S, T>._(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable
<dynamic> _) { |
298 } | 298 } |
299 ), DDC$RT.type((Iterable<S> _) { | 299 ), DEVC$RT.type((Iterable<S> _) { |
300 } | 300 } |
301 ), "CastDynamic", """line 357, column 39 of dart:_internal/iterable.dart: """, i
terable is Iterable<S>, false), function); | 301 ), "CastDynamic", """line 357, column 39 of dart:_internal/iterable.dart: """, i
terable is Iterable<S>, false), function); |
302 } | 302 } |
303 MappedIterable._(this._iterable, T this._f(S element)); | 303 MappedIterable._(this._iterable, T this._f(S element)); |
304 Iterator<T> get iterator => new MappedIterator<S, T>(_iterable.iterator, _f); | 304 Iterator<T> get iterator => new MappedIterator<S, T>(_iterable.iterator, _f); |
305 int get length => _iterable.length; | 305 int get length => _iterable.length; |
306 bool get isEmpty => _iterable.isEmpty; | 306 bool get isEmpty => _iterable.isEmpty; |
307 T get first => _f(_iterable.first); | 307 T get first => _f(_iterable.first); |
308 T get last => _f(_iterable.last); | 308 T get last => _f(_iterable.last); |
309 T get single => _f(_iterable.single); | 309 T get single => _f(_iterable.single); |
310 T elementAt(int index) => _f(_iterable.elementAt(index)); | 310 T elementAt(int index) => _f(_iterable.elementAt(index)); |
311 } | 311 } |
312 class EfficientLengthMappedIterable<S, T> extends MappedIterable<S, T> implemen
ts EfficientLength {EfficientLengthMappedIterable(Iterable iterable, T function(
S value)) : super._(DDC$RT.cast(iterable, DDC$RT.type((Iterable<dynamic> _) { | 312 class EfficientLengthMappedIterable<S, T> extends MappedIterable<S, T> implemen
ts EfficientLength {EfficientLengthMappedIterable(Iterable iterable, T function(
S value)) : super._(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dynamic> _) { |
313 } | 313 } |
314 ), DDC$RT.type((Iterable<S> _) { | 314 ), DEVC$RT.type((Iterable<S> _) { |
315 } | 315 } |
316 ), "CastDynamic", """line 378, column 17 of dart:_internal/iterable.dart: """, i
terable is Iterable<S>, false), function); | 316 ), "CastDynamic", """line 378, column 17 of dart:_internal/iterable.dart: """, i
terable is Iterable<S>, false), function); |
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); |
(...skipping 26 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 __u6)) { | 361 Iterator<T> get iterator => new ExpandIterator<S, T>(_iterable.iterator, DEVC$R
T.wrap((Iterable<dynamic> f(dynamic __u6)) { |
362 Iterable<dynamic> c(dynamic x0) => ((__x5) => DDC$RT.cast(__x5, DDC$RT.type((Ite
rable<dynamic> _) { | 362 Iterable<dynamic> c(dynamic x0) => ((__x5) => DEVC$RT.cast(__x5, DEVC$RT.type((I
terable<dynamic> _) { |
363 } | 363 } |
364 ), DDC$RT.type((Iterable<T> _) { | 364 ), DEVC$RT.type((Iterable<T> _) { |
365 } | 365 } |
366 ), "CastResult", """line 454, column 76 of dart:_internal/iterable.dart: """, __
x5 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((__t7<S, T> _) { | 369 , _f, null, DEVC$RT.type((__t7<S, T> _) { |
370 } | 370 } |
371 ), "Wrap", """line 454, column 76 of dart:_internal/iterable.dart: """, _f is __
t7<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 = ((__x11) => DDC$RT.cast(__x11, null, DDC$RT.typ
e((Iterator<T> _) { | 375 Iterator<T> _currentExpansion = ((__x11) => DEVC$RT.cast(__x11, null, DEVC$RT.t
ype((Iterator<T> _) { |
376 } | 376 } |
377 ), "CastExact", """line 463, column 35 of dart:_internal/iterable.dart: """, __x
11 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 = null; | 386 _current = null; |
387 if (_iterator.moveNext()) { | 387 if (_iterator.moveNext()) { |
388 _currentExpansion = null; | 388 _currentExpansion = null; |
389 _currentExpansion = ((__x12) => DDC$RT.cast(__x12, DDC$RT.type((Iterator<dynami
c> _) { | 389 _currentExpansion = ((__x12) => DEVC$RT.cast(__x12, DEVC$RT.type((Iterator<dyna
mic> _) { |
390 } | 390 } |
391 ), DDC$RT.type((Iterator<T> _) { | 391 ), DEVC$RT.type((Iterator<T> _) { |
392 } | 392 } |
393 ), "CastDynamic", """line 481, column 29 of dart:_internal/iterable.dart: """, _
_x12 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 } |
(...skipping 121 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 => ((__x13) => DDC$RT.cast(__x13, null, DDC$RT.type((I
terator<E> _) { | 533 Iterator<E> get iterator => ((__x13) => DEVC$RT.cast(__x13, null, DEVC$RT.type(
(Iterator<E> _) { |
534 } | 534 } |
535 ), "CastExact", """line 678, column 31 of dart:_internal/iterable.dart: """, __x
13 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 { |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 else { | 753 else { |
754 buffer.write(list[0]); | 754 buffer.write(list[0]); |
755 for (int i = 1; i < list.length; i++) { | 755 for (int i = 1; i < list.length; i++) { |
756 buffer.write(separator); | 756 buffer.write(separator); |
757 buffer.write(list[i]); | 757 buffer.write(list[i]); |
758 } | 758 } |
759 } | 759 } |
760 return buffer.toString(); | 760 return buffer.toString(); |
761 } | 761 } |
762 Iterable<T> where(Iterable iterable, bool f(var element)) { | 762 Iterable<T> where(Iterable iterable, bool f(var element)) { |
763 return new WhereIterable<T>(DDC$RT.cast(iterable, DDC$RT.type((Iterable<dynamic>
_) { | 763 return new WhereIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dynami
c> _) { |
764 } | 764 } |
765 ), DDC$RT.type((Iterable<T> _) { | 765 ), DEVC$RT.type((Iterable<T> _) { |
766 } | 766 } |
767 ), "CastDynamic", """line 961, column 33 of dart:_internal/iterable.dart: """, i
terable is Iterable<T>, false), f); | 767 ), "CastDynamic", """line 961, column 33 of dart:_internal/iterable.dart: """, i
terable is Iterable<T>, false), f); |
768 } | 768 } |
769 static Iterable map(Iterable iterable, f(var element)) { | 769 static Iterable map(Iterable iterable, f(var element)) { |
770 return new MappedIterable(iterable, f); | 770 return new MappedIterable(iterable, f); |
771 } | 771 } |
772 static Iterable mapList(List list, f(var element)) { | 772 static Iterable mapList(List list, f(var element)) { |
773 return new MappedListIterable(list, f); | 773 return new MappedListIterable(list, f); |
774 } | 774 } |
775 static Iterable expand(Iterable iterable, Iterable f(var element)) { | 775 static Iterable expand(Iterable iterable, Iterable f(var element)) { |
776 return new ExpandIterable(iterable, f); | 776 return new ExpandIterable(iterable, f); |
777 } | 777 } |
778 Iterable<T> takeList(List list, int n) { | 778 Iterable<T> takeList(List list, int n) { |
779 return new SubListIterable<T>(DDC$RT.cast(list, DDC$RT.type((List<dynamic> _) { | 779 return new SubListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic> _)
{ |
780 } | 780 } |
781 ), DDC$RT.type((Iterable<T> _) { | 781 ), DEVC$RT.type((Iterable<T> _) { |
782 } | 782 } |
783 ), "CastDynamic", """line 978, column 35 of dart:_internal/iterable.dart: """, l
ist is Iterable<T>, false), 0, n); | 783 ), "CastDynamic", """line 978, column 35 of dart:_internal/iterable.dart: """, l
ist is Iterable<T>, false), 0, n); |
784 } | 784 } |
785 Iterable<T> takeWhile(Iterable iterable, bool test(var value)) { | 785 Iterable<T> takeWhile(Iterable iterable, bool test(var value)) { |
786 return new TakeWhileIterable<T>(DDC$RT.cast(iterable, DDC$RT.type((Iterable<dyna
mic> _) { | 786 return new TakeWhileIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dy
namic> _) { |
787 } | 787 } |
788 ), DDC$RT.type((Iterable<T> _) { | 788 ), DEVC$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>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic> _)
{ |
794 } | 794 } |
795 ), DDC$RT.type((Iterable<T> _) { | 795 ), DEVC$RT.type((Iterable<T> _) { |
796 } | 796 } |
797 ), "CastDynamic", """line 988, column 35 of dart:_internal/iterable.dart: """, l
ist is Iterable<T>, false), n, 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>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dy
namic> _) { |
801 } | 801 } |
802 ), DDC$RT.type((Iterable<T> _) { | 802 ), DEVC$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>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic
> _) { |
808 } | 808 } |
809 ), DDC$RT.type((Iterable<T> _) { | 809 ), DEVC$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> __u14, Com
parable<dynamic> __u15)) { | 814 if (compare == null) compare = DEVC$RT.wrap((int f(Comparable<dynamic> __u14, Co
mparable<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(DEVC$RT.cast(x0, dyna
mic, DEVC$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), DEVC$RT.cast(x1, dynamic, DEVC$RT.type((Comparab
le<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, __t19, __t16, "Wrap", """line 1001, column 36 of dart:_int
ernal/iterable.dart: """, Comparable.compare is __t16); | 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; |
(...skipping 10 matching lines...) Expand all Loading... |
838 } | 838 } |
839 static int lastIndexOfList(List list, var element, int start) { | 839 static int lastIndexOfList(List list, var element, int start) { |
840 if (start == null) start = list.length - 1; | 840 if (start == null) start = list.length - 1; |
841 return Lists.lastIndexOf(list, element, start); | 841 return Lists.lastIndexOf(list, element, start); |
842 } | 842 } |
843 static void _rangeCheck(List list, int start, int end) { | 843 static void _rangeCheck(List list, int start, int end) { |
844 RangeError.checkValidRange(start, end, list.length); | 844 RangeError.checkValidRange(start, end, list.length); |
845 } | 845 } |
846 Iterable<T> getRangeList(List list, int start, int end) { | 846 Iterable<T> getRangeList(List list, int start, int end) { |
847 _rangeCheck(list, start, end); | 847 _rangeCheck(list, start, end); |
848 return new SubListIterable<T>(DDC$RT.cast(list, DDC$RT.type((List<dynamic> _) { | 848 return new SubListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic> _)
{ |
849 } | 849 } |
850 ), DDC$RT.type((Iterable<T> _) { | 850 ), DEVC$RT.type((Iterable<T> _) { |
851 } | 851 } |
852 ), "CastDynamic", """line 1033, column 35 of dart:_internal/iterable.dart: """,
list is Iterable<T>, false), start, end); | 852 ), "CastDynamic", """line 1033, column 35 of dart:_internal/iterable.dart: """,
list is Iterable<T>, false), start, end); |
853 } | 853 } |
854 static void setRangeList(List list, int start, int end, Iterable from, int skip
Count) { | 854 static void setRangeList(List list, int start, int end, Iterable from, int skip
Count) { |
855 _rangeCheck(list, start, end); | 855 _rangeCheck(list, start, end); |
856 int length = end - start; | 856 int length = end - start; |
857 if (length == 0) return; if (skipCount < 0) throw new ArgumentError(skipCount); | 857 if (length == 0) return; if (skipCount < 0) throw new ArgumentError(skipCount); |
858 List otherList; | 858 List otherList; |
859 int otherStart; | 859 int otherStart; |
860 if (from is List) { | 860 if (from is List) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 list[index++] = element; | 914 list[index++] = element; |
915 } | 915 } |
916 } | 916 } |
917 static void setAllList(List list, int index, Iterable iterable) { | 917 static void setAllList(List list, int index, Iterable iterable) { |
918 RangeError.checkValueInInterval(index, 0, list.length, "index"); | 918 RangeError.checkValueInInterval(index, 0, list.length, "index"); |
919 for (var element in iterable) { | 919 for (var element in iterable) { |
920 list[index++] = element; | 920 list[index++] = element; |
921 } | 921 } |
922 } | 922 } |
923 Map<int, T> asMapList(List l) { | 923 Map<int, T> asMapList(List l) { |
924 return new ListMapView<T>(DDC$RT.cast(l, DDC$RT.type((List<dynamic> _) { | 924 return new ListMapView<T>(DEVC$RT.cast(l, DEVC$RT.type((List<dynamic> _) { |
925 } | 925 } |
926 ), DDC$RT.type((List<T> _) { | 926 ), DEVC$RT.type((List<T> _) { |
927 } | 927 } |
928 ), "CastDynamic", """line 1115, column 31 of dart:_internal/iterable.dart: """,
l is List<T>, false)); | 928 ), "CastDynamic", """line 1115, column 31 of dart:_internal/iterable.dart: """,
l is List<T>, false)); |
929 } | 929 } |
930 static bool setContainsAll(Set set, Iterable other) { | 930 static bool setContainsAll(Set set, Iterable other) { |
931 for (var element in other) { | 931 for (var element in other) { |
932 if (!set.contains(element)) return false; | 932 if (!set.contains(element)) return false; |
933 } | 933 } |
934 return true; | 934 return true; |
935 } | 935 } |
936 static Set setIntersection(Set set, Set other, Set result) { | 936 static Set setIntersection(Set set, Set other, Set result) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 __t1(dynamic __u2); | 972 typedef dynamic __t1(dynamic __u2); |
973 typedef dynamic __t3<E>(E __u4); | 973 typedef dynamic __t3<E>(E __u4); |
974 typedef Iterable<T> __t7<S, T>(S __u8); | 974 typedef Iterable<T> __t7<S, T>(S __u8); |
975 typedef Iterable<dynamic> __t9(dynamic __u10); | 975 typedef Iterable<dynamic> __t9(dynamic __u10); |
976 typedef int __t16(dynamic __u17, dynamic __u18); | 976 typedef int __t16(dynamic __u17, dynamic __u18); |
977 typedef int __t19(Comparable<dynamic> __u20, Comparable<dynamic> __u21); | 977 typedef int __t19(Comparable<dynamic> __u20, Comparable<dynamic> __u21); |
OLD | NEW |