| Index: test/dart_codegen/expect/_internal/iterable.dart
|
| diff --git a/test/dart_codegen/expect/_internal/iterable.dart b/test/dart_codegen/expect/_internal/iterable.dart
|
| index c983ba7758e98382bb4caa49682441bf39aeb226..1da08e1b197b9b644cc019f313ff5b302fbf6bf8 100644
|
| --- a/test/dart_codegen/expect/_internal/iterable.dart
|
| +++ b/test/dart_codegen/expect/_internal/iterable.dart
|
| @@ -136,7 +136,11 @@ int length = this.length;
|
| }
|
| }
|
| Iterable<E> where(bool test(E element)) => super.where(test);
|
| - Iterable map(f(E element)) => new MappedListIterable(this, f);
|
| + Iterable map(f(E element)) => new MappedListIterable(this, DDC$RT.wrap((dynamic f(E __u1)) {
|
| +dynamic c(E x0) => f(DDC$RT.cast(x0, dynamic, E, "CastParam", """line 175, column 62 of dart:_internal/iterable.dart: """, x0 is E, false));
|
| + return f == null ? null : c;
|
| +}
|
| +, f, null, __t2, "Wrap", """line 175, column 62 of dart:_internal/iterable.dart: """, f is __t2));
|
| E reduce(E combine(var value, E element)) {
|
| int length = this.length;
|
| if (length == 0) throw IterableElementError.noElement();
|
| @@ -160,7 +164,7 @@ var value = initialValue;
|
| }
|
| return value;
|
| }
|
| - Iterable<E> skip(int count) => new SubListIterable<E>(this, count, null);
|
| + Iterable<E> skip(int count) => new SubListIterable<E>(this, count, ((__x6) => DDC$RT.cast(__x6, Null, int, "CastLiteral", """line 203, column 70 of dart:_internal/iterable.dart: """, __x6 is int, true))(null));
|
| Iterable<E> skipWhile(bool test(E element)) => super.skipWhile(test);
|
| Iterable<E> take(int count) => new SubListIterable<E>(this, 0, count);
|
| Iterable<E> takeWhile(bool test(E element)) => super.takeWhile(test);
|
| @@ -275,7 +279,7 @@ int length = _iterable.length;
|
| throw new ConcurrentModificationError(_iterable);
|
| }
|
| if (_index >= length) {
|
| -_current = ((__x1) => DDC$RT.cast(__x1, Null, E, "CastLiteral", """line 338, column 18 of dart:_internal/iterable.dart: """, __x1 is E, false))(null);
|
| +_current = ((__x7) => DDC$RT.cast(__x7, Null, E, "CastLiteral", """line 338, column 18 of dart:_internal/iterable.dart: """, __x7 is E, false))(null);
|
| return false;
|
| }
|
| _current = _iterable.elementAt(_index);
|
| @@ -290,7 +294,11 @@ _current = ((__x1) => DDC$RT.cast(__x1, Null, E, "CastLiteral", """line 338, col
|
| if (iterable is EfficientLength) {
|
| return new EfficientLengthMappedIterable<S, T>(iterable, function);
|
| }
|
| - return new MappedIterable<S, T>._(iterable, function);
|
| + return new MappedIterable<S, T>._(DDC$RT.cast(iterable, DDC$RT.type((Iterable<dynamic> _) {
|
| +}
|
| +), DDC$RT.type((Iterable<S> _) {
|
| +}
|
| +), "CastDynamic", """line 357, column 39 of dart:_internal/iterable.dart: """, iterable is Iterable<S>, false), function);
|
| }
|
| MappedIterable._(this._iterable, T this._f(S element));
|
| Iterator<T> get iterator => new MappedIterator<S, T>(_iterable.iterator, _f);
|
| @@ -316,7 +324,7 @@ if (_iterator.moveNext()) {
|
| _current = _f(_iterator.current);
|
| return true;
|
| }
|
| - _current = ((__x2) => DDC$RT.cast(__x2, Null, T, "CastLiteral", """line 393, column 16 of dart:_internal/iterable.dart: """, __x2 is T, false))(null);
|
| + _current = ((__x8) => DDC$RT.cast(__x8, Null, T, "CastLiteral", """line 393, column 16 of dart:_internal/iterable.dart: """, __x8 is T, false))(null);
|
| return false;
|
| }
|
| T get current => _current;
|
| @@ -350,13 +358,23 @@ return true;
|
| class ExpandIterable<S, T> extends IterableBase<T> {final Iterable<S> _iterable;
|
| final _ExpandFunction _f;
|
| ExpandIterable(this._iterable, Iterable<T> this._f(S element));
|
| - Iterator<T> get iterator => new ExpandIterator<S, T>(_iterable.iterator, _f);
|
| + Iterator<T> get iterator => new ExpandIterator<S, T>(_iterable.iterator, DDC$RT.wrap((Iterable<dynamic> f(dynamic __u10)) {
|
| +Iterable<dynamic> c(dynamic x0) => ((__x9) => DDC$RT.cast(__x9, DDC$RT.type((Iterable<dynamic> _) {
|
| +}
|
| +), DDC$RT.type((Iterable<T> _) {
|
| +}
|
| +), "CastResult", """line 454, column 76 of dart:_internal/iterable.dart: """, __x9 is Iterable<T>, false))(f(x0));
|
| + return f == null ? null : c;
|
| +}
|
| +, _f, null, DDC$RT.type((__t11<S, T> _) {
|
| +}
|
| +), "Wrap", """line 454, column 76 of dart:_internal/iterable.dart: """, _f is __t11<S, T>));
|
| }
|
| class ExpandIterator<S, T> implements Iterator<T> {final Iterator<S> _iterator;
|
| final _ExpandFunction _f;
|
| - Iterator<T> _currentExpansion = ((__x3) => DDC$RT.cast(__x3, null, DDC$RT.type((Iterator<T> _) {
|
| + Iterator<T> _currentExpansion = ((__x15) => DDC$RT.cast(__x15, null, DDC$RT.type((Iterator<T> _) {
|
| }
|
| -), "CastExact", """line 463, column 35 of dart:_internal/iterable.dart: """, __x3 is Iterator<T>, false))(const EmptyIterator());
|
| +), "CastExact", """line 463, column 35 of dart:_internal/iterable.dart: """, __x15 is Iterator<T>, false))(const EmptyIterator());
|
| T _current;
|
| ExpandIterator(this._iterator, Iterable<T> this._f(S element));
|
| void _nextExpansion() {
|
| @@ -365,14 +383,14 @@ return true;
|
| bool moveNext() {
|
| if (_currentExpansion == null) return false;
|
| while (!_currentExpansion.moveNext()) {
|
| -_current = ((__x4) => DDC$RT.cast(__x4, Null, T, "CastLiteral", """line 476, column 18 of dart:_internal/iterable.dart: """, __x4 is T, false))(null);
|
| +_current = ((__x16) => DDC$RT.cast(__x16, Null, T, "CastLiteral", """line 476, column 18 of dart:_internal/iterable.dart: """, __x16 is T, false))(null);
|
| if (_iterator.moveNext()) {
|
| _currentExpansion = null;
|
| - _currentExpansion = ((__x5) => DDC$RT.cast(__x5, DDC$RT.type((Iterator<dynamic> _) {
|
| + _currentExpansion = ((__x17) => DDC$RT.cast(__x17, DDC$RT.type((Iterator<dynamic> _) {
|
| }
|
| ), DDC$RT.type((Iterator<T> _) {
|
| }
|
| -), "CastDynamic", """line 481, column 29 of dart:_internal/iterable.dart: """, __x5 is Iterator<T>, false))(_f(_iterator.current).iterator);
|
| +), "CastDynamic", """line 481, column 29 of dart:_internal/iterable.dart: """, __x17 is Iterator<T>, false))(_f(_iterator.current).iterator);
|
| }
|
| else {
|
| return false;
|
| @@ -418,7 +436,7 @@ return _iterator.moveNext();
|
| return false;
|
| }
|
| E get current {
|
| -if (_remaining < 0) return ((__x6) => DDC$RT.cast(__x6, Null, E, "CastLiteral", """line 543, column 32 of dart:_internal/iterable.dart: """, __x6 is E, false))(null);
|
| +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);
|
| return _iterator.current;
|
| }
|
| }
|
| @@ -442,7 +460,7 @@ _isFinished = true;
|
| return true;
|
| }
|
| E get current {
|
| -if (_isFinished) return ((__x7) => DDC$RT.cast(__x7, Null, E, "CastLiteral", """line 576, column 29 of dart:_internal/iterable.dart: """, __x7 is E, false))(null);
|
| +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);
|
| return _iterator.current;
|
| }
|
| }
|
| @@ -512,9 +530,9 @@ if (!_f(_iterator.current)) return true;
|
| E get current => _iterator.current;
|
| }
|
| class EmptyIterable<E> extends IterableBase<E> implements EfficientLength {const EmptyIterable();
|
| - Iterator<E> get iterator => ((__x8) => DDC$RT.cast(__x8, null, DDC$RT.type((Iterator<E> _) {
|
| + Iterator<E> get iterator => ((__x20) => DDC$RT.cast(__x20, null, DDC$RT.type((Iterator<E> _) {
|
| }
|
| -), "CastExact", """line 678, column 31 of dart:_internal/iterable.dart: """, __x8 is Iterator<E>, false))(const EmptyIterator());
|
| +), "CastExact", """line 678, column 31 of dart:_internal/iterable.dart: """, __x20 is Iterator<E>, false))(const EmptyIterator());
|
| void forEach(void action(E element)) {
|
| }
|
| bool get isEmpty => true;
|
| @@ -578,7 +596,7 @@ bool growable : true}
|
| }
|
| class EmptyIterator<E> implements Iterator<E> {const EmptyIterator();
|
| bool moveNext() => false;
|
| - E get current => ((__x9) => DDC$RT.cast(__x9, Null, E, "CastLiteral", """line 752, column 20 of dart:_internal/iterable.dart: """, __x9 is E, false))(null);
|
| + 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);
|
| }
|
| abstract class BidirectionalIterator<T> implements Iterator<T> {bool movePrevious();
|
| }
|
| @@ -742,7 +760,11 @@ buffer.write(separator);
|
| return buffer.toString();
|
| }
|
| Iterable<T> where(Iterable iterable, bool f(var element)) {
|
| -return new WhereIterable<T>(iterable, f);
|
| +return new WhereIterable<T>(DDC$RT.cast(iterable, DDC$RT.type((Iterable<dynamic> _) {
|
| +}
|
| +), DDC$RT.type((Iterable<T> _) {
|
| +}
|
| +), "CastDynamic", """line 961, column 33 of dart:_internal/iterable.dart: """, iterable is Iterable<T>, false), f);
|
| }
|
| static Iterable map(Iterable iterable, f(var element)) {
|
| return new MappedIterable(iterable, f);
|
| @@ -754,22 +776,42 @@ return new MappedListIterable(list, f);
|
| return new ExpandIterable(iterable, f);
|
| }
|
| Iterable<T> takeList(List list, int n) {
|
| -return new SubListIterable<T>(list, 0, n);
|
| +return new SubListIterable<T>(DDC$RT.cast(list, DDC$RT.type((List<dynamic> _) {
|
| +}
|
| +), DDC$RT.type((Iterable<T> _) {
|
| +}
|
| +), "CastDynamic", """line 978, column 35 of dart:_internal/iterable.dart: """, list is Iterable<T>, false), 0, n);
|
| }
|
| Iterable<T> takeWhile(Iterable iterable, bool test(var value)) {
|
| -return new TakeWhileIterable<T>(iterable, test);
|
| +return new TakeWhileIterable<T>(DDC$RT.cast(iterable, DDC$RT.type((Iterable<dynamic> _) {
|
| +}
|
| +), DDC$RT.type((Iterable<T> _) {
|
| +}
|
| +), "CastDynamic", """line 983, column 37 of dart:_internal/iterable.dart: """, iterable is Iterable<T>, false), test);
|
| }
|
| Iterable<T> skipList(List list, int n) {
|
| -return new SubListIterable<T>(list, n, null);
|
| +return new SubListIterable<T>(DDC$RT.cast(list, DDC$RT.type((List<dynamic> _) {
|
| +}
|
| +), DDC$RT.type((Iterable<T> _) {
|
| +}
|
| +), "CastDynamic", """line 988, column 35 of dart:_internal/iterable.dart: """, list is Iterable<T>, false), n, ((__x22) => DDC$RT.cast(__x22, Null, int, "CastLiteral", """line 988, column 44 of dart:_internal/iterable.dart: """, __x22 is int, true))(null));
|
| }
|
| Iterable<T> skipWhile(Iterable iterable, bool test(var value)) {
|
| -return new SkipWhileIterable<T>(iterable, test);
|
| +return new SkipWhileIterable<T>(DDC$RT.cast(iterable, DDC$RT.type((Iterable<dynamic> _) {
|
| +}
|
| +), DDC$RT.type((Iterable<T> _) {
|
| +}
|
| +), "CastDynamic", """line 993, column 37 of dart:_internal/iterable.dart: """, iterable is Iterable<T>, false), test);
|
| }
|
| Iterable<T> reversedList(List list) {
|
| -return new ReversedListIterable<T>(list);
|
| +return new ReversedListIterable<T>(DDC$RT.cast(list, DDC$RT.type((List<dynamic> _) {
|
| +}
|
| +), DDC$RT.type((Iterable<T> _) {
|
| +}
|
| +), "CastDynamic", """line 997, column 40 of dart:_internal/iterable.dart: """, list is Iterable<T>, false));
|
| }
|
| static void sortList(List list, int compare(a, b)) {
|
| -if (compare == null) compare = DDC$RT.wrap((int f(Comparable<dynamic> __u10, Comparable<dynamic> __u11)) {
|
| +if (compare == null) compare = DDC$RT.wrap((int f(Comparable<dynamic> __u23, Comparable<dynamic> __u24)) {
|
| int c(Comparable<dynamic> x0, Comparable<dynamic> x1) => f(DDC$RT.cast(x0, dynamic, DDC$RT.type((Comparable<dynamic> _) {
|
| }
|
| ), "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> _) {
|
| @@ -777,7 +819,7 @@ int c(Comparable<dynamic> x0, Comparable<dynamic> x1) => f(DDC$RT.cast(x0, dynam
|
| ), "CastParam", """line 1001, column 36 of dart:_internal/iterable.dart: """, x1 is Comparable<dynamic>, true));
|
| return f == null ? null : c;
|
| }
|
| -, Comparable.compare, __t15, __t12, "Wrap", """line 1001, column 36 of dart:_internal/iterable.dart: """, Comparable.compare is __t12);
|
| +, Comparable.compare, __t28, __t25, "Wrap", """line 1001, column 36 of dart:_internal/iterable.dart: """, Comparable.compare is __t25);
|
| Sort.sort(list, compare);
|
| }
|
| static void shuffleList(List list, Random random) {
|
| @@ -803,7 +845,11 @@ RangeError.checkValidRange(start, end, list.length);
|
| }
|
| Iterable<T> getRangeList(List list, int start, int end) {
|
| _rangeCheck(list, start, end);
|
| - return new SubListIterable<T>(list, start, end);
|
| + return new SubListIterable<T>(DDC$RT.cast(list, DDC$RT.type((List<dynamic> _) {
|
| +}
|
| +), DDC$RT.type((Iterable<T> _) {
|
| +}
|
| +), "CastDynamic", """line 1033, column 35 of dart:_internal/iterable.dart: """, list is Iterable<T>, false), start, end);
|
| }
|
| static void setRangeList(List list, int start, int end, Iterable from, int skipCount) {
|
| _rangeCheck(list, start, end);
|
| @@ -875,7 +921,11 @@ list[index++] = element;
|
| }
|
| }
|
| Map<int, T> asMapList(List l) {
|
| -return new ListMapView<T>(l);
|
| +return new ListMapView<T>(DDC$RT.cast(l, DDC$RT.type((List<dynamic> _) {
|
| +}
|
| +), DDC$RT.type((List<T> _) {
|
| +}
|
| +), "CastDynamic", """line 1115, column 31 of dart:_internal/iterable.dart: """, l is List<T>, false));
|
| }
|
| static bool setContainsAll(Set set, Iterable other) {
|
| for (var element in other) {
|
| @@ -919,5 +969,9 @@ result.add(element);
|
| static StateError tooMany() => new StateError("Too many elements");
|
| static StateError tooFew() => new StateError("Too few elements");
|
| }
|
| - typedef int __t12(dynamic __u13, dynamic __u14);
|
| - typedef int __t15(Comparable<dynamic> __u16, Comparable<dynamic> __u17);
|
| + typedef dynamic __t2(dynamic __u3);
|
| + typedef dynamic __t4<E>(E __u5);
|
| + typedef Iterable<T> __t11<S, T>(S __u12);
|
| + typedef Iterable<dynamic> __t13(dynamic __u14);
|
| + typedef int __t25(dynamic __u26, dynamic __u27);
|
| + typedef int __t28(Comparable<dynamic> __u29, Comparable<dynamic> __u30);
|
|
|