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

Side by Side Diff: test/dart_codegen/expect/_internal/iterable.dart

Issue 1010893004: Allow S->T <: dynamic->T (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase and address comments Created 5 years, 9 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
« no previous file with comments | « test/codegen/expect/sunflower/sunflower.txt ('k') | test/dart_codegen/expect/async/future.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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, DEVC$RT.wrap((dynami c f(E __u0)) { 139 Iterable map(f(E element)) => new MappedListIterable(this, f);
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;
142 }
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)) { 140 E reduce(E combine(var value, E element)) {
145 int length = this.length; 141 int length = this.length;
146 if (length == 0) throw IterableElementError.noElement(); 142 if (length == 0) throw IterableElementError.noElement();
147 E value = elementAt(0); 143 E value = elementAt(0);
148 for (int i = 1; i < length; i++) { 144 for (int i = 1; i < length; i++) {
149 value = combine(value, elementAt(i)); 145 value = combine(value, elementAt(i));
150 if (length != this.length) { 146 if (length != this.length) {
151 throw new ConcurrentModificationError(this); 147 throw new ConcurrentModificationError(this);
152 } 148 }
153 } 149 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 T get current => _current; 326 T get current => _current;
331 } 327 }
332 class MappedListIterable<S, T> extends ListIterable<T> implements EfficientLeng th {final Iterable<S> _source; 328 class MappedListIterable<S, T> extends ListIterable<T> implements EfficientLeng th {final Iterable<S> _source;
333 final _Transformation<S, T> _f; 329 final _Transformation<S, T> _f;
334 MappedListIterable(this._source, T this._f(S value)); 330 MappedListIterable(this._source, T this._f(S value));
335 int get length => _source.length; 331 int get length => _source.length;
336 T elementAt(int index) => _f(_source.elementAt(index)); 332 T elementAt(int index) => _f(_source.elementAt(index));
337 } 333 }
338 typedef bool _ElementPredicate<E>(E element); 334 typedef bool _ElementPredicate<E>(E element);
339 class WhereIterable<E> extends IterableBase<E> {final Iterable<E> _iterable; 335 class WhereIterable<E> extends IterableBase<E> {final Iterable<E> _iterable;
340 final _ElementPredicate _f; 336 final _ElementPredicate<E> _f;
341 WhereIterable(this._iterable, bool this._f(E element)); 337 WhereIterable(this._iterable, bool this._f(E element));
342 Iterator<E> get iterator => new WhereIterator<E>(_iterable.iterator, _f); 338 Iterator<E> get iterator => new WhereIterator<E>(_iterable.iterator, _f);
343 } 339 }
344 class WhereIterator<E> extends Iterator<E> {final Iterator<E> _iterator; 340 class WhereIterator<E> extends Iterator<E> {final Iterator<E> _iterator;
345 final _ElementPredicate _f; 341 final _ElementPredicate<E> _f;
346 WhereIterator(this._iterator, bool this._f(E element)); 342 WhereIterator(this._iterator, bool this._f(E element));
347 bool moveNext() { 343 bool moveNext() {
348 while (_iterator.moveNext()) { 344 while (_iterator.moveNext()) {
349 if (_f(_iterator.current)) { 345 if (_f(_iterator.current)) {
350 return true; 346 return true;
351 } 347 }
352 } 348 }
353 return false; 349 return false;
354 } 350 }
355 E get current => _iterator.current; 351 E get current => _iterator.current;
356 } 352 }
357 typedef Iterable<T> _ExpandFunction<S, T>(S sourceElement); 353 typedef Iterable<T> _ExpandFunction<S, T>(S sourceElement);
358 class ExpandIterable<S, T> extends IterableBase<T> {final Iterable<S> _iterable ; 354 class ExpandIterable<S, T> extends IterableBase<T> {final Iterable<S> _iterable ;
359 final _ExpandFunction _f; 355 final _ExpandFunction _f;
360 ExpandIterable(this._iterable, Iterable<T> this._f(S element)); 356 ExpandIterable(this._iterable, Iterable<T> this._f(S element));
361 Iterator<T> get iterator => new ExpandIterator<S, T>(_iterable.iterator, DEVC$R T.wrap((Iterable<dynamic> f(dynamic __u6)) { 357 Iterator<T> get iterator => new ExpandIterator<S, T>(_iterable.iterator, DEVC$R T.wrap((Iterable<dynamic> f(dynamic __u1)) {
362 Iterable<dynamic> c(dynamic x0) => ((__x5) => DEVC$RT.cast(__x5, DEVC$RT.type((I terable<dynamic> _) { 358 Iterable<dynamic> c(dynamic x0) => ((__x0) => DEVC$RT.cast(__x0, DEVC$RT.type((I terable<dynamic> _) {
363 } 359 }
364 ), DEVC$RT.type((Iterable<T> _) { 360 ), DEVC$RT.type((Iterable<T> _) {
365 } 361 }
366 ), "CastResult", """line 454, column 76 of dart:_internal/iterable.dart: """, __ x5 is Iterable<T>, false))(f(x0)); 362 ), "CastResult", """line 454, column 76 of dart:_internal/iterable.dart: """, __ x0 is Iterable<T>, false))(f(x0));
367 return f == null ? null : c; 363 return f == null ? null : c;
368 } 364 }
369 , _f, null, DEVC$RT.type((__t7<S, T> _) { 365 , _f, null, DEVC$RT.type((__t2<S, T> _) {
370 } 366 }
371 ), "Wrap", """line 454, column 76 of dart:_internal/iterable.dart: """, _f is __ t7<S, T>)); 367 ), "Wrap", """line 454, column 76 of dart:_internal/iterable.dart: """, _f is __ t2<S, T>));
372 } 368 }
373 class ExpandIterator<S, T> implements Iterator<T> {final Iterator<S> _iterator; 369 class ExpandIterator<S, T> implements Iterator<T> {final Iterator<S> _iterator;
374 final _ExpandFunction _f; 370 final _ExpandFunction _f;
375 Iterator<T> _currentExpansion = ((__x11) => DEVC$RT.cast(__x11, null, DEVC$RT.t ype((Iterator<T> _) { 371 Iterator<T> _currentExpansion = ((__x6) => DEVC$RT.cast(__x6, null, DEVC$RT.typ e((Iterator<T> _) {
376 } 372 }
377 ), "CastExact", """line 463, column 35 of dart:_internal/iterable.dart: """, __x 11 is Iterator<T>, false))(const EmptyIterator()); 373 ), "CastExact", """line 463, column 35 of dart:_internal/iterable.dart: """, __x 6 is Iterator<T>, false))(const EmptyIterator());
378 T _current; 374 T _current;
379 ExpandIterator(this._iterator, Iterable<T> this._f(S element)); 375 ExpandIterator(this._iterator, Iterable<T> this._f(S element));
380 void _nextExpansion() { 376 void _nextExpansion() {
381 } 377 }
382 T get current => _current; 378 T get current => _current;
383 bool moveNext() { 379 bool moveNext() {
384 if (_currentExpansion == null) return false; 380 if (_currentExpansion == null) return false;
385 while (!_currentExpansion.moveNext()) { 381 while (!_currentExpansion.moveNext()) {
386 _current = null; 382 _current = null;
387 if (_iterator.moveNext()) { 383 if (_iterator.moveNext()) {
388 _currentExpansion = null; 384 _currentExpansion = null;
389 _currentExpansion = ((__x12) => DEVC$RT.cast(__x12, DEVC$RT.type((Iterator<dyna mic> _) { 385 _currentExpansion = ((__x7) => DEVC$RT.cast(__x7, DEVC$RT.type((Iterator<dynami c> _) {
390 } 386 }
391 ), DEVC$RT.type((Iterator<T> _) { 387 ), DEVC$RT.type((Iterator<T> _) {
392 } 388 }
393 ), "CastDynamic", """line 481, column 29 of dart:_internal/iterable.dart: """, _ _x12 is Iterator<T>, false))(_f(_iterator.current).iterator); 389 ), "CastDynamic", """line 481, column 29 of dart:_internal/iterable.dart: """, _ _x7 is Iterator<T>, false))(_f(_iterator.current).iterator);
394 } 390 }
395 else { 391 else {
396 return false; 392 return false;
397 } 393 }
398 } 394 }
399 _current = _currentExpansion.current; 395 _current = _currentExpansion.current;
400 return true; 396 return true;
401 } 397 }
402 } 398 }
403 class TakeIterable<E> extends IterableBase<E> {final Iterable<E> _iterable; 399 class TakeIterable<E> extends IterableBase<E> {final Iterable<E> _iterable;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 } 433 }
438 E get current { 434 E get current {
439 if (_remaining < 0) return null; 435 if (_remaining < 0) return null;
440 return _iterator.current; 436 return _iterator.current;
441 } 437 }
442 } 438 }
443 class TakeWhileIterable<E> extends IterableBase<E> {final Iterable<E> _iterable ; 439 class TakeWhileIterable<E> extends IterableBase<E> {final Iterable<E> _iterable ;
444 final _ElementPredicate _f; 440 final _ElementPredicate _f;
445 TakeWhileIterable(this._iterable, bool this._f(E element)); 441 TakeWhileIterable(this._iterable, bool this._f(E element));
446 Iterator<E> get iterator { 442 Iterator<E> get iterator {
447 return new TakeWhileIterator<E>(_iterable.iterator, _f); 443 return new TakeWhileIterator<E>(_iterable.iterator, DEVC$RT.wrap((bool f(dynamic __u8)) {
444 bool c(dynamic x0) => f(x0);
445 return f == null ? null : c;
446 }
447 , _f, null, DEVC$RT.type((__t9<E> _) {
448 }
449 ), "Wrap", """line 555, column 57 of dart:_internal/iterable.dart: """, _f is __ t9<E>));
448 } 450 }
449 } 451 }
450 class TakeWhileIterator<E> extends Iterator<E> {final Iterator<E> _iterator; 452 class TakeWhileIterator<E> extends Iterator<E> {final Iterator<E> _iterator;
451 final _ElementPredicate _f; 453 final _ElementPredicate _f;
452 bool _isFinished = false; 454 bool _isFinished = false;
453 TakeWhileIterator(this._iterator, bool this._f(E element)); 455 TakeWhileIterator(this._iterator, bool this._f(E element));
454 bool moveNext() { 456 bool moveNext() {
455 if (_isFinished) return false; 457 if (_isFinished) return false;
456 if (!_iterator.moveNext() || !_f(_iterator.current)) { 458 if (!_iterator.moveNext() || !_f(_iterator.current)) {
457 _isFinished = true; 459 _isFinished = true;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 for (int i = 0; i < _skipCount; i++) _iterator.moveNext(); 506 for (int i = 0; i < _skipCount; i++) _iterator.moveNext();
505 _skipCount = 0; 507 _skipCount = 0;
506 return _iterator.moveNext(); 508 return _iterator.moveNext();
507 } 509 }
508 E get current => _iterator.current; 510 E get current => _iterator.current;
509 } 511 }
510 class SkipWhileIterable<E> extends IterableBase<E> {final Iterable<E> _iterable ; 512 class SkipWhileIterable<E> extends IterableBase<E> {final Iterable<E> _iterable ;
511 final _ElementPredicate _f; 513 final _ElementPredicate _f;
512 SkipWhileIterable(this._iterable, bool this._f(E element)); 514 SkipWhileIterable(this._iterable, bool this._f(E element));
513 Iterator<E> get iterator { 515 Iterator<E> get iterator {
514 return new SkipWhileIterator<E>(_iterable.iterator, _f); 516 return new SkipWhileIterator<E>(_iterable.iterator, DEVC$RT.wrap((bool f(dynamic __u13)) {
517 bool c(dynamic x0) => f(x0);
518 return f == null ? null : c;
519 }
520 , _f, null, DEVC$RT.type((__t14<E> _) {
521 }
522 ), "Wrap", """line 648, column 57 of dart:_internal/iterable.dart: """, _f is __ t14<E>));
515 } 523 }
516 } 524 }
517 class SkipWhileIterator<E> extends Iterator<E> {final Iterator<E> _iterator; 525 class SkipWhileIterator<E> extends Iterator<E> {final Iterator<E> _iterator;
518 final _ElementPredicate _f; 526 final _ElementPredicate _f;
519 bool _hasSkipped = false; 527 bool _hasSkipped = false;
520 SkipWhileIterator(this._iterator, bool this._f(E element)); 528 SkipWhileIterator(this._iterator, bool this._f(E element));
521 bool moveNext() { 529 bool moveNext() {
522 if (!_hasSkipped) { 530 if (!_hasSkipped) {
523 _hasSkipped = true; 531 _hasSkipped = true;
524 while (_iterator.moveNext()) { 532 while (_iterator.moveNext()) {
525 if (!_f(_iterator.current)) return true; 533 if (!_f(_iterator.current)) return true;
526 } 534 }
527 } 535 }
528 return _iterator.moveNext(); 536 return _iterator.moveNext();
529 } 537 }
530 E get current => _iterator.current; 538 E get current => _iterator.current;
531 } 539 }
532 class EmptyIterable<E> extends IterableBase<E> implements EfficientLength {cons t EmptyIterable(); 540 class EmptyIterable<E> extends IterableBase<E> implements EfficientLength {cons t EmptyIterable();
533 Iterator<E> get iterator => ((__x13) => DEVC$RT.cast(__x13, null, DEVC$RT.type( (Iterator<E> _) { 541 Iterator<E> get iterator => ((__x16) => DEVC$RT.cast(__x16, null, DEVC$RT.type( (Iterator<E> _) {
534 } 542 }
535 ), "CastExact", """line 678, column 31 of dart:_internal/iterable.dart: """, __x 13 is Iterator<E>, false))(const EmptyIterator()); 543 ), "CastExact", """line 678, column 31 of dart:_internal/iterable.dart: """, __x 16 is Iterator<E>, false))(const EmptyIterator());
536 void forEach(void action(E element)) { 544 void forEach(void action(E element)) {
537 } 545 }
538 bool get isEmpty => true; 546 bool get isEmpty => true;
539 int get length => 0; 547 int get length => 0;
540 E get first { 548 E get first {
541 throw IterableElementError.noElement(); 549 throw IterableElementError.noElement();
542 } 550 }
543 E get last { 551 E get last {
544 throw IterableElementError.noElement(); 552 throw IterableElementError.noElement();
545 } 553 }
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 buffer.write(list[i]); 765 buffer.write(list[i]);
758 } 766 }
759 } 767 }
760 return buffer.toString(); 768 return buffer.toString();
761 } 769 }
762 Iterable<T> where(Iterable iterable, bool f(var element)) { 770 Iterable<T> where(Iterable iterable, bool f(var element)) {
763 return new WhereIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dynami c> _) { 771 return new WhereIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dynami c> _) {
764 } 772 }
765 ), DEVC$RT.type((Iterable<T> _) { 773 ), DEVC$RT.type((Iterable<T> _) {
766 } 774 }
767 ), "CastDynamic", """line 961, column 33 of dart:_internal/iterable.dart: """, i terable is Iterable<T>, false), f); 775 ), "CastDynamic", """line 961, column 33 of dart:_internal/iterable.dart: """, i terable is Iterable<T>, false), DEVC$RT.wrap((bool f(dynamic __u17)) {
776 bool c(dynamic x0) => f(x0);
777 return f == null ? null : c;
778 }
779 , f, null, DEVC$RT.type((__t18<T> _) {
780 }
781 ), "Wrap", """line 961, column 43 of dart:_internal/iterable.dart: """, f is __t 18<T>));
768 } 782 }
769 static Iterable map(Iterable iterable, f(var element)) { 783 static Iterable map(Iterable iterable, f(var element)) {
770 return new MappedIterable(iterable, f); 784 return new MappedIterable(iterable, f);
771 } 785 }
772 static Iterable mapList(List list, f(var element)) { 786 static Iterable mapList(List list, f(var element)) {
773 return new MappedListIterable(list, f); 787 return new MappedListIterable(list, f);
774 } 788 }
775 static Iterable expand(Iterable iterable, Iterable f(var element)) { 789 static Iterable expand(Iterable iterable, Iterable f(var element)) {
776 return new ExpandIterable(iterable, f); 790 return new ExpandIterable(iterable, f);
777 } 791 }
778 Iterable<T> takeList(List list, int n) { 792 Iterable<T> takeList(List list, int n) {
779 return new SubListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic> _) { 793 return new SubListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic> _) {
780 } 794 }
781 ), DEVC$RT.type((Iterable<T> _) { 795 ), DEVC$RT.type((Iterable<T> _) {
782 } 796 }
783 ), "CastDynamic", """line 978, column 35 of dart:_internal/iterable.dart: """, l ist is Iterable<T>, false), 0, n); 797 ), "CastDynamic", """line 978, column 35 of dart:_internal/iterable.dart: """, l ist is Iterable<T>, false), 0, n);
784 } 798 }
785 Iterable<T> takeWhile(Iterable iterable, bool test(var value)) { 799 Iterable<T> takeWhile(Iterable iterable, bool test(var value)) {
786 return new TakeWhileIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dy namic> _) { 800 return new TakeWhileIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dy namic> _) {
787 } 801 }
788 ), DEVC$RT.type((Iterable<T> _) { 802 ), DEVC$RT.type((Iterable<T> _) {
789 } 803 }
790 ), "CastDynamic", """line 983, column 37 of dart:_internal/iterable.dart: """, i terable is Iterable<T>, false), test); 804 ), "CastDynamic", """line 983, column 37 of dart:_internal/iterable.dart: """, i terable is Iterable<T>, false), DEVC$RT.wrap((bool f(dynamic __u20)) {
805 bool c(dynamic x0) => f(x0);
806 return f == null ? null : c;
807 }
808 , test, null, DEVC$RT.type((__t18<T> _) {
809 }
810 ), "Wrap", """line 983, column 47 of dart:_internal/iterable.dart: """, test is __t18<T>));
791 } 811 }
792 Iterable<T> skipList(List list, int n) { 812 Iterable<T> skipList(List list, int n) {
793 return new SubListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic> _) { 813 return new SubListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic> _) {
794 } 814 }
795 ), DEVC$RT.type((Iterable<T> _) { 815 ), DEVC$RT.type((Iterable<T> _) {
796 } 816 }
797 ), "CastDynamic", """line 988, column 35 of dart:_internal/iterable.dart: """, l ist is Iterable<T>, false), n, null); 817 ), "CastDynamic", """line 988, column 35 of dart:_internal/iterable.dart: """, l ist is Iterable<T>, false), n, null);
798 } 818 }
799 Iterable<T> skipWhile(Iterable iterable, bool test(var value)) { 819 Iterable<T> skipWhile(Iterable iterable, bool test(var value)) {
800 return new SkipWhileIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dy namic> _) { 820 return new SkipWhileIterable<T>(DEVC$RT.cast(iterable, DEVC$RT.type((Iterable<dy namic> _) {
801 } 821 }
802 ), DEVC$RT.type((Iterable<T> _) { 822 ), DEVC$RT.type((Iterable<T> _) {
803 } 823 }
804 ), "CastDynamic", """line 993, column 37 of dart:_internal/iterable.dart: """, i terable is Iterable<T>, false), test); 824 ), "CastDynamic", """line 993, column 37 of dart:_internal/iterable.dart: """, i terable is Iterable<T>, false), DEVC$RT.wrap((bool f(dynamic __u21)) {
825 bool c(dynamic x0) => f(x0);
826 return f == null ? null : c;
827 }
828 , test, null, DEVC$RT.type((__t18<T> _) {
829 }
830 ), "Wrap", """line 993, column 47 of dart:_internal/iterable.dart: """, test is __t18<T>));
805 } 831 }
806 Iterable<T> reversedList(List list) { 832 Iterable<T> reversedList(List list) {
807 return new ReversedListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic > _) { 833 return new ReversedListIterable<T>(DEVC$RT.cast(list, DEVC$RT.type((List<dynamic > _) {
808 } 834 }
809 ), DEVC$RT.type((Iterable<T> _) { 835 ), DEVC$RT.type((Iterable<T> _) {
810 } 836 }
811 ), "CastDynamic", """line 997, column 40 of dart:_internal/iterable.dart: """, l ist is Iterable<T>, false)); 837 ), "CastDynamic", """line 997, column 40 of dart:_internal/iterable.dart: """, l ist is Iterable<T>, false));
812 } 838 }
813 static void sortList(List list, int compare(a, b)) { 839 static void sortList(List list, int compare(a, b)) {
814 if (compare == null) compare = DEVC$RT.wrap((int f(Comparable<dynamic> __u14, Co mparable<dynamic> __u15)) { 840 if (compare == null) compare = Comparable.compare;
815 int c(Comparable<dynamic> x0, Comparable<dynamic> x1) => f(DEVC$RT.cast(x0, dyna mic, DEVC$RT.type((Comparable<dynamic> _) {
816 }
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 }
819 ), "CastParam", """line 1001, column 36 of dart:_internal/iterable.dart: """, x1 is Comparable<dynamic>, true));
820 return f == null ? null : c;
821 }
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); 841 Sort.sort(list, compare);
824 } 842 }
825 static void shuffleList(List list, Random random) { 843 static void shuffleList(List list, Random random) {
826 if (random == null) random = new Random(); 844 if (random == null) random = new Random();
827 int length = list.length; 845 int length = list.length;
828 while (length > 1) { 846 while (length > 1) {
829 int pos = random.nextInt(length); 847 int pos = random.nextInt(length);
830 length -= 1; 848 length -= 1;
831 var tmp = list[length]; 849 var tmp = list[length];
832 list[length] = list[pos]; 850 list[length] = list[pos];
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 result.add(element); 980 result.add(element);
963 } 981 }
964 } 982 }
965 return result; 983 return result;
966 } 984 }
967 } 985 }
968 abstract class IterableElementError {static StateError noElement() => new State Error("No element"); 986 abstract class IterableElementError {static StateError noElement() => new State Error("No element");
969 static StateError tooMany() => new StateError("Too many elements"); 987 static StateError tooMany() => new StateError("Too many elements");
970 static StateError tooFew() => new StateError("Too few elements"); 988 static StateError tooFew() => new StateError("Too few elements");
971 } 989 }
972 typedef dynamic __t1(dynamic __u2); 990 typedef Iterable<T> __t2<S, T>(S __u3);
973 typedef dynamic __t3<E>(E __u4); 991 typedef Iterable<dynamic> __t4(dynamic __u5);
974 typedef Iterable<T> __t7<S, T>(S __u8); 992 typedef bool __t9<E>(E __u10);
975 typedef Iterable<dynamic> __t9(dynamic __u10); 993 typedef bool __t11(dynamic __u12);
976 typedef int __t16(dynamic __u17, dynamic __u18); 994 typedef bool __t14<E>(E __u15);
977 typedef int __t19(Comparable<dynamic> __u20, Comparable<dynamic> __u21); 995 typedef bool __t18<T>(T __u19);
OLDNEW
« no previous file with comments | « test/codegen/expect/sunflower/sunflower.txt ('k') | test/dart_codegen/expect/async/future.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698