| Index: lib/runtime/dart/_internal.js
|
| diff --git a/lib/runtime/dart/_internal.js b/lib/runtime/dart/_internal.js
|
| index a34625db9e90ef5e413ea33d67dee5ecd5fb9486..34a5788efc6e3bbf30bb096e9633a7fcad3b71da 100644
|
| --- a/lib/runtime/dart/_internal.js
|
| +++ b/lib/runtime/dart/_internal.js
|
| @@ -172,11 +172,11 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| return super[core.$where](test);
|
| }
|
| [core.$map](f) {
|
| - dart.as(f, dart.functionType(dart.dynamic, [E]));
|
| + dart.as(f, dart.functionType(core.Object, [E]));
|
| return new MappedListIterable(this, f);
|
| }
|
| [core.$reduce](combine) {
|
| - dart.as(combine, dart.functionType(E, [dart.dynamic, E]));
|
| + dart.as(combine, dart.functionType(E, [dart.bottom, E]));
|
| let length = this[core.$length];
|
| if (length == 0)
|
| throw IterableElementError.noElement();
|
| @@ -190,7 +190,7 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| return value;
|
| }
|
| [core.$fold](initialValue, combine) {
|
| - dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E]));
|
| + dart.as(combine, dart.functionType(core.Object, [dart.bottom, E]));
|
| let value = initialValue;
|
| let length = this[core.$length];
|
| for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull(i) + 1) {
|
| @@ -247,9 +247,9 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| [core.$lastWhere]: dart.functionType(E, [dart.functionType(core.bool, [E])], {rEls: dart.functionType(E, [])}),
|
| [core.$singleWhere]: dart.functionType(E, [dart.functionType(core.bool, [E])]),
|
| [core.$where]: dart.functionType(core.Iterable$(E), [dart.functionType(core.bool, [E])]),
|
| - [core.$map]: dart.functionType(core.Iterable, [dart.functionType(dart.dynamic, [E])]),
|
| - [core.$reduce]: dart.functionType(E, [dart.functionType(E, [dart.dynamic, E])]),
|
| - [core.$fold]: dart.functionType(dart.dynamic, [dart.dynamic, dart.functionType(dart.dynamic, [dart.dynamic, E])]),
|
| + [core.$map]: dart.functionType(core.Iterable, [dart.functionType(core.Object, [E])]),
|
| + [core.$reduce]: dart.functionType(E, [dart.functionType(E, [dart.bottom, E])]),
|
| + [core.$fold]: dart.functionType(core.Object, [core.Object, dart.functionType(core.Object, [dart.bottom, E])]),
|
| [core.$skip]: dart.functionType(core.Iterable$(E), [core.int]),
|
| [core.$skipWhile]: dart.functionType(core.Iterable$(E), [dart.functionType(core.bool, [E])]),
|
| [core.$take]: dart.functionType(core.Iterable$(E), [core.int]),
|
| @@ -907,7 +907,7 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| return this;
|
| }
|
| [core.$map](f) {
|
| - dart.as(f, dart.functionType(dart.dynamic, [E]));
|
| + dart.as(f, dart.functionType(core.Object, [E]));
|
| return dart.const(new (EmptyIterable$())());
|
| }
|
| [core.$reduce](combine) {
|
| @@ -915,7 +915,7 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| throw IterableElementError.noElement();
|
| }
|
| [core.$fold](initialValue, combine) {
|
| - dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E]));
|
| + dart.as(combine, dart.functionType(core.Object, [dart.bottom, E]));
|
| return initialValue;
|
| }
|
| [core.$skip](count) {
|
| @@ -953,9 +953,9 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| [core.$lastWhere]: dart.functionType(E, [dart.functionType(core.bool, [E])], {rEls: dart.functionType(E, [])}),
|
| [core.$singleWhere]: dart.functionType(E, [dart.functionType(core.bool, [E])], {rEls: dart.functionType(E, [])}),
|
| [core.$where]: dart.functionType(core.Iterable$(E), [dart.functionType(core.bool, [E])]),
|
| - [core.$map]: dart.functionType(core.Iterable, [dart.functionType(dart.dynamic, [E])]),
|
| + [core.$map]: dart.functionType(core.Iterable, [dart.functionType(core.Object, [E])]),
|
| [core.$reduce]: dart.functionType(E, [dart.functionType(E, [E, E])]),
|
| - [core.$fold]: dart.functionType(dart.dynamic, [dart.dynamic, dart.functionType(dart.dynamic, [dart.dynamic, E])]),
|
| + [core.$fold]: dart.functionType(core.Object, [core.Object, dart.functionType(core.Object, [dart.bottom, E])]),
|
| [core.$skip]: dart.functionType(core.Iterable$(E), [core.int]),
|
| [core.$skipWhile]: dart.functionType(core.Iterable$(E), [dart.functionType(core.bool, [E])]),
|
| [core.$take]: dart.functionType(core.Iterable$(E), [core.int]),
|
| @@ -1001,13 +1001,13 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| return false;
|
| }
|
| static forEach(iterable, f) {
|
| - dart.as(f, dart.functionType(dart.void, [dart.dynamic]));
|
| + dart.as(f, dart.functionType(dart.void, [dart.bottom]));
|
| for (let e of iterable) {
|
| dart.dcall(f, e);
|
| }
|
| }
|
| static any(iterable, f) {
|
| - dart.as(f, dart.functionType(core.bool, [dart.dynamic]));
|
| + dart.as(f, dart.functionType(core.bool, [dart.bottom]));
|
| for (let e of iterable) {
|
| if (dart.dcall(f, e))
|
| return true;
|
| @@ -1015,7 +1015,7 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| return false;
|
| }
|
| static every(iterable, f) {
|
| - dart.as(f, dart.functionType(core.bool, [dart.dynamic]));
|
| + dart.as(f, dart.functionType(core.bool, [dart.bottom]));
|
| for (let e of iterable) {
|
| if (!dart.notNull(dart.dcall(f, e)))
|
| return false;
|
| @@ -1023,7 +1023,7 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| return true;
|
| }
|
| static reduce(iterable, combine) {
|
| - dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, dart.dynamic]));
|
| + dart.as(combine, dart.functionType(core.Object, [dart.bottom, dart.bottom]));
|
| let iterator = iterable[core.$iterator];
|
| if (!dart.notNull(iterator.moveNext()))
|
| throw IterableElementError.noElement();
|
| @@ -1034,14 +1034,14 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| return value;
|
| }
|
| static fold(iterable, initialValue, combine) {
|
| - dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, dart.dynamic]));
|
| + dart.as(combine, dart.functionType(core.Object, [dart.bottom, dart.bottom]));
|
| for (let element of iterable) {
|
| initialValue = dart.dcall(combine, initialValue, element);
|
| }
|
| return initialValue;
|
| }
|
| static removeWhereList(list, test) {
|
| - dart.as(test, dart.functionType(core.bool, [dart.dynamic]));
|
| + dart.as(test, dart.functionType(core.bool, [dart.bottom]));
|
| let retained = [];
|
| let length = list[core.$length];
|
| for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull(i) + 1) {
|
| @@ -1091,8 +1091,8 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| return result;
|
| }
|
| static firstWhere(iterable, test, orElse) {
|
| - dart.as(test, dart.functionType(core.bool, [dart.dynamic]));
|
| - dart.as(orElse, dart.functionType(dart.dynamic, []));
|
| + dart.as(test, dart.functionType(core.bool, [dart.bottom]));
|
| + dart.as(orElse, dart.functionType(core.Object, []));
|
| for (let element of iterable) {
|
| if (dart.dcall(test, element))
|
| return element;
|
| @@ -1102,8 +1102,8 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| throw IterableElementError.noElement();
|
| }
|
| static lastWhere(iterable, test, orElse) {
|
| - dart.as(test, dart.functionType(core.bool, [dart.dynamic]));
|
| - dart.as(orElse, dart.functionType(dart.dynamic, []));
|
| + dart.as(test, dart.functionType(core.bool, [dart.bottom]));
|
| + dart.as(orElse, dart.functionType(core.Object, []));
|
| let result = null;
|
| let foundMatching = false;
|
| for (let element of iterable) {
|
| @@ -1119,8 +1119,8 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| throw IterableElementError.noElement();
|
| }
|
| static lastWhereList(list, test, orElse) {
|
| - dart.as(test, dart.functionType(core.bool, [dart.dynamic]));
|
| - dart.as(orElse, dart.functionType(dart.dynamic, []));
|
| + dart.as(test, dart.functionType(core.bool, [dart.bottom]));
|
| + dart.as(orElse, dart.functionType(core.Object, []));
|
| for (let i = dart.notNull(list[core.$length]) - 1; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) {
|
| let element = list[core.$get](i);
|
| if (dart.dcall(test, element))
|
| @@ -1131,7 +1131,7 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| throw IterableElementError.noElement();
|
| }
|
| static singleWhere(iterable, test) {
|
| - dart.as(test, dart.functionType(core.bool, [dart.dynamic]));
|
| + dart.as(test, dart.functionType(core.bool, [dart.bottom]));
|
| let result = null;
|
| let foundMatching = false;
|
| for (let element of iterable) {
|
| @@ -1188,40 +1188,40 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| return dart.toString(buffer);
|
| }
|
| where(iterable, f) {
|
| - dart.as(f, dart.functionType(core.bool, [dart.dynamic]));
|
| + dart.as(f, dart.functionType(core.bool, [dart.bottom]));
|
| return new (WhereIterable$(T))(dart.as(iterable, core.Iterable$(T)), dart.as(f, __CastType6));
|
| }
|
| static map(iterable, f) {
|
| - dart.as(f, dart.functionType(dart.dynamic, [dart.dynamic]));
|
| + dart.as(f, dart.functionType(core.Object, [dart.bottom]));
|
| return new MappedIterable(iterable, f);
|
| }
|
| static mapList(list, f) {
|
| - dart.as(f, dart.functionType(dart.dynamic, [dart.dynamic]));
|
| + dart.as(f, dart.functionType(core.Object, [dart.bottom]));
|
| return new MappedListIterable(list, f);
|
| }
|
| static expand(iterable, f) {
|
| - dart.as(f, dart.functionType(core.Iterable, [dart.dynamic]));
|
| + dart.as(f, dart.functionType(core.Iterable, [dart.bottom]));
|
| return new ExpandIterable(iterable, f);
|
| }
|
| takeList(list, n) {
|
| return new (SubListIterable$(T))(dart.as(list, core.Iterable$(T)), 0, n);
|
| }
|
| takeWhile(iterable, test) {
|
| - dart.as(test, dart.functionType(core.bool, [dart.dynamic]));
|
| + dart.as(test, dart.functionType(core.bool, [dart.bottom]));
|
| return new (TakeWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)), dart.as(test, dart.functionType(core.bool, [T])));
|
| }
|
| skipList(list, n) {
|
| return new (SubListIterable$(T))(dart.as(list, core.Iterable$(T)), n, null);
|
| }
|
| skipWhile(iterable, test) {
|
| - dart.as(test, dart.functionType(core.bool, [dart.dynamic]));
|
| + dart.as(test, dart.functionType(core.bool, [dart.bottom]));
|
| return new (SkipWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)), dart.as(test, dart.functionType(core.bool, [T])));
|
| }
|
| reversedList(list) {
|
| return new (ReversedListIterable$(T))(dart.as(list, core.Iterable$(T)));
|
| }
|
| static sortList(list, compare) {
|
| - dart.as(compare, dart.functionType(core.int, [dart.dynamic, dart.dynamic]));
|
| + dart.as(compare, dart.functionType(core.int, [dart.bottom, dart.bottom]));
|
| if (compare == null)
|
| compare = core.Comparable.compare;
|
| Sort.sort(list, compare);
|
| @@ -1374,45 +1374,45 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| }
|
| dart.setSignature(IterableMixinWorkaround, {
|
| methods: () => ({
|
| - where: dart.functionType(core.Iterable$(T), [core.Iterable, dart.functionType(core.bool, [dart.dynamic])]),
|
| + where: dart.functionType(core.Iterable$(T), [core.Iterable, dart.functionType(core.bool, [dart.bottom])]),
|
| takeList: dart.functionType(core.Iterable$(T), [core.List, core.int]),
|
| - takeWhile: dart.functionType(core.Iterable$(T), [core.Iterable, dart.functionType(core.bool, [dart.dynamic])]),
|
| + takeWhile: dart.functionType(core.Iterable$(T), [core.Iterable, dart.functionType(core.bool, [dart.bottom])]),
|
| skipList: dart.functionType(core.Iterable$(T), [core.List, core.int]),
|
| - skipWhile: dart.functionType(core.Iterable$(T), [core.Iterable, dart.functionType(core.bool, [dart.dynamic])]),
|
| + skipWhile: dart.functionType(core.Iterable$(T), [core.Iterable, dart.functionType(core.bool, [dart.bottom])]),
|
| reversedList: dart.functionType(core.Iterable$(T), [core.List]),
|
| getRangeList: dart.functionType(core.Iterable$(T), [core.List, core.int, core.int]),
|
| asMapList: dart.functionType(core.Map$(core.int, T), [core.List])
|
| }),
|
| statics: () => ({
|
| - contains: dart.functionType(core.bool, [core.Iterable, dart.dynamic]),
|
| - forEach: dart.functionType(dart.void, [core.Iterable, dart.functionType(dart.void, [dart.dynamic])]),
|
| - any: dart.functionType(core.bool, [core.Iterable, dart.functionType(core.bool, [dart.dynamic])]),
|
| - every: dart.functionType(core.bool, [core.Iterable, dart.functionType(core.bool, [dart.dynamic])]),
|
| - reduce: dart.functionType(dart.dynamic, [core.Iterable, dart.functionType(dart.dynamic, [dart.dynamic, dart.dynamic])]),
|
| - fold: dart.functionType(dart.dynamic, [core.Iterable, dart.dynamic, dart.functionType(dart.dynamic, [dart.dynamic, dart.dynamic])]),
|
| - removeWhereList: dart.functionType(dart.void, [core.List, dart.functionType(core.bool, [dart.dynamic])]),
|
| + contains: dart.functionType(core.bool, [core.Iterable, core.Object]),
|
| + forEach: dart.functionType(dart.void, [core.Iterable, dart.functionType(dart.void, [dart.bottom])]),
|
| + any: dart.functionType(core.bool, [core.Iterable, dart.functionType(core.bool, [dart.bottom])]),
|
| + every: dart.functionType(core.bool, [core.Iterable, dart.functionType(core.bool, [dart.bottom])]),
|
| + reduce: dart.functionType(core.Object, [core.Iterable, dart.functionType(core.Object, [dart.bottom, dart.bottom])]),
|
| + fold: dart.functionType(core.Object, [core.Iterable, core.Object, dart.functionType(core.Object, [dart.bottom, dart.bottom])]),
|
| + removeWhereList: dart.functionType(dart.void, [core.List, dart.functionType(core.bool, [dart.bottom])]),
|
| isEmpty: dart.functionType(core.bool, [core.Iterable]),
|
| - first: dart.functionType(dart.dynamic, [core.Iterable]),
|
| - last: dart.functionType(dart.dynamic, [core.Iterable]),
|
| - single: dart.functionType(dart.dynamic, [core.Iterable]),
|
| - firstWhere: dart.functionType(dart.dynamic, [core.Iterable, dart.functionType(core.bool, [dart.dynamic]), dart.functionType(dart.dynamic, [])]),
|
| - lastWhere: dart.functionType(dart.dynamic, [core.Iterable, dart.functionType(core.bool, [dart.dynamic]), dart.functionType(dart.dynamic, [])]),
|
| - lastWhereList: dart.functionType(dart.dynamic, [core.List, dart.functionType(core.bool, [dart.dynamic]), dart.functionType(dart.dynamic, [])]),
|
| - singleWhere: dart.functionType(dart.dynamic, [core.Iterable, dart.functionType(core.bool, [dart.dynamic])]),
|
| - elementAt: dart.functionType(dart.dynamic, [core.Iterable, core.int]),
|
| + first: dart.functionType(core.Object, [core.Iterable]),
|
| + last: dart.functionType(core.Object, [core.Iterable]),
|
| + single: dart.functionType(core.Object, [core.Iterable]),
|
| + firstWhere: dart.functionType(core.Object, [core.Iterable, dart.functionType(core.bool, [dart.bottom]), dart.functionType(core.Object, [])]),
|
| + lastWhere: dart.functionType(core.Object, [core.Iterable, dart.functionType(core.bool, [dart.bottom]), dart.functionType(core.Object, [])]),
|
| + lastWhereList: dart.functionType(core.Object, [core.List, dart.functionType(core.bool, [dart.bottom]), dart.functionType(core.Object, [])]),
|
| + singleWhere: dart.functionType(core.Object, [core.Iterable, dart.functionType(core.bool, [dart.bottom])]),
|
| + elementAt: dart.functionType(core.Object, [core.Iterable, core.int]),
|
| join: dart.functionType(core.String, [core.Iterable], [core.String]),
|
| joinList: dart.functionType(core.String, [core.List], [core.String]),
|
| - map: dart.functionType(core.Iterable, [core.Iterable, dart.functionType(dart.dynamic, [dart.dynamic])]),
|
| - mapList: dart.functionType(core.Iterable, [core.List, dart.functionType(dart.dynamic, [dart.dynamic])]),
|
| - expand: dart.functionType(core.Iterable, [core.Iterable, dart.functionType(core.Iterable, [dart.dynamic])]),
|
| - sortList: dart.functionType(dart.void, [core.List, dart.functionType(core.int, [dart.dynamic, dart.dynamic])]),
|
| + map: dart.functionType(core.Iterable, [core.Iterable, dart.functionType(core.Object, [dart.bottom])]),
|
| + mapList: dart.functionType(core.Iterable, [core.List, dart.functionType(core.Object, [dart.bottom])]),
|
| + expand: dart.functionType(core.Iterable, [core.Iterable, dart.functionType(core.Iterable, [dart.bottom])]),
|
| + sortList: dart.functionType(dart.void, [core.List, dart.functionType(core.int, [dart.bottom, dart.bottom])]),
|
| shuffleList: dart.functionType(dart.void, [core.List, math.Random]),
|
| - indexOfList: dart.functionType(core.int, [core.List, dart.dynamic, core.int]),
|
| - lastIndexOfList: dart.functionType(core.int, [core.List, dart.dynamic, core.int]),
|
| + indexOfList: dart.functionType(core.int, [core.List, core.Object, core.int]),
|
| + lastIndexOfList: dart.functionType(core.int, [core.List, core.Object, core.int]),
|
| _rangeCheck: dart.functionType(dart.void, [core.List, core.int, core.int]),
|
| setRangeList: dart.functionType(dart.void, [core.List, core.int, core.int, core.Iterable, core.int]),
|
| replaceRangeList: dart.functionType(dart.void, [core.List, core.int, core.int, core.Iterable]),
|
| - fillRangeList: dart.functionType(dart.void, [core.List, core.int, core.int, dart.dynamic]),
|
| + fillRangeList: dart.functionType(dart.void, [core.List, core.int, core.int, core.Object]),
|
| insertAllList: dart.functionType(dart.void, [core.List, core.int, core.Iterable]),
|
| setAllList: dart.functionType(dart.void, [core.List, core.int, core.Iterable]),
|
| setContainsAll: dart.functionType(core.bool, [core.Set, core.Iterable]),
|
| @@ -1879,7 +1879,7 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| dart.setSignature(Lists, {
|
| statics: () => ({
|
| copy: dart.functionType(dart.void, [core.List, core.int, core.List, core.int, core.int]),
|
| - areEqual: dart.functionType(core.bool, [core.List, dart.dynamic]),
|
| + areEqual: dart.functionType(core.bool, [core.List, core.Object]),
|
| indexOf: dart.functionType(core.int, [core.List, core.Object, core.int, core.int]),
|
| lastIndexOf: dart.functionType(core.int, [core.List, core.Object, core.int]),
|
| indicesCheck: dart.functionType(dart.void, [core.List, core.int, core.int]),
|
| @@ -2152,11 +2152,11 @@ var _js_primitives = dart.lazyImport(_js_primitives);
|
| }
|
| dart.setSignature(Sort, {
|
| statics: () => ({
|
| - sort: dart.functionType(dart.void, [core.List, dart.functionType(core.int, [dart.dynamic, dart.dynamic])]),
|
| - sortRange: dart.functionType(dart.void, [core.List, core.int, core.int, dart.functionType(core.int, [dart.dynamic, dart.dynamic])]),
|
| - _doSort: dart.functionType(dart.void, [core.List, core.int, core.int, dart.functionType(core.int, [dart.dynamic, dart.dynamic])]),
|
| - _insertionSort: dart.functionType(dart.void, [core.List, core.int, core.int, dart.functionType(core.int, [dart.dynamic, dart.dynamic])]),
|
| - _dualPivotQuicksort: dart.functionType(dart.void, [core.List, core.int, core.int, dart.functionType(core.int, [dart.dynamic, dart.dynamic])])
|
| + sort: dart.functionType(dart.void, [core.List, dart.functionType(core.int, [dart.bottom, dart.bottom])]),
|
| + sortRange: dart.functionType(dart.void, [core.List, core.int, core.int, dart.functionType(core.int, [dart.bottom, dart.bottom])]),
|
| + _doSort: dart.functionType(dart.void, [core.List, core.int, core.int, dart.functionType(core.int, [dart.bottom, dart.bottom])]),
|
| + _insertionSort: dart.functionType(dart.void, [core.List, core.int, core.int, dart.functionType(core.int, [dart.bottom, dart.bottom])]),
|
| + _dualPivotQuicksort: dart.functionType(dart.void, [core.List, core.int, core.int, dart.functionType(core.int, [dart.bottom, dart.bottom])])
|
| }),
|
| names: ['sort', 'sortRange', '_doSort', '_insertionSort', '_dualPivotQuicksort']
|
| });
|
|
|