| OLD | NEW |
| 1 dart_library.library('dart/_internal', null, /* Imports */[ | 1 dart_library.library('dart/_internal', null, /* Imports */[ |
| 2 "dart_runtime/dart", | 2 "dart_runtime/dart", |
| 3 'dart/core', | 3 'dart/core', |
| 4 'dart/collection' | 4 'dart/collection' |
| 5 ], /* Lazy imports */[ | 5 ], /* Lazy imports */[ |
| 6 'dart/math', | 6 'dart/math', |
| 7 'dart/_interceptors', | 7 'dart/_interceptors', |
| 8 'dart/_js_primitives' | 8 'dart/_js_primitives' |
| 9 ], function(exports, dart, core, collection, math, _interceptors, _js_primitives
) { | 9 ], function(exports, dart, core, collection, math, _interceptors, _js_primitives
) { |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 return dart.toString(buffer); | 170 return dart.toString(buffer); |
| 171 } | 171 } |
| 172 } | 172 } |
| 173 where(test) { | 173 where(test) { |
| 174 dart.as(test, dart.functionType(core.bool, [E])); | 174 dart.as(test, dart.functionType(core.bool, [E])); |
| 175 return super.where(test); | 175 return super.where(test); |
| 176 } | 176 } |
| 177 map(f) { | 177 map(f) { |
| 178 dart.as(f, dart.functionType(core.Object, [E])); | 178 dart.as(f, dart.functionType(dart.dynamic, [E])); |
| 179 return new MappedListIterable(this, f); | 179 return new MappedListIterable(this, f); |
| 180 } | 180 } |
| 181 reduce(combine) { | 181 reduce(combine) { |
| 182 dart.as(combine, dart.functionType(E, [dart.bottom, E])); | 182 dart.as(combine, dart.functionType(E, [dart.dynamic, E])); |
| 183 let length = this.length; | 183 let length = this.length; |
| 184 if (length == 0) | 184 if (length == 0) |
| 185 throw IterableElementError.noElement(); | 185 throw IterableElementError.noElement(); |
| 186 let value = this.elementAt(0); | 186 let value = this.elementAt(0); |
| 187 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 187 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 188 value = dart.dcall(combine, value, this.elementAt(i)); | 188 value = dart.dcall(combine, value, this.elementAt(i)); |
| 189 if (length != this.length) { | 189 if (length != this.length) { |
| 190 throw new core.ConcurrentModificationError(this); | 190 throw new core.ConcurrentModificationError(this); |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 return value; | 193 return value; |
| 194 } | 194 } |
| 195 fold(initialValue, combine) { | 195 fold(initialValue, combine) { |
| 196 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); | 196 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); |
| 197 let value = initialValue; | 197 let value = initialValue; |
| 198 let length = this.length; | 198 let length = this.length; |
| 199 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 199 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 200 value = dart.dcall(combine, value, this.elementAt(i)); | 200 value = dart.dcall(combine, value, this.elementAt(i)); |
| 201 if (length != this.length) { | 201 if (length != this.length) { |
| 202 throw new core.ConcurrentModificationError(this); | 202 throw new core.ConcurrentModificationError(this); |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 return value; | 205 return value; |
| 206 } | 206 } |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 dart.setSignature(ListIterable, { | 244 dart.setSignature(ListIterable, { |
| 245 constructors: () => ({ListIterable: [ListIterable$(E), []]}), | 245 constructors: () => ({ListIterable: [ListIterable$(E), []]}), |
| 246 methods: () => ({ | 246 methods: () => ({ |
| 247 forEach: [dart.void, [dart.functionType(dart.void, [E])]], | 247 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
| 248 every: [core.bool, [dart.functionType(core.bool, [E])]], | 248 every: [core.bool, [dart.functionType(core.bool, [E])]], |
| 249 any: [core.bool, [dart.functionType(core.bool, [E])]], | 249 any: [core.bool, [dart.functionType(core.bool, [E])]], |
| 250 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct
ionType(E, [])}], | 250 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct
ionType(E, [])}], |
| 251 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi
onType(E, [])}], | 251 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi
onType(E, [])}], |
| 252 singleWhere: [E, [dart.functionType(core.bool, [E])]], | 252 singleWhere: [E, [dart.functionType(core.bool, [E])]], |
| 253 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 253 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 254 map: [core.Iterable, [dart.functionType(core.Object, [E])]], | 254 map: [core.Iterable, [dart.functionType(dart.dynamic, [E])]], |
| 255 reduce: [E, [dart.functionType(E, [dart.bottom, E])]], | 255 reduce: [E, [dart.functionType(E, [dart.dynamic, E])]], |
| 256 fold: [core.Object, [core.Object, dart.functionType(core.Object, [dart.b
ottom, E])]], | 256 fold: [dart.dynamic, [dart.dynamic, dart.functionType(dart.dynamic, [dar
t.dynamic, E])]], |
| 257 skip: [core.Iterable$(E), [core.int]], | 257 skip: [core.Iterable$(E), [core.int]], |
| 258 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 258 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 259 take: [core.Iterable$(E), [core.int]], | 259 take: [core.Iterable$(E), [core.int]], |
| 260 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 260 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 261 toList: [core.List$(E), [], {growable: core.bool}], | 261 toList: [core.List$(E), [], {growable: core.bool}], |
| 262 toSet: [core.Set$(E), []] | 262 toSet: [core.Set$(E), []] |
| 263 }) | 263 }) |
| 264 }); | 264 }); |
| 265 dart.defineExtensionMembers(ListIterable, [ | 265 dart.defineExtensionMembers(ListIterable, [ |
| 266 'forEach', | 266 'forEach', |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 999 join(separator) { | 999 join(separator) { |
| 1000 if (separator === void 0) | 1000 if (separator === void 0) |
| 1001 separator = ""; | 1001 separator = ""; |
| 1002 return ""; | 1002 return ""; |
| 1003 } | 1003 } |
| 1004 where(test) { | 1004 where(test) { |
| 1005 dart.as(test, dart.functionType(core.bool, [E])); | 1005 dart.as(test, dart.functionType(core.bool, [E])); |
| 1006 return this; | 1006 return this; |
| 1007 } | 1007 } |
| 1008 map(f) { | 1008 map(f) { |
| 1009 dart.as(f, dart.functionType(core.Object, [E])); | 1009 dart.as(f, dart.functionType(dart.dynamic, [E])); |
| 1010 return dart.const(new (EmptyIterable$())()); | 1010 return dart.const(new (EmptyIterable$())()); |
| 1011 } | 1011 } |
| 1012 reduce(combine) { | 1012 reduce(combine) { |
| 1013 dart.as(combine, dart.functionType(E, [E, E])); | 1013 dart.as(combine, dart.functionType(E, [E, E])); |
| 1014 throw IterableElementError.noElement(); | 1014 throw IterableElementError.noElement(); |
| 1015 } | 1015 } |
| 1016 fold(initialValue, combine) { | 1016 fold(initialValue, combine) { |
| 1017 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); | 1017 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); |
| 1018 return initialValue; | 1018 return initialValue; |
| 1019 } | 1019 } |
| 1020 skip(count) { | 1020 skip(count) { |
| 1021 core.RangeError.checkNotNegative(count, "count"); | 1021 core.RangeError.checkNotNegative(count, "count"); |
| 1022 return this; | 1022 return this; |
| 1023 } | 1023 } |
| 1024 skipWhile(test) { | 1024 skipWhile(test) { |
| 1025 dart.as(test, dart.functionType(core.bool, [E])); | 1025 dart.as(test, dart.functionType(core.bool, [E])); |
| 1026 return this; | 1026 return this; |
| 1027 } | 1027 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 1046 constructors: () => ({EmptyIterable: [EmptyIterable$(E), []]}), | 1046 constructors: () => ({EmptyIterable: [EmptyIterable$(E), []]}), |
| 1047 methods: () => ({ | 1047 methods: () => ({ |
| 1048 forEach: [dart.void, [dart.functionType(dart.void, [E])]], | 1048 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
| 1049 elementAt: [E, [core.int]], | 1049 elementAt: [E, [core.int]], |
| 1050 every: [core.bool, [dart.functionType(core.bool, [E])]], | 1050 every: [core.bool, [dart.functionType(core.bool, [E])]], |
| 1051 any: [core.bool, [dart.functionType(core.bool, [E])]], | 1051 any: [core.bool, [dart.functionType(core.bool, [E])]], |
| 1052 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct
ionType(E, [])}], | 1052 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct
ionType(E, [])}], |
| 1053 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi
onType(E, [])}], | 1053 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi
onType(E, [])}], |
| 1054 singleWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.func
tionType(E, [])}], | 1054 singleWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.func
tionType(E, [])}], |
| 1055 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 1055 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 1056 map: [core.Iterable, [dart.functionType(core.Object, [E])]], | 1056 map: [core.Iterable, [dart.functionType(dart.dynamic, [E])]], |
| 1057 reduce: [E, [dart.functionType(E, [E, E])]], | 1057 reduce: [E, [dart.functionType(E, [E, E])]], |
| 1058 fold: [core.Object, [core.Object, dart.functionType(core.Object, [dart.b
ottom, E])]], | 1058 fold: [dart.dynamic, [dart.dynamic, dart.functionType(dart.dynamic, [dar
t.dynamic, E])]], |
| 1059 skip: [core.Iterable$(E), [core.int]], | 1059 skip: [core.Iterable$(E), [core.int]], |
| 1060 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 1060 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 1061 take: [core.Iterable$(E), [core.int]], | 1061 take: [core.Iterable$(E), [core.int]], |
| 1062 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 1062 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
| 1063 toList: [core.List$(E), [], {growable: core.bool}], | 1063 toList: [core.List$(E), [], {growable: core.bool}], |
| 1064 toSet: [core.Set$(E), []] | 1064 toSet: [core.Set$(E), []] |
| 1065 }) | 1065 }) |
| 1066 }); | 1066 }); |
| 1067 dart.defineExtensionMembers(EmptyIterable, [ | 1067 dart.defineExtensionMembers(EmptyIterable, [ |
| 1068 'forEach', | 1068 'forEach', |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 let IterableMixinWorkaround$ = dart.generic(function(T) { | 1122 let IterableMixinWorkaround$ = dart.generic(function(T) { |
| 1123 class IterableMixinWorkaround extends core.Object { | 1123 class IterableMixinWorkaround extends core.Object { |
| 1124 static contains(iterable, element) { | 1124 static contains(iterable, element) { |
| 1125 for (let e of iterable) { | 1125 for (let e of iterable) { |
| 1126 if (dart.equals(e, element)) | 1126 if (dart.equals(e, element)) |
| 1127 return true; | 1127 return true; |
| 1128 } | 1128 } |
| 1129 return false; | 1129 return false; |
| 1130 } | 1130 } |
| 1131 static forEach(iterable, f) { | 1131 static forEach(iterable, f) { |
| 1132 dart.as(f, dart.functionType(dart.void, [dart.bottom])); | 1132 dart.as(f, dart.functionType(dart.void, [dart.dynamic])); |
| 1133 for (let e of iterable) { | 1133 for (let e of iterable) { |
| 1134 dart.dcall(f, e); | 1134 dart.dcall(f, e); |
| 1135 } | 1135 } |
| 1136 } | 1136 } |
| 1137 static any(iterable, f) { | 1137 static any(iterable, f) { |
| 1138 dart.as(f, dart.functionType(core.bool, [dart.bottom])); | 1138 dart.as(f, dart.functionType(core.bool, [dart.dynamic])); |
| 1139 for (let e of iterable) { | 1139 for (let e of iterable) { |
| 1140 if (dart.notNull(dart.dcall(f, e))) | 1140 if (dart.notNull(dart.dcall(f, e))) |
| 1141 return true; | 1141 return true; |
| 1142 } | 1142 } |
| 1143 return false; | 1143 return false; |
| 1144 } | 1144 } |
| 1145 static every(iterable, f) { | 1145 static every(iterable, f) { |
| 1146 dart.as(f, dart.functionType(core.bool, [dart.bottom])); | 1146 dart.as(f, dart.functionType(core.bool, [dart.dynamic])); |
| 1147 for (let e of iterable) { | 1147 for (let e of iterable) { |
| 1148 if (!dart.notNull(dart.dcall(f, e))) | 1148 if (!dart.notNull(dart.dcall(f, e))) |
| 1149 return false; | 1149 return false; |
| 1150 } | 1150 } |
| 1151 return true; | 1151 return true; |
| 1152 } | 1152 } |
| 1153 static reduce(iterable, combine) { | 1153 static reduce(iterable, combine) { |
| 1154 dart.as(combine, dart.functionType(core.Object, [dart.bottom, dart.botto
m])); | 1154 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, dart.dyn
amic])); |
| 1155 let iterator = iterable[dartx.iterator]; | 1155 let iterator = iterable[dartx.iterator]; |
| 1156 if (!dart.notNull(iterator.moveNext())) | 1156 if (!dart.notNull(iterator.moveNext())) |
| 1157 throw IterableElementError.noElement(); | 1157 throw IterableElementError.noElement(); |
| 1158 let value = iterator.current; | 1158 let value = iterator.current; |
| 1159 while (dart.notNull(iterator.moveNext())) { | 1159 while (dart.notNull(iterator.moveNext())) { |
| 1160 value = dart.dcall(combine, value, iterator.current); | 1160 value = dart.dcall(combine, value, iterator.current); |
| 1161 } | 1161 } |
| 1162 return value; | 1162 return value; |
| 1163 } | 1163 } |
| 1164 static fold(iterable, initialValue, combine) { | 1164 static fold(iterable, initialValue, combine) { |
| 1165 dart.as(combine, dart.functionType(core.Object, [dart.bottom, dart.botto
m])); | 1165 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, dart.dyn
amic])); |
| 1166 for (let element of iterable) { | 1166 for (let element of iterable) { |
| 1167 initialValue = dart.dcall(combine, initialValue, element); | 1167 initialValue = dart.dcall(combine, initialValue, element); |
| 1168 } | 1168 } |
| 1169 return initialValue; | 1169 return initialValue; |
| 1170 } | 1170 } |
| 1171 static removeWhereList(list, test) { | 1171 static removeWhereList(list, test) { |
| 1172 dart.as(test, dart.functionType(core.bool, [dart.bottom])); | 1172 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); |
| 1173 let retained = []; | 1173 let retained = []; |
| 1174 let length = list[dartx.length]; | 1174 let length = list[dartx.length]; |
| 1175 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1175 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 1176 let element = list[dartx.get](i); | 1176 let element = list[dartx.get](i); |
| 1177 if (!dart.notNull(dart.dcall(test, element))) { | 1177 if (!dart.notNull(dart.dcall(test, element))) { |
| 1178 retained[dartx.add](element); | 1178 retained[dartx.add](element); |
| 1179 } | 1179 } |
| 1180 if (length != list[dartx.length]) { | 1180 if (length != list[dartx.length]) { |
| 1181 throw new core.ConcurrentModificationError(list); | 1181 throw new core.ConcurrentModificationError(list); |
| 1182 } | 1182 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1212 static single(iterable) { | 1212 static single(iterable) { |
| 1213 let it = iterable[dartx.iterator]; | 1213 let it = iterable[dartx.iterator]; |
| 1214 if (!dart.notNull(it.moveNext())) | 1214 if (!dart.notNull(it.moveNext())) |
| 1215 throw IterableElementError.noElement(); | 1215 throw IterableElementError.noElement(); |
| 1216 let result = it.current; | 1216 let result = it.current; |
| 1217 if (dart.notNull(it.moveNext())) | 1217 if (dart.notNull(it.moveNext())) |
| 1218 throw IterableElementError.tooMany(); | 1218 throw IterableElementError.tooMany(); |
| 1219 return result; | 1219 return result; |
| 1220 } | 1220 } |
| 1221 static firstWhere(iterable, test, orElse) { | 1221 static firstWhere(iterable, test, orElse) { |
| 1222 dart.as(test, dart.functionType(core.bool, [dart.bottom])); | 1222 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); |
| 1223 dart.as(orElse, dart.functionType(core.Object, [])); | 1223 dart.as(orElse, dart.functionType(dart.dynamic, [])); |
| 1224 for (let element of iterable) { | 1224 for (let element of iterable) { |
| 1225 if (dart.notNull(dart.dcall(test, element))) | 1225 if (dart.notNull(dart.dcall(test, element))) |
| 1226 return element; | 1226 return element; |
| 1227 } | 1227 } |
| 1228 if (orElse != null) | 1228 if (orElse != null) |
| 1229 return orElse(); | 1229 return orElse(); |
| 1230 throw IterableElementError.noElement(); | 1230 throw IterableElementError.noElement(); |
| 1231 } | 1231 } |
| 1232 static lastWhere(iterable, test, orElse) { | 1232 static lastWhere(iterable, test, orElse) { |
| 1233 dart.as(test, dart.functionType(core.bool, [dart.bottom])); | 1233 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); |
| 1234 dart.as(orElse, dart.functionType(core.Object, [])); | 1234 dart.as(orElse, dart.functionType(dart.dynamic, [])); |
| 1235 let result = null; | 1235 let result = null; |
| 1236 let foundMatching = false; | 1236 let foundMatching = false; |
| 1237 for (let element of iterable) { | 1237 for (let element of iterable) { |
| 1238 if (dart.notNull(dart.dcall(test, element))) { | 1238 if (dart.notNull(dart.dcall(test, element))) { |
| 1239 result = element; | 1239 result = element; |
| 1240 foundMatching = true; | 1240 foundMatching = true; |
| 1241 } | 1241 } |
| 1242 } | 1242 } |
| 1243 if (dart.notNull(foundMatching)) | 1243 if (dart.notNull(foundMatching)) |
| 1244 return result; | 1244 return result; |
| 1245 if (orElse != null) | 1245 if (orElse != null) |
| 1246 return orElse(); | 1246 return orElse(); |
| 1247 throw IterableElementError.noElement(); | 1247 throw IterableElementError.noElement(); |
| 1248 } | 1248 } |
| 1249 static lastWhereList(list, test, orElse) { | 1249 static lastWhereList(list, test, orElse) { |
| 1250 dart.as(test, dart.functionType(core.bool, [dart.bottom])); | 1250 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); |
| 1251 dart.as(orElse, dart.functionType(core.Object, [])); | 1251 dart.as(orElse, dart.functionType(dart.dynamic, [])); |
| 1252 for (let i = dart.notNull(list[dartx.length]) - 1; dart.notNull(i) >= 0;
i = dart.notNull(i) - 1) { | 1252 for (let i = dart.notNull(list[dartx.length]) - 1; dart.notNull(i) >= 0;
i = dart.notNull(i) - 1) { |
| 1253 let element = list[dartx.get](i); | 1253 let element = list[dartx.get](i); |
| 1254 if (dart.notNull(dart.dcall(test, element))) | 1254 if (dart.notNull(dart.dcall(test, element))) |
| 1255 return element; | 1255 return element; |
| 1256 } | 1256 } |
| 1257 if (orElse != null) | 1257 if (orElse != null) |
| 1258 return orElse(); | 1258 return orElse(); |
| 1259 throw IterableElementError.noElement(); | 1259 throw IterableElementError.noElement(); |
| 1260 } | 1260 } |
| 1261 static singleWhere(iterable, test) { | 1261 static singleWhere(iterable, test) { |
| 1262 dart.as(test, dart.functionType(core.bool, [dart.bottom])); | 1262 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); |
| 1263 let result = null; | 1263 let result = null; |
| 1264 let foundMatching = false; | 1264 let foundMatching = false; |
| 1265 for (let element of iterable) { | 1265 for (let element of iterable) { |
| 1266 if (dart.notNull(dart.dcall(test, element))) { | 1266 if (dart.notNull(dart.dcall(test, element))) { |
| 1267 if (dart.notNull(foundMatching)) { | 1267 if (dart.notNull(foundMatching)) { |
| 1268 throw IterableElementError.tooMany(); | 1268 throw IterableElementError.tooMany(); |
| 1269 } | 1269 } |
| 1270 result = element; | 1270 result = element; |
| 1271 foundMatching = true; | 1271 foundMatching = true; |
| 1272 } | 1272 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 } else { | 1309 } else { |
| 1310 buffer.write(list[dartx.get](0)); | 1310 buffer.write(list[dartx.get](0)); |
| 1311 for (let i = 1; dart.notNull(i) < dart.notNull(list[dartx.length]); i
= dart.notNull(i) + 1) { | 1311 for (let i = 1; dart.notNull(i) < dart.notNull(list[dartx.length]); i
= dart.notNull(i) + 1) { |
| 1312 buffer.write(separator); | 1312 buffer.write(separator); |
| 1313 buffer.write(list[dartx.get](i)); | 1313 buffer.write(list[dartx.get](i)); |
| 1314 } | 1314 } |
| 1315 } | 1315 } |
| 1316 return dart.toString(buffer); | 1316 return dart.toString(buffer); |
| 1317 } | 1317 } |
| 1318 where(iterable, f) { | 1318 where(iterable, f) { |
| 1319 dart.as(f, dart.functionType(core.bool, [dart.bottom])); | 1319 dart.as(f, dart.functionType(core.bool, [dart.dynamic])); |
| 1320 return new (WhereIterable$(T))(dart.as(iterable, core.Iterable$(T)), dar
t.as(f, __CastType2)); | 1320 return new (WhereIterable$(T))(dart.as(iterable, core.Iterable$(T)), dar
t.as(f, __CastType2)); |
| 1321 } | 1321 } |
| 1322 static map(iterable, f) { | 1322 static map(iterable, f) { |
| 1323 dart.as(f, dart.functionType(core.Object, [dart.bottom])); | 1323 dart.as(f, dart.functionType(dart.dynamic, [dart.dynamic])); |
| 1324 return MappedIterable.new(iterable, f); | 1324 return MappedIterable.new(iterable, f); |
| 1325 } | 1325 } |
| 1326 static mapList(list, f) { | 1326 static mapList(list, f) { |
| 1327 dart.as(f, dart.functionType(core.Object, [dart.bottom])); | 1327 dart.as(f, dart.functionType(dart.dynamic, [dart.dynamic])); |
| 1328 return new MappedListIterable(list, f); | 1328 return new MappedListIterable(list, f); |
| 1329 } | 1329 } |
| 1330 static expand(iterable, f) { | 1330 static expand(iterable, f) { |
| 1331 dart.as(f, dart.functionType(core.Iterable, [dart.bottom])); | 1331 dart.as(f, dart.functionType(core.Iterable, [dart.dynamic])); |
| 1332 return new ExpandIterable(iterable, f); | 1332 return new ExpandIterable(iterable, f); |
| 1333 } | 1333 } |
| 1334 takeList(list, n) { | 1334 takeList(list, n) { |
| 1335 return new (SubListIterable$(T))(dart.as(list, core.Iterable$(T)), 0, n)
; | 1335 return new (SubListIterable$(T))(dart.as(list, core.Iterable$(T)), 0, n)
; |
| 1336 } | 1336 } |
| 1337 takeWhile(iterable, test) { | 1337 takeWhile(iterable, test) { |
| 1338 dart.as(test, dart.functionType(core.bool, [dart.bottom])); | 1338 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); |
| 1339 return new (TakeWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)),
dart.as(test, dart.functionType(core.bool, [T]))); | 1339 return new (TakeWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)),
dart.as(test, dart.functionType(core.bool, [T]))); |
| 1340 } | 1340 } |
| 1341 skipList(list, n) { | 1341 skipList(list, n) { |
| 1342 return new (SubListIterable$(T))(dart.as(list, core.Iterable$(T)), n, nu
ll); | 1342 return new (SubListIterable$(T))(dart.as(list, core.Iterable$(T)), n, nu
ll); |
| 1343 } | 1343 } |
| 1344 skipWhile(iterable, test) { | 1344 skipWhile(iterable, test) { |
| 1345 dart.as(test, dart.functionType(core.bool, [dart.bottom])); | 1345 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); |
| 1346 return new (SkipWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)),
dart.as(test, dart.functionType(core.bool, [T]))); | 1346 return new (SkipWhileIterable$(T))(dart.as(iterable, core.Iterable$(T)),
dart.as(test, dart.functionType(core.bool, [T]))); |
| 1347 } | 1347 } |
| 1348 reversedList(list) { | 1348 reversedList(list) { |
| 1349 return new (ReversedListIterable$(T))(dart.as(list, core.Iterable$(T))); | 1349 return new (ReversedListIterable$(T))(dart.as(list, core.Iterable$(T))); |
| 1350 } | 1350 } |
| 1351 static sortList(list, compare) { | 1351 static sortList(list, compare) { |
| 1352 dart.as(compare, dart.functionType(core.int, [dart.bottom, dart.bottom])
); | 1352 dart.as(compare, dart.functionType(core.int, [dart.dynamic, dart.dynamic
])); |
| 1353 if (compare == null) | 1353 if (compare == null) |
| 1354 compare = core.Comparable.compare; | 1354 compare = core.Comparable.compare; |
| 1355 Sort.sort(list, compare); | 1355 Sort.sort(list, compare); |
| 1356 } | 1356 } |
| 1357 static shuffleList(list, random) { | 1357 static shuffleList(list, random) { |
| 1358 if (random == null) | 1358 if (random == null) |
| 1359 random = math.Random.new(); | 1359 random = math.Random.new(); |
| 1360 let length = list[dartx.length]; | 1360 let length = list[dartx.length]; |
| 1361 while (dart.notNull(length) > 1) { | 1361 while (dart.notNull(length) > 1) { |
| 1362 let pos = random.nextInt(length); | 1362 let pos = random.nextInt(length); |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1495 for (let element of set) { | 1495 for (let element of set) { |
| 1496 if (!dart.notNull(other.contains(element))) { | 1496 if (!dart.notNull(other.contains(element))) { |
| 1497 result.add(element); | 1497 result.add(element); |
| 1498 } | 1498 } |
| 1499 } | 1499 } |
| 1500 return result; | 1500 return result; |
| 1501 } | 1501 } |
| 1502 } | 1502 } |
| 1503 dart.setSignature(IterableMixinWorkaround, { | 1503 dart.setSignature(IterableMixinWorkaround, { |
| 1504 methods: () => ({ | 1504 methods: () => ({ |
| 1505 where: [core.Iterable$(T), [core.Iterable, dart.functionType(core.bool,
[dart.bottom])]], | 1505 where: [core.Iterable$(T), [core.Iterable, dart.functionType(core.bool,
[dart.dynamic])]], |
| 1506 takeList: [core.Iterable$(T), [core.List, core.int]], | 1506 takeList: [core.Iterable$(T), [core.List, core.int]], |
| 1507 takeWhile: [core.Iterable$(T), [core.Iterable, dart.functionType(core.bo
ol, [dart.bottom])]], | 1507 takeWhile: [core.Iterable$(T), [core.Iterable, dart.functionType(core.bo
ol, [dart.dynamic])]], |
| 1508 skipList: [core.Iterable$(T), [core.List, core.int]], | 1508 skipList: [core.Iterable$(T), [core.List, core.int]], |
| 1509 skipWhile: [core.Iterable$(T), [core.Iterable, dart.functionType(core.bo
ol, [dart.bottom])]], | 1509 skipWhile: [core.Iterable$(T), [core.Iterable, dart.functionType(core.bo
ol, [dart.dynamic])]], |
| 1510 reversedList: [core.Iterable$(T), [core.List]], | 1510 reversedList: [core.Iterable$(T), [core.List]], |
| 1511 getRangeList: [core.Iterable$(T), [core.List, core.int, core.int]], | 1511 getRangeList: [core.Iterable$(T), [core.List, core.int, core.int]], |
| 1512 asMapList: [core.Map$(core.int, T), [core.List]] | 1512 asMapList: [core.Map$(core.int, T), [core.List]] |
| 1513 }), | 1513 }), |
| 1514 statics: () => ({ | 1514 statics: () => ({ |
| 1515 contains: [core.bool, [core.Iterable, core.Object]], | 1515 contains: [core.bool, [core.Iterable, dart.dynamic]], |
| 1516 forEach: [dart.void, [core.Iterable, dart.functionType(dart.void, [dart.
bottom])]], | 1516 forEach: [dart.void, [core.Iterable, dart.functionType(dart.void, [dart.
dynamic])]], |
| 1517 any: [core.bool, [core.Iterable, dart.functionType(core.bool, [dart.bott
om])]], | 1517 any: [core.bool, [core.Iterable, dart.functionType(core.bool, [dart.dyna
mic])]], |
| 1518 every: [core.bool, [core.Iterable, dart.functionType(core.bool, [dart.bo
ttom])]], | 1518 every: [core.bool, [core.Iterable, dart.functionType(core.bool, [dart.dy
namic])]], |
| 1519 reduce: [core.Object, [core.Iterable, dart.functionType(core.Object, [da
rt.bottom, dart.bottom])]], | 1519 reduce: [dart.dynamic, [core.Iterable, dart.functionType(dart.dynamic, [
dart.dynamic, dart.dynamic])]], |
| 1520 fold: [core.Object, [core.Iterable, core.Object, dart.functionType(core.
Object, [dart.bottom, dart.bottom])]], | 1520 fold: [dart.dynamic, [core.Iterable, dart.dynamic, dart.functionType(dar
t.dynamic, [dart.dynamic, dart.dynamic])]], |
| 1521 removeWhereList: [dart.void, [core.List, dart.functionType(core.bool, [d
art.bottom])]], | 1521 removeWhereList: [dart.void, [core.List, dart.functionType(core.bool, [d
art.dynamic])]], |
| 1522 isEmpty: [core.bool, [core.Iterable]], | 1522 isEmpty: [core.bool, [core.Iterable]], |
| 1523 first: [core.Object, [core.Iterable]], | 1523 first: [dart.dynamic, [core.Iterable]], |
| 1524 last: [core.Object, [core.Iterable]], | 1524 last: [dart.dynamic, [core.Iterable]], |
| 1525 single: [core.Object, [core.Iterable]], | 1525 single: [dart.dynamic, [core.Iterable]], |
| 1526 firstWhere: [core.Object, [core.Iterable, dart.functionType(core.bool, [
dart.bottom]), dart.functionType(core.Object, [])]], | 1526 firstWhere: [dart.dynamic, [core.Iterable, dart.functionType(core.bool,
[dart.dynamic]), dart.functionType(dart.dynamic, [])]], |
| 1527 lastWhere: [core.Object, [core.Iterable, dart.functionType(core.bool, [d
art.bottom]), dart.functionType(core.Object, [])]], | 1527 lastWhere: [dart.dynamic, [core.Iterable, dart.functionType(core.bool, [
dart.dynamic]), dart.functionType(dart.dynamic, [])]], |
| 1528 lastWhereList: [core.Object, [core.List, dart.functionType(core.bool, [d
art.bottom]), dart.functionType(core.Object, [])]], | 1528 lastWhereList: [dart.dynamic, [core.List, dart.functionType(core.bool, [
dart.dynamic]), dart.functionType(dart.dynamic, [])]], |
| 1529 singleWhere: [core.Object, [core.Iterable, dart.functionType(core.bool,
[dart.bottom])]], | 1529 singleWhere: [dart.dynamic, [core.Iterable, dart.functionType(core.bool,
[dart.dynamic])]], |
| 1530 elementAt: [core.Object, [core.Iterable, core.int]], | 1530 elementAt: [dart.dynamic, [core.Iterable, core.int]], |
| 1531 join: [core.String, [core.Iterable], [core.String]], | 1531 join: [core.String, [core.Iterable], [core.String]], |
| 1532 joinList: [core.String, [core.List], [core.String]], | 1532 joinList: [core.String, [core.List], [core.String]], |
| 1533 map: [core.Iterable, [core.Iterable, dart.functionType(core.Object, [dar
t.bottom])]], | 1533 map: [core.Iterable, [core.Iterable, dart.functionType(dart.dynamic, [da
rt.dynamic])]], |
| 1534 mapList: [core.Iterable, [core.List, dart.functionType(core.Object, [dar
t.bottom])]], | 1534 mapList: [core.Iterable, [core.List, dart.functionType(dart.dynamic, [da
rt.dynamic])]], |
| 1535 expand: [core.Iterable, [core.Iterable, dart.functionType(core.Iterable,
[dart.bottom])]], | 1535 expand: [core.Iterable, [core.Iterable, dart.functionType(core.Iterable,
[dart.dynamic])]], |
| 1536 sortList: [dart.void, [core.List, dart.functionType(core.int, [dart.bott
om, dart.bottom])]], | 1536 sortList: [dart.void, [core.List, dart.functionType(core.int, [dart.dyna
mic, dart.dynamic])]], |
| 1537 shuffleList: [dart.void, [core.List, math.Random]], | 1537 shuffleList: [dart.void, [core.List, math.Random]], |
| 1538 indexOfList: [core.int, [core.List, core.Object, core.int]], | 1538 indexOfList: [core.int, [core.List, dart.dynamic, core.int]], |
| 1539 lastIndexOfList: [core.int, [core.List, core.Object, core.int]], | 1539 lastIndexOfList: [core.int, [core.List, dart.dynamic, core.int]], |
| 1540 _rangeCheck: [dart.void, [core.List, core.int, core.int]], | 1540 _rangeCheck: [dart.void, [core.List, core.int, core.int]], |
| 1541 setRangeList: [dart.void, [core.List, core.int, core.int, core.Iterable,
core.int]], | 1541 setRangeList: [dart.void, [core.List, core.int, core.int, core.Iterable,
core.int]], |
| 1542 replaceRangeList: [dart.void, [core.List, core.int, core.int, core.Itera
ble]], | 1542 replaceRangeList: [dart.void, [core.List, core.int, core.int, core.Itera
ble]], |
| 1543 fillRangeList: [dart.void, [core.List, core.int, core.int, core.Object]]
, | 1543 fillRangeList: [dart.void, [core.List, core.int, core.int, dart.dynamic]
], |
| 1544 insertAllList: [dart.void, [core.List, core.int, core.Iterable]], | 1544 insertAllList: [dart.void, [core.List, core.int, core.Iterable]], |
| 1545 setAllList: [dart.void, [core.List, core.int, core.Iterable]], | 1545 setAllList: [dart.void, [core.List, core.int, core.Iterable]], |
| 1546 setContainsAll: [core.bool, [core.Set, core.Iterable]], | 1546 setContainsAll: [core.bool, [core.Set, core.Iterable]], |
| 1547 setIntersection: [core.Set, [core.Set, core.Set, core.Set]], | 1547 setIntersection: [core.Set, [core.Set, core.Set, core.Set]], |
| 1548 setUnion: [core.Set, [core.Set, core.Set, core.Set]], | 1548 setUnion: [core.Set, [core.Set, core.Set, core.Set]], |
| 1549 setDifference: [core.Set, [core.Set, core.Set, core.Set]] | 1549 setDifference: [core.Set, [core.Set, core.Set, core.Set]] |
| 1550 }), | 1550 }), |
| 1551 names: ['contains', 'forEach', 'any', 'every', 'reduce', 'fold', 'removeWh
ereList', 'isEmpty', 'first', 'last', 'single', 'firstWhere', 'lastWhere', 'last
WhereList', 'singleWhere', 'elementAt', 'join', 'joinList', 'map', 'mapList', 'e
xpand', 'sortList', 'shuffleList', 'indexOfList', 'lastIndexOfList', '_rangeChec
k', 'setRangeList', 'replaceRangeList', 'fillRangeList', 'insertAllList', 'setAl
lList', 'setContainsAll', 'setIntersection', 'setUnion', 'setDifference'] | 1551 names: ['contains', 'forEach', 'any', 'every', 'reduce', 'fold', 'removeWh
ereList', 'isEmpty', 'first', 'last', 'single', 'firstWhere', 'lastWhere', 'last
WhereList', 'singleWhere', 'elementAt', 'join', 'joinList', 'map', 'mapList', 'e
xpand', 'sortList', 'shuffleList', 'indexOfList', 'lastIndexOfList', '_rangeChec
k', 'setRangeList', 'replaceRangeList', 'fillRangeList', 'insertAllList', 'setAl
lList', 'setContainsAll', 'setIntersection', 'setUnion', 'setDifference'] |
| 1552 }); | 1552 }); |
| 1553 return IterableMixinWorkaround; | 1553 return IterableMixinWorkaround; |
| (...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 core.RangeError.checkNotNegative(start); | 2016 core.RangeError.checkNotNegative(start); |
| 2017 if (dart.notNull(start) + dart.notNull(length) > dart.notNull(a[dartx.leng
th])) { | 2017 if (dart.notNull(start) + dart.notNull(length) > dart.notNull(a[dartx.leng
th])) { |
| 2018 let message = `${start} + ${length} must be in the range [0..${a[dartx.l
ength]}]`; | 2018 let message = `${start} + ${length} must be in the range [0..${a[dartx.l
ength]}]`; |
| 2019 throw new core.RangeError.range(length, 0, dart.notNull(a[dartx.length])
- dart.notNull(start), "length", message); | 2019 throw new core.RangeError.range(length, 0, dart.notNull(a[dartx.length])
- dart.notNull(start), "length", message); |
| 2020 } | 2020 } |
| 2021 } | 2021 } |
| 2022 } | 2022 } |
| 2023 dart.setSignature(Lists, { | 2023 dart.setSignature(Lists, { |
| 2024 statics: () => ({ | 2024 statics: () => ({ |
| 2025 copy: [dart.void, [core.List, core.int, core.List, core.int, core.int]], | 2025 copy: [dart.void, [core.List, core.int, core.List, core.int, core.int]], |
| 2026 areEqual: [core.bool, [core.List, core.Object]], | 2026 areEqual: [core.bool, [core.List, dart.dynamic]], |
| 2027 indexOf: [core.int, [core.List, core.Object, core.int, core.int]], | 2027 indexOf: [core.int, [core.List, core.Object, core.int, core.int]], |
| 2028 lastIndexOf: [core.int, [core.List, core.Object, core.int]], | 2028 lastIndexOf: [core.int, [core.List, core.Object, core.int]], |
| 2029 indicesCheck: [dart.void, [core.List, core.int, core.int]], | 2029 indicesCheck: [dart.void, [core.List, core.int, core.int]], |
| 2030 rangeCheck: [dart.void, [core.List, core.int, core.int]] | 2030 rangeCheck: [dart.void, [core.List, core.int, core.int]] |
| 2031 }), | 2031 }), |
| 2032 names: ['copy', 'areEqual', 'indexOf', 'lastIndexOf', 'indicesCheck', 'range
Check'] | 2032 names: ['copy', 'areEqual', 'indexOf', 'lastIndexOf', 'indicesCheck', 'range
Check'] |
| 2033 }); | 2033 }); |
| 2034 exports.printToZone = null; | 2034 exports.printToZone = null; |
| 2035 function printToConsole(line) { | 2035 function printToConsole(line) { |
| 2036 _js_primitives.printString(`${line}`); | 2036 _js_primitives.printString(`${line}`); |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2289 } | 2289 } |
| 2290 } | 2290 } |
| 2291 Sort._doSort(a, less, great, compare); | 2291 Sort._doSort(a, less, great, compare); |
| 2292 } else { | 2292 } else { |
| 2293 Sort._doSort(a, less, great, compare); | 2293 Sort._doSort(a, less, great, compare); |
| 2294 } | 2294 } |
| 2295 } | 2295 } |
| 2296 } | 2296 } |
| 2297 dart.setSignature(Sort, { | 2297 dart.setSignature(Sort, { |
| 2298 statics: () => ({ | 2298 statics: () => ({ |
| 2299 sort: [dart.void, [core.List, dart.functionType(core.int, [dart.bottom, da
rt.bottom])]], | 2299 sort: [dart.void, [core.List, dart.functionType(core.int, [dart.dynamic, d
art.dynamic])]], |
| 2300 sortRange: [dart.void, [core.List, core.int, core.int, dart.functionType(c
ore.int, [dart.bottom, dart.bottom])]], | 2300 sortRange: [dart.void, [core.List, core.int, core.int, dart.functionType(c
ore.int, [dart.dynamic, dart.dynamic])]], |
| 2301 _doSort: [dart.void, [core.List, core.int, core.int, dart.functionType(cor
e.int, [dart.bottom, dart.bottom])]], | 2301 _doSort: [dart.void, [core.List, core.int, core.int, dart.functionType(cor
e.int, [dart.dynamic, dart.dynamic])]], |
| 2302 _insertionSort: [dart.void, [core.List, core.int, core.int, dart.functionT
ype(core.int, [dart.bottom, dart.bottom])]], | 2302 _insertionSort: [dart.void, [core.List, core.int, core.int, dart.functionT
ype(core.int, [dart.dynamic, dart.dynamic])]], |
| 2303 _dualPivotQuicksort: [dart.void, [core.List, core.int, core.int, dart.func
tionType(core.int, [dart.bottom, dart.bottom])]] | 2303 _dualPivotQuicksort: [dart.void, [core.List, core.int, core.int, dart.func
tionType(core.int, [dart.dynamic, dart.dynamic])]] |
| 2304 }), | 2304 }), |
| 2305 names: ['sort', 'sortRange', '_doSort', '_insertionSort', '_dualPivotQuickso
rt'] | 2305 names: ['sort', 'sortRange', '_doSort', '_insertionSort', '_dualPivotQuickso
rt'] |
| 2306 }); | 2306 }); |
| 2307 Sort._INSERTION_SORT_THRESHOLD = 32; | 2307 Sort._INSERTION_SORT_THRESHOLD = 32; |
| 2308 let _name = dart.JsSymbol('_name'); | 2308 let _name = dart.JsSymbol('_name'); |
| 2309 class Symbol extends core.Object { | 2309 class Symbol extends core.Object { |
| 2310 Symbol(name) { | 2310 Symbol(name) { |
| 2311 this[_name] = name; | 2311 this[_name] = name; |
| 2312 } | 2312 } |
| 2313 unvalidated(name) { | 2313 unvalidated(name) { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2438 exports.ReversedListIterable = ReversedListIterable; | 2438 exports.ReversedListIterable = ReversedListIterable; |
| 2439 exports.UnmodifiableListError = UnmodifiableListError; | 2439 exports.UnmodifiableListError = UnmodifiableListError; |
| 2440 exports.NonGrowableListError = NonGrowableListError; | 2440 exports.NonGrowableListError = NonGrowableListError; |
| 2441 exports.makeListFixedLength = makeListFixedLength; | 2441 exports.makeListFixedLength = makeListFixedLength; |
| 2442 exports.Lists = Lists; | 2442 exports.Lists = Lists; |
| 2443 exports.printToConsole = printToConsole; | 2443 exports.printToConsole = printToConsole; |
| 2444 exports.Sort = Sort; | 2444 exports.Sort = Sort; |
| 2445 exports.Symbol = Symbol; | 2445 exports.Symbol = Symbol; |
| 2446 exports.POWERS_OF_TEN = POWERS_OF_TEN; | 2446 exports.POWERS_OF_TEN = POWERS_OF_TEN; |
| 2447 }); | 2447 }); |
| OLD | NEW |