OLD | NEW |
1 var collection = dart.defineLibrary(collection, {}); | 1 var collection = dart.defineLibrary(collection, {}); |
2 var _internal = dart.lazyImport(_internal); | 2 var _internal = dart.lazyImport(_internal); |
3 var core = dart.import(core); | 3 var core = dart.import(core); |
4 var _js_helper = dart.lazyImport(_js_helper); | 4 var _js_helper = dart.lazyImport(_js_helper); |
5 var math = dart.lazyImport(math); | 5 var math = dart.lazyImport(math); |
6 (function(exports, _internal, core, _js_helper, math) { | 6 (function(exports, _internal, core, _js_helper, math) { |
7 'use strict'; | 7 'use strict'; |
8 let _source = Symbol('_source'); | 8 let _source = Symbol('_source'); |
9 let UnmodifiableListView$ = dart.generic(function(E) { | 9 let UnmodifiableListView$ = dart.generic(function(E) { |
10 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { | 10 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { |
11 UnmodifiableListView(source) { | 11 UnmodifiableListView(source) { |
12 this[_source] = source; | 12 this[_source] = source; |
13 } | 13 } |
14 get [core.$length]() { | 14 get length() { |
15 return this[_source][core.$length]; | 15 return this[_source].length; |
16 } | 16 } |
17 [core.$get](index) { | 17 get(index) { |
18 return this[_source][core.$elementAt](index); | 18 return this[_source][dartx.elementAt](index); |
19 } | 19 } |
20 } | 20 } |
21 dart.setSignature(UnmodifiableListView, { | 21 dart.setSignature(UnmodifiableListView, { |
22 constructors: () => ({UnmodifiableListView: [exports.UnmodifiableListView$
(E), [core.Iterable$(E)]]}), | 22 constructors: () => ({UnmodifiableListView: [exports.UnmodifiableListView$
(E), [core.Iterable$(E)]]}), |
23 methods: () => ({[core.$get]: [E, [core.int]]}) | 23 methods: () => ({get: [E, [core.int]]}) |
24 }); | 24 }); |
25 return UnmodifiableListView; | 25 return UnmodifiableListView; |
26 }); | 26 }); |
27 dart.defineLazyClassGeneric(exports, 'UnmodifiableListView', {get: Unmodifiabl
eListView$}); | 27 dart.defineLazyClassGeneric(exports, 'UnmodifiableListView', {get: Unmodifiabl
eListView$}); |
28 function _defaultEquals(a, b) { | 28 function _defaultEquals(a, b) { |
29 return dart.equals(a, b); | 29 return dart.equals(a, b); |
30 } | 30 } |
31 dart.fn(_defaultEquals, core.bool, [core.Object, core.Object]); | 31 dart.fn(_defaultEquals, core.bool, [core.Object, core.Object]); |
32 function _defaultHashCode(a) { | 32 function _defaultHashCode(a) { |
33 return dart.hashCode(a); | 33 return dart.hashCode(a); |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 fromIterable: [HashMap$(K, V), [core.Iterable], {key: dart.functionType(
K, [dart.bottom]), value: dart.functionType(V, [dart.bottom])}], | 105 fromIterable: [HashMap$(K, V), [core.Iterable], {key: dart.functionType(
K, [dart.bottom]), value: dart.functionType(V, [dart.bottom])}], |
106 fromIterables: [HashMap$(K, V), [core.Iterable$(K), core.Iterable$(V)]] | 106 fromIterables: [HashMap$(K, V), [core.Iterable$(K), core.Iterable$(V)]] |
107 }) | 107 }) |
108 }); | 108 }); |
109 return HashMap; | 109 return HashMap; |
110 }); | 110 }); |
111 let HashMap = HashMap$(); | 111 let HashMap = HashMap$(); |
112 let SetMixin$ = dart.generic(function(E) { | 112 let SetMixin$ = dart.generic(function(E) { |
113 class SetMixin extends core.Object { | 113 class SetMixin extends core.Object { |
114 [Symbol.iterator]() { | 114 [Symbol.iterator]() { |
115 return new dart.JsIterator(this[core.$iterator]); | 115 return new dart.JsIterator(this.iterator); |
116 } | 116 } |
117 get [core.$isEmpty]() { | 117 get isEmpty() { |
118 return this[core.$length] == 0; | 118 return this.length == 0; |
119 } | 119 } |
120 get [core.$isNotEmpty]() { | 120 get isNotEmpty() { |
121 return this[core.$length] != 0; | 121 return this.length != 0; |
122 } | 122 } |
123 clear() { | 123 clear() { |
124 this.removeAll(this[core.$toList]()); | 124 this.removeAll(this.toList()); |
125 } | 125 } |
126 addAll(elements) { | 126 addAll(elements) { |
127 dart.as(elements, core.Iterable$(E)); | 127 dart.as(elements, core.Iterable$(E)); |
128 for (let element of elements) | 128 for (let element of elements) |
129 this.add(element); | 129 this.add(element); |
130 } | 130 } |
131 removeAll(elements) { | 131 removeAll(elements) { |
132 for (let element of elements) | 132 for (let element of elements) |
133 this.remove(element); | 133 this.remove(element); |
134 } | 134 } |
135 retainAll(elements) { | 135 retainAll(elements) { |
136 let toRemove = this[core.$toSet](); | 136 let toRemove = this.toSet(); |
137 for (let o of elements) { | 137 for (let o of elements) { |
138 toRemove.remove(o); | 138 toRemove.remove(o); |
139 } | 139 } |
140 this.removeAll(toRemove); | 140 this.removeAll(toRemove); |
141 } | 141 } |
142 removeWhere(test) { | 142 removeWhere(test) { |
143 dart.as(test, dart.functionType(core.bool, [E])); | 143 dart.as(test, dart.functionType(core.bool, [E])); |
144 let toRemove = []; | 144 let toRemove = []; |
145 for (let element of this) { | 145 for (let element of this) { |
146 if (test(element)) | 146 if (test(element)) |
147 toRemove[core.$add](element); | 147 toRemove[dartx.add](element); |
148 } | 148 } |
149 this.removeAll(toRemove); | 149 this.removeAll(toRemove); |
150 } | 150 } |
151 retainWhere(test) { | 151 retainWhere(test) { |
152 dart.as(test, dart.functionType(core.bool, [E])); | 152 dart.as(test, dart.functionType(core.bool, [E])); |
153 let toRemove = []; | 153 let toRemove = []; |
154 for (let element of this) { | 154 for (let element of this) { |
155 if (!dart.notNull(test(element))) | 155 if (!dart.notNull(test(element))) |
156 toRemove[core.$add](element); | 156 toRemove[dartx.add](element); |
157 } | 157 } |
158 this.removeAll(toRemove); | 158 this.removeAll(toRemove); |
159 } | 159 } |
160 containsAll(other) { | 160 containsAll(other) { |
161 for (let o of other) { | 161 for (let o of other) { |
162 if (!dart.notNull(this[core.$contains](o))) | 162 if (!dart.notNull(this.contains(o))) |
163 return false; | 163 return false; |
164 } | 164 } |
165 return true; | 165 return true; |
166 } | 166 } |
167 union(other) { | 167 union(other) { |
168 dart.as(other, core.Set$(E)); | 168 dart.as(other, core.Set$(E)); |
169 let _ = this[core.$toSet](); | 169 let _ = this.toSet(); |
170 _.addAll(other); | 170 _.addAll(other); |
171 return _; | 171 return _; |
172 } | 172 } |
173 intersection(other) { | 173 intersection(other) { |
174 let result = this[core.$toSet](); | 174 let result = this.toSet(); |
175 for (let element of this) { | 175 for (let element of this) { |
176 if (!dart.notNull(other[core.$contains](element))) | 176 if (!dart.notNull(other.contains(element))) |
177 result.remove(element); | 177 result.remove(element); |
178 } | 178 } |
179 return result; | 179 return result; |
180 } | 180 } |
181 difference(other) { | 181 difference(other) { |
182 let result = this[core.$toSet](); | 182 let result = this.toSet(); |
183 for (let element of this) { | 183 for (let element of this) { |
184 if (other[core.$contains](element)) | 184 if (other.contains(element)) |
185 result.remove(element); | 185 result.remove(element); |
186 } | 186 } |
187 return result; | 187 return result; |
188 } | 188 } |
189 [core.$toList](opts) { | 189 toList(opts) { |
190 let growable = opts && 'growable' in opts ? opts.growable : true; | 190 let growable = opts && 'growable' in opts ? opts.growable : true; |
191 let result = growable ? (() => { | 191 let result = growable ? (() => { |
192 let _ = core.List$(E).new(); | 192 let _ = core.List$(E).new(); |
193 _[core.$length] = this[core.$length]; | 193 _.length = this.length; |
194 return _; | 194 return _; |
195 }).bind(this)() : core.List$(E).new(this[core.$length]); | 195 }).bind(this)() : core.List$(E).new(this.length); |
196 let i = 0; | 196 let i = 0; |
197 for (let element of this) | 197 for (let element of this) |
198 result[core.$set]((() => { | 198 result[dartx.set]((() => { |
199 let x = i; | 199 let x = i; |
200 i = dart.notNull(x) + 1; | 200 i = dart.notNull(x) + 1; |
201 return x; | 201 return x; |
202 })(), element); | 202 })(), element); |
203 return result; | 203 return result; |
204 } | 204 } |
205 [core.$map](f) { | 205 map(f) { |
206 dart.as(f, dart.functionType(core.Object, [E])); | 206 dart.as(f, dart.functionType(core.Object, [E])); |
207 return new (_internal.EfficientLengthMappedIterable$(E, core.Object))(th
is, f); | 207 return new (_internal.EfficientLengthMappedIterable$(E, core.Object))(th
is, f); |
208 } | 208 } |
209 get [core.$single]() { | 209 get single() { |
210 if (dart.notNull(this[core.$length]) > 1) | 210 if (dart.notNull(this.length) > 1) |
211 throw _internal.IterableElementError.tooMany(); | 211 throw _internal.IterableElementError.tooMany(); |
212 let it = this[core.$iterator]; | 212 let it = this.iterator; |
213 if (!dart.notNull(it.moveNext())) | 213 if (!dart.notNull(it.moveNext())) |
214 throw _internal.IterableElementError.noElement(); | 214 throw _internal.IterableElementError.noElement(); |
215 let result = it.current; | 215 let result = it.current; |
216 return result; | 216 return result; |
217 } | 217 } |
218 toString() { | 218 toString() { |
219 return IterableBase.iterableToFullString(this, '{', '}'); | 219 return IterableBase.iterableToFullString(this, '{', '}'); |
220 } | 220 } |
221 [core.$where](f) { | 221 where(f) { |
222 dart.as(f, dart.functionType(core.bool, [E])); | 222 dart.as(f, dart.functionType(core.bool, [E])); |
223 return new (_internal.WhereIterable$(E))(this, f); | 223 return new (_internal.WhereIterable$(E))(this, f); |
224 } | 224 } |
225 [core.$expand](f) { | 225 expand(f) { |
226 dart.as(f, dart.functionType(core.Iterable, [E])); | 226 dart.as(f, dart.functionType(core.Iterable, [E])); |
227 return new (_internal.ExpandIterable$(E, core.Object))(this, f); | 227 return new (_internal.ExpandIterable$(E, core.Object))(this, f); |
228 } | 228 } |
229 [core.$forEach](f) { | 229 forEach(f) { |
230 dart.as(f, dart.functionType(dart.void, [E])); | 230 dart.as(f, dart.functionType(dart.void, [E])); |
231 for (let element of this) | 231 for (let element of this) |
232 f(element); | 232 f(element); |
233 } | 233 } |
234 [core.$reduce](combine) { | 234 reduce(combine) { |
235 dart.as(combine, dart.functionType(E, [E, E])); | 235 dart.as(combine, dart.functionType(E, [E, E])); |
236 let iterator = this[core.$iterator]; | 236 let iterator = this.iterator; |
237 if (!dart.notNull(iterator.moveNext())) { | 237 if (!dart.notNull(iterator.moveNext())) { |
238 throw _internal.IterableElementError.noElement(); | 238 throw _internal.IterableElementError.noElement(); |
239 } | 239 } |
240 let value = iterator.current; | 240 let value = iterator.current; |
241 while (iterator.moveNext()) { | 241 while (iterator.moveNext()) { |
242 value = combine(value, iterator.current); | 242 value = combine(value, iterator.current); |
243 } | 243 } |
244 return value; | 244 return value; |
245 } | 245 } |
246 [core.$fold](initialValue, combine) { | 246 fold(initialValue, combine) { |
247 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); | 247 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); |
248 let value = initialValue; | 248 let value = initialValue; |
249 for (let element of this) | 249 for (let element of this) |
250 value = dart.dcall(combine, value, element); | 250 value = dart.dcall(combine, value, element); |
251 return value; | 251 return value; |
252 } | 252 } |
253 [core.$every](f) { | 253 every(f) { |
254 dart.as(f, dart.functionType(core.bool, [E])); | 254 dart.as(f, dart.functionType(core.bool, [E])); |
255 for (let element of this) { | 255 for (let element of this) { |
256 if (!dart.notNull(f(element))) | 256 if (!dart.notNull(f(element))) |
257 return false; | 257 return false; |
258 } | 258 } |
259 return true; | 259 return true; |
260 } | 260 } |
261 [core.$join](separator) { | 261 join(separator) { |
262 if (separator === void 0) | 262 if (separator === void 0) |
263 separator = ""; | 263 separator = ""; |
264 let iterator = this[core.$iterator]; | 264 let iterator = this.iterator; |
265 if (!dart.notNull(iterator.moveNext())) | 265 if (!dart.notNull(iterator.moveNext())) |
266 return ""; | 266 return ""; |
267 let buffer = new core.StringBuffer(); | 267 let buffer = new core.StringBuffer(); |
268 if (separator == null || separator == "") { | 268 if (separator == null || separator == "") { |
269 do { | 269 do { |
270 buffer.write(`${iterator.current}`); | 270 buffer.write(`${iterator.current}`); |
271 } while (iterator.moveNext()); | 271 } while (iterator.moveNext()); |
272 } else { | 272 } else { |
273 buffer.write(`${iterator.current}`); | 273 buffer.write(`${iterator.current}`); |
274 while (iterator.moveNext()) { | 274 while (iterator.moveNext()) { |
275 buffer.write(separator); | 275 buffer.write(separator); |
276 buffer.write(`${iterator.current}`); | 276 buffer.write(`${iterator.current}`); |
277 } | 277 } |
278 } | 278 } |
279 return dart.toString(buffer); | 279 return dart.toString(buffer); |
280 } | 280 } |
281 [core.$any](test) { | 281 any(test) { |
282 dart.as(test, dart.functionType(core.bool, [E])); | 282 dart.as(test, dart.functionType(core.bool, [E])); |
283 for (let element of this) { | 283 for (let element of this) { |
284 if (test(element)) | 284 if (test(element)) |
285 return true; | 285 return true; |
286 } | 286 } |
287 return false; | 287 return false; |
288 } | 288 } |
289 [core.$take](n) { | 289 take(n) { |
290 return _internal.TakeIterable$(E).new(this, n); | 290 return _internal.TakeIterable$(E).new(this, n); |
291 } | 291 } |
292 [core.$takeWhile](test) { | 292 takeWhile(test) { |
293 dart.as(test, dart.functionType(core.bool, [E])); | 293 dart.as(test, dart.functionType(core.bool, [E])); |
294 return new (_internal.TakeWhileIterable$(E))(this, test); | 294 return new (_internal.TakeWhileIterable$(E))(this, test); |
295 } | 295 } |
296 [core.$skip](n) { | 296 skip(n) { |
297 return _internal.SkipIterable$(E).new(this, n); | 297 return _internal.SkipIterable$(E).new(this, n); |
298 } | 298 } |
299 [core.$skipWhile](test) { | 299 skipWhile(test) { |
300 dart.as(test, dart.functionType(core.bool, [E])); | 300 dart.as(test, dart.functionType(core.bool, [E])); |
301 return new (_internal.SkipWhileIterable$(E))(this, test); | 301 return new (_internal.SkipWhileIterable$(E))(this, test); |
302 } | 302 } |
303 get [core.$first]() { | 303 get first() { |
304 let it = this[core.$iterator]; | 304 let it = this.iterator; |
305 if (!dart.notNull(it.moveNext())) { | 305 if (!dart.notNull(it.moveNext())) { |
306 throw _internal.IterableElementError.noElement(); | 306 throw _internal.IterableElementError.noElement(); |
307 } | 307 } |
308 return it.current; | 308 return it.current; |
309 } | 309 } |
310 get [core.$last]() { | 310 get last() { |
311 let it = this[core.$iterator]; | 311 let it = this.iterator; |
312 if (!dart.notNull(it.moveNext())) { | 312 if (!dart.notNull(it.moveNext())) { |
313 throw _internal.IterableElementError.noElement(); | 313 throw _internal.IterableElementError.noElement(); |
314 } | 314 } |
315 let result = null; | 315 let result = null; |
316 do { | 316 do { |
317 result = it.current; | 317 result = it.current; |
318 } while (it.moveNext()); | 318 } while (it.moveNext()); |
319 return result; | 319 return result; |
320 } | 320 } |
321 [core.$firstWhere](test, opts) { | 321 firstWhere(test, opts) { |
322 dart.as(test, dart.functionType(core.bool, [E])); | 322 dart.as(test, dart.functionType(core.bool, [E])); |
323 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 323 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
324 dart.as(orElse, dart.functionType(E, [])); | 324 dart.as(orElse, dart.functionType(E, [])); |
325 for (let element of this) { | 325 for (let element of this) { |
326 if (test(element)) | 326 if (test(element)) |
327 return element; | 327 return element; |
328 } | 328 } |
329 if (orElse != null) | 329 if (orElse != null) |
330 return orElse(); | 330 return orElse(); |
331 throw _internal.IterableElementError.noElement(); | 331 throw _internal.IterableElementError.noElement(); |
332 } | 332 } |
333 [core.$lastWhere](test, opts) { | 333 lastWhere(test, opts) { |
334 dart.as(test, dart.functionType(core.bool, [E])); | 334 dart.as(test, dart.functionType(core.bool, [E])); |
335 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 335 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
336 dart.as(orElse, dart.functionType(E, [])); | 336 dart.as(orElse, dart.functionType(E, [])); |
337 let result = null; | 337 let result = null; |
338 let foundMatching = false; | 338 let foundMatching = false; |
339 for (let element of this) { | 339 for (let element of this) { |
340 if (test(element)) { | 340 if (test(element)) { |
341 result = element; | 341 result = element; |
342 foundMatching = true; | 342 foundMatching = true; |
343 } | 343 } |
344 } | 344 } |
345 if (foundMatching) | 345 if (foundMatching) |
346 return result; | 346 return result; |
347 if (orElse != null) | 347 if (orElse != null) |
348 return orElse(); | 348 return orElse(); |
349 throw _internal.IterableElementError.noElement(); | 349 throw _internal.IterableElementError.noElement(); |
350 } | 350 } |
351 [core.$singleWhere](test) { | 351 singleWhere(test) { |
352 dart.as(test, dart.functionType(core.bool, [E])); | 352 dart.as(test, dart.functionType(core.bool, [E])); |
353 let result = null; | 353 let result = null; |
354 let foundMatching = false; | 354 let foundMatching = false; |
355 for (let element of this) { | 355 for (let element of this) { |
356 if (test(element)) { | 356 if (test(element)) { |
357 if (foundMatching) { | 357 if (foundMatching) { |
358 throw _internal.IterableElementError.tooMany(); | 358 throw _internal.IterableElementError.tooMany(); |
359 } | 359 } |
360 result = element; | 360 result = element; |
361 foundMatching = true; | 361 foundMatching = true; |
362 } | 362 } |
363 } | 363 } |
364 if (foundMatching) | 364 if (foundMatching) |
365 return result; | 365 return result; |
366 throw _internal.IterableElementError.noElement(); | 366 throw _internal.IterableElementError.noElement(); |
367 } | 367 } |
368 [core.$elementAt](index) { | 368 elementAt(index) { |
369 if (!(typeof index == 'number')) | 369 if (!(typeof index == 'number')) |
370 throw new core.ArgumentError.notNull("index"); | 370 throw new core.ArgumentError.notNull("index"); |
371 core.RangeError.checkNotNegative(index, "index"); | 371 core.RangeError.checkNotNegative(index, "index"); |
372 let elementIndex = 0; | 372 let elementIndex = 0; |
373 for (let element of this) { | 373 for (let element of this) { |
374 if (index == elementIndex) | 374 if (index == elementIndex) |
375 return element; | 375 return element; |
376 elementIndex = dart.notNull(elementIndex) + 1; | 376 elementIndex = dart.notNull(elementIndex) + 1; |
377 } | 377 } |
378 throw core.RangeError.index(index, this, "index", null, elementIndex); | 378 throw core.RangeError.index(index, this, "index", null, elementIndex); |
379 } | 379 } |
380 } | 380 } |
381 SetMixin[dart.implements] = () => [core.Set$(E)]; | 381 SetMixin[dart.implements] = () => [core.Set$(E)]; |
| 382 dart.implementExtension(SetMixin, () => [core.Iterable]); |
382 dart.setSignature(SetMixin, { | 383 dart.setSignature(SetMixin, { |
383 methods: () => ({ | 384 methods: () => ({ |
384 clear: [dart.void, []], | 385 clear: [dart.void, []], |
385 addAll: [dart.void, [core.Iterable$(E)]], | 386 addAll: [dart.void, [core.Iterable$(E)]], |
386 removeAll: [dart.void, [core.Iterable$(core.Object)]], | 387 removeAll: [dart.void, [core.Iterable$(core.Object)]], |
387 retainAll: [dart.void, [core.Iterable$(core.Object)]], | 388 retainAll: [dart.void, [core.Iterable$(core.Object)]], |
388 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 389 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
389 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 390 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
390 containsAll: [core.bool, [core.Iterable$(core.Object)]], | 391 containsAll: [core.bool, [core.Iterable$(core.Object)]], |
391 union: [core.Set$(E), [core.Set$(E)]], | 392 union: [core.Set$(E), [core.Set$(E)]], |
392 intersection: [core.Set$(E), [core.Set$(core.Object)]], | 393 intersection: [core.Set$(E), [core.Set$(core.Object)]], |
393 difference: [core.Set$(E), [core.Set$(core.Object)]], | 394 difference: [core.Set$(E), [core.Set$(core.Object)]], |
394 [core.$toList]: [core.List$(E), [], {growable: core.bool}], | 395 toList: [core.List$(E), [], {growable: core.bool}], |
395 [core.$map]: [core.Iterable, [dart.functionType(core.Object, [E])]], | 396 map: [core.Iterable, [dart.functionType(core.Object, [E])]], |
396 [core.$where]: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 397 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
397 [core.$expand]: [core.Iterable, [dart.functionType(core.Iterable, [E])]]
, | 398 expand: [core.Iterable, [dart.functionType(core.Iterable, [E])]], |
398 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 399 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
399 [core.$reduce]: [E, [dart.functionType(E, [E, E])]], | 400 reduce: [E, [dart.functionType(E, [E, E])]], |
400 [core.$fold]: [core.Object, [core.Object, dart.functionType(core.Object,
[dart.bottom, E])]], | 401 fold: [core.Object, [core.Object, dart.functionType(core.Object, [dart.b
ottom, E])]], |
401 [core.$every]: [core.bool, [dart.functionType(core.bool, [E])]], | 402 every: [core.bool, [dart.functionType(core.bool, [E])]], |
402 [core.$join]: [core.String, [], [core.String]], | 403 join: [core.String, [], [core.String]], |
403 [core.$any]: [core.bool, [dart.functionType(core.bool, [E])]], | 404 any: [core.bool, [dart.functionType(core.bool, [E])]], |
404 [core.$take]: [core.Iterable$(E), [core.int]], | 405 take: [core.Iterable$(E), [core.int]], |
405 [core.$takeWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 406 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
406 [core.$skip]: [core.Iterable$(E), [core.int]], | 407 skip: [core.Iterable$(E), [core.int]], |
407 [core.$skipWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 408 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
408 [core.$firstWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: da
rt.functionType(E, [])}], | 409 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct
ionType(E, [])}], |
409 [core.$lastWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: dar
t.functionType(E, [])}], | 410 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi
onType(E, [])}], |
410 [core.$singleWhere]: [E, [dart.functionType(core.bool, [E])]], | 411 singleWhere: [E, [dart.functionType(core.bool, [E])]], |
411 [core.$elementAt]: [E, [core.int]] | 412 elementAt: [E, [core.int]] |
412 }) | 413 }) |
413 }); | 414 }); |
414 return SetMixin; | 415 return SetMixin; |
415 }); | 416 }); |
416 let SetMixin = SetMixin$(); | 417 let SetMixin = SetMixin$(); |
417 let SetBase$ = dart.generic(function(E) { | 418 let SetBase$ = dart.generic(function(E) { |
418 class SetBase extends SetMixin$(E) { | 419 class SetBase extends SetMixin$(E) { |
419 static setToString(set) { | 420 static setToString(set) { |
420 return IterableBase.iterableToFullString(set, '{', '}'); | 421 return IterableBase.iterableToFullString(set, '{', '}'); |
421 } | 422 } |
422 } | 423 } |
423 dart.setSignature(SetBase, { | 424 dart.setSignature(SetBase, { |
424 statics: () => ({setToString: [core.String, [core.Set]]}), | 425 statics: () => ({setToString: [core.String, [core.Set]]}), |
425 names: ['setToString'] | 426 names: ['setToString'] |
426 }); | 427 }); |
427 return SetBase; | 428 return SetBase; |
428 }); | 429 }); |
429 let SetBase = SetBase$(); | 430 let SetBase = SetBase$(); |
430 let _newSet = Symbol('_newSet'); | 431 let _newSet = Symbol('_newSet'); |
431 let _HashSetBase$ = dart.generic(function(E) { | 432 let _HashSetBase$ = dart.generic(function(E) { |
432 class _HashSetBase extends SetBase$(E) { | 433 class _HashSetBase extends SetBase$(E) { |
433 difference(other) { | 434 difference(other) { |
434 let result = this[_newSet](); | 435 let result = this[_newSet](); |
435 for (let element of this) { | 436 for (let element of this) { |
436 if (!dart.notNull(other[core.$contains](element))) | 437 if (!dart.notNull(other.contains(element))) |
437 result.add(element); | 438 result.add(element); |
438 } | 439 } |
439 return result; | 440 return result; |
440 } | 441 } |
441 intersection(other) { | 442 intersection(other) { |
442 let result = this[_newSet](); | 443 let result = this[_newSet](); |
443 for (let element of this) { | 444 for (let element of this) { |
444 if (other[core.$contains](element)) | 445 if (other.contains(element)) |
445 result.add(element); | 446 result.add(element); |
446 } | 447 } |
447 return result; | 448 return result; |
448 } | 449 } |
449 [core.$toSet]() { | 450 toSet() { |
450 return (() => { | 451 return (() => { |
451 let _ = this[_newSet](); | 452 let _ = this[_newSet](); |
452 _.addAll(this); | 453 _.addAll(this); |
453 return _; | 454 return _; |
454 }).bind(this)(); | 455 }).bind(this)(); |
455 } | 456 } |
456 } | 457 } |
457 dart.setSignature(_HashSetBase, { | 458 dart.setSignature(_HashSetBase, { |
458 methods: () => ({ | 459 methods: () => ({ |
459 difference: [core.Set$(E), [core.Set$(core.Object)]], | 460 difference: [core.Set$(E), [core.Set$(core.Object)]], |
460 intersection: [core.Set$(E), [core.Set$(core.Object)]], | 461 intersection: [core.Set$(E), [core.Set$(core.Object)]], |
461 [core.$toSet]: [core.Set$(E), []] | 462 toSet: [core.Set$(E), []] |
462 }) | 463 }) |
463 }); | 464 }); |
464 return _HashSetBase; | 465 return _HashSetBase; |
465 }); | 466 }); |
466 let _HashSetBase = _HashSetBase$(); | 467 let _HashSetBase = _HashSetBase$(); |
467 let HashSet$ = dart.generic(function(E) { | 468 let HashSet$ = dart.generic(function(E) { |
468 class HashSet extends core.Object { | 469 class HashSet extends core.Object { |
469 static new(opts) { | 470 static new(opts) { |
470 let equals = opts && 'equals' in opts ? opts.equals : null; | 471 let equals = opts && 'equals' in opts ? opts.equals : null; |
471 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; | 472 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; |
(...skipping 25 matching lines...) Expand all Loading... |
497 static identity() { | 498 static identity() { |
498 return new (_IdentityHashSet$(E))(); | 499 return new (_IdentityHashSet$(E))(); |
499 } | 500 } |
500 static from(elements) { | 501 static from(elements) { |
501 let result = HashSet$(E).new(); | 502 let result = HashSet$(E).new(); |
502 for (let e of dart.as(elements, core.Iterable$(E))) | 503 for (let e of dart.as(elements, core.Iterable$(E))) |
503 result.add(e); | 504 result.add(e); |
504 return result; | 505 return result; |
505 } | 506 } |
506 [Symbol.iterator]() { | 507 [Symbol.iterator]() { |
507 return new dart.JsIterator(this[core.$iterator]); | 508 return new dart.JsIterator(this.iterator); |
508 } | 509 } |
509 } | 510 } |
510 HashSet[dart.implements] = () => [core.Set$(E)]; | 511 HashSet[dart.implements] = () => [core.Set$(E)]; |
| 512 dart.implementExtension(HashSet, () => [core.Iterable]); |
511 dart.setSignature(HashSet, { | 513 dart.setSignature(HashSet, { |
512 constructors: () => ({ | 514 constructors: () => ({ |
513 new: [HashSet$(E), [], {equals: dart.functionType(core.bool, [E, E]), ha
shCode: dart.functionType(core.int, [E]), isValidKey: dart.functionType(core.boo
l, [core.Object])}], | 515 new: [HashSet$(E), [], {equals: dart.functionType(core.bool, [E, E]), ha
shCode: dart.functionType(core.int, [E]), isValidKey: dart.functionType(core.boo
l, [core.Object])}], |
514 identity: [HashSet$(E), []], | 516 identity: [HashSet$(E), []], |
515 from: [HashSet$(E), [core.Iterable]] | 517 from: [HashSet$(E), [core.Iterable]] |
516 }) | 518 }) |
517 }); | 519 }); |
518 return HashSet; | 520 return HashSet; |
519 }); | 521 }); |
520 let HashSet = HashSet$(); | 522 let HashSet = HashSet$(); |
521 let IterableMixin$ = dart.generic(function(E) { | 523 let IterableMixin$ = dart.generic(function(E) { |
522 class IterableMixin extends core.Object { | 524 class IterableMixin extends core.Object { |
523 [core.$map](f) { | 525 map(f) { |
524 dart.as(f, dart.functionType(core.Object, [E])); | 526 dart.as(f, dart.functionType(core.Object, [E])); |
525 return _internal.MappedIterable$(E, core.Object).new(this, f); | 527 return _internal.MappedIterable$(E, core.Object).new(this, f); |
526 } | 528 } |
527 [core.$where](f) { | 529 where(f) { |
528 dart.as(f, dart.functionType(core.bool, [E])); | 530 dart.as(f, dart.functionType(core.bool, [E])); |
529 return new (_internal.WhereIterable$(E))(this, f); | 531 return new (_internal.WhereIterable$(E))(this, f); |
530 } | 532 } |
531 [core.$expand](f) { | 533 expand(f) { |
532 dart.as(f, dart.functionType(core.Iterable, [E])); | 534 dart.as(f, dart.functionType(core.Iterable, [E])); |
533 return new (_internal.ExpandIterable$(E, core.Object))(this, f); | 535 return new (_internal.ExpandIterable$(E, core.Object))(this, f); |
534 } | 536 } |
535 [core.$contains](element) { | 537 contains(element) { |
536 for (let e of this) { | 538 for (let e of this) { |
537 if (dart.equals(e, element)) | 539 if (dart.equals(e, element)) |
538 return true; | 540 return true; |
539 } | 541 } |
540 return false; | 542 return false; |
541 } | 543 } |
542 [core.$forEach](f) { | 544 forEach(f) { |
543 dart.as(f, dart.functionType(dart.void, [E])); | 545 dart.as(f, dart.functionType(dart.void, [E])); |
544 for (let element of this) | 546 for (let element of this) |
545 f(element); | 547 f(element); |
546 } | 548 } |
547 [core.$reduce](combine) { | 549 reduce(combine) { |
548 dart.as(combine, dart.functionType(E, [E, E])); | 550 dart.as(combine, dart.functionType(E, [E, E])); |
549 let iterator = this[core.$iterator]; | 551 let iterator = this.iterator; |
550 if (!dart.notNull(iterator.moveNext())) { | 552 if (!dart.notNull(iterator.moveNext())) { |
551 throw _internal.IterableElementError.noElement(); | 553 throw _internal.IterableElementError.noElement(); |
552 } | 554 } |
553 let value = iterator.current; | 555 let value = iterator.current; |
554 while (iterator.moveNext()) { | 556 while (iterator.moveNext()) { |
555 value = combine(value, iterator.current); | 557 value = combine(value, iterator.current); |
556 } | 558 } |
557 return value; | 559 return value; |
558 } | 560 } |
559 [core.$fold](initialValue, combine) { | 561 fold(initialValue, combine) { |
560 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); | 562 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); |
561 let value = initialValue; | 563 let value = initialValue; |
562 for (let element of this) | 564 for (let element of this) |
563 value = dart.dcall(combine, value, element); | 565 value = dart.dcall(combine, value, element); |
564 return value; | 566 return value; |
565 } | 567 } |
566 [core.$every](f) { | 568 every(f) { |
567 dart.as(f, dart.functionType(core.bool, [E])); | 569 dart.as(f, dart.functionType(core.bool, [E])); |
568 for (let element of this) { | 570 for (let element of this) { |
569 if (!dart.notNull(f(element))) | 571 if (!dart.notNull(f(element))) |
570 return false; | 572 return false; |
571 } | 573 } |
572 return true; | 574 return true; |
573 } | 575 } |
574 [core.$join](separator) { | 576 join(separator) { |
575 if (separator === void 0) | 577 if (separator === void 0) |
576 separator = ""; | 578 separator = ""; |
577 let iterator = this[core.$iterator]; | 579 let iterator = this.iterator; |
578 if (!dart.notNull(iterator.moveNext())) | 580 if (!dart.notNull(iterator.moveNext())) |
579 return ""; | 581 return ""; |
580 let buffer = new core.StringBuffer(); | 582 let buffer = new core.StringBuffer(); |
581 if (separator == null || separator == "") { | 583 if (separator == null || separator == "") { |
582 do { | 584 do { |
583 buffer.write(`${iterator.current}`); | 585 buffer.write(`${iterator.current}`); |
584 } while (iterator.moveNext()); | 586 } while (iterator.moveNext()); |
585 } else { | 587 } else { |
586 buffer.write(`${iterator.current}`); | 588 buffer.write(`${iterator.current}`); |
587 while (iterator.moveNext()) { | 589 while (iterator.moveNext()) { |
588 buffer.write(separator); | 590 buffer.write(separator); |
589 buffer.write(`${iterator.current}`); | 591 buffer.write(`${iterator.current}`); |
590 } | 592 } |
591 } | 593 } |
592 return dart.toString(buffer); | 594 return dart.toString(buffer); |
593 } | 595 } |
594 [core.$any](f) { | 596 any(f) { |
595 dart.as(f, dart.functionType(core.bool, [E])); | 597 dart.as(f, dart.functionType(core.bool, [E])); |
596 for (let element of this) { | 598 for (let element of this) { |
597 if (f(element)) | 599 if (f(element)) |
598 return true; | 600 return true; |
599 } | 601 } |
600 return false; | 602 return false; |
601 } | 603 } |
602 [core.$toList](opts) { | 604 toList(opts) { |
603 let growable = opts && 'growable' in opts ? opts.growable : true; | 605 let growable = opts && 'growable' in opts ? opts.growable : true; |
604 return core.List$(E).from(this, {growable: growable}); | 606 return core.List$(E).from(this, {growable: growable}); |
605 } | 607 } |
606 [core.$toSet]() { | 608 toSet() { |
607 return core.Set$(E).from(this); | 609 return core.Set$(E).from(this); |
608 } | 610 } |
609 get [core.$length]() { | 611 get length() { |
610 dart.assert(!dart.is(this, _internal.EfficientLength)); | 612 dart.assert(!dart.is(this, _internal.EfficientLength)); |
611 let count = 0; | 613 let count = 0; |
612 let it = this[core.$iterator]; | 614 let it = this[dartx.iterator]; |
613 while (it.moveNext()) { | 615 while (it.moveNext()) { |
614 count = dart.notNull(count) + 1; | 616 count = dart.notNull(count) + 1; |
615 } | 617 } |
616 return count; | 618 return count; |
617 } | 619 } |
618 get [core.$isEmpty]() { | 620 get isEmpty() { |
619 return !dart.notNull(this[core.$iterator].moveNext()); | 621 return !dart.notNull(this[dartx.iterator].moveNext()); |
620 } | 622 } |
621 get [core.$isNotEmpty]() { | 623 get isNotEmpty() { |
622 return !dart.notNull(this[core.$isEmpty]); | 624 return !dart.notNull(this.isEmpty); |
623 } | 625 } |
624 [core.$take](n) { | 626 take(n) { |
625 return _internal.TakeIterable$(E).new(this, n); | 627 return _internal.TakeIterable$(E).new(this, n); |
626 } | 628 } |
627 [core.$takeWhile](test) { | 629 takeWhile(test) { |
628 dart.as(test, dart.functionType(core.bool, [E])); | 630 dart.as(test, dart.functionType(core.bool, [E])); |
629 return new (_internal.TakeWhileIterable$(E))(this, test); | 631 return new (_internal.TakeWhileIterable$(E))(this, test); |
630 } | 632 } |
631 [core.$skip](n) { | 633 skip(n) { |
632 return _internal.SkipIterable$(E).new(this, n); | 634 return _internal.SkipIterable$(E).new(this, n); |
633 } | 635 } |
634 [core.$skipWhile](test) { | 636 skipWhile(test) { |
635 dart.as(test, dart.functionType(core.bool, [E])); | 637 dart.as(test, dart.functionType(core.bool, [E])); |
636 return new (_internal.SkipWhileIterable$(E))(this, test); | 638 return new (_internal.SkipWhileIterable$(E))(this, test); |
637 } | 639 } |
638 get [core.$first]() { | 640 get first() { |
639 let it = this[core.$iterator]; | 641 let it = this[dartx.iterator]; |
640 if (!dart.notNull(it.moveNext())) { | 642 if (!dart.notNull(it.moveNext())) { |
641 throw _internal.IterableElementError.noElement(); | 643 throw _internal.IterableElementError.noElement(); |
642 } | 644 } |
643 return it.current; | 645 return it.current; |
644 } | 646 } |
645 get [core.$last]() { | 647 get last() { |
646 let it = this[core.$iterator]; | 648 let it = this[dartx.iterator]; |
647 if (!dart.notNull(it.moveNext())) { | 649 if (!dart.notNull(it.moveNext())) { |
648 throw _internal.IterableElementError.noElement(); | 650 throw _internal.IterableElementError.noElement(); |
649 } | 651 } |
650 let result = null; | 652 let result = null; |
651 do { | 653 do { |
652 result = it.current; | 654 result = it.current; |
653 } while (it.moveNext()); | 655 } while (it.moveNext()); |
654 return result; | 656 return result; |
655 } | 657 } |
656 get [core.$single]() { | 658 get single() { |
657 let it = this[core.$iterator]; | 659 let it = this[dartx.iterator]; |
658 if (!dart.notNull(it.moveNext())) | 660 if (!dart.notNull(it.moveNext())) |
659 throw _internal.IterableElementError.noElement(); | 661 throw _internal.IterableElementError.noElement(); |
660 let result = it.current; | 662 let result = it.current; |
661 if (it.moveNext()) | 663 if (it.moveNext()) |
662 throw _internal.IterableElementError.tooMany(); | 664 throw _internal.IterableElementError.tooMany(); |
663 return result; | 665 return result; |
664 } | 666 } |
665 [core.$firstWhere](test, opts) { | 667 firstWhere(test, opts) { |
666 dart.as(test, dart.functionType(core.bool, [E])); | 668 dart.as(test, dart.functionType(core.bool, [E])); |
667 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 669 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
668 dart.as(orElse, dart.functionType(E, [])); | 670 dart.as(orElse, dart.functionType(E, [])); |
669 for (let element of this) { | 671 for (let element of this) { |
670 if (test(element)) | 672 if (test(element)) |
671 return element; | 673 return element; |
672 } | 674 } |
673 if (orElse != null) | 675 if (orElse != null) |
674 return orElse(); | 676 return orElse(); |
675 throw _internal.IterableElementError.noElement(); | 677 throw _internal.IterableElementError.noElement(); |
676 } | 678 } |
677 [core.$lastWhere](test, opts) { | 679 lastWhere(test, opts) { |
678 dart.as(test, dart.functionType(core.bool, [E])); | 680 dart.as(test, dart.functionType(core.bool, [E])); |
679 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 681 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
680 dart.as(orElse, dart.functionType(E, [])); | 682 dart.as(orElse, dart.functionType(E, [])); |
681 let result = null; | 683 let result = null; |
682 let foundMatching = false; | 684 let foundMatching = false; |
683 for (let element of this) { | 685 for (let element of this) { |
684 if (test(element)) { | 686 if (test(element)) { |
685 result = element; | 687 result = element; |
686 foundMatching = true; | 688 foundMatching = true; |
687 } | 689 } |
688 } | 690 } |
689 if (foundMatching) | 691 if (foundMatching) |
690 return result; | 692 return result; |
691 if (orElse != null) | 693 if (orElse != null) |
692 return orElse(); | 694 return orElse(); |
693 throw _internal.IterableElementError.noElement(); | 695 throw _internal.IterableElementError.noElement(); |
694 } | 696 } |
695 [core.$singleWhere](test) { | 697 singleWhere(test) { |
696 dart.as(test, dart.functionType(core.bool, [E])); | 698 dart.as(test, dart.functionType(core.bool, [E])); |
697 let result = null; | 699 let result = null; |
698 let foundMatching = false; | 700 let foundMatching = false; |
699 for (let element of this) { | 701 for (let element of this) { |
700 if (test(element)) { | 702 if (test(element)) { |
701 if (foundMatching) { | 703 if (foundMatching) { |
702 throw _internal.IterableElementError.tooMany(); | 704 throw _internal.IterableElementError.tooMany(); |
703 } | 705 } |
704 result = element; | 706 result = element; |
705 foundMatching = true; | 707 foundMatching = true; |
706 } | 708 } |
707 } | 709 } |
708 if (foundMatching) | 710 if (foundMatching) |
709 return result; | 711 return result; |
710 throw _internal.IterableElementError.noElement(); | 712 throw _internal.IterableElementError.noElement(); |
711 } | 713 } |
712 [core.$elementAt](index) { | 714 elementAt(index) { |
713 if (!(typeof index == 'number')) | 715 if (!(typeof index == 'number')) |
714 throw new core.ArgumentError.notNull("index"); | 716 throw new core.ArgumentError.notNull("index"); |
715 core.RangeError.checkNotNegative(index, "index"); | 717 core.RangeError.checkNotNegative(index, "index"); |
716 let elementIndex = 0; | 718 let elementIndex = 0; |
717 for (let element of this) { | 719 for (let element of this) { |
718 if (index == elementIndex) | 720 if (index == elementIndex) |
719 return element; | 721 return element; |
720 elementIndex = dart.notNull(elementIndex) + 1; | 722 elementIndex = dart.notNull(elementIndex) + 1; |
721 } | 723 } |
722 throw core.RangeError.index(index, this, "index", null, elementIndex); | 724 throw core.RangeError.index(index, this, "index", null, elementIndex); |
723 } | 725 } |
724 toString() { | 726 toString() { |
725 return IterableBase.iterableToShortString(this, '(', ')'); | 727 return IterableBase.iterableToShortString(this, '(', ')'); |
726 } | 728 } |
727 [Symbol.iterator]() { | 729 [Symbol.iterator]() { |
728 return new dart.JsIterator(this[core.$iterator]); | 730 return new dart.JsIterator(this.iterator); |
729 } | 731 } |
730 } | 732 } |
731 IterableMixin[dart.implements] = () => [core.Iterable$(E)]; | 733 IterableMixin[dart.implements] = () => [core.Iterable$(E)]; |
| 734 dart.implementExtension(IterableMixin, () => [core.Iterable]); |
732 dart.setSignature(IterableMixin, { | 735 dart.setSignature(IterableMixin, { |
733 methods: () => ({ | 736 methods: () => ({ |
734 [core.$map]: [core.Iterable, [dart.functionType(core.Object, [E])]], | 737 map: [core.Iterable, [dart.functionType(core.Object, [E])]], |
735 [core.$where]: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 738 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
736 [core.$expand]: [core.Iterable, [dart.functionType(core.Iterable, [E])]]
, | 739 expand: [core.Iterable, [dart.functionType(core.Iterable, [E])]], |
737 [core.$contains]: [core.bool, [core.Object]], | 740 contains: [core.bool, [core.Object]], |
738 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 741 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
739 [core.$reduce]: [E, [dart.functionType(E, [E, E])]], | 742 reduce: [E, [dart.functionType(E, [E, E])]], |
740 [core.$fold]: [core.Object, [core.Object, dart.functionType(core.Object,
[dart.bottom, E])]], | 743 fold: [core.Object, [core.Object, dart.functionType(core.Object, [dart.b
ottom, E])]], |
741 [core.$every]: [core.bool, [dart.functionType(core.bool, [E])]], | 744 every: [core.bool, [dart.functionType(core.bool, [E])]], |
742 [core.$join]: [core.String, [], [core.String]], | 745 join: [core.String, [], [core.String]], |
743 [core.$any]: [core.bool, [dart.functionType(core.bool, [E])]], | 746 any: [core.bool, [dart.functionType(core.bool, [E])]], |
744 [core.$toList]: [core.List$(E), [], {growable: core.bool}], | 747 toList: [core.List$(E), [], {growable: core.bool}], |
745 [core.$toSet]: [core.Set$(E), []], | 748 toSet: [core.Set$(E), []], |
746 [core.$take]: [core.Iterable$(E), [core.int]], | 749 take: [core.Iterable$(E), [core.int]], |
747 [core.$takeWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 750 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
748 [core.$skip]: [core.Iterable$(E), [core.int]], | 751 skip: [core.Iterable$(E), [core.int]], |
749 [core.$skipWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 752 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
750 [core.$firstWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: da
rt.functionType(E, [])}], | 753 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct
ionType(E, [])}], |
751 [core.$lastWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: dar
t.functionType(E, [])}], | 754 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi
onType(E, [])}], |
752 [core.$singleWhere]: [E, [dart.functionType(core.bool, [E])]], | 755 singleWhere: [E, [dart.functionType(core.bool, [E])]], |
753 [core.$elementAt]: [E, [core.int]] | 756 elementAt: [E, [core.int]] |
754 }) | 757 }) |
755 }); | 758 }); |
756 return IterableMixin; | 759 return IterableMixin; |
757 }); | 760 }); |
758 let IterableMixin = IterableMixin$(); | 761 let IterableMixin = IterableMixin$(); |
759 let IterableBase$ = dart.generic(function(E) { | 762 let IterableBase$ = dart.generic(function(E) { |
760 class IterableBase extends core.Object { | 763 class IterableBase extends core.Object { |
761 IterableBase() { | 764 IterableBase() { |
762 } | 765 } |
763 [core.$map](f) { | 766 map(f) { |
764 dart.as(f, dart.functionType(core.Object, [E])); | 767 dart.as(f, dart.functionType(core.Object, [E])); |
765 return _internal.MappedIterable$(E, core.Object).new(this, f); | 768 return _internal.MappedIterable$(E, core.Object).new(this, f); |
766 } | 769 } |
767 [core.$where](f) { | 770 where(f) { |
768 dart.as(f, dart.functionType(core.bool, [E])); | 771 dart.as(f, dart.functionType(core.bool, [E])); |
769 return new (_internal.WhereIterable$(E))(this, f); | 772 return new (_internal.WhereIterable$(E))(this, f); |
770 } | 773 } |
771 [core.$expand](f) { | 774 expand(f) { |
772 dart.as(f, dart.functionType(core.Iterable, [E])); | 775 dart.as(f, dart.functionType(core.Iterable, [E])); |
773 return new (_internal.ExpandIterable$(E, core.Object))(this, f); | 776 return new (_internal.ExpandIterable$(E, core.Object))(this, f); |
774 } | 777 } |
775 [core.$contains](element) { | 778 contains(element) { |
776 for (let e of this) { | 779 for (let e of this) { |
777 if (dart.equals(e, element)) | 780 if (dart.equals(e, element)) |
778 return true; | 781 return true; |
779 } | 782 } |
780 return false; | 783 return false; |
781 } | 784 } |
782 [core.$forEach](f) { | 785 forEach(f) { |
783 dart.as(f, dart.functionType(dart.void, [E])); | 786 dart.as(f, dart.functionType(dart.void, [E])); |
784 for (let element of this) | 787 for (let element of this) |
785 f(element); | 788 f(element); |
786 } | 789 } |
787 [core.$reduce](combine) { | 790 reduce(combine) { |
788 dart.as(combine, dart.functionType(E, [E, E])); | 791 dart.as(combine, dart.functionType(E, [E, E])); |
789 let iterator = this[core.$iterator]; | 792 let iterator = this.iterator; |
790 if (!dart.notNull(iterator.moveNext())) { | 793 if (!dart.notNull(iterator.moveNext())) { |
791 throw _internal.IterableElementError.noElement(); | 794 throw _internal.IterableElementError.noElement(); |
792 } | 795 } |
793 let value = iterator.current; | 796 let value = iterator.current; |
794 while (iterator.moveNext()) { | 797 while (iterator.moveNext()) { |
795 value = combine(value, iterator.current); | 798 value = combine(value, iterator.current); |
796 } | 799 } |
797 return value; | 800 return value; |
798 } | 801 } |
799 [core.$fold](initialValue, combine) { | 802 fold(initialValue, combine) { |
800 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); | 803 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); |
801 let value = initialValue; | 804 let value = initialValue; |
802 for (let element of this) | 805 for (let element of this) |
803 value = dart.dcall(combine, value, element); | 806 value = dart.dcall(combine, value, element); |
804 return value; | 807 return value; |
805 } | 808 } |
806 [core.$every](f) { | 809 every(f) { |
807 dart.as(f, dart.functionType(core.bool, [E])); | 810 dart.as(f, dart.functionType(core.bool, [E])); |
808 for (let element of this) { | 811 for (let element of this) { |
809 if (!dart.notNull(f(element))) | 812 if (!dart.notNull(f(element))) |
810 return false; | 813 return false; |
811 } | 814 } |
812 return true; | 815 return true; |
813 } | 816 } |
814 [core.$join](separator) { | 817 join(separator) { |
815 if (separator === void 0) | 818 if (separator === void 0) |
816 separator = ""; | 819 separator = ""; |
817 let iterator = this[core.$iterator]; | 820 let iterator = this.iterator; |
818 if (!dart.notNull(iterator.moveNext())) | 821 if (!dart.notNull(iterator.moveNext())) |
819 return ""; | 822 return ""; |
820 let buffer = new core.StringBuffer(); | 823 let buffer = new core.StringBuffer(); |
821 if (separator == null || separator == "") { | 824 if (separator == null || separator == "") { |
822 do { | 825 do { |
823 buffer.write(`${iterator.current}`); | 826 buffer.write(`${iterator.current}`); |
824 } while (iterator.moveNext()); | 827 } while (iterator.moveNext()); |
825 } else { | 828 } else { |
826 buffer.write(`${iterator.current}`); | 829 buffer.write(`${iterator.current}`); |
827 while (iterator.moveNext()) { | 830 while (iterator.moveNext()) { |
828 buffer.write(separator); | 831 buffer.write(separator); |
829 buffer.write(`${iterator.current}`); | 832 buffer.write(`${iterator.current}`); |
830 } | 833 } |
831 } | 834 } |
832 return dart.toString(buffer); | 835 return dart.toString(buffer); |
833 } | 836 } |
834 [core.$any](f) { | 837 any(f) { |
835 dart.as(f, dart.functionType(core.bool, [E])); | 838 dart.as(f, dart.functionType(core.bool, [E])); |
836 for (let element of this) { | 839 for (let element of this) { |
837 if (f(element)) | 840 if (f(element)) |
838 return true; | 841 return true; |
839 } | 842 } |
840 return false; | 843 return false; |
841 } | 844 } |
842 [core.$toList](opts) { | 845 toList(opts) { |
843 let growable = opts && 'growable' in opts ? opts.growable : true; | 846 let growable = opts && 'growable' in opts ? opts.growable : true; |
844 return core.List$(E).from(this, {growable: growable}); | 847 return core.List$(E).from(this, {growable: growable}); |
845 } | 848 } |
846 [core.$toSet]() { | 849 toSet() { |
847 return core.Set$(E).from(this); | 850 return core.Set$(E).from(this); |
848 } | 851 } |
849 get [core.$length]() { | 852 get length() { |
850 dart.assert(!dart.is(this, _internal.EfficientLength)); | 853 dart.assert(!dart.is(this, _internal.EfficientLength)); |
851 let count = 0; | 854 let count = 0; |
852 let it = this[core.$iterator]; | 855 let it = this[dartx.iterator]; |
853 while (it.moveNext()) { | 856 while (it.moveNext()) { |
854 count = dart.notNull(count) + 1; | 857 count = dart.notNull(count) + 1; |
855 } | 858 } |
856 return count; | 859 return count; |
857 } | 860 } |
858 get [core.$isEmpty]() { | 861 get isEmpty() { |
859 return !dart.notNull(this[core.$iterator].moveNext()); | 862 return !dart.notNull(this[dartx.iterator].moveNext()); |
860 } | 863 } |
861 get [core.$isNotEmpty]() { | 864 get isNotEmpty() { |
862 return !dart.notNull(this[core.$isEmpty]); | 865 return !dart.notNull(this.isEmpty); |
863 } | 866 } |
864 [core.$take](n) { | 867 take(n) { |
865 return _internal.TakeIterable$(E).new(this, n); | 868 return _internal.TakeIterable$(E).new(this, n); |
866 } | 869 } |
867 [core.$takeWhile](test) { | 870 takeWhile(test) { |
868 dart.as(test, dart.functionType(core.bool, [E])); | 871 dart.as(test, dart.functionType(core.bool, [E])); |
869 return new (_internal.TakeWhileIterable$(E))(this, test); | 872 return new (_internal.TakeWhileIterable$(E))(this, test); |
870 } | 873 } |
871 [core.$skip](n) { | 874 skip(n) { |
872 return _internal.SkipIterable$(E).new(this, n); | 875 return _internal.SkipIterable$(E).new(this, n); |
873 } | 876 } |
874 [core.$skipWhile](test) { | 877 skipWhile(test) { |
875 dart.as(test, dart.functionType(core.bool, [E])); | 878 dart.as(test, dart.functionType(core.bool, [E])); |
876 return new (_internal.SkipWhileIterable$(E))(this, test); | 879 return new (_internal.SkipWhileIterable$(E))(this, test); |
877 } | 880 } |
878 get [core.$first]() { | 881 get first() { |
879 let it = this[core.$iterator]; | 882 let it = this[dartx.iterator]; |
880 if (!dart.notNull(it.moveNext())) { | 883 if (!dart.notNull(it.moveNext())) { |
881 throw _internal.IterableElementError.noElement(); | 884 throw _internal.IterableElementError.noElement(); |
882 } | 885 } |
883 return it.current; | 886 return it.current; |
884 } | 887 } |
885 get [core.$last]() { | 888 get last() { |
886 let it = this[core.$iterator]; | 889 let it = this[dartx.iterator]; |
887 if (!dart.notNull(it.moveNext())) { | 890 if (!dart.notNull(it.moveNext())) { |
888 throw _internal.IterableElementError.noElement(); | 891 throw _internal.IterableElementError.noElement(); |
889 } | 892 } |
890 let result = null; | 893 let result = null; |
891 do { | 894 do { |
892 result = it.current; | 895 result = it.current; |
893 } while (it.moveNext()); | 896 } while (it.moveNext()); |
894 return result; | 897 return result; |
895 } | 898 } |
896 get [core.$single]() { | 899 get single() { |
897 let it = this[core.$iterator]; | 900 let it = this[dartx.iterator]; |
898 if (!dart.notNull(it.moveNext())) | 901 if (!dart.notNull(it.moveNext())) |
899 throw _internal.IterableElementError.noElement(); | 902 throw _internal.IterableElementError.noElement(); |
900 let result = it.current; | 903 let result = it.current; |
901 if (it.moveNext()) | 904 if (it.moveNext()) |
902 throw _internal.IterableElementError.tooMany(); | 905 throw _internal.IterableElementError.tooMany(); |
903 return result; | 906 return result; |
904 } | 907 } |
905 [core.$firstWhere](test, opts) { | 908 firstWhere(test, opts) { |
906 dart.as(test, dart.functionType(core.bool, [E])); | 909 dart.as(test, dart.functionType(core.bool, [E])); |
907 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 910 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
908 dart.as(orElse, dart.functionType(E, [])); | 911 dart.as(orElse, dart.functionType(E, [])); |
909 for (let element of this) { | 912 for (let element of this) { |
910 if (test(element)) | 913 if (test(element)) |
911 return element; | 914 return element; |
912 } | 915 } |
913 if (orElse != null) | 916 if (orElse != null) |
914 return orElse(); | 917 return orElse(); |
915 throw _internal.IterableElementError.noElement(); | 918 throw _internal.IterableElementError.noElement(); |
916 } | 919 } |
917 [core.$lastWhere](test, opts) { | 920 lastWhere(test, opts) { |
918 dart.as(test, dart.functionType(core.bool, [E])); | 921 dart.as(test, dart.functionType(core.bool, [E])); |
919 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 922 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
920 dart.as(orElse, dart.functionType(E, [])); | 923 dart.as(orElse, dart.functionType(E, [])); |
921 let result = null; | 924 let result = null; |
922 let foundMatching = false; | 925 let foundMatching = false; |
923 for (let element of this) { | 926 for (let element of this) { |
924 if (test(element)) { | 927 if (test(element)) { |
925 result = element; | 928 result = element; |
926 foundMatching = true; | 929 foundMatching = true; |
927 } | 930 } |
928 } | 931 } |
929 if (foundMatching) | 932 if (foundMatching) |
930 return result; | 933 return result; |
931 if (orElse != null) | 934 if (orElse != null) |
932 return orElse(); | 935 return orElse(); |
933 throw _internal.IterableElementError.noElement(); | 936 throw _internal.IterableElementError.noElement(); |
934 } | 937 } |
935 [core.$singleWhere](test) { | 938 singleWhere(test) { |
936 dart.as(test, dart.functionType(core.bool, [E])); | 939 dart.as(test, dart.functionType(core.bool, [E])); |
937 let result = null; | 940 let result = null; |
938 let foundMatching = false; | 941 let foundMatching = false; |
939 for (let element of this) { | 942 for (let element of this) { |
940 if (test(element)) { | 943 if (test(element)) { |
941 if (foundMatching) { | 944 if (foundMatching) { |
942 throw _internal.IterableElementError.tooMany(); | 945 throw _internal.IterableElementError.tooMany(); |
943 } | 946 } |
944 result = element; | 947 result = element; |
945 foundMatching = true; | 948 foundMatching = true; |
946 } | 949 } |
947 } | 950 } |
948 if (foundMatching) | 951 if (foundMatching) |
949 return result; | 952 return result; |
950 throw _internal.IterableElementError.noElement(); | 953 throw _internal.IterableElementError.noElement(); |
951 } | 954 } |
952 [core.$elementAt](index) { | 955 elementAt(index) { |
953 if (!(typeof index == 'number')) | 956 if (!(typeof index == 'number')) |
954 throw new core.ArgumentError.notNull("index"); | 957 throw new core.ArgumentError.notNull("index"); |
955 core.RangeError.checkNotNegative(index, "index"); | 958 core.RangeError.checkNotNegative(index, "index"); |
956 let elementIndex = 0; | 959 let elementIndex = 0; |
957 for (let element of this) { | 960 for (let element of this) { |
958 if (index == elementIndex) | 961 if (index == elementIndex) |
959 return element; | 962 return element; |
960 elementIndex = dart.notNull(elementIndex) + 1; | 963 elementIndex = dart.notNull(elementIndex) + 1; |
961 } | 964 } |
962 throw core.RangeError.index(index, this, "index", null, elementIndex); | 965 throw core.RangeError.index(index, this, "index", null, elementIndex); |
963 } | 966 } |
964 toString() { | 967 toString() { |
965 return IterableBase$().iterableToShortString(this, '(', ')'); | 968 return IterableBase$().iterableToShortString(this, '(', ')'); |
966 } | 969 } |
967 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { | 970 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { |
968 if (leftDelimiter === void 0) | 971 if (leftDelimiter === void 0) |
969 leftDelimiter = '('; | 972 leftDelimiter = '('; |
970 if (rightDelimiter === void 0) | 973 if (rightDelimiter === void 0) |
971 rightDelimiter = ')'; | 974 rightDelimiter = ')'; |
972 if (IterableBase$()._isToStringVisiting(iterable)) { | 975 if (IterableBase$()._isToStringVisiting(iterable)) { |
973 if (leftDelimiter == "(" && rightDelimiter == ")") { | 976 if (leftDelimiter == "(" && rightDelimiter == ")") { |
974 return "(...)"; | 977 return "(...)"; |
975 } | 978 } |
976 return `${leftDelimiter}...${rightDelimiter}`; | 979 return `${leftDelimiter}...${rightDelimiter}`; |
977 } | 980 } |
978 let parts = []; | 981 let parts = []; |
979 IterableBase$()._toStringVisiting[core.$add](iterable); | 982 IterableBase$()._toStringVisiting[dartx.add](iterable); |
980 try { | 983 try { |
981 IterableBase$()._iterablePartsToStrings(iterable, parts); | 984 IterableBase$()._iterablePartsToStrings(iterable, parts); |
982 } finally { | 985 } finally { |
983 dart.assert(core.identical(IterableBase$()._toStringVisiting[core.$las
t], iterable)); | 986 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las
t], iterable)); |
984 IterableBase$()._toStringVisiting[core.$removeLast](); | 987 IterableBase$()._toStringVisiting[dartx.removeLast](); |
985 } | 988 } |
986 return dart.toString((() => { | 989 return dart.toString((() => { |
987 let _ = new core.StringBuffer(leftDelimiter); | 990 let _ = new core.StringBuffer(leftDelimiter); |
988 _.writeAll(parts, ", "); | 991 _.writeAll(parts, ", "); |
989 _.write(rightDelimiter); | 992 _.write(rightDelimiter); |
990 return _; | 993 return _; |
991 })()); | 994 })()); |
992 } | 995 } |
993 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { | 996 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { |
994 if (leftDelimiter === void 0) | 997 if (leftDelimiter === void 0) |
995 leftDelimiter = '('; | 998 leftDelimiter = '('; |
996 if (rightDelimiter === void 0) | 999 if (rightDelimiter === void 0) |
997 rightDelimiter = ')'; | 1000 rightDelimiter = ')'; |
998 if (IterableBase$()._isToStringVisiting(iterable)) { | 1001 if (IterableBase$()._isToStringVisiting(iterable)) { |
999 return `${leftDelimiter}...${rightDelimiter}`; | 1002 return `${leftDelimiter}...${rightDelimiter}`; |
1000 } | 1003 } |
1001 let buffer = new core.StringBuffer(leftDelimiter); | 1004 let buffer = new core.StringBuffer(leftDelimiter); |
1002 IterableBase$()._toStringVisiting[core.$add](iterable); | 1005 IterableBase$()._toStringVisiting[dartx.add](iterable); |
1003 try { | 1006 try { |
1004 buffer.writeAll(iterable, ", "); | 1007 buffer.writeAll(iterable, ", "); |
1005 } finally { | 1008 } finally { |
1006 dart.assert(core.identical(IterableBase$()._toStringVisiting[core.$las
t], iterable)); | 1009 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las
t], iterable)); |
1007 IterableBase$()._toStringVisiting[core.$removeLast](); | 1010 IterableBase$()._toStringVisiting[dartx.removeLast](); |
1008 } | 1011 } |
1009 buffer.write(rightDelimiter); | 1012 buffer.write(rightDelimiter); |
1010 return dart.toString(buffer); | 1013 return dart.toString(buffer); |
1011 } | 1014 } |
1012 static _isToStringVisiting(o) { | 1015 static _isToStringVisiting(o) { |
1013 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase$()._toString
Visiting[core.$length]); i = dart.notNull(i) + 1) { | 1016 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase$()._toString
Visiting.length); i = dart.notNull(i) + 1) { |
1014 if (core.identical(o, IterableBase$()._toStringVisiting[core.$get](i))
) | 1017 if (core.identical(o, IterableBase$()._toStringVisiting[dartx.get](i))
) |
1015 return true; | 1018 return true; |
1016 } | 1019 } |
1017 return false; | 1020 return false; |
1018 } | 1021 } |
1019 static _iterablePartsToStrings(iterable, parts) { | 1022 static _iterablePartsToStrings(iterable, parts) { |
1020 let LENGTH_LIMIT = 80; | 1023 let LENGTH_LIMIT = 80; |
1021 let HEAD_COUNT = 3; | 1024 let HEAD_COUNT = 3; |
1022 let TAIL_COUNT = 2; | 1025 let TAIL_COUNT = 2; |
1023 let MAX_COUNT = 100; | 1026 let MAX_COUNT = 100; |
1024 let OVERHEAD = 2; | 1027 let OVERHEAD = 2; |
1025 let ELLIPSIS_SIZE = 3; | 1028 let ELLIPSIS_SIZE = 3; |
1026 let length = 0; | 1029 let length = 0; |
1027 let count = 0; | 1030 let count = 0; |
1028 let it = iterable[core.$iterator]; | 1031 let it = iterable[dartx.iterator]; |
1029 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull
(count) < dart.notNull(HEAD_COUNT)) { | 1032 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull
(count) < dart.notNull(HEAD_COUNT)) { |
1030 if (!dart.notNull(it.moveNext())) | 1033 if (!dart.notNull(it.moveNext())) |
1031 return; | 1034 return; |
1032 let next = `${it.current}`; | 1035 let next = `${it.current}`; |
1033 parts[core.$add](next); | 1036 parts[dartx.add](next); |
1034 length = dart.notNull(length) + (dart.notNull(next.length) + dart.notN
ull(OVERHEAD)); | 1037 length = dart.notNull(length) + (dart.notNull(next.length) + dart.notN
ull(OVERHEAD)); |
1035 count = dart.notNull(count) + 1; | 1038 count = dart.notNull(count) + 1; |
1036 } | 1039 } |
1037 let penultimateString = null; | 1040 let penultimateString = null; |
1038 let ultimateString = null; | 1041 let ultimateString = null; |
1039 let penultimate = null; | 1042 let penultimate = null; |
1040 let ultimate = null; | 1043 let ultimate = null; |
1041 if (!dart.notNull(it.moveNext())) { | 1044 if (!dart.notNull(it.moveNext())) { |
1042 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + dart.notNull(TAI
L_COUNT)) | 1045 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + dart.notNull(TAI
L_COUNT)) |
1043 return; | 1046 return; |
1044 ultimateString = dart.as(parts[core.$removeLast](), core.String); | 1047 ultimateString = dart.as(parts[dartx.removeLast](), core.String); |
1045 penultimateString = dart.as(parts[core.$removeLast](), core.String); | 1048 penultimateString = dart.as(parts[dartx.removeLast](), core.String); |
1046 } else { | 1049 } else { |
1047 penultimate = it.current; | 1050 penultimate = it.current; |
1048 count = dart.notNull(count) + 1; | 1051 count = dart.notNull(count) + 1; |
1049 if (!dart.notNull(it.moveNext())) { | 1052 if (!dart.notNull(it.moveNext())) { |
1050 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + 1) { | 1053 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + 1) { |
1051 parts[core.$add](`${penultimate}`); | 1054 parts[dartx.add](`${penultimate}`); |
1052 return; | 1055 return; |
1053 } | 1056 } |
1054 ultimateString = `${penultimate}`; | 1057 ultimateString = `${penultimate}`; |
1055 penultimateString = dart.as(parts[core.$removeLast](), core.String); | 1058 penultimateString = dart.as(parts[dartx.removeLast](), core.String); |
1056 length = dart.notNull(length) + (dart.notNull(ultimateString.length)
+ dart.notNull(OVERHEAD)); | 1059 length = dart.notNull(length) + (dart.notNull(ultimateString.length)
+ dart.notNull(OVERHEAD)); |
1057 } else { | 1060 } else { |
1058 ultimate = it.current; | 1061 ultimate = it.current; |
1059 count = dart.notNull(count) + 1; | 1062 count = dart.notNull(count) + 1; |
1060 dart.assert(dart.notNull(count) < dart.notNull(MAX_COUNT)); | 1063 dart.assert(dart.notNull(count) < dart.notNull(MAX_COUNT)); |
1061 while (it.moveNext()) { | 1064 while (it.moveNext()) { |
1062 penultimate = ultimate; | 1065 penultimate = ultimate; |
1063 ultimate = it.current; | 1066 ultimate = it.current; |
1064 count = dart.notNull(count) + 1; | 1067 count = dart.notNull(count) + 1; |
1065 if (dart.notNull(count) > dart.notNull(MAX_COUNT)) { | 1068 if (dart.notNull(count) > dart.notNull(MAX_COUNT)) { |
1066 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) - dart.
notNull(ELLIPSIS_SIZE) - dart.notNull(OVERHEAD) && dart.notNull(count) > dart.no
tNull(HEAD_COUNT)) { | 1069 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) - dart.
notNull(ELLIPSIS_SIZE) - dart.notNull(OVERHEAD) && dart.notNull(count) > dart.no
tNull(HEAD_COUNT)) { |
1067 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsen
d(dart.dload(parts[core.$removeLast](), 'length'), '+', OVERHEAD), core.int)); | 1070 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsen
d(dart.dload(parts[dartx.removeLast](), 'length'), '+', OVERHEAD), core.int)); |
1068 count = dart.notNull(count) - 1; | 1071 count = dart.notNull(count) - 1; |
1069 } | 1072 } |
1070 parts[core.$add]("..."); | 1073 parts[dartx.add]("..."); |
1071 return; | 1074 return; |
1072 } | 1075 } |
1073 } | 1076 } |
1074 penultimateString = `${penultimate}`; | 1077 penultimateString = `${penultimate}`; |
1075 ultimateString = `${ultimate}`; | 1078 ultimateString = `${ultimate}`; |
1076 length = dart.notNull(length) + (dart.notNull(ultimateString.length)
+ dart.notNull(penultimateString.length) + 2 * dart.notNull(OVERHEAD)); | 1079 length = dart.notNull(length) + (dart.notNull(ultimateString.length)
+ dart.notNull(penultimateString.length) + 2 * dart.notNull(OVERHEAD)); |
1077 } | 1080 } |
1078 } | 1081 } |
1079 let elision = null; | 1082 let elision = null; |
1080 if (dart.notNull(count) > dart.notNull(parts[core.$length]) + dart.notNu
ll(TAIL_COUNT)) { | 1083 if (dart.notNull(count) > dart.notNull(parts.length) + dart.notNull(TAIL
_COUNT)) { |
1081 elision = "..."; | 1084 elision = "..."; |
1082 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart.no
tNull(OVERHEAD)); | 1085 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart.no
tNull(OVERHEAD)); |
1083 } | 1086 } |
1084 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) && dart.notNull
(parts[core.$length]) > dart.notNull(HEAD_COUNT)) { | 1087 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) && dart.notNull
(parts.length) > dart.notNull(HEAD_COUNT)) { |
1085 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsend(dart.d
load(parts[core.$removeLast](), 'length'), '+', OVERHEAD), core.int)); | 1088 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsend(dart.d
load(parts[dartx.removeLast](), 'length'), '+', OVERHEAD), core.int)); |
1086 if (elision == null) { | 1089 if (elision == null) { |
1087 elision = "..."; | 1090 elision = "..."; |
1088 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart.
notNull(OVERHEAD)); | 1091 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart.
notNull(OVERHEAD)); |
1089 } | 1092 } |
1090 } | 1093 } |
1091 if (elision != null) { | 1094 if (elision != null) { |
1092 parts[core.$add](elision); | 1095 parts[dartx.add](elision); |
1093 } | 1096 } |
1094 parts[core.$add](penultimateString); | 1097 parts[dartx.add](penultimateString); |
1095 parts[core.$add](ultimateString); | 1098 parts[dartx.add](ultimateString); |
1096 } | 1099 } |
1097 [Symbol.iterator]() { | 1100 [Symbol.iterator]() { |
1098 return new dart.JsIterator(this[core.$iterator]); | 1101 return new dart.JsIterator(this.iterator); |
1099 } | 1102 } |
1100 } | 1103 } |
1101 IterableBase[dart.implements] = () => [core.Iterable$(E)]; | 1104 IterableBase[dart.implements] = () => [core.Iterable$(E)]; |
| 1105 dart.implementExtension(IterableBase, () => [core.Iterable]); |
1102 dart.setSignature(IterableBase, { | 1106 dart.setSignature(IterableBase, { |
1103 constructors: () => ({IterableBase: [IterableBase$(E), []]}), | 1107 constructors: () => ({IterableBase: [IterableBase$(E), []]}), |
1104 methods: () => ({ | 1108 methods: () => ({ |
1105 [core.$map]: [core.Iterable, [dart.functionType(core.Object, [E])]], | 1109 map: [core.Iterable, [dart.functionType(core.Object, [E])]], |
1106 [core.$where]: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 1110 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
1107 [core.$expand]: [core.Iterable, [dart.functionType(core.Iterable, [E])]]
, | 1111 expand: [core.Iterable, [dart.functionType(core.Iterable, [E])]], |
1108 [core.$contains]: [core.bool, [core.Object]], | 1112 contains: [core.bool, [core.Object]], |
1109 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 1113 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
1110 [core.$reduce]: [E, [dart.functionType(E, [E, E])]], | 1114 reduce: [E, [dart.functionType(E, [E, E])]], |
1111 [core.$fold]: [core.Object, [core.Object, dart.functionType(core.Object,
[dart.bottom, E])]], | 1115 fold: [core.Object, [core.Object, dart.functionType(core.Object, [dart.b
ottom, E])]], |
1112 [core.$every]: [core.bool, [dart.functionType(core.bool, [E])]], | 1116 every: [core.bool, [dart.functionType(core.bool, [E])]], |
1113 [core.$join]: [core.String, [], [core.String]], | 1117 join: [core.String, [], [core.String]], |
1114 [core.$any]: [core.bool, [dart.functionType(core.bool, [E])]], | 1118 any: [core.bool, [dart.functionType(core.bool, [E])]], |
1115 [core.$toList]: [core.List$(E), [], {growable: core.bool}], | 1119 toList: [core.List$(E), [], {growable: core.bool}], |
1116 [core.$toSet]: [core.Set$(E), []], | 1120 toSet: [core.Set$(E), []], |
1117 [core.$take]: [core.Iterable$(E), [core.int]], | 1121 take: [core.Iterable$(E), [core.int]], |
1118 [core.$takeWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 1122 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
1119 [core.$skip]: [core.Iterable$(E), [core.int]], | 1123 skip: [core.Iterable$(E), [core.int]], |
1120 [core.$skipWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 1124 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
1121 [core.$firstWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: da
rt.functionType(E, [])}], | 1125 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct
ionType(E, [])}], |
1122 [core.$lastWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: dar
t.functionType(E, [])}], | 1126 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi
onType(E, [])}], |
1123 [core.$singleWhere]: [E, [dart.functionType(core.bool, [E])]], | 1127 singleWhere: [E, [dart.functionType(core.bool, [E])]], |
1124 [core.$elementAt]: [E, [core.int]] | 1128 elementAt: [E, [core.int]] |
1125 }), | 1129 }), |
1126 statics: () => ({ | 1130 statics: () => ({ |
1127 iterableToShortString: [core.String, [core.Iterable], [core.String, core
.String]], | 1131 iterableToShortString: [core.String, [core.Iterable], [core.String, core
.String]], |
1128 iterableToFullString: [core.String, [core.Iterable], [core.String, core.
String]], | 1132 iterableToFullString: [core.String, [core.Iterable], [core.String, core.
String]], |
1129 _isToStringVisiting: [core.bool, [core.Object]], | 1133 _isToStringVisiting: [core.bool, [core.Object]], |
1130 _iterablePartsToStrings: [dart.void, [core.Iterable, core.List]] | 1134 _iterablePartsToStrings: [dart.void, [core.Iterable, core.List]] |
1131 }), | 1135 }), |
1132 names: ['iterableToShortString', 'iterableToFullString', '_isToStringVisit
ing', '_iterablePartsToStrings'] | 1136 names: ['iterableToShortString', 'iterableToFullString', '_isToStringVisit
ing', '_iterablePartsToStrings'] |
1133 }); | 1137 }); |
1134 return IterableBase; | 1138 return IterableBase; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1290 return new (_LinkedIdentityHashSet$(E))(); | 1294 return new (_LinkedIdentityHashSet$(E))(); |
1291 } | 1295 } |
1292 static from(elements) { | 1296 static from(elements) { |
1293 let result = LinkedHashSet$(E).new(); | 1297 let result = LinkedHashSet$(E).new(); |
1294 for (let element of elements) { | 1298 for (let element of elements) { |
1295 result.add(element); | 1299 result.add(element); |
1296 } | 1300 } |
1297 return result; | 1301 return result; |
1298 } | 1302 } |
1299 [Symbol.iterator]() { | 1303 [Symbol.iterator]() { |
1300 return new dart.JsIterator(this[core.$iterator]); | 1304 return new dart.JsIterator(this.iterator); |
1301 } | 1305 } |
1302 } | 1306 } |
1303 LinkedHashSet[dart.implements] = () => [HashSet$(E)]; | 1307 LinkedHashSet[dart.implements] = () => [HashSet$(E)]; |
| 1308 dart.implementExtension(LinkedHashSet, () => [core.Iterable]); |
1304 dart.setSignature(LinkedHashSet, { | 1309 dart.setSignature(LinkedHashSet, { |
1305 constructors: () => ({ | 1310 constructors: () => ({ |
1306 new: [LinkedHashSet$(E), [], {equals: dart.functionType(core.bool, [E, E
]), hashCode: dart.functionType(core.int, [E]), isValidKey: dart.functionType(co
re.bool, [core.Object])}], | 1311 new: [LinkedHashSet$(E), [], {equals: dart.functionType(core.bool, [E, E
]), hashCode: dart.functionType(core.int, [E]), isValidKey: dart.functionType(co
re.bool, [core.Object])}], |
1307 identity: [LinkedHashSet$(E), []], | 1312 identity: [LinkedHashSet$(E), []], |
1308 from: [LinkedHashSet$(E), [core.Iterable$(E)]] | 1313 from: [LinkedHashSet$(E), [core.Iterable$(E)]] |
1309 }) | 1314 }) |
1310 }); | 1315 }); |
1311 return LinkedHashSet; | 1316 return LinkedHashSet; |
1312 }); | 1317 }); |
1313 let LinkedHashSet = LinkedHashSet$(); | 1318 let LinkedHashSet = LinkedHashSet$(); |
(...skipping 17 matching lines...) Expand all Loading... |
1331 addFirst(entry) { | 1336 addFirst(entry) { |
1332 dart.as(entry, E); | 1337 dart.as(entry, E); |
1333 this[_insertAfter](this, entry); | 1338 this[_insertAfter](this, entry); |
1334 } | 1339 } |
1335 add(entry) { | 1340 add(entry) { |
1336 dart.as(entry, E); | 1341 dart.as(entry, E); |
1337 this[_insertAfter](this[_previous], entry); | 1342 this[_insertAfter](this[_previous], entry); |
1338 } | 1343 } |
1339 addAll(entries) { | 1344 addAll(entries) { |
1340 dart.as(entries, core.Iterable$(E)); | 1345 dart.as(entries, core.Iterable$(E)); |
1341 entries[core.$forEach](dart.fn((entry => this[_insertAfter](this[_previo
us], dart.as(entry, E))).bind(this), dart.void, [core.Object])); | 1346 entries[dartx.forEach](dart.fn((entry => this[_insertAfter](this[_previo
us], dart.as(entry, E))).bind(this), dart.void, [core.Object])); |
1342 } | 1347 } |
1343 remove(entry) { | 1348 remove(entry) { |
1344 dart.as(entry, E); | 1349 dart.as(entry, E); |
1345 if (!dart.equals(entry[_list], this)) | 1350 if (!dart.equals(entry[_list], this)) |
1346 return false; | 1351 return false; |
1347 this[_unlink](entry); | 1352 this[_unlink](entry); |
1348 return true; | 1353 return true; |
1349 } | 1354 } |
1350 get [core.$iterator]() { | 1355 get iterator() { |
1351 return new (_LinkedListIterator$(E))(this); | 1356 return new (_LinkedListIterator$(E))(this); |
1352 } | 1357 } |
1353 get [core.$length]() { | 1358 get length() { |
1354 return this[_length]; | 1359 return this[_length]; |
1355 } | 1360 } |
1356 clear() { | 1361 clear() { |
1357 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 1362 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
1358 let next = this[_next]; | 1363 let next = this[_next]; |
1359 while (!dart.notNull(core.identical(next, this))) { | 1364 while (!dart.notNull(core.identical(next, this))) { |
1360 let entry = dart.as(next, E); | 1365 let entry = dart.as(next, E); |
1361 next = entry[_next]; | 1366 next = entry[_next]; |
1362 entry[_next] = entry[_previous] = entry[_list] = null; | 1367 entry[_next] = entry[_previous] = entry[_list] = null; |
1363 } | 1368 } |
1364 this[_next] = this[_previous] = this; | 1369 this[_next] = this[_previous] = this; |
1365 this[_length] = 0; | 1370 this[_length] = 0; |
1366 } | 1371 } |
1367 get [core.$first]() { | 1372 get first() { |
1368 if (core.identical(this[_next], this)) { | 1373 if (core.identical(this[_next], this)) { |
1369 throw new core.StateError('No such element'); | 1374 throw new core.StateError('No such element'); |
1370 } | 1375 } |
1371 return dart.as(this[_next], E); | 1376 return dart.as(this[_next], E); |
1372 } | 1377 } |
1373 get [core.$last]() { | 1378 get last() { |
1374 if (core.identical(this[_previous], this)) { | 1379 if (core.identical(this[_previous], this)) { |
1375 throw new core.StateError('No such element'); | 1380 throw new core.StateError('No such element'); |
1376 } | 1381 } |
1377 return dart.as(this[_previous], E); | 1382 return dart.as(this[_previous], E); |
1378 } | 1383 } |
1379 get [core.$single]() { | 1384 get single() { |
1380 if (core.identical(this[_previous], this)) { | 1385 if (core.identical(this[_previous], this)) { |
1381 throw new core.StateError('No such element'); | 1386 throw new core.StateError('No such element'); |
1382 } | 1387 } |
1383 if (!dart.notNull(core.identical(this[_previous], this[_next]))) { | 1388 if (!dart.notNull(core.identical(this[_previous], this[_next]))) { |
1384 throw new core.StateError('Too many elements'); | 1389 throw new core.StateError('Too many elements'); |
1385 } | 1390 } |
1386 return dart.as(this[_next], E); | 1391 return dart.as(this[_next], E); |
1387 } | 1392 } |
1388 [core.$forEach](action) { | 1393 forEach(action) { |
1389 dart.as(action, dart.functionType(dart.void, [E])); | 1394 dart.as(action, dart.functionType(dart.void, [E])); |
1390 let modificationCount = this[_modificationCount]; | 1395 let modificationCount = this[_modificationCount]; |
1391 let current = this[_next]; | 1396 let current = this[_next]; |
1392 while (!dart.notNull(core.identical(current, this))) { | 1397 while (!dart.notNull(core.identical(current, this))) { |
1393 action(dart.as(current, E)); | 1398 action(dart.as(current, E)); |
1394 if (modificationCount != this[_modificationCount]) { | 1399 if (modificationCount != this[_modificationCount]) { |
1395 throw new core.ConcurrentModificationError(this); | 1400 throw new core.ConcurrentModificationError(this); |
1396 } | 1401 } |
1397 current = current[_next]; | 1402 current = current[_next]; |
1398 } | 1403 } |
1399 } | 1404 } |
1400 get [core.$isEmpty]() { | 1405 get isEmpty() { |
1401 return this[_length] == 0; | 1406 return this[_length] == 0; |
1402 } | 1407 } |
1403 [_insertAfter](entry, newEntry) { | 1408 [_insertAfter](entry, newEntry) { |
1404 dart.as(newEntry, E); | 1409 dart.as(newEntry, E); |
1405 if (newEntry.list != null) { | 1410 if (newEntry.list != null) { |
1406 throw new core.StateError('LinkedListEntry is already in a LinkedList'
); | 1411 throw new core.StateError('LinkedListEntry is already in a LinkedList'
); |
1407 } | 1412 } |
1408 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 1413 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
1409 newEntry[_list] = this; | 1414 newEntry[_list] = this; |
1410 let predecessor = entry; | 1415 let predecessor = entry; |
1411 let successor = entry[_next]; | 1416 let successor = entry[_next]; |
1412 successor[_previous] = newEntry; | 1417 successor[_previous] = newEntry; |
1413 newEntry[_previous] = predecessor; | 1418 newEntry[_previous] = predecessor; |
1414 newEntry[_next] = successor; | 1419 newEntry[_next] = successor; |
1415 predecessor[_next] = newEntry; | 1420 predecessor[_next] = newEntry; |
1416 this[_length] = dart.notNull(this[_length]) + 1; | 1421 this[_length] = dart.notNull(this[_length]) + 1; |
1417 } | 1422 } |
1418 [_unlink](entry) { | 1423 [_unlink](entry) { |
1419 dart.as(entry, LinkedListEntry$(E)); | 1424 dart.as(entry, LinkedListEntry$(E)); |
1420 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 1425 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
1421 entry[_next][_previous] = entry[_previous]; | 1426 entry[_next][_previous] = entry[_previous]; |
1422 entry[_previous][_next] = entry[_next]; | 1427 entry[_previous][_next] = entry[_next]; |
1423 this[_length] = dart.notNull(this[_length]) - 1; | 1428 this[_length] = dart.notNull(this[_length]) - 1; |
1424 entry[_list] = entry[_next] = entry[_previous] = null; | 1429 entry[_list] = entry[_next] = entry[_previous] = null; |
1425 } | 1430 } |
1426 } | 1431 } |
1427 LinkedList[dart.implements] = () => [_LinkedListLink]; | 1432 LinkedList[dart.implements] = () => [_LinkedListLink]; |
| 1433 dart.implementExtension(LinkedList, () => [core.Iterable]); |
1428 dart.setSignature(LinkedList, { | 1434 dart.setSignature(LinkedList, { |
1429 constructors: () => ({LinkedList: [LinkedList$(E), []]}), | 1435 constructors: () => ({LinkedList: [LinkedList$(E), []]}), |
1430 methods: () => ({ | 1436 methods: () => ({ |
1431 addFirst: [dart.void, [E]], | 1437 addFirst: [dart.void, [E]], |
1432 add: [dart.void, [E]], | 1438 add: [dart.void, [E]], |
1433 addAll: [dart.void, [core.Iterable$(E)]], | 1439 addAll: [dart.void, [core.Iterable$(E)]], |
1434 remove: [core.bool, [E]], | 1440 remove: [core.bool, [E]], |
1435 clear: [dart.void, []], | 1441 clear: [dart.void, []], |
1436 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 1442 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
1437 [_insertAfter]: [dart.void, [_LinkedListLink, E]], | 1443 [_insertAfter]: [dart.void, [_LinkedListLink, E]], |
1438 [_unlink]: [dart.void, [LinkedListEntry$(E)]] | 1444 [_unlink]: [dart.void, [LinkedListEntry$(E)]] |
1439 }) | 1445 }) |
1440 }); | 1446 }); |
1441 return LinkedList; | 1447 return LinkedList; |
1442 }); | 1448 }); |
1443 let LinkedList = LinkedList$(); | 1449 let LinkedList = LinkedList$(); |
1444 let _current = Symbol('_current'); | 1450 let _current = Symbol('_current'); |
1445 let _LinkedListIterator$ = dart.generic(function(E) { | 1451 let _LinkedListIterator$ = dart.generic(function(E) { |
1446 class _LinkedListIterator extends core.Object { | 1452 class _LinkedListIterator extends core.Object { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1519 unlink: [dart.void, []], | 1525 unlink: [dart.void, []], |
1520 insertAfter: [dart.void, [E]], | 1526 insertAfter: [dart.void, [E]], |
1521 insertBefore: [dart.void, [E]] | 1527 insertBefore: [dart.void, [E]] |
1522 }) | 1528 }) |
1523 }); | 1529 }); |
1524 return LinkedListEntry; | 1530 return LinkedListEntry; |
1525 }); | 1531 }); |
1526 let LinkedListEntry = LinkedListEntry$(); | 1532 let LinkedListEntry = LinkedListEntry$(); |
1527 let ListMixin$ = dart.generic(function(E) { | 1533 let ListMixin$ = dart.generic(function(E) { |
1528 class ListMixin extends core.Object { | 1534 class ListMixin extends core.Object { |
1529 get [core.$iterator]() { | 1535 get iterator() { |
1530 return new (_internal.ListIterator$(E))(this); | 1536 return new (_internal.ListIterator$(E))(this); |
1531 } | 1537 } |
1532 [Symbol.iterator]() { | 1538 [Symbol.iterator]() { |
1533 return new dart.JsIterator(this[core.$iterator]); | 1539 return new dart.JsIterator(this.iterator); |
1534 } | 1540 } |
1535 [core.$elementAt](index) { | 1541 elementAt(index) { |
1536 return this[core.$get](index); | 1542 return this.get(index); |
1537 } | 1543 } |
1538 [core.$forEach](action) { | 1544 forEach(action) { |
1539 dart.as(action, dart.functionType(dart.void, [E])); | 1545 dart.as(action, dart.functionType(dart.void, [E])); |
1540 let length = this[core.$length]; | 1546 let length = this.length; |
1541 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1547 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1542 action(this[core.$get](i)); | 1548 action(this.get(i)); |
1543 if (length != this[core.$length]) { | 1549 if (length != this.length) { |
1544 throw new core.ConcurrentModificationError(this); | 1550 throw new core.ConcurrentModificationError(this); |
1545 } | 1551 } |
1546 } | 1552 } |
1547 } | 1553 } |
1548 get [core.$isEmpty]() { | 1554 get isEmpty() { |
1549 return this[core.$length] == 0; | 1555 return this.length == 0; |
1550 } | 1556 } |
1551 get [core.$isNotEmpty]() { | 1557 get isNotEmpty() { |
1552 return !dart.notNull(this[core.$isEmpty]); | 1558 return !dart.notNull(this.isEmpty); |
1553 } | 1559 } |
1554 get [core.$first]() { | 1560 get first() { |
1555 if (this[core.$length] == 0) | 1561 if (this.length == 0) |
1556 throw _internal.IterableElementError.noElement(); | 1562 throw _internal.IterableElementError.noElement(); |
1557 return this[core.$get](0); | 1563 return this.get(0); |
1558 } | 1564 } |
1559 get [core.$last]() { | 1565 get last() { |
1560 if (this[core.$length] == 0) | 1566 if (this.length == 0) |
1561 throw _internal.IterableElementError.noElement(); | 1567 throw _internal.IterableElementError.noElement(); |
1562 return this[core.$get](dart.notNull(this[core.$length]) - 1); | 1568 return this.get(dart.notNull(this.length) - 1); |
1563 } | 1569 } |
1564 get [core.$single]() { | 1570 get single() { |
1565 if (this[core.$length] == 0) | 1571 if (this.length == 0) |
1566 throw _internal.IterableElementError.noElement(); | 1572 throw _internal.IterableElementError.noElement(); |
1567 if (dart.notNull(this[core.$length]) > 1) | 1573 if (dart.notNull(this.length) > 1) |
1568 throw _internal.IterableElementError.tooMany(); | 1574 throw _internal.IterableElementError.tooMany(); |
1569 return this[core.$get](0); | 1575 return this.get(0); |
1570 } | 1576 } |
1571 [core.$contains](element) { | 1577 contains(element) { |
1572 let length = this[core.$length]; | 1578 let length = this.length; |
1573 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { | 1579 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no
tNull(i) + 1) { |
1574 if (dart.equals(this[core.$get](i), element)) | 1580 if (dart.equals(this.get(i), element)) |
1575 return true; | 1581 return true; |
1576 if (length != this[core.$length]) { | 1582 if (length != this.length) { |
1577 throw new core.ConcurrentModificationError(this); | 1583 throw new core.ConcurrentModificationError(this); |
1578 } | 1584 } |
1579 } | 1585 } |
1580 return false; | 1586 return false; |
1581 } | 1587 } |
1582 [core.$every](test) { | 1588 every(test) { |
1583 dart.as(test, dart.functionType(core.bool, [E])); | 1589 dart.as(test, dart.functionType(core.bool, [E])); |
1584 let length = this[core.$length]; | 1590 let length = this.length; |
1585 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1591 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1586 if (!dart.notNull(test(this[core.$get](i)))) | 1592 if (!dart.notNull(test(this.get(i)))) |
1587 return false; | 1593 return false; |
1588 if (length != this[core.$length]) { | 1594 if (length != this.length) { |
1589 throw new core.ConcurrentModificationError(this); | 1595 throw new core.ConcurrentModificationError(this); |
1590 } | 1596 } |
1591 } | 1597 } |
1592 return true; | 1598 return true; |
1593 } | 1599 } |
1594 [core.$any](test) { | 1600 any(test) { |
1595 dart.as(test, dart.functionType(core.bool, [E])); | 1601 dart.as(test, dart.functionType(core.bool, [E])); |
1596 let length = this[core.$length]; | 1602 let length = this.length; |
1597 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1603 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1598 if (test(this[core.$get](i))) | 1604 if (test(this.get(i))) |
1599 return true; | 1605 return true; |
1600 if (length != this[core.$length]) { | 1606 if (length != this.length) { |
1601 throw new core.ConcurrentModificationError(this); | 1607 throw new core.ConcurrentModificationError(this); |
1602 } | 1608 } |
1603 } | 1609 } |
1604 return false; | 1610 return false; |
1605 } | 1611 } |
1606 [core.$firstWhere](test, opts) { | 1612 firstWhere(test, opts) { |
1607 dart.as(test, dart.functionType(core.bool, [E])); | 1613 dart.as(test, dart.functionType(core.bool, [E])); |
1608 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 1614 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
1609 dart.as(orElse, dart.functionType(E, [])); | 1615 dart.as(orElse, dart.functionType(E, [])); |
1610 let length = this[core.$length]; | 1616 let length = this.length; |
1611 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1617 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1612 let element = this[core.$get](i); | 1618 let element = this.get(i); |
1613 if (test(element)) | 1619 if (test(element)) |
1614 return element; | 1620 return element; |
1615 if (length != this[core.$length]) { | 1621 if (length != this.length) { |
1616 throw new core.ConcurrentModificationError(this); | 1622 throw new core.ConcurrentModificationError(this); |
1617 } | 1623 } |
1618 } | 1624 } |
1619 if (orElse != null) | 1625 if (orElse != null) |
1620 return orElse(); | 1626 return orElse(); |
1621 throw _internal.IterableElementError.noElement(); | 1627 throw _internal.IterableElementError.noElement(); |
1622 } | 1628 } |
1623 [core.$lastWhere](test, opts) { | 1629 lastWhere(test, opts) { |
1624 dart.as(test, dart.functionType(core.bool, [E])); | 1630 dart.as(test, dart.functionType(core.bool, [E])); |
1625 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 1631 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
1626 dart.as(orElse, dart.functionType(E, [])); | 1632 dart.as(orElse, dart.functionType(E, [])); |
1627 let length = this[core.$length]; | 1633 let length = this.length; |
1628 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no
tNull(i) - 1) { | 1634 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no
tNull(i) - 1) { |
1629 let element = this[core.$get](i); | 1635 let element = this.get(i); |
1630 if (test(element)) | 1636 if (test(element)) |
1631 return element; | 1637 return element; |
1632 if (length != this[core.$length]) { | 1638 if (length != this.length) { |
1633 throw new core.ConcurrentModificationError(this); | 1639 throw new core.ConcurrentModificationError(this); |
1634 } | 1640 } |
1635 } | 1641 } |
1636 if (orElse != null) | 1642 if (orElse != null) |
1637 return orElse(); | 1643 return orElse(); |
1638 throw _internal.IterableElementError.noElement(); | 1644 throw _internal.IterableElementError.noElement(); |
1639 } | 1645 } |
1640 [core.$singleWhere](test) { | 1646 singleWhere(test) { |
1641 dart.as(test, dart.functionType(core.bool, [E])); | 1647 dart.as(test, dart.functionType(core.bool, [E])); |
1642 let length = this[core.$length]; | 1648 let length = this.length; |
1643 let match = null; | 1649 let match = null; |
1644 let matchFound = false; | 1650 let matchFound = false; |
1645 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1651 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1646 let element = this[core.$get](i); | 1652 let element = this.get(i); |
1647 if (test(element)) { | 1653 if (test(element)) { |
1648 if (matchFound) { | 1654 if (matchFound) { |
1649 throw _internal.IterableElementError.tooMany(); | 1655 throw _internal.IterableElementError.tooMany(); |
1650 } | 1656 } |
1651 matchFound = true; | 1657 matchFound = true; |
1652 match = element; | 1658 match = element; |
1653 } | 1659 } |
1654 if (length != this[core.$length]) { | 1660 if (length != this.length) { |
1655 throw new core.ConcurrentModificationError(this); | 1661 throw new core.ConcurrentModificationError(this); |
1656 } | 1662 } |
1657 } | 1663 } |
1658 if (matchFound) | 1664 if (matchFound) |
1659 return match; | 1665 return match; |
1660 throw _internal.IterableElementError.noElement(); | 1666 throw _internal.IterableElementError.noElement(); |
1661 } | 1667 } |
1662 [core.$join](separator) { | 1668 join(separator) { |
1663 if (separator === void 0) | 1669 if (separator === void 0) |
1664 separator = ""; | 1670 separator = ""; |
1665 if (this[core.$length] == 0) | 1671 if (this.length == 0) |
1666 return ""; | 1672 return ""; |
1667 let buffer = new core.StringBuffer(); | 1673 let buffer = new core.StringBuffer(); |
1668 buffer.writeAll(this, separator); | 1674 buffer.writeAll(this, separator); |
1669 return dart.toString(buffer); | 1675 return dart.toString(buffer); |
1670 } | 1676 } |
1671 [core.$where](test) { | 1677 where(test) { |
1672 dart.as(test, dart.functionType(core.bool, [E])); | 1678 dart.as(test, dart.functionType(core.bool, [E])); |
1673 return new (_internal.WhereIterable$(E))(this, test); | 1679 return new (_internal.WhereIterable$(E))(this, test); |
1674 } | 1680 } |
1675 [core.$map](f) { | 1681 map(f) { |
1676 dart.as(f, dart.functionType(core.Object, [E])); | 1682 dart.as(f, dart.functionType(core.Object, [E])); |
1677 return new _internal.MappedListIterable(this, f); | 1683 return new _internal.MappedListIterable(this, f); |
1678 } | 1684 } |
1679 [core.$expand](f) { | 1685 expand(f) { |
1680 dart.as(f, dart.functionType(core.Iterable, [E])); | 1686 dart.as(f, dart.functionType(core.Iterable, [E])); |
1681 return new (_internal.ExpandIterable$(E, core.Object))(this, f); | 1687 return new (_internal.ExpandIterable$(E, core.Object))(this, f); |
1682 } | 1688 } |
1683 [core.$reduce](combine) { | 1689 reduce(combine) { |
1684 dart.as(combine, dart.functionType(E, [E, E])); | 1690 dart.as(combine, dart.functionType(E, [E, E])); |
1685 let length = this[core.$length]; | 1691 let length = this.length; |
1686 if (length == 0) | 1692 if (length == 0) |
1687 throw _internal.IterableElementError.noElement(); | 1693 throw _internal.IterableElementError.noElement(); |
1688 let value = this[core.$get](0); | 1694 let value = this.get(0); |
1689 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1695 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1690 value = combine(value, this[core.$get](i)); | 1696 value = combine(value, this.get(i)); |
1691 if (length != this[core.$length]) { | 1697 if (length != this.length) { |
1692 throw new core.ConcurrentModificationError(this); | 1698 throw new core.ConcurrentModificationError(this); |
1693 } | 1699 } |
1694 } | 1700 } |
1695 return value; | 1701 return value; |
1696 } | 1702 } |
1697 [core.$fold](initialValue, combine) { | 1703 fold(initialValue, combine) { |
1698 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); | 1704 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); |
1699 let value = initialValue; | 1705 let value = initialValue; |
1700 let length = this[core.$length]; | 1706 let length = this.length; |
1701 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1707 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1702 value = dart.dcall(combine, value, this[core.$get](i)); | 1708 value = dart.dcall(combine, value, this.get(i)); |
1703 if (length != this[core.$length]) { | 1709 if (length != this.length) { |
1704 throw new core.ConcurrentModificationError(this); | 1710 throw new core.ConcurrentModificationError(this); |
1705 } | 1711 } |
1706 } | 1712 } |
1707 return value; | 1713 return value; |
1708 } | 1714 } |
1709 [core.$skip](count) { | 1715 skip(count) { |
1710 return new (_internal.SubListIterable$(E))(this, count, null); | 1716 return new (_internal.SubListIterable$(E))(this, count, null); |
1711 } | 1717 } |
1712 [core.$skipWhile](test) { | 1718 skipWhile(test) { |
1713 dart.as(test, dart.functionType(core.bool, [E])); | 1719 dart.as(test, dart.functionType(core.bool, [E])); |
1714 return new (_internal.SkipWhileIterable$(E))(this, test); | 1720 return new (_internal.SkipWhileIterable$(E))(this, test); |
1715 } | 1721 } |
1716 [core.$take](count) { | 1722 take(count) { |
1717 return new (_internal.SubListIterable$(E))(this, 0, count); | 1723 return new (_internal.SubListIterable$(E))(this, 0, count); |
1718 } | 1724 } |
1719 [core.$takeWhile](test) { | 1725 takeWhile(test) { |
1720 dart.as(test, dart.functionType(core.bool, [E])); | 1726 dart.as(test, dart.functionType(core.bool, [E])); |
1721 return new (_internal.TakeWhileIterable$(E))(this, test); | 1727 return new (_internal.TakeWhileIterable$(E))(this, test); |
1722 } | 1728 } |
1723 [core.$toList](opts) { | 1729 toList(opts) { |
1724 let growable = opts && 'growable' in opts ? opts.growable : true; | 1730 let growable = opts && 'growable' in opts ? opts.growable : true; |
1725 let result = null; | 1731 let result = null; |
1726 if (growable) { | 1732 if (growable) { |
1727 result = core.List$(E).new(); | 1733 result = core.List$(E).new(); |
1728 result[core.$length] = this[core.$length]; | 1734 result.length = this.length; |
1729 } else { | 1735 } else { |
1730 result = core.List$(E).new(this[core.$length]); | 1736 result = core.List$(E).new(this.length); |
1731 } | 1737 } |
1732 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { | 1738 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no
tNull(i) + 1) { |
1733 result[core.$set](i, this[core.$get](i)); | 1739 result[dartx.set](i, this.get(i)); |
1734 } | 1740 } |
1735 return result; | 1741 return result; |
1736 } | 1742 } |
1737 [core.$toSet]() { | 1743 toSet() { |
1738 let result = core.Set$(E).new(); | 1744 let result = core.Set$(E).new(); |
1739 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { | 1745 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no
tNull(i) + 1) { |
1740 result.add(this[core.$get](i)); | 1746 result.add(this.get(i)); |
1741 } | 1747 } |
1742 return result; | 1748 return result; |
1743 } | 1749 } |
1744 [core.$add](element) { | 1750 add(element) { |
1745 dart.as(element, E); | 1751 dart.as(element, E); |
1746 this[core.$set]((() => { | 1752 this.set((() => { |
1747 let x = this[core.$length]; | 1753 let x = this.length; |
1748 this[core.$length] = dart.notNull(x) + 1; | 1754 this.length = dart.notNull(x) + 1; |
1749 return x; | 1755 return x; |
1750 }).bind(this)(), element); | 1756 }).bind(this)(), element); |
1751 } | 1757 } |
1752 [core.$addAll](iterable) { | 1758 addAll(iterable) { |
1753 dart.as(iterable, core.Iterable$(E)); | 1759 dart.as(iterable, core.Iterable$(E)); |
1754 for (let element of iterable) { | 1760 for (let element of iterable) { |
1755 this[core.$set]((() => { | 1761 this.set((() => { |
1756 let x = this[core.$length]; | 1762 let x = this.length; |
1757 this[core.$length] = dart.notNull(x) + 1; | 1763 this.length = dart.notNull(x) + 1; |
1758 return x; | 1764 return x; |
1759 }).bind(this)(), element); | 1765 }).bind(this)(), element); |
1760 } | 1766 } |
1761 } | 1767 } |
1762 [core.$remove](element) { | 1768 remove(element) { |
1763 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { | 1769 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no
tNull(i) + 1) { |
1764 if (dart.equals(this[core.$get](i), element)) { | 1770 if (dart.equals(this.get(i), element)) { |
1765 this[core.$setRange](i, dart.notNull(this[core.$length]) - 1, this,
dart.notNull(i) + 1); | 1771 this.setRange(i, dart.notNull(this.length) - 1, this, dart.notNull(i
) + 1); |
1766 this[core.$length] = dart.notNull(this[core.$length]) - 1; | 1772 this.length = dart.notNull(this.length) - 1; |
1767 return true; | 1773 return true; |
1768 } | 1774 } |
1769 } | 1775 } |
1770 return false; | 1776 return false; |
1771 } | 1777 } |
1772 [core.$removeWhere](test) { | 1778 removeWhere(test) { |
1773 dart.as(test, dart.functionType(core.bool, [E])); | 1779 dart.as(test, dart.functionType(core.bool, [E])); |
1774 ListMixin$()._filter(this, test, false); | 1780 ListMixin$()._filter(this, test, false); |
1775 } | 1781 } |
1776 [core.$retainWhere](test) { | 1782 retainWhere(test) { |
1777 dart.as(test, dart.functionType(core.bool, [E])); | 1783 dart.as(test, dart.functionType(core.bool, [E])); |
1778 ListMixin$()._filter(this, test, true); | 1784 ListMixin$()._filter(this, test, true); |
1779 } | 1785 } |
1780 static _filter(source, test, retainMatching) { | 1786 static _filter(source, test, retainMatching) { |
1781 dart.as(test, dart.functionType(core.bool, [dart.bottom])); | 1787 dart.as(test, dart.functionType(core.bool, [dart.bottom])); |
1782 let retained = []; | 1788 let retained = []; |
1783 let length = source[core.$length]; | 1789 let length = source.length; |
1784 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1790 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1785 let element = source[core.$get](i); | 1791 let element = source[dartx.get](i); |
1786 if (dart.dcall(test, element) == retainMatching) { | 1792 if (dart.dcall(test, element) == retainMatching) { |
1787 retained[core.$add](element); | 1793 retained[dartx.add](element); |
1788 } | 1794 } |
1789 if (length != source[core.$length]) { | 1795 if (length != source.length) { |
1790 throw new core.ConcurrentModificationError(source); | 1796 throw new core.ConcurrentModificationError(source); |
1791 } | 1797 } |
1792 } | 1798 } |
1793 if (retained[core.$length] != source[core.$length]) { | 1799 if (retained.length != source.length) { |
1794 source[core.$setRange](0, retained[core.$length], retained); | 1800 source[dartx.setRange](0, retained.length, retained); |
1795 source[core.$length] = retained[core.$length]; | 1801 source.length = retained.length; |
1796 } | 1802 } |
1797 } | 1803 } |
1798 [core.$clear]() { | 1804 clear() { |
1799 this[core.$length] = 0; | 1805 this.length = 0; |
1800 } | 1806 } |
1801 [core.$removeLast]() { | 1807 removeLast() { |
1802 if (this[core.$length] == 0) { | 1808 if (this.length == 0) { |
1803 throw _internal.IterableElementError.noElement(); | 1809 throw _internal.IterableElementError.noElement(); |
1804 } | 1810 } |
1805 let result = this[core.$get](dart.notNull(this[core.$length]) - 1); | 1811 let result = this.get(dart.notNull(this.length) - 1); |
1806 this[core.$length] = dart.notNull(this[core.$length]) - 1; | 1812 this.length = dart.notNull(this.length) - 1; |
1807 return result; | 1813 return result; |
1808 } | 1814 } |
1809 [core.$sort](compare) { | 1815 sort(compare) { |
1810 if (compare === void 0) | 1816 if (compare === void 0) |
1811 compare = null; | 1817 compare = null; |
1812 dart.as(compare, dart.functionType(core.int, [E, E])); | 1818 dart.as(compare, dart.functionType(core.int, [E, E])); |
1813 _internal.Sort.sort(this, compare == null ? core.Comparable.compare : co
mpare); | 1819 _internal.Sort.sort(this, compare == null ? core.Comparable.compare : co
mpare); |
1814 } | 1820 } |
1815 [core.$shuffle](random) { | 1821 shuffle(random) { |
1816 if (random === void 0) | 1822 if (random === void 0) |
1817 random = null; | 1823 random = null; |
1818 if (random == null) | 1824 if (random == null) |
1819 random = math.Random.new(); | 1825 random = math.Random.new(); |
1820 let length = this[core.$length]; | 1826 let length = this.length; |
1821 while (dart.notNull(length) > 1) { | 1827 while (dart.notNull(length) > 1) { |
1822 let pos = random.nextInt(length); | 1828 let pos = random.nextInt(length); |
1823 length = dart.notNull(length) - 1; | 1829 length = dart.notNull(length) - 1; |
1824 let tmp = this[core.$get](length); | 1830 let tmp = this.get(length); |
1825 this[core.$set](length, this[core.$get](pos)); | 1831 this.set(length, this.get(pos)); |
1826 this[core.$set](pos, tmp); | 1832 this.set(pos, tmp); |
1827 } | 1833 } |
1828 } | 1834 } |
1829 [core.$asMap]() { | 1835 asMap() { |
1830 return new (_internal.ListMapView$(E))(this); | 1836 return new (_internal.ListMapView$(E))(this); |
1831 } | 1837 } |
1832 [core.$sublist](start, end) { | 1838 sublist(start, end) { |
1833 if (end === void 0) | 1839 if (end === void 0) |
1834 end = null; | 1840 end = null; |
1835 let listLength = this[core.$length]; | 1841 let listLength = this.length; |
1836 if (end == null) | 1842 if (end == null) |
1837 end = listLength; | 1843 end = listLength; |
1838 core.RangeError.checkValidRange(start, end, listLength); | 1844 core.RangeError.checkValidRange(start, end, listLength); |
1839 let length = dart.notNull(end) - dart.notNull(start); | 1845 let length = dart.notNull(end) - dart.notNull(start); |
1840 let result = core.List$(E).new(); | 1846 let result = core.List$(E).new(); |
1841 result[core.$length] = length; | 1847 result.length = length; |
1842 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1848 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1843 result[core.$set](i, this[core.$get](dart.notNull(start) + dart.notNul
l(i))); | 1849 result[dartx.set](i, this.get(dart.notNull(start) + dart.notNull(i))); |
1844 } | 1850 } |
1845 return result; | 1851 return result; |
1846 } | 1852 } |
1847 [core.$getRange](start, end) { | 1853 getRange(start, end) { |
1848 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1854 core.RangeError.checkValidRange(start, end, this.length); |
1849 return new (_internal.SubListIterable$(E))(this, start, end); | 1855 return new (_internal.SubListIterable$(E))(this, start, end); |
1850 } | 1856 } |
1851 [core.$removeRange](start, end) { | 1857 removeRange(start, end) { |
1852 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1858 core.RangeError.checkValidRange(start, end, this.length); |
1853 let length = dart.notNull(end) - dart.notNull(start); | 1859 let length = dart.notNull(end) - dart.notNull(start); |
1854 this[core.$setRange](start, dart.notNull(this[core.$length]) - dart.notN
ull(length), this, end); | 1860 this.setRange(start, dart.notNull(this.length) - dart.notNull(length), t
his, end); |
1855 this[core.$length] = dart.notNull(this[core.$length]) - dart.notNull(len
gth); | 1861 this.length = dart.notNull(this.length) - dart.notNull(length); |
1856 } | 1862 } |
1857 [core.$fillRange](start, end, fill) { | 1863 fillRange(start, end, fill) { |
1858 if (fill === void 0) | 1864 if (fill === void 0) |
1859 fill = null; | 1865 fill = null; |
1860 dart.as(fill, E); | 1866 dart.as(fill, E); |
1861 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1867 core.RangeError.checkValidRange(start, end, this.length); |
1862 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul
l(i) + 1) { | 1868 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul
l(i) + 1) { |
1863 this[core.$set](i, fill); | 1869 this.set(i, fill); |
1864 } | 1870 } |
1865 } | 1871 } |
1866 [core.$setRange](start, end, iterable, skipCount) { | 1872 setRange(start, end, iterable, skipCount) { |
1867 dart.as(iterable, core.Iterable$(E)); | 1873 dart.as(iterable, core.Iterable$(E)); |
1868 if (skipCount === void 0) | 1874 if (skipCount === void 0) |
1869 skipCount = 0; | 1875 skipCount = 0; |
1870 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1876 core.RangeError.checkValidRange(start, end, this.length); |
1871 let length = dart.notNull(end) - dart.notNull(start); | 1877 let length = dart.notNull(end) - dart.notNull(start); |
1872 if (length == 0) | 1878 if (length == 0) |
1873 return; | 1879 return; |
1874 core.RangeError.checkNotNegative(skipCount, "skipCount"); | 1880 core.RangeError.checkNotNegative(skipCount, "skipCount"); |
1875 let otherList = null; | 1881 let otherList = null; |
1876 let otherStart = null; | 1882 let otherStart = null; |
1877 if (dart.is(iterable, core.List)) { | 1883 if (dart.is(iterable, core.List)) { |
1878 otherList = dart.as(iterable, core.List); | 1884 otherList = dart.as(iterable, core.List); |
1879 otherStart = skipCount; | 1885 otherStart = skipCount; |
1880 } else { | 1886 } else { |
1881 otherList = iterable[core.$skip](skipCount)[core.$toList]({growable: f
alse}); | 1887 otherList = iterable[dartx.skip](skipCount)[dartx.toList]({growable: f
alse}); |
1882 otherStart = 0; | 1888 otherStart = 0; |
1883 } | 1889 } |
1884 if (dart.notNull(otherStart) + dart.notNull(length) > dart.notNull(other
List[core.$length])) { | 1890 if (dart.notNull(otherStart) + dart.notNull(length) > dart.notNull(other
List.length)) { |
1885 throw _internal.IterableElementError.tooFew(); | 1891 throw _internal.IterableElementError.tooFew(); |
1886 } | 1892 } |
1887 if (dart.notNull(otherStart) < dart.notNull(start)) { | 1893 if (dart.notNull(otherStart) < dart.notNull(start)) { |
1888 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.
notNull(i) - 1) { | 1894 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.
notNull(i) - 1) { |
1889 this[core.$set](dart.notNull(start) + dart.notNull(i), dart.as(other
List[core.$get](dart.notNull(otherStart) + dart.notNull(i)), E)); | 1895 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList[da
rtx.get](dart.notNull(otherStart) + dart.notNull(i)), E)); |
1890 } | 1896 } |
1891 } else { | 1897 } else { |
1892 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNu
ll(i) + 1) { | 1898 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNu
ll(i) + 1) { |
1893 this[core.$set](dart.notNull(start) + dart.notNull(i), dart.as(other
List[core.$get](dart.notNull(otherStart) + dart.notNull(i)), E)); | 1899 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList[da
rtx.get](dart.notNull(otherStart) + dart.notNull(i)), E)); |
1894 } | 1900 } |
1895 } | 1901 } |
1896 } | 1902 } |
1897 [core.$replaceRange](start, end, newContents) { | 1903 replaceRange(start, end, newContents) { |
1898 dart.as(newContents, core.Iterable$(E)); | 1904 dart.as(newContents, core.Iterable$(E)); |
1899 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1905 core.RangeError.checkValidRange(start, end, this.length); |
1900 if (!dart.is(newContents, _internal.EfficientLength)) { | 1906 if (!dart.is(newContents, _internal.EfficientLength)) { |
1901 newContents = newContents[core.$toList](); | 1907 newContents = newContents[dartx.toList](); |
1902 } | 1908 } |
1903 let removeLength = dart.notNull(end) - dart.notNull(start); | 1909 let removeLength = dart.notNull(end) - dart.notNull(start); |
1904 let insertLength = newContents[core.$length]; | 1910 let insertLength = newContents.length; |
1905 if (dart.notNull(removeLength) >= dart.notNull(insertLength)) { | 1911 if (dart.notNull(removeLength) >= dart.notNull(insertLength)) { |
1906 let delta = dart.notNull(removeLength) - dart.notNull(insertLength); | 1912 let delta = dart.notNull(removeLength) - dart.notNull(insertLength); |
1907 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); | 1913 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); |
1908 let newLength = dart.notNull(this[core.$length]) - dart.notNull(delta)
; | 1914 let newLength = dart.notNull(this.length) - dart.notNull(delta); |
1909 this[core.$setRange](start, insertEnd, newContents); | 1915 this.setRange(start, insertEnd, newContents); |
1910 if (delta != 0) { | 1916 if (delta != 0) { |
1911 this[core.$setRange](insertEnd, newLength, this, end); | 1917 this.setRange(insertEnd, newLength, this, end); |
1912 this[core.$length] = newLength; | 1918 this.length = newLength; |
1913 } | 1919 } |
1914 } else { | 1920 } else { |
1915 let delta = dart.notNull(insertLength) - dart.notNull(removeLength); | 1921 let delta = dart.notNull(insertLength) - dart.notNull(removeLength); |
1916 let newLength = dart.notNull(this[core.$length]) + dart.notNull(delta)
; | 1922 let newLength = dart.notNull(this.length) + dart.notNull(delta); |
1917 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); | 1923 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); |
1918 this[core.$length] = newLength; | 1924 this.length = newLength; |
1919 this[core.$setRange](insertEnd, newLength, this, end); | 1925 this.setRange(insertEnd, newLength, this, end); |
1920 this[core.$setRange](start, insertEnd, newContents); | 1926 this.setRange(start, insertEnd, newContents); |
1921 } | 1927 } |
1922 } | 1928 } |
1923 [core.$indexOf](element, startIndex) { | 1929 indexOf(element, startIndex) { |
1924 if (startIndex === void 0) | 1930 if (startIndex === void 0) |
1925 startIndex = 0; | 1931 startIndex = 0; |
1926 if (dart.notNull(startIndex) >= dart.notNull(this[core.$length])) { | 1932 if (dart.notNull(startIndex) >= dart.notNull(this.length)) { |
1927 return -1; | 1933 return -1; |
1928 } | 1934 } |
1929 if (dart.notNull(startIndex) < 0) { | 1935 if (dart.notNull(startIndex) < 0) { |
1930 startIndex = 0; | 1936 startIndex = 0; |
1931 } | 1937 } |
1932 for (let i = startIndex; dart.notNull(i) < dart.notNull(this[core.$lengt
h]); i = dart.notNull(i) + 1) { | 1938 for (let i = startIndex; dart.notNull(i) < dart.notNull(this.length); i
= dart.notNull(i) + 1) { |
1933 if (dart.equals(this[core.$get](i), element)) { | 1939 if (dart.equals(this.get(i), element)) { |
1934 return i; | 1940 return i; |
1935 } | 1941 } |
1936 } | 1942 } |
1937 return -1; | 1943 return -1; |
1938 } | 1944 } |
1939 [core.$lastIndexOf](element, startIndex) { | 1945 lastIndexOf(element, startIndex) { |
1940 if (startIndex === void 0) | 1946 if (startIndex === void 0) |
1941 startIndex = null; | 1947 startIndex = null; |
1942 if (startIndex == null) { | 1948 if (startIndex == null) { |
1943 startIndex = dart.notNull(this[core.$length]) - 1; | 1949 startIndex = dart.notNull(this.length) - 1; |
1944 } else { | 1950 } else { |
1945 if (dart.notNull(startIndex) < 0) { | 1951 if (dart.notNull(startIndex) < 0) { |
1946 return -1; | 1952 return -1; |
1947 } | 1953 } |
1948 if (dart.notNull(startIndex) >= dart.notNull(this[core.$length])) { | 1954 if (dart.notNull(startIndex) >= dart.notNull(this.length)) { |
1949 startIndex = dart.notNull(this[core.$length]) - 1; | 1955 startIndex = dart.notNull(this.length) - 1; |
1950 } | 1956 } |
1951 } | 1957 } |
1952 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1)
{ | 1958 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1)
{ |
1953 if (dart.equals(this[core.$get](i), element)) { | 1959 if (dart.equals(this.get(i), element)) { |
1954 return i; | 1960 return i; |
1955 } | 1961 } |
1956 } | 1962 } |
1957 return -1; | 1963 return -1; |
1958 } | 1964 } |
1959 [core.$insert](index, element) { | 1965 insert(index, element) { |
1960 dart.as(element, E); | 1966 dart.as(element, E); |
1961 core.RangeError.checkValueInInterval(index, 0, this[core.$length], "inde
x"); | 1967 core.RangeError.checkValueInInterval(index, 0, this.length, "index"); |
1962 if (index == this[core.$length]) { | 1968 if (index == this.length) { |
1963 this[core.$add](element); | 1969 this.add(element); |
1964 return; | 1970 return; |
1965 } | 1971 } |
1966 if (!(typeof index == 'number')) | 1972 if (!(typeof index == 'number')) |
1967 throw new core.ArgumentError(index); | 1973 throw new core.ArgumentError(index); |
1968 this[core.$length] = dart.notNull(this[core.$length]) + 1; | 1974 this.length = dart.notNull(this.length) + 1; |
1969 this[core.$setRange](dart.notNull(index) + 1, this[core.$length], this,
index); | 1975 this.setRange(dart.notNull(index) + 1, this.length, this, index); |
1970 this[core.$set](index, element); | 1976 this.set(index, element); |
1971 } | 1977 } |
1972 [core.$removeAt](index) { | 1978 removeAt(index) { |
1973 let result = this[core.$get](index); | 1979 let result = this.get(index); |
1974 this[core.$setRange](index, dart.notNull(this[core.$length]) - 1, this,
dart.notNull(index) + 1); | 1980 this.setRange(index, dart.notNull(this.length) - 1, this, dart.notNull(i
ndex) + 1); |
1975 this[core.$length] = dart.notNull(this[core.$length]) - 1; | 1981 this.length = dart.notNull(this.length) - 1; |
1976 return result; | 1982 return result; |
1977 } | 1983 } |
1978 [core.$insertAll](index, iterable) { | 1984 insertAll(index, iterable) { |
1979 dart.as(iterable, core.Iterable$(E)); | 1985 dart.as(iterable, core.Iterable$(E)); |
1980 core.RangeError.checkValueInInterval(index, 0, this[core.$length], "inde
x"); | 1986 core.RangeError.checkValueInInterval(index, 0, this.length, "index"); |
1981 if (dart.is(iterable, _internal.EfficientLength)) { | 1987 if (dart.is(iterable, _internal.EfficientLength)) { |
1982 iterable = iterable[core.$toList](); | 1988 iterable = iterable[dartx.toList](); |
1983 } | 1989 } |
1984 let insertionLength = iterable[core.$length]; | 1990 let insertionLength = iterable.length; |
1985 this[core.$length] = dart.notNull(this[core.$length]) + dart.notNull(ins
ertionLength); | 1991 this.length = dart.notNull(this.length) + dart.notNull(insertionLength); |
1986 this[core.$setRange](dart.notNull(index) + dart.notNull(insertionLength)
, this[core.$length], this, index); | 1992 this.setRange(dart.notNull(index) + dart.notNull(insertionLength), this.
length, this, index); |
1987 this[core.$setAll](index, iterable); | 1993 this.setAll(index, iterable); |
1988 } | 1994 } |
1989 [core.$setAll](index, iterable) { | 1995 setAll(index, iterable) { |
1990 dart.as(iterable, core.Iterable$(E)); | 1996 dart.as(iterable, core.Iterable$(E)); |
1991 if (dart.is(iterable, core.List)) { | 1997 if (dart.is(iterable, core.List)) { |
1992 this[core.$setRange](index, dart.notNull(index) + dart.notNull(iterabl
e[core.$length]), iterable); | 1998 this.setRange(index, dart.notNull(index) + dart.notNull(iterable.lengt
h), iterable); |
1993 } else { | 1999 } else { |
1994 for (let element of iterable) { | 2000 for (let element of iterable) { |
1995 this[core.$set]((() => { | 2001 this.set((() => { |
1996 let x = index; | 2002 let x = index; |
1997 index = dart.notNull(x) + 1; | 2003 index = dart.notNull(x) + 1; |
1998 return x; | 2004 return x; |
1999 })(), element); | 2005 })(), element); |
2000 } | 2006 } |
2001 } | 2007 } |
2002 } | 2008 } |
2003 get [core.$reversed]() { | 2009 get reversed() { |
2004 return new (_internal.ReversedListIterable$(E))(this); | 2010 return new (_internal.ReversedListIterable$(E))(this); |
2005 } | 2011 } |
2006 [core.$toString]() { | 2012 toString() { |
2007 return IterableBase.iterableToFullString(this, '[', ']'); | 2013 return IterableBase.iterableToFullString(this, '[', ']'); |
2008 } | 2014 } |
2009 } | 2015 } |
2010 ListMixin[dart.implements] = () => [core.List$(E)]; | 2016 ListMixin[dart.implements] = () => [core.List$(E)]; |
| 2017 dart.implementExtension(ListMixin, () => [core.List, core.Iterable]); |
2011 dart.setSignature(ListMixin, { | 2018 dart.setSignature(ListMixin, { |
2012 methods: () => ({ | 2019 methods: () => ({ |
2013 [core.$elementAt]: [E, [core.int]], | 2020 elementAt: [E, [core.int]], |
2014 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 2021 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
2015 [core.$contains]: [core.bool, [core.Object]], | 2022 contains: [core.bool, [core.Object]], |
2016 [core.$every]: [core.bool, [dart.functionType(core.bool, [E])]], | 2023 every: [core.bool, [dart.functionType(core.bool, [E])]], |
2017 [core.$any]: [core.bool, [dart.functionType(core.bool, [E])]], | 2024 any: [core.bool, [dart.functionType(core.bool, [E])]], |
2018 [core.$firstWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: da
rt.functionType(E, [])}], | 2025 firstWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.funct
ionType(E, [])}], |
2019 [core.$lastWhere]: [E, [dart.functionType(core.bool, [E])], {orElse: dar
t.functionType(E, [])}], | 2026 lastWhere: [E, [dart.functionType(core.bool, [E])], {orElse: dart.functi
onType(E, [])}], |
2020 [core.$singleWhere]: [E, [dart.functionType(core.bool, [E])]], | 2027 singleWhere: [E, [dart.functionType(core.bool, [E])]], |
2021 [core.$join]: [core.String, [], [core.String]], | 2028 join: [core.String, [], [core.String]], |
2022 [core.$where]: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], | 2029 where: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
2023 [core.$map]: [core.Iterable, [dart.functionType(core.Object, [E])]], | 2030 map: [core.Iterable, [dart.functionType(core.Object, [E])]], |
2024 [core.$expand]: [core.Iterable, [dart.functionType(core.Iterable, [E])]]
, | 2031 expand: [core.Iterable, [dart.functionType(core.Iterable, [E])]], |
2025 [core.$reduce]: [E, [dart.functionType(E, [E, E])]], | 2032 reduce: [E, [dart.functionType(E, [E, E])]], |
2026 [core.$fold]: [core.Object, [core.Object, dart.functionType(core.Object,
[dart.bottom, E])]], | 2033 fold: [core.Object, [core.Object, dart.functionType(core.Object, [dart.b
ottom, E])]], |
2027 [core.$skip]: [core.Iterable$(E), [core.int]], | 2034 skip: [core.Iterable$(E), [core.int]], |
2028 [core.$skipWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 2035 skipWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
2029 [core.$take]: [core.Iterable$(E), [core.int]], | 2036 take: [core.Iterable$(E), [core.int]], |
2030 [core.$takeWhile]: [core.Iterable$(E), [dart.functionType(core.bool, [E]
)]], | 2037 takeWhile: [core.Iterable$(E), [dart.functionType(core.bool, [E])]], |
2031 [core.$toList]: [core.List$(E), [], {growable: core.bool}], | 2038 toList: [core.List$(E), [], {growable: core.bool}], |
2032 [core.$toSet]: [core.Set$(E), []], | 2039 toSet: [core.Set$(E), []], |
2033 [core.$add]: [dart.void, [E]], | 2040 add: [dart.void, [E]], |
2034 [core.$addAll]: [dart.void, [core.Iterable$(E)]], | 2041 addAll: [dart.void, [core.Iterable$(E)]], |
2035 [core.$remove]: [core.bool, [core.Object]], | 2042 remove: [core.bool, [core.Object]], |
2036 [core.$removeWhere]: [dart.void, [dart.functionType(core.bool, [E])]], | 2043 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
2037 [core.$retainWhere]: [dart.void, [dart.functionType(core.bool, [E])]], | 2044 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
2038 [core.$clear]: [dart.void, []], | 2045 clear: [dart.void, []], |
2039 [core.$removeLast]: [E, []], | 2046 removeLast: [E, []], |
2040 [core.$sort]: [dart.void, [], [dart.functionType(core.int, [E, E])]], | 2047 sort: [dart.void, [], [dart.functionType(core.int, [E, E])]], |
2041 [core.$shuffle]: [dart.void, [], [math.Random]], | 2048 shuffle: [dart.void, [], [math.Random]], |
2042 [core.$asMap]: [core.Map$(core.int, E), []], | 2049 asMap: [core.Map$(core.int, E), []], |
2043 [core.$sublist]: [core.List$(E), [core.int], [core.int]], | 2050 sublist: [core.List$(E), [core.int], [core.int]], |
2044 [core.$getRange]: [core.Iterable$(E), [core.int, core.int]], | 2051 getRange: [core.Iterable$(E), [core.int, core.int]], |
2045 [core.$removeRange]: [dart.void, [core.int, core.int]], | 2052 removeRange: [dart.void, [core.int, core.int]], |
2046 [core.$fillRange]: [dart.void, [core.int, core.int], [E]], | 2053 fillRange: [dart.void, [core.int, core.int], [E]], |
2047 [core.$setRange]: [dart.void, [core.int, core.int, core.Iterable$(E)], [
core.int]], | 2054 setRange: [dart.void, [core.int, core.int, core.Iterable$(E)], [core.int
]], |
2048 [core.$replaceRange]: [dart.void, [core.int, core.int, core.Iterable$(E)
]], | 2055 replaceRange: [dart.void, [core.int, core.int, core.Iterable$(E)]], |
2049 [core.$indexOf]: [core.int, [core.Object], [core.int]], | 2056 indexOf: [core.int, [core.Object], [core.int]], |
2050 [core.$lastIndexOf]: [core.int, [core.Object], [core.int]], | 2057 lastIndexOf: [core.int, [core.Object], [core.int]], |
2051 [core.$insert]: [dart.void, [core.int, E]], | 2058 insert: [dart.void, [core.int, E]], |
2052 [core.$removeAt]: [E, [core.int]], | 2059 removeAt: [E, [core.int]], |
2053 [core.$insertAll]: [dart.void, [core.int, core.Iterable$(E)]], | 2060 insertAll: [dart.void, [core.int, core.Iterable$(E)]], |
2054 [core.$setAll]: [dart.void, [core.int, core.Iterable$(E)]] | 2061 setAll: [dart.void, [core.int, core.Iterable$(E)]] |
2055 }), | 2062 }), |
2056 statics: () => ({_filter: [dart.void, [core.List, dart.functionType(core.b
ool, [dart.bottom]), core.bool]]}), | 2063 statics: () => ({_filter: [dart.void, [core.List, dart.functionType(core.b
ool, [dart.bottom]), core.bool]]}), |
2057 names: ['_filter'] | 2064 names: ['_filter'] |
2058 }); | 2065 }); |
2059 return ListMixin; | 2066 return ListMixin; |
2060 }); | 2067 }); |
2061 let ListMixin = ListMixin$(); | 2068 let ListMixin = ListMixin$(); |
2062 let ListBase$ = dart.generic(function(E) { | 2069 let ListBase$ = dart.generic(function(E) { |
2063 class ListBase extends dart.mixin(core.Object, ListMixin$(E)) { | 2070 class ListBase extends dart.mixin(core.Object, ListMixin$(E)) { |
2064 static listToString(list) { | 2071 static listToString(list) { |
(...skipping 24 matching lines...) Expand all Loading... |
2089 containsValue(value) { | 2096 containsValue(value) { |
2090 for (let key of this.keys) { | 2097 for (let key of this.keys) { |
2091 if (dart.equals(this.get(key), value)) | 2098 if (dart.equals(this.get(key), value)) |
2092 return true; | 2099 return true; |
2093 } | 2100 } |
2094 return false; | 2101 return false; |
2095 } | 2102 } |
2096 putIfAbsent(key, ifAbsent) { | 2103 putIfAbsent(key, ifAbsent) { |
2097 dart.as(key, K); | 2104 dart.as(key, K); |
2098 dart.as(ifAbsent, dart.functionType(V, [])); | 2105 dart.as(ifAbsent, dart.functionType(V, [])); |
2099 if (this.keys[core.$contains](key)) { | 2106 if (this.keys[dartx.contains](key)) { |
2100 return this.get(key); | 2107 return this.get(key); |
2101 } | 2108 } |
2102 return this.set(key, ifAbsent()); | 2109 return this.set(key, ifAbsent()); |
2103 } | 2110 } |
2104 containsKey(key) { | 2111 containsKey(key) { |
2105 return this.keys[core.$contains](key); | 2112 return this.keys[dartx.contains](key); |
2106 } | 2113 } |
2107 get length() { | 2114 get length() { |
2108 return this.keys[core.$length]; | 2115 return this.keys.length; |
2109 } | 2116 } |
2110 get isEmpty() { | 2117 get isEmpty() { |
2111 return this.keys[core.$isEmpty]; | 2118 return this.keys[dartx.isEmpty]; |
2112 } | 2119 } |
2113 get isNotEmpty() { | 2120 get isNotEmpty() { |
2114 return this.keys[core.$isNotEmpty]; | 2121 return this.keys[dartx.isNotEmpty]; |
2115 } | 2122 } |
2116 get values() { | 2123 get values() { |
2117 return new (_MapBaseValueIterable$(V))(this); | 2124 return new (_MapBaseValueIterable$(V))(this); |
2118 } | 2125 } |
2119 toString() { | 2126 toString() { |
2120 return Maps.mapToString(this); | 2127 return Maps.mapToString(this); |
2121 } | 2128 } |
2122 } | 2129 } |
2123 MapMixin[dart.implements] = () => [core.Map$(K, V)]; | 2130 MapMixin[dart.implements] = () => [core.Map$(K, V)]; |
2124 dart.setSignature(MapMixin, { | 2131 dart.setSignature(MapMixin, { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2179 return UnmodifiableMapBase; | 2186 return UnmodifiableMapBase; |
2180 }); | 2187 }); |
2181 let UnmodifiableMapBase = UnmodifiableMapBase$(); | 2188 let UnmodifiableMapBase = UnmodifiableMapBase$(); |
2182 let _map = Symbol('_map'); | 2189 let _map = Symbol('_map'); |
2183 let _MapBaseValueIterable$ = dart.generic(function(V) { | 2190 let _MapBaseValueIterable$ = dart.generic(function(V) { |
2184 class _MapBaseValueIterable extends IterableBase$(V) { | 2191 class _MapBaseValueIterable extends IterableBase$(V) { |
2185 _MapBaseValueIterable(map) { | 2192 _MapBaseValueIterable(map) { |
2186 this[_map] = map; | 2193 this[_map] = map; |
2187 super.IterableBase(); | 2194 super.IterableBase(); |
2188 } | 2195 } |
2189 get [core.$length]() { | 2196 get length() { |
2190 return this[_map].length; | 2197 return this[_map].length; |
2191 } | 2198 } |
2192 get [core.$isEmpty]() { | 2199 get isEmpty() { |
2193 return this[_map].isEmpty; | 2200 return this[_map].isEmpty; |
2194 } | 2201 } |
2195 get [core.$isNotEmpty]() { | 2202 get isNotEmpty() { |
2196 return this[_map].isNotEmpty; | 2203 return this[_map].isNotEmpty; |
2197 } | 2204 } |
2198 get [core.$first]() { | 2205 get first() { |
2199 return dart.as(this[_map].get(this[_map].keys[core.$first]), V); | 2206 return dart.as(this[_map].get(this[_map].keys[dartx.first]), V); |
2200 } | 2207 } |
2201 get [core.$single]() { | 2208 get single() { |
2202 return dart.as(this[_map].get(this[_map].keys[core.$single]), V); | 2209 return dart.as(this[_map].get(this[_map].keys[dartx.single]), V); |
2203 } | 2210 } |
2204 get [core.$last]() { | 2211 get last() { |
2205 return dart.as(this[_map].get(this[_map].keys[core.$last]), V); | 2212 return dart.as(this[_map].get(this[_map].keys[dartx.last]), V); |
2206 } | 2213 } |
2207 get [core.$iterator]() { | 2214 get iterator() { |
2208 return new (_MapBaseValueIterator$(V))(this[_map]); | 2215 return new (_MapBaseValueIterator$(V))(this[_map]); |
2209 } | 2216 } |
2210 } | 2217 } |
2211 _MapBaseValueIterable[dart.implements] = () => [_internal.EfficientLength]; | 2218 _MapBaseValueIterable[dart.implements] = () => [_internal.EfficientLength]; |
| 2219 dart.implementExtension(_MapBaseValueIterable, () => [core.Iterable]); |
2212 dart.setSignature(_MapBaseValueIterable, { | 2220 dart.setSignature(_MapBaseValueIterable, { |
2213 constructors: () => ({_MapBaseValueIterable: [_MapBaseValueIterable$(V), [
core.Map]]}) | 2221 constructors: () => ({_MapBaseValueIterable: [_MapBaseValueIterable$(V), [
core.Map]]}) |
2214 }); | 2222 }); |
2215 return _MapBaseValueIterable; | 2223 return _MapBaseValueIterable; |
2216 }); | 2224 }); |
2217 let _MapBaseValueIterable = _MapBaseValueIterable$(); | 2225 let _MapBaseValueIterable = _MapBaseValueIterable$(); |
2218 let _keys = Symbol('_keys'); | 2226 let _keys = Symbol('_keys'); |
2219 let _MapBaseValueIterator$ = dart.generic(function(V) { | 2227 let _MapBaseValueIterator$ = dart.generic(function(V) { |
2220 class _MapBaseValueIterator extends core.Object { | 2228 class _MapBaseValueIterator extends core.Object { |
2221 _MapBaseValueIterator(map) { | 2229 _MapBaseValueIterator(map) { |
2222 this[_map] = map; | 2230 this[_map] = map; |
2223 this[_keys] = map.keys[core.$iterator]; | 2231 this[_keys] = map.keys[dartx.iterator]; |
2224 this[_current] = null; | 2232 this[_current] = null; |
2225 } | 2233 } |
2226 moveNext() { | 2234 moveNext() { |
2227 if (this[_keys].moveNext()) { | 2235 if (this[_keys].moveNext()) { |
2228 this[_current] = dart.as(this[_map].get(this[_keys].current), V); | 2236 this[_current] = dart.as(this[_map].get(this[_keys].current), V); |
2229 return true; | 2237 return true; |
2230 } | 2238 } |
2231 this[_current] = null; | 2239 this[_current] = null; |
2232 return false; | 2240 return false; |
2233 } | 2241 } |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2342 } | 2350 } |
2343 static putIfAbsent(map, key, ifAbsent) { | 2351 static putIfAbsent(map, key, ifAbsent) { |
2344 if (map.containsKey(key)) { | 2352 if (map.containsKey(key)) { |
2345 return map.get(key); | 2353 return map.get(key); |
2346 } | 2354 } |
2347 let v = ifAbsent(); | 2355 let v = ifAbsent(); |
2348 map.set(key, v); | 2356 map.set(key, v); |
2349 return v; | 2357 return v; |
2350 } | 2358 } |
2351 static clear(map) { | 2359 static clear(map) { |
2352 for (let k of map.keys[core.$toList]()) { | 2360 for (let k of map.keys[dartx.toList]()) { |
2353 map.remove(k); | 2361 map.remove(k); |
2354 } | 2362 } |
2355 } | 2363 } |
2356 static forEach(map, f) { | 2364 static forEach(map, f) { |
2357 for (let k of map.keys) { | 2365 for (let k of map.keys) { |
2358 dart.dcall(f, k, map.get(k)); | 2366 dart.dcall(f, k, map.get(k)); |
2359 } | 2367 } |
2360 } | 2368 } |
2361 static getValues(map) { | 2369 static getValues(map) { |
2362 return map.keys[core.$map](dart.fn(key => map.get(key))); | 2370 return map.keys[dartx.map](dart.fn(key => map.get(key))); |
2363 } | 2371 } |
2364 static length(map) { | 2372 static length(map) { |
2365 return map.keys[core.$length]; | 2373 return map.keys.length; |
2366 } | 2374 } |
2367 static isEmpty(map) { | 2375 static isEmpty(map) { |
2368 return map.keys[core.$isEmpty]; | 2376 return map.keys[dartx.isEmpty]; |
2369 } | 2377 } |
2370 static isNotEmpty(map) { | 2378 static isNotEmpty(map) { |
2371 return map.keys[core.$isNotEmpty]; | 2379 return map.keys[dartx.isNotEmpty]; |
2372 } | 2380 } |
2373 static mapToString(m) { | 2381 static mapToString(m) { |
2374 if (IterableBase._isToStringVisiting(m)) { | 2382 if (IterableBase._isToStringVisiting(m)) { |
2375 return '{...}'; | 2383 return '{...}'; |
2376 } | 2384 } |
2377 let result = new core.StringBuffer(); | 2385 let result = new core.StringBuffer(); |
2378 try { | 2386 try { |
2379 IterableBase._toStringVisiting[core.$add](m); | 2387 IterableBase._toStringVisiting[dartx.add](m); |
2380 result.write('{'); | 2388 result.write('{'); |
2381 let first = true; | 2389 let first = true; |
2382 m.forEach(dart.fn((k, v) => { | 2390 m.forEach(dart.fn((k, v) => { |
2383 if (!dart.notNull(first)) { | 2391 if (!dart.notNull(first)) { |
2384 result.write(', '); | 2392 result.write(', '); |
2385 } | 2393 } |
2386 first = false; | 2394 first = false; |
2387 result.write(k); | 2395 result.write(k); |
2388 result.write(': '); | 2396 result.write(': '); |
2389 result.write(v); | 2397 result.write(v); |
2390 })); | 2398 })); |
2391 result.write('}'); | 2399 result.write('}'); |
2392 } finally { | 2400 } finally { |
2393 dart.assert(core.identical(IterableBase._toStringVisiting[core.$last], m
)); | 2401 dart.assert(core.identical(IterableBase._toStringVisiting[dartx.last], m
)); |
2394 IterableBase._toStringVisiting[core.$removeLast](); | 2402 IterableBase._toStringVisiting[dartx.removeLast](); |
2395 } | 2403 } |
2396 return dart.toString(result); | 2404 return dart.toString(result); |
2397 } | 2405 } |
2398 static _id(x) { | 2406 static _id(x) { |
2399 return x; | 2407 return x; |
2400 } | 2408 } |
2401 static _fillMapWithMappedIterable(map, iterable, key, value) { | 2409 static _fillMapWithMappedIterable(map, iterable, key, value) { |
2402 if (key == null) | 2410 if (key == null) |
2403 key = Maps._id; | 2411 key = Maps._id; |
2404 if (value == null) | 2412 if (value == null) |
2405 value = Maps._id; | 2413 value = Maps._id; |
2406 for (let element of iterable) { | 2414 for (let element of iterable) { |
2407 map.set(dart.dcall(key, element), dart.dcall(value, element)); | 2415 map.set(dart.dcall(key, element), dart.dcall(value, element)); |
2408 } | 2416 } |
2409 } | 2417 } |
2410 static _fillMapWithIterables(map, keys, values) { | 2418 static _fillMapWithIterables(map, keys, values) { |
2411 let keyIterator = keys[core.$iterator]; | 2419 let keyIterator = keys[dartx.iterator]; |
2412 let valueIterator = values[core.$iterator]; | 2420 let valueIterator = values[dartx.iterator]; |
2413 let hasNextKey = keyIterator.moveNext(); | 2421 let hasNextKey = keyIterator.moveNext(); |
2414 let hasNextValue = valueIterator.moveNext(); | 2422 let hasNextValue = valueIterator.moveNext(); |
2415 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { | 2423 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { |
2416 map.set(keyIterator.current, valueIterator.current); | 2424 map.set(keyIterator.current, valueIterator.current); |
2417 hasNextKey = keyIterator.moveNext(); | 2425 hasNextKey = keyIterator.moveNext(); |
2418 hasNextValue = valueIterator.moveNext(); | 2426 hasNextValue = valueIterator.moveNext(); |
2419 } | 2427 } |
2420 if (dart.notNull(hasNextKey) || dart.notNull(hasNextValue)) { | 2428 if (dart.notNull(hasNextKey) || dart.notNull(hasNextValue)) { |
2421 throw new core.ArgumentError("Iterables do not have same length."); | 2429 throw new core.ArgumentError("Iterables do not have same length."); |
2422 } | 2430 } |
(...skipping 19 matching lines...) Expand all Loading... |
2442 }); | 2450 }); |
2443 let Queue$ = dart.generic(function(E) { | 2451 let Queue$ = dart.generic(function(E) { |
2444 class Queue extends core.Object { | 2452 class Queue extends core.Object { |
2445 static new() { | 2453 static new() { |
2446 return new (ListQueue$(E))(); | 2454 return new (ListQueue$(E))(); |
2447 } | 2455 } |
2448 static from(elements) { | 2456 static from(elements) { |
2449 return ListQueue$(E).from(elements); | 2457 return ListQueue$(E).from(elements); |
2450 } | 2458 } |
2451 [Symbol.iterator]() { | 2459 [Symbol.iterator]() { |
2452 return new dart.JsIterator(this[core.$iterator]); | 2460 return new dart.JsIterator(this.iterator); |
2453 } | 2461 } |
2454 } | 2462 } |
2455 Queue[dart.implements] = () => [core.Iterable$(E), _internal.EfficientLength
]; | 2463 Queue[dart.implements] = () => [core.Iterable$(E), _internal.EfficientLength
]; |
| 2464 dart.implementExtension(Queue, () => [core.Iterable]); |
2456 dart.setSignature(Queue, { | 2465 dart.setSignature(Queue, { |
2457 constructors: () => ({ | 2466 constructors: () => ({ |
2458 new: [Queue$(E), []], | 2467 new: [Queue$(E), []], |
2459 from: [Queue$(E), [core.Iterable]] | 2468 from: [Queue$(E), [core.Iterable]] |
2460 }) | 2469 }) |
2461 }); | 2470 }); |
2462 return Queue; | 2471 return Queue; |
2463 }); | 2472 }); |
2464 let Queue = Queue$(); | 2473 let Queue = Queue$(); |
2465 let _element = Symbol('_element'); | 2474 let _element = Symbol('_element'); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2568 super.IterableBase(); | 2577 super.IterableBase(); |
2569 this[_sentinel] = new (_DoubleLinkedQueueEntrySentinel$(E))(); | 2578 this[_sentinel] = new (_DoubleLinkedQueueEntrySentinel$(E))(); |
2570 } | 2579 } |
2571 static from(elements) { | 2580 static from(elements) { |
2572 let list = new (DoubleLinkedQueue$(E))(); | 2581 let list = new (DoubleLinkedQueue$(E))(); |
2573 for (let e of dart.as(elements, core.Iterable$(E))) { | 2582 for (let e of dart.as(elements, core.Iterable$(E))) { |
2574 list.addLast(e); | 2583 list.addLast(e); |
2575 } | 2584 } |
2576 return dart.as(list, DoubleLinkedQueue$(E)); | 2585 return dart.as(list, DoubleLinkedQueue$(E)); |
2577 } | 2586 } |
2578 get [core.$length]() { | 2587 get length() { |
2579 return this[_elementCount]; | 2588 return this[_elementCount]; |
2580 } | 2589 } |
2581 addLast(value) { | 2590 addLast(value) { |
2582 dart.as(value, E); | 2591 dart.as(value, E); |
2583 this[_sentinel].prepend(value); | 2592 this[_sentinel].prepend(value); |
2584 this[_elementCount] = dart.notNull(this[_elementCount]) + 1; | 2593 this[_elementCount] = dart.notNull(this[_elementCount]) + 1; |
2585 } | 2594 } |
2586 addFirst(value) { | 2595 addFirst(value) { |
2587 dart.as(value, E); | 2596 dart.as(value, E); |
2588 this[_sentinel].append(value); | 2597 this[_sentinel].append(value); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2635 } | 2644 } |
2636 } | 2645 } |
2637 removeWhere(test) { | 2646 removeWhere(test) { |
2638 dart.as(test, dart.functionType(core.bool, [E])); | 2647 dart.as(test, dart.functionType(core.bool, [E])); |
2639 this[_filter](test, true); | 2648 this[_filter](test, true); |
2640 } | 2649 } |
2641 retainWhere(test) { | 2650 retainWhere(test) { |
2642 dart.as(test, dart.functionType(core.bool, [E])); | 2651 dart.as(test, dart.functionType(core.bool, [E])); |
2643 this[_filter](test, false); | 2652 this[_filter](test, false); |
2644 } | 2653 } |
2645 get [core.$first]() { | 2654 get first() { |
2646 return this[_sentinel][_next].element; | 2655 return this[_sentinel][_next].element; |
2647 } | 2656 } |
2648 get [core.$last]() { | 2657 get last() { |
2649 return this[_sentinel][_previous].element; | 2658 return this[_sentinel][_previous].element; |
2650 } | 2659 } |
2651 get [core.$single]() { | 2660 get single() { |
2652 if (core.identical(this[_sentinel][_next], this[_sentinel][_previous]))
{ | 2661 if (core.identical(this[_sentinel][_next], this[_sentinel][_previous]))
{ |
2653 return this[_sentinel][_next].element; | 2662 return this[_sentinel][_next].element; |
2654 } | 2663 } |
2655 throw _internal.IterableElementError.tooMany(); | 2664 throw _internal.IterableElementError.tooMany(); |
2656 } | 2665 } |
2657 lastEntry() { | 2666 lastEntry() { |
2658 return this[_sentinel].previousEntry(); | 2667 return this[_sentinel].previousEntry(); |
2659 } | 2668 } |
2660 firstEntry() { | 2669 firstEntry() { |
2661 return this[_sentinel].nextEntry(); | 2670 return this[_sentinel].nextEntry(); |
2662 } | 2671 } |
2663 get [core.$isEmpty]() { | 2672 get isEmpty() { |
2664 return core.identical(this[_sentinel][_next], this[_sentinel]); | 2673 return core.identical(this[_sentinel][_next], this[_sentinel]); |
2665 } | 2674 } |
2666 clear() { | 2675 clear() { |
2667 this[_sentinel][_next] = this[_sentinel]; | 2676 this[_sentinel][_next] = this[_sentinel]; |
2668 this[_sentinel][_previous] = this[_sentinel]; | 2677 this[_sentinel][_previous] = this[_sentinel]; |
2669 this[_elementCount] = 0; | 2678 this[_elementCount] = 0; |
2670 } | 2679 } |
2671 forEachEntry(f) { | 2680 forEachEntry(f) { |
2672 dart.as(f, dart.functionType(dart.void, [DoubleLinkedQueueEntry$(E)])); | 2681 dart.as(f, dart.functionType(dart.void, [DoubleLinkedQueueEntry$(E)])); |
2673 let entry = this[_sentinel][_next]; | 2682 let entry = this[_sentinel][_next]; |
2674 while (!dart.notNull(core.identical(entry, this[_sentinel]))) { | 2683 while (!dart.notNull(core.identical(entry, this[_sentinel]))) { |
2675 let nextEntry = entry[_next]; | 2684 let nextEntry = entry[_next]; |
2676 f(entry); | 2685 f(entry); |
2677 entry = nextEntry; | 2686 entry = nextEntry; |
2678 } | 2687 } |
2679 } | 2688 } |
2680 get [core.$iterator]() { | 2689 get iterator() { |
2681 return new (_DoubleLinkedQueueIterator$(E))(this[_sentinel]); | 2690 return new (_DoubleLinkedQueueIterator$(E))(this[_sentinel]); |
2682 } | 2691 } |
2683 toString() { | 2692 toString() { |
2684 return IterableBase.iterableToFullString(this, '{', '}'); | 2693 return IterableBase.iterableToFullString(this, '{', '}'); |
2685 } | 2694 } |
2686 } | 2695 } |
2687 DoubleLinkedQueue[dart.implements] = () => [Queue$(E)]; | 2696 DoubleLinkedQueue[dart.implements] = () => [Queue$(E)]; |
| 2697 dart.implementExtension(DoubleLinkedQueue, () => [core.Iterable]); |
2688 dart.setSignature(DoubleLinkedQueue, { | 2698 dart.setSignature(DoubleLinkedQueue, { |
2689 constructors: () => ({ | 2699 constructors: () => ({ |
2690 DoubleLinkedQueue: [DoubleLinkedQueue$(E), []], | 2700 DoubleLinkedQueue: [DoubleLinkedQueue$(E), []], |
2691 from: [DoubleLinkedQueue$(E), [core.Iterable]] | 2701 from: [DoubleLinkedQueue$(E), [core.Iterable]] |
2692 }), | 2702 }), |
2693 methods: () => ({ | 2703 methods: () => ({ |
2694 addLast: [dart.void, [E]], | 2704 addLast: [dart.void, [E]], |
2695 addFirst: [dart.void, [E]], | 2705 addFirst: [dart.void, [E]], |
2696 add: [dart.void, [E]], | 2706 add: [dart.void, [E]], |
2697 addAll: [dart.void, [core.Iterable$(E)]], | 2707 addAll: [dart.void, [core.Iterable$(E)]], |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2763 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN
ull(ListQueue$()._INITIAL_CAPACITY)) { | 2773 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN
ull(ListQueue$()._INITIAL_CAPACITY)) { |
2764 initialCapacity = ListQueue$()._INITIAL_CAPACITY; | 2774 initialCapacity = ListQueue$()._INITIAL_CAPACITY; |
2765 } else if (!dart.notNull(ListQueue$()._isPowerOf2(initialCapacity))) { | 2775 } else if (!dart.notNull(ListQueue$()._isPowerOf2(initialCapacity))) { |
2766 initialCapacity = ListQueue$()._nextPowerOf2(initialCapacity); | 2776 initialCapacity = ListQueue$()._nextPowerOf2(initialCapacity); |
2767 } | 2777 } |
2768 dart.assert(ListQueue$()._isPowerOf2(initialCapacity)); | 2778 dart.assert(ListQueue$()._isPowerOf2(initialCapacity)); |
2769 this[_table] = core.List$(E).new(initialCapacity); | 2779 this[_table] = core.List$(E).new(initialCapacity); |
2770 } | 2780 } |
2771 static from(elements) { | 2781 static from(elements) { |
2772 if (dart.is(elements, core.List)) { | 2782 if (dart.is(elements, core.List)) { |
2773 let length = elements[core.$length]; | 2783 let length = elements.length; |
2774 let queue = new (ListQueue$(E))(dart.notNull(length) + 1); | 2784 let queue = new (ListQueue$(E))(dart.notNull(length) + 1); |
2775 dart.assert(dart.notNull(queue[_table][core.$length]) > dart.notNull(l
ength)); | 2785 dart.assert(dart.notNull(queue[_table].length) > dart.notNull(length))
; |
2776 let sourceList = elements; | 2786 let sourceList = elements; |
2777 queue[_table][core.$setRange](0, length, dart.as(sourceList, core.Iter
able$(E)), 0); | 2787 queue[_table][dartx.setRange](0, length, dart.as(sourceList, core.Iter
able$(E)), 0); |
2778 queue[_tail] = length; | 2788 queue[_tail] = length; |
2779 return queue; | 2789 return queue; |
2780 } else { | 2790 } else { |
2781 let capacity = ListQueue$()._INITIAL_CAPACITY; | 2791 let capacity = ListQueue$()._INITIAL_CAPACITY; |
2782 if (dart.is(elements, _internal.EfficientLength)) { | 2792 if (dart.is(elements, _internal.EfficientLength)) { |
2783 capacity = elements[core.$length]; | 2793 capacity = elements.length; |
2784 } | 2794 } |
2785 let result = new (ListQueue$(E))(capacity); | 2795 let result = new (ListQueue$(E))(capacity); |
2786 for (let element of dart.as(elements, core.Iterable$(E))) { | 2796 for (let element of dart.as(elements, core.Iterable$(E))) { |
2787 result.addLast(element); | 2797 result.addLast(element); |
2788 } | 2798 } |
2789 return result; | 2799 return result; |
2790 } | 2800 } |
2791 } | 2801 } |
2792 get [core.$iterator]() { | 2802 get iterator() { |
2793 return new (_ListQueueIterator$(E))(this); | 2803 return new (_ListQueueIterator$(E))(this); |
2794 } | 2804 } |
2795 [core.$forEach](action) { | 2805 forEach(action) { |
2796 dart.as(action, dart.functionType(dart.void, [E])); | 2806 dart.as(action, dart.functionType(dart.void, [E])); |
2797 let modificationCount = this[_modificationCount]; | 2807 let modificationCount = this[_modificationCount]; |
2798 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da
rt.notNull(this[_table][core.$length]) - 1) { | 2808 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da
rt.notNull(this[_table].length) - 1) { |
2799 action(this[_table][core.$get](i)); | 2809 action(this[_table][dartx.get](i)); |
2800 this[_checkModification](modificationCount); | 2810 this[_checkModification](modificationCount); |
2801 } | 2811 } |
2802 } | 2812 } |
2803 get [core.$isEmpty]() { | 2813 get isEmpty() { |
2804 return this[_head] == this[_tail]; | 2814 return this[_head] == this[_tail]; |
2805 } | 2815 } |
2806 get [core.$length]() { | 2816 get length() { |
2807 return dart.notNull(this[_tail]) - dart.notNull(this[_head]) & dart.notN
ull(this[_table][core.$length]) - 1; | 2817 return dart.notNull(this[_tail]) - dart.notNull(this[_head]) & dart.notN
ull(this[_table].length) - 1; |
2808 } | 2818 } |
2809 get [core.$first]() { | 2819 get first() { |
2810 if (this[_head] == this[_tail]) | 2820 if (this[_head] == this[_tail]) |
2811 throw _internal.IterableElementError.noElement(); | 2821 throw _internal.IterableElementError.noElement(); |
2812 return this[_table][core.$get](this[_head]); | 2822 return this[_table][dartx.get](this[_head]); |
2813 } | 2823 } |
2814 get [core.$last]() { | 2824 get last() { |
2815 if (this[_head] == this[_tail]) | 2825 if (this[_head] == this[_tail]) |
2816 throw _internal.IterableElementError.noElement(); | 2826 throw _internal.IterableElementError.noElement(); |
2817 return this[_table][core.$get](dart.notNull(this[_tail]) - 1 & dart.notN
ull(this[_table][core.$length]) - 1); | 2827 return this[_table][dartx.get](dart.notNull(this[_tail]) - 1 & dart.notN
ull(this[_table].length) - 1); |
2818 } | 2828 } |
2819 get [core.$single]() { | 2829 get single() { |
2820 if (this[_head] == this[_tail]) | 2830 if (this[_head] == this[_tail]) |
2821 throw _internal.IterableElementError.noElement(); | 2831 throw _internal.IterableElementError.noElement(); |
2822 if (dart.notNull(this[core.$length]) > 1) | 2832 if (dart.notNull(this.length) > 1) |
2823 throw _internal.IterableElementError.tooMany(); | 2833 throw _internal.IterableElementError.tooMany(); |
2824 return this[_table][core.$get](this[_head]); | 2834 return this[_table][dartx.get](this[_head]); |
2825 } | 2835 } |
2826 [core.$elementAt](index) { | 2836 elementAt(index) { |
2827 core.RangeError.checkValidIndex(index, this); | 2837 core.RangeError.checkValidIndex(index, this); |
2828 return this[_table][core.$get](dart.notNull(this[_head]) + dart.notNull(
index) & dart.notNull(this[_table][core.$length]) - 1); | 2838 return this[_table][dartx.get](dart.notNull(this[_head]) + dart.notNull(
index) & dart.notNull(this[_table].length) - 1); |
2829 } | 2839 } |
2830 [core.$toList](opts) { | 2840 toList(opts) { |
2831 let growable = opts && 'growable' in opts ? opts.growable : true; | 2841 let growable = opts && 'growable' in opts ? opts.growable : true; |
2832 let list = null; | 2842 let list = null; |
2833 if (growable) { | 2843 if (growable) { |
2834 list = core.List$(E).new(); | 2844 list = core.List$(E).new(); |
2835 list[core.$length] = this[core.$length]; | 2845 list.length = this.length; |
2836 } else { | 2846 } else { |
2837 list = core.List$(E).new(this[core.$length]); | 2847 list = core.List$(E).new(this.length); |
2838 } | 2848 } |
2839 this[_writeToList](list); | 2849 this[_writeToList](list); |
2840 return list; | 2850 return list; |
2841 } | 2851 } |
2842 add(element) { | 2852 add(element) { |
2843 dart.as(element, E); | 2853 dart.as(element, E); |
2844 this[_add](element); | 2854 this[_add](element); |
2845 } | 2855 } |
2846 addAll(elements) { | 2856 addAll(elements) { |
2847 dart.as(elements, core.Iterable$(E)); | 2857 dart.as(elements, core.Iterable$(E)); |
2848 if (dart.is(elements, core.List)) { | 2858 if (dart.is(elements, core.List)) { |
2849 let list = dart.as(elements, core.List); | 2859 let list = dart.as(elements, core.List); |
2850 let addCount = list[core.$length]; | 2860 let addCount = list.length; |
2851 let length = this[core.$length]; | 2861 let length = this.length; |
2852 if (dart.notNull(length) + dart.notNull(addCount) >= dart.notNull(this
[_table][core.$length])) { | 2862 if (dart.notNull(length) + dart.notNull(addCount) >= dart.notNull(this
[_table].length)) { |
2853 this[_preGrow](dart.notNull(length) + dart.notNull(addCount)); | 2863 this[_preGrow](dart.notNull(length) + dart.notNull(addCount)); |
2854 this[_table][core.$setRange](length, dart.notNull(length) + dart.not
Null(addCount), dart.as(list, core.Iterable$(E)), 0); | 2864 this[_table][dartx.setRange](length, dart.notNull(length) + dart.not
Null(addCount), dart.as(list, core.Iterable$(E)), 0); |
2855 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount); | 2865 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount); |
2856 } else { | 2866 } else { |
2857 let endSpace = dart.notNull(this[_table][core.$length]) - dart.notNu
ll(this[_tail]); | 2867 let endSpace = dart.notNull(this[_table].length) - dart.notNull(this
[_tail]); |
2858 if (dart.notNull(addCount) < dart.notNull(endSpace)) { | 2868 if (dart.notNull(addCount) < dart.notNull(endSpace)) { |
2859 this[_table][core.$setRange](this[_tail], dart.notNull(this[_tail]
) + dart.notNull(addCount), dart.as(list, core.Iterable$(E)), 0); | 2869 this[_table][dartx.setRange](this[_tail], dart.notNull(this[_tail]
) + dart.notNull(addCount), dart.as(list, core.Iterable$(E)), 0); |
2860 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount); | 2870 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount); |
2861 } else { | 2871 } else { |
2862 let preSpace = dart.notNull(addCount) - dart.notNull(endSpace); | 2872 let preSpace = dart.notNull(addCount) - dart.notNull(endSpace); |
2863 this[_table][core.$setRange](this[_tail], dart.notNull(this[_tail]
) + dart.notNull(endSpace), dart.as(list, core.Iterable$(E)), 0); | 2873 this[_table][dartx.setRange](this[_tail], dart.notNull(this[_tail]
) + dart.notNull(endSpace), dart.as(list, core.Iterable$(E)), 0); |
2864 this[_table][core.$setRange](0, preSpace, dart.as(list, core.Itera
ble$(E)), endSpace); | 2874 this[_table][dartx.setRange](0, preSpace, dart.as(list, core.Itera
ble$(E)), endSpace); |
2865 this[_tail] = preSpace; | 2875 this[_tail] = preSpace; |
2866 } | 2876 } |
2867 } | 2877 } |
2868 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 2878 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
2869 } else { | 2879 } else { |
2870 for (let element of elements) | 2880 for (let element of elements) |
2871 this[_add](element); | 2881 this[_add](element); |
2872 } | 2882 } |
2873 } | 2883 } |
2874 remove(object) { | 2884 remove(object) { |
2875 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da
rt.notNull(this[_table][core.$length]) - 1) { | 2885 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da
rt.notNull(this[_table].length) - 1) { |
2876 let element = this[_table][core.$get](i); | 2886 let element = this[_table][dartx.get](i); |
2877 if (dart.equals(element, object)) { | 2887 if (dart.equals(element, object)) { |
2878 this[_remove](i); | 2888 this[_remove](i); |
2879 this[_modificationCount] = dart.notNull(this[_modificationCount]) +
1; | 2889 this[_modificationCount] = dart.notNull(this[_modificationCount]) +
1; |
2880 return true; | 2890 return true; |
2881 } | 2891 } |
2882 } | 2892 } |
2883 return false; | 2893 return false; |
2884 } | 2894 } |
2885 [_filterWhere](test, removeMatching) { | 2895 [_filterWhere](test, removeMatching) { |
2886 dart.as(test, dart.functionType(core.bool, [E])); | 2896 dart.as(test, dart.functionType(core.bool, [E])); |
2887 let index = this[_head]; | 2897 let index = this[_head]; |
2888 let modificationCount = this[_modificationCount]; | 2898 let modificationCount = this[_modificationCount]; |
2889 let i = this[_head]; | 2899 let i = this[_head]; |
2890 while (i != this[_tail]) { | 2900 while (i != this[_tail]) { |
2891 let element = this[_table][core.$get](i); | 2901 let element = this[_table][dartx.get](i); |
2892 let remove = core.identical(removeMatching, test(element)); | 2902 let remove = core.identical(removeMatching, test(element)); |
2893 this[_checkModification](modificationCount); | 2903 this[_checkModification](modificationCount); |
2894 if (remove) { | 2904 if (remove) { |
2895 i = this[_remove](i); | 2905 i = this[_remove](i); |
2896 modificationCount = this[_modificationCount] = dart.notNull(this[_mo
dificationCount]) + 1; | 2906 modificationCount = this[_modificationCount] = dart.notNull(this[_mo
dificationCount]) + 1; |
2897 } else { | 2907 } else { |
2898 i = dart.notNull(i) + 1 & dart.notNull(this[_table][core.$length]) -
1; | 2908 i = dart.notNull(i) + 1 & dart.notNull(this[_table].length) - 1; |
2899 } | 2909 } |
2900 } | 2910 } |
2901 } | 2911 } |
2902 removeWhere(test) { | 2912 removeWhere(test) { |
2903 dart.as(test, dart.functionType(core.bool, [E])); | 2913 dart.as(test, dart.functionType(core.bool, [E])); |
2904 this[_filterWhere](test, true); | 2914 this[_filterWhere](test, true); |
2905 } | 2915 } |
2906 retainWhere(test) { | 2916 retainWhere(test) { |
2907 dart.as(test, dart.functionType(core.bool, [E])); | 2917 dart.as(test, dart.functionType(core.bool, [E])); |
2908 this[_filterWhere](test, false); | 2918 this[_filterWhere](test, false); |
2909 } | 2919 } |
2910 clear() { | 2920 clear() { |
2911 if (this[_head] != this[_tail]) { | 2921 if (this[_head] != this[_tail]) { |
2912 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 &
dart.notNull(this[_table][core.$length]) - 1) { | 2922 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 &
dart.notNull(this[_table].length) - 1) { |
2913 this[_table][core.$set](i, null); | 2923 this[_table][dartx.set](i, null); |
2914 } | 2924 } |
2915 this[_head] = this[_tail] = 0; | 2925 this[_head] = this[_tail] = 0; |
2916 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 2926 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
2917 } | 2927 } |
2918 } | 2928 } |
2919 toString() { | 2929 toString() { |
2920 return IterableBase.iterableToFullString(this, "{", "}"); | 2930 return IterableBase.iterableToFullString(this, "{", "}"); |
2921 } | 2931 } |
2922 addLast(element) { | 2932 addLast(element) { |
2923 dart.as(element, E); | 2933 dart.as(element, E); |
2924 this[_add](element); | 2934 this[_add](element); |
2925 } | 2935 } |
2926 addFirst(element) { | 2936 addFirst(element) { |
2927 dart.as(element, E); | 2937 dart.as(element, E); |
2928 this[_head] = dart.notNull(this[_head]) - 1 & dart.notNull(this[_table][
core.$length]) - 1; | 2938 this[_head] = dart.notNull(this[_head]) - 1 & dart.notNull(this[_table].
length) - 1; |
2929 this[_table][core.$set](this[_head], element); | 2939 this[_table][dartx.set](this[_head], element); |
2930 if (this[_head] == this[_tail]) | 2940 if (this[_head] == this[_tail]) |
2931 this[_grow](); | 2941 this[_grow](); |
2932 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 2942 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
2933 } | 2943 } |
2934 removeFirst() { | 2944 removeFirst() { |
2935 if (this[_head] == this[_tail]) | 2945 if (this[_head] == this[_tail]) |
2936 throw _internal.IterableElementError.noElement(); | 2946 throw _internal.IterableElementError.noElement(); |
2937 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 2947 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
2938 let result = this[_table][core.$get](this[_head]); | 2948 let result = this[_table][dartx.get](this[_head]); |
2939 this[_table][core.$set](this[_head], null); | 2949 this[_table][dartx.set](this[_head], null); |
2940 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(this[_table][
core.$length]) - 1; | 2950 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(this[_table].
length) - 1; |
2941 return result; | 2951 return result; |
2942 } | 2952 } |
2943 removeLast() { | 2953 removeLast() { |
2944 if (this[_head] == this[_tail]) | 2954 if (this[_head] == this[_tail]) |
2945 throw _internal.IterableElementError.noElement(); | 2955 throw _internal.IterableElementError.noElement(); |
2946 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 2956 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
2947 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table][
core.$length]) - 1; | 2957 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table].
length) - 1; |
2948 let result = this[_table][core.$get](this[_tail]); | 2958 let result = this[_table][dartx.get](this[_tail]); |
2949 this[_table][core.$set](this[_tail], null); | 2959 this[_table][dartx.set](this[_tail], null); |
2950 return result; | 2960 return result; |
2951 } | 2961 } |
2952 static _isPowerOf2(number) { | 2962 static _isPowerOf2(number) { |
2953 return (dart.notNull(number) & dart.notNull(number) - 1) == 0; | 2963 return (dart.notNull(number) & dart.notNull(number) - 1) == 0; |
2954 } | 2964 } |
2955 static _nextPowerOf2(number) { | 2965 static _nextPowerOf2(number) { |
2956 dart.assert(dart.notNull(number) > 0); | 2966 dart.assert(dart.notNull(number) > 0); |
2957 number = (dart.notNull(number) << 1) - 1; | 2967 number = (dart.notNull(number) << 1) - 1; |
2958 for (;;) { | 2968 for (;;) { |
2959 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1; | 2969 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1; |
2960 if (nextNumber == 0) | 2970 if (nextNumber == 0) |
2961 return number; | 2971 return number; |
2962 number = nextNumber; | 2972 number = nextNumber; |
2963 } | 2973 } |
2964 } | 2974 } |
2965 [_checkModification](expectedModificationCount) { | 2975 [_checkModification](expectedModificationCount) { |
2966 if (expectedModificationCount != this[_modificationCount]) { | 2976 if (expectedModificationCount != this[_modificationCount]) { |
2967 throw new core.ConcurrentModificationError(this); | 2977 throw new core.ConcurrentModificationError(this); |
2968 } | 2978 } |
2969 } | 2979 } |
2970 [_add](element) { | 2980 [_add](element) { |
2971 dart.as(element, E); | 2981 dart.as(element, E); |
2972 this[_table][core.$set](this[_tail], element); | 2982 this[_table][dartx.set](this[_tail], element); |
2973 this[_tail] = dart.notNull(this[_tail]) + 1 & dart.notNull(this[_table][
core.$length]) - 1; | 2983 this[_tail] = dart.notNull(this[_tail]) + 1 & dart.notNull(this[_table].
length) - 1; |
2974 if (this[_head] == this[_tail]) | 2984 if (this[_head] == this[_tail]) |
2975 this[_grow](); | 2985 this[_grow](); |
2976 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 2986 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
2977 } | 2987 } |
2978 [_remove](offset) { | 2988 [_remove](offset) { |
2979 let mask = dart.notNull(this[_table][core.$length]) - 1; | 2989 let mask = dart.notNull(this[_table].length) - 1; |
2980 let startDistance = dart.notNull(offset) - dart.notNull(this[_head]) & d
art.notNull(mask); | 2990 let startDistance = dart.notNull(offset) - dart.notNull(this[_head]) & d
art.notNull(mask); |
2981 let endDistance = dart.notNull(this[_tail]) - dart.notNull(offset) & dar
t.notNull(mask); | 2991 let endDistance = dart.notNull(this[_tail]) - dart.notNull(offset) & dar
t.notNull(mask); |
2982 if (dart.notNull(startDistance) < dart.notNull(endDistance)) { | 2992 if (dart.notNull(startDistance) < dart.notNull(endDistance)) { |
2983 let i = offset; | 2993 let i = offset; |
2984 while (i != this[_head]) { | 2994 while (i != this[_head]) { |
2985 let prevOffset = dart.notNull(i) - 1 & dart.notNull(mask); | 2995 let prevOffset = dart.notNull(i) - 1 & dart.notNull(mask); |
2986 this[_table][core.$set](i, this[_table][core.$get](prevOffset)); | 2996 this[_table][dartx.set](i, this[_table][dartx.get](prevOffset)); |
2987 i = prevOffset; | 2997 i = prevOffset; |
2988 } | 2998 } |
2989 this[_table][core.$set](this[_head], null); | 2999 this[_table][dartx.set](this[_head], null); |
2990 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(mask); | 3000 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(mask); |
2991 return dart.notNull(offset) + 1 & dart.notNull(mask); | 3001 return dart.notNull(offset) + 1 & dart.notNull(mask); |
2992 } else { | 3002 } else { |
2993 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(mask); | 3003 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(mask); |
2994 let i = offset; | 3004 let i = offset; |
2995 while (i != this[_tail]) { | 3005 while (i != this[_tail]) { |
2996 let nextOffset = dart.notNull(i) + 1 & dart.notNull(mask); | 3006 let nextOffset = dart.notNull(i) + 1 & dart.notNull(mask); |
2997 this[_table][core.$set](i, this[_table][core.$get](nextOffset)); | 3007 this[_table][dartx.set](i, this[_table][dartx.get](nextOffset)); |
2998 i = nextOffset; | 3008 i = nextOffset; |
2999 } | 3009 } |
3000 this[_table][core.$set](this[_tail], null); | 3010 this[_table][dartx.set](this[_tail], null); |
3001 return offset; | 3011 return offset; |
3002 } | 3012 } |
3003 } | 3013 } |
3004 [_grow]() { | 3014 [_grow]() { |
3005 let newTable = core.List$(E).new(dart.notNull(this[_table][core.$length]
) * 2); | 3015 let newTable = core.List$(E).new(dart.notNull(this[_table].length) * 2); |
3006 let split = dart.notNull(this[_table][core.$length]) - dart.notNull(this
[_head]); | 3016 let split = dart.notNull(this[_table].length) - dart.notNull(this[_head]
); |
3007 newTable[core.$setRange](0, split, this[_table], this[_head]); | 3017 newTable[dartx.setRange](0, split, this[_table], this[_head]); |
3008 newTable[core.$setRange](split, dart.notNull(split) + dart.notNull(this[
_head]), this[_table], 0); | 3018 newTable[dartx.setRange](split, dart.notNull(split) + dart.notNull(this[
_head]), this[_table], 0); |
3009 this[_head] = 0; | 3019 this[_head] = 0; |
3010 this[_tail] = this[_table][core.$length]; | 3020 this[_tail] = this[_table].length; |
3011 this[_table] = newTable; | 3021 this[_table] = newTable; |
3012 } | 3022 } |
3013 [_writeToList](target) { | 3023 [_writeToList](target) { |
3014 dart.as(target, core.List$(E)); | 3024 dart.as(target, core.List$(E)); |
3015 dart.assert(dart.notNull(target[core.$length]) >= dart.notNull(this[core
.$length])); | 3025 dart.assert(dart.notNull(target.length) >= dart.notNull(this.length)); |
3016 if (dart.notNull(this[_head]) <= dart.notNull(this[_tail])) { | 3026 if (dart.notNull(this[_head]) <= dart.notNull(this[_tail])) { |
3017 let length = dart.notNull(this[_tail]) - dart.notNull(this[_head]); | 3027 let length = dart.notNull(this[_tail]) - dart.notNull(this[_head]); |
3018 target[core.$setRange](0, length, this[_table], this[_head]); | 3028 target[dartx.setRange](0, length, this[_table], this[_head]); |
3019 return length; | 3029 return length; |
3020 } else { | 3030 } else { |
3021 let firstPartSize = dart.notNull(this[_table][core.$length]) - dart.no
tNull(this[_head]); | 3031 let firstPartSize = dart.notNull(this[_table].length) - dart.notNull(t
his[_head]); |
3022 target[core.$setRange](0, firstPartSize, this[_table], this[_head]); | 3032 target[dartx.setRange](0, firstPartSize, this[_table], this[_head]); |
3023 target[core.$setRange](firstPartSize, dart.notNull(firstPartSize) + da
rt.notNull(this[_tail]), this[_table], 0); | 3033 target[dartx.setRange](firstPartSize, dart.notNull(firstPartSize) + da
rt.notNull(this[_tail]), this[_table], 0); |
3024 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); | 3034 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); |
3025 } | 3035 } |
3026 } | 3036 } |
3027 [_preGrow](newElementCount) { | 3037 [_preGrow](newElementCount) { |
3028 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this[core.$len
gth])); | 3038 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this.length)); |
3029 newElementCount = dart.notNull(newElementCount) + (dart.notNull(newEleme
ntCount) >> 1); | 3039 newElementCount = dart.notNull(newElementCount) + (dart.notNull(newEleme
ntCount) >> 1); |
3030 let newCapacity = ListQueue$()._nextPowerOf2(newElementCount); | 3040 let newCapacity = ListQueue$()._nextPowerOf2(newElementCount); |
3031 let newTable = core.List$(E).new(newCapacity); | 3041 let newTable = core.List$(E).new(newCapacity); |
3032 this[_tail] = this[_writeToList](newTable); | 3042 this[_tail] = this[_writeToList](newTable); |
3033 this[_table] = newTable; | 3043 this[_table] = newTable; |
3034 this[_head] = 0; | 3044 this[_head] = 0; |
3035 } | 3045 } |
3036 } | 3046 } |
3037 ListQueue[dart.implements] = () => [Queue$(E)]; | 3047 ListQueue[dart.implements] = () => [Queue$(E)]; |
| 3048 dart.implementExtension(ListQueue, () => [core.Iterable]); |
3038 dart.setSignature(ListQueue, { | 3049 dart.setSignature(ListQueue, { |
3039 constructors: () => ({ | 3050 constructors: () => ({ |
3040 ListQueue: [ListQueue$(E), [], [core.int]], | 3051 ListQueue: [ListQueue$(E), [], [core.int]], |
3041 from: [ListQueue$(E), [core.Iterable]] | 3052 from: [ListQueue$(E), [core.Iterable]] |
3042 }), | 3053 }), |
3043 methods: () => ({ | 3054 methods: () => ({ |
3044 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 3055 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
3045 [core.$elementAt]: [E, [core.int]], | 3056 elementAt: [E, [core.int]], |
3046 [core.$toList]: [core.List$(E), [], {growable: core.bool}], | 3057 toList: [core.List$(E), [], {growable: core.bool}], |
3047 add: [dart.void, [E]], | 3058 add: [dart.void, [E]], |
3048 addAll: [dart.void, [core.Iterable$(E)]], | 3059 addAll: [dart.void, [core.Iterable$(E)]], |
3049 remove: [core.bool, [core.Object]], | 3060 remove: [core.bool, [core.Object]], |
3050 [_filterWhere]: [dart.void, [dart.functionType(core.bool, [E]), core.boo
l]], | 3061 [_filterWhere]: [dart.void, [dart.functionType(core.bool, [E]), core.boo
l]], |
3051 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 3062 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
3052 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 3063 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
3053 clear: [dart.void, []], | 3064 clear: [dart.void, []], |
3054 addLast: [dart.void, [E]], | 3065 addLast: [dart.void, [E]], |
3055 addFirst: [dart.void, [E]], | 3066 addFirst: [dart.void, [E]], |
3056 removeFirst: [E, []], | 3067 removeFirst: [E, []], |
(...skipping 29 matching lines...) Expand all Loading... |
3086 } | 3097 } |
3087 get current() { | 3098 get current() { |
3088 return this[_current]; | 3099 return this[_current]; |
3089 } | 3100 } |
3090 moveNext() { | 3101 moveNext() { |
3091 this[_queue][_checkModification](this[_modificationCount]); | 3102 this[_queue][_checkModification](this[_modificationCount]); |
3092 if (this[_position] == this[_end]) { | 3103 if (this[_position] == this[_end]) { |
3093 this[_current] = null; | 3104 this[_current] = null; |
3094 return false; | 3105 return false; |
3095 } | 3106 } |
3096 this[_current] = dart.as(this[_queue][_table][core.$get](this[_position]
), E); | 3107 this[_current] = dart.as(this[_queue][_table][dartx.get](this[_position]
), E); |
3097 this[_position] = dart.notNull(this[_position]) + 1 & dart.notNull(this[
_queue][_table][core.$length]) - 1; | 3108 this[_position] = dart.notNull(this[_position]) + 1 & dart.notNull(this[
_queue][_table].length) - 1; |
3098 return true; | 3109 return true; |
3099 } | 3110 } |
3100 } | 3111 } |
3101 _ListQueueIterator[dart.implements] = () => [core.Iterator$(E)]; | 3112 _ListQueueIterator[dart.implements] = () => [core.Iterator$(E)]; |
3102 dart.setSignature(_ListQueueIterator, { | 3113 dart.setSignature(_ListQueueIterator, { |
3103 constructors: () => ({_ListQueueIterator: [_ListQueueIterator$(E), [ListQu
eue]]}), | 3114 constructors: () => ({_ListQueueIterator: [_ListQueueIterator$(E), [ListQu
eue]]}), |
3104 methods: () => ({moveNext: [core.bool, []]}) | 3115 methods: () => ({moveNext: [core.bool, []]}) |
3105 }); | 3116 }); |
3106 return _ListQueueIterator; | 3117 return _ListQueueIterator; |
3107 }); | 3118 }); |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3550 let SplayTreeMap = SplayTreeMap$(); | 3561 let SplayTreeMap = SplayTreeMap$(); |
3551 let _workList = Symbol('_workList'); | 3562 let _workList = Symbol('_workList'); |
3552 let _tree = Symbol('_tree'); | 3563 let _tree = Symbol('_tree'); |
3553 let _currentNode = Symbol('_currentNode'); | 3564 let _currentNode = Symbol('_currentNode'); |
3554 let _findLeftMostDescendent = Symbol('_findLeftMostDescendent'); | 3565 let _findLeftMostDescendent = Symbol('_findLeftMostDescendent'); |
3555 let _getValue = Symbol('_getValue'); | 3566 let _getValue = Symbol('_getValue'); |
3556 let _rebuildWorkList = Symbol('_rebuildWorkList'); | 3567 let _rebuildWorkList = Symbol('_rebuildWorkList'); |
3557 let _SplayTreeIterator$ = dart.generic(function(T) { | 3568 let _SplayTreeIterator$ = dart.generic(function(T) { |
3558 class _SplayTreeIterator extends core.Object { | 3569 class _SplayTreeIterator extends core.Object { |
3559 _SplayTreeIterator(tree) { | 3570 _SplayTreeIterator(tree) { |
3560 this[_workList] = dart.setType([], core.List$(_SplayTreeNode)); | 3571 this[_workList] = dart.list([], _SplayTreeNode); |
3561 this[_tree] = tree; | 3572 this[_tree] = tree; |
3562 this[_modificationCount] = tree[_modificationCount]; | 3573 this[_modificationCount] = tree[_modificationCount]; |
3563 this[_splayCount] = tree[_splayCount]; | 3574 this[_splayCount] = tree[_splayCount]; |
3564 this[_currentNode] = null; | 3575 this[_currentNode] = null; |
3565 this[_findLeftMostDescendent](tree[_root]); | 3576 this[_findLeftMostDescendent](tree[_root]); |
3566 } | 3577 } |
3567 startAt(tree, startKey) { | 3578 startAt(tree, startKey) { |
3568 this[_workList] = dart.setType([], core.List$(_SplayTreeNode)); | 3579 this[_workList] = dart.list([], _SplayTreeNode); |
3569 this[_tree] = tree; | 3580 this[_tree] = tree; |
3570 this[_modificationCount] = tree[_modificationCount]; | 3581 this[_modificationCount] = tree[_modificationCount]; |
3571 this[_splayCount] = null; | 3582 this[_splayCount] = null; |
3572 this[_currentNode] = null; | 3583 this[_currentNode] = null; |
3573 if (tree[_root] == null) | 3584 if (tree[_root] == null) |
3574 return; | 3585 return; |
3575 let compare = tree[_splay](startKey); | 3586 let compare = tree[_splay](startKey); |
3576 this[_splayCount] = tree[_splayCount]; | 3587 this[_splayCount] = tree[_splayCount]; |
3577 if (dart.notNull(compare) < 0) { | 3588 if (dart.notNull(compare) < 0) { |
3578 this[_findLeftMostDescendent](tree[_root].right); | 3589 this[_findLeftMostDescendent](tree[_root].right); |
3579 } else { | 3590 } else { |
3580 this[_workList][core.$add](tree[_root]); | 3591 this[_workList][dartx.add](tree[_root]); |
3581 } | 3592 } |
3582 } | 3593 } |
3583 get current() { | 3594 get current() { |
3584 if (this[_currentNode] == null) | 3595 if (this[_currentNode] == null) |
3585 return null; | 3596 return null; |
3586 return this[_getValue](dart.as(this[_currentNode], _SplayTreeMapNode)); | 3597 return this[_getValue](dart.as(this[_currentNode], _SplayTreeMapNode)); |
3587 } | 3598 } |
3588 [_findLeftMostDescendent](node) { | 3599 [_findLeftMostDescendent](node) { |
3589 while (node != null) { | 3600 while (node != null) { |
3590 this[_workList][core.$add](node); | 3601 this[_workList][dartx.add](node); |
3591 node = node.left; | 3602 node = node.left; |
3592 } | 3603 } |
3593 } | 3604 } |
3594 [_rebuildWorkList](currentNode) { | 3605 [_rebuildWorkList](currentNode) { |
3595 dart.assert(!dart.notNull(this[_workList][core.$isEmpty])); | 3606 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty])); |
3596 this[_workList][core.$clear](); | 3607 this[_workList][dartx.clear](); |
3597 if (currentNode == null) { | 3608 if (currentNode == null) { |
3598 this[_findLeftMostDescendent](this[_tree][_root]); | 3609 this[_findLeftMostDescendent](this[_tree][_root]); |
3599 } else { | 3610 } else { |
3600 this[_tree][_splay](currentNode.key); | 3611 this[_tree][_splay](currentNode.key); |
3601 this[_findLeftMostDescendent](this[_tree][_root].right); | 3612 this[_findLeftMostDescendent](this[_tree][_root].right); |
3602 dart.assert(!dart.notNull(this[_workList][core.$isEmpty])); | 3613 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty])); |
3603 } | 3614 } |
3604 } | 3615 } |
3605 moveNext() { | 3616 moveNext() { |
3606 if (this[_modificationCount] != this[_tree][_modificationCount]) { | 3617 if (this[_modificationCount] != this[_tree][_modificationCount]) { |
3607 throw new core.ConcurrentModificationError(this[_tree]); | 3618 throw new core.ConcurrentModificationError(this[_tree]); |
3608 } | 3619 } |
3609 if (this[_workList][core.$isEmpty]) { | 3620 if (this[_workList][dartx.isEmpty]) { |
3610 this[_currentNode] = null; | 3621 this[_currentNode] = null; |
3611 return false; | 3622 return false; |
3612 } | 3623 } |
3613 if (this[_tree][_splayCount] != this[_splayCount] && dart.notNull(this[_
currentNode] != null)) { | 3624 if (this[_tree][_splayCount] != this[_splayCount] && dart.notNull(this[_
currentNode] != null)) { |
3614 this[_rebuildWorkList](this[_currentNode]); | 3625 this[_rebuildWorkList](this[_currentNode]); |
3615 } | 3626 } |
3616 this[_currentNode] = this[_workList][core.$removeLast](); | 3627 this[_currentNode] = this[_workList][dartx.removeLast](); |
3617 this[_findLeftMostDescendent](this[_currentNode].right); | 3628 this[_findLeftMostDescendent](this[_currentNode].right); |
3618 return true; | 3629 return true; |
3619 } | 3630 } |
3620 } | 3631 } |
3621 _SplayTreeIterator[dart.implements] = () => [core.Iterator$(T)]; | 3632 _SplayTreeIterator[dart.implements] = () => [core.Iterator$(T)]; |
3622 dart.defineNamedConstructor(_SplayTreeIterator, 'startAt'); | 3633 dart.defineNamedConstructor(_SplayTreeIterator, 'startAt'); |
3623 dart.setSignature(_SplayTreeIterator, { | 3634 dart.setSignature(_SplayTreeIterator, { |
3624 constructors: () => ({ | 3635 constructors: () => ({ |
3625 _SplayTreeIterator: [_SplayTreeIterator$(T), [_SplayTree]], | 3636 _SplayTreeIterator: [_SplayTreeIterator$(T), [_SplayTree]], |
3626 startAt: [_SplayTreeIterator$(T), [_SplayTree, core.Object]] | 3637 startAt: [_SplayTreeIterator$(T), [_SplayTree, core.Object]] |
3627 }), | 3638 }), |
3628 methods: () => ({ | 3639 methods: () => ({ |
3629 [_findLeftMostDescendent]: [dart.void, [_SplayTreeNode]], | 3640 [_findLeftMostDescendent]: [dart.void, [_SplayTreeNode]], |
3630 [_rebuildWorkList]: [dart.void, [_SplayTreeNode]], | 3641 [_rebuildWorkList]: [dart.void, [_SplayTreeNode]], |
3631 moveNext: [core.bool, []] | 3642 moveNext: [core.bool, []] |
3632 }) | 3643 }) |
3633 }); | 3644 }); |
3634 return _SplayTreeIterator; | 3645 return _SplayTreeIterator; |
3635 }); | 3646 }); |
3636 let _SplayTreeIterator = _SplayTreeIterator$(); | 3647 let _SplayTreeIterator = _SplayTreeIterator$(); |
3637 let _copyNode = Symbol('_copyNode'); | 3648 let _copyNode = Symbol('_copyNode'); |
3638 let _SplayTreeKeyIterable$ = dart.generic(function(K) { | 3649 let _SplayTreeKeyIterable$ = dart.generic(function(K) { |
3639 class _SplayTreeKeyIterable extends IterableBase$(K) { | 3650 class _SplayTreeKeyIterable extends IterableBase$(K) { |
3640 _SplayTreeKeyIterable(tree) { | 3651 _SplayTreeKeyIterable(tree) { |
3641 this[_tree] = tree; | 3652 this[_tree] = tree; |
3642 super.IterableBase(); | 3653 super.IterableBase(); |
3643 } | 3654 } |
3644 get [core.$length]() { | 3655 get length() { |
3645 return this[_tree][_count]; | 3656 return this[_tree][_count]; |
3646 } | 3657 } |
3647 get [core.$isEmpty]() { | 3658 get isEmpty() { |
3648 return this[_tree][_count] == 0; | 3659 return this[_tree][_count] == 0; |
3649 } | 3660 } |
3650 get [core.$iterator]() { | 3661 get iterator() { |
3651 return new (_SplayTreeKeyIterator$(K))(this[_tree]); | 3662 return new (_SplayTreeKeyIterator$(K))(this[_tree]); |
3652 } | 3663 } |
3653 [core.$toSet]() { | 3664 toSet() { |
3654 let setOrMap = this[_tree]; | 3665 let setOrMap = this[_tree]; |
3655 let set = new (SplayTreeSet$(K))(dart.as(setOrMap[_comparator], __CastTy
pe0), dart.as(setOrMap[_validKey], __CastType3)); | 3666 let set = new (SplayTreeSet$(K))(dart.as(setOrMap[_comparator], __CastTy
pe0), dart.as(setOrMap[_validKey], __CastType3)); |
3656 set[_count] = this[_tree][_count]; | 3667 set[_count] = this[_tree][_count]; |
3657 set[_root] = set[_copyNode](this[_tree][_root]); | 3668 set[_root] = set[_copyNode](this[_tree][_root]); |
3658 return set; | 3669 return set; |
3659 } | 3670 } |
3660 } | 3671 } |
3661 _SplayTreeKeyIterable[dart.implements] = () => [_internal.EfficientLength]; | 3672 _SplayTreeKeyIterable[dart.implements] = () => [_internal.EfficientLength]; |
| 3673 dart.implementExtension(_SplayTreeKeyIterable, () => [core.Iterable]); |
3662 dart.setSignature(_SplayTreeKeyIterable, { | 3674 dart.setSignature(_SplayTreeKeyIterable, { |
3663 constructors: () => ({_SplayTreeKeyIterable: [_SplayTreeKeyIterable$(K), [
_SplayTree$(K)]]}), | 3675 constructors: () => ({_SplayTreeKeyIterable: [_SplayTreeKeyIterable$(K), [
_SplayTree$(K)]]}), |
3664 methods: () => ({[core.$toSet]: [core.Set$(K), []]}) | 3676 methods: () => ({toSet: [core.Set$(K), []]}) |
3665 }); | 3677 }); |
3666 return _SplayTreeKeyIterable; | 3678 return _SplayTreeKeyIterable; |
3667 }); | 3679 }); |
3668 let _SplayTreeKeyIterable = _SplayTreeKeyIterable$(); | 3680 let _SplayTreeKeyIterable = _SplayTreeKeyIterable$(); |
3669 let _SplayTreeValueIterable$ = dart.generic(function(K, V) { | 3681 let _SplayTreeValueIterable$ = dart.generic(function(K, V) { |
3670 class _SplayTreeValueIterable extends IterableBase$(V) { | 3682 class _SplayTreeValueIterable extends IterableBase$(V) { |
3671 _SplayTreeValueIterable(map) { | 3683 _SplayTreeValueIterable(map) { |
3672 this[_map] = map; | 3684 this[_map] = map; |
3673 super.IterableBase(); | 3685 super.IterableBase(); |
3674 } | 3686 } |
3675 get [core.$length]() { | 3687 get length() { |
3676 return this[_map][_count]; | 3688 return this[_map][_count]; |
3677 } | 3689 } |
3678 get [core.$isEmpty]() { | 3690 get isEmpty() { |
3679 return this[_map][_count] == 0; | 3691 return this[_map][_count] == 0; |
3680 } | 3692 } |
3681 get [core.$iterator]() { | 3693 get iterator() { |
3682 return new (_SplayTreeValueIterator$(K, V))(this[_map]); | 3694 return new (_SplayTreeValueIterator$(K, V))(this[_map]); |
3683 } | 3695 } |
3684 } | 3696 } |
3685 _SplayTreeValueIterable[dart.implements] = () => [_internal.EfficientLength]
; | 3697 _SplayTreeValueIterable[dart.implements] = () => [_internal.EfficientLength]
; |
| 3698 dart.implementExtension(_SplayTreeValueIterable, () => [core.Iterable]); |
3686 dart.setSignature(_SplayTreeValueIterable, { | 3699 dart.setSignature(_SplayTreeValueIterable, { |
3687 constructors: () => ({_SplayTreeValueIterable: [_SplayTreeValueIterable$(K
, V), [SplayTreeMap$(K, V)]]}) | 3700 constructors: () => ({_SplayTreeValueIterable: [_SplayTreeValueIterable$(K
, V), [SplayTreeMap$(K, V)]]}) |
3688 }); | 3701 }); |
3689 return _SplayTreeValueIterable; | 3702 return _SplayTreeValueIterable; |
3690 }); | 3703 }); |
3691 let _SplayTreeValueIterable = _SplayTreeValueIterable$(); | 3704 let _SplayTreeValueIterable = _SplayTreeValueIterable$(); |
3692 let _SplayTreeKeyIterator$ = dart.generic(function(K) { | 3705 let _SplayTreeKeyIterator$ = dart.generic(function(K) { |
3693 class _SplayTreeKeyIterator extends _SplayTreeIterator$(K) { | 3706 class _SplayTreeKeyIterator extends _SplayTreeIterator$(K) { |
3694 _SplayTreeKeyIterator(map) { | 3707 _SplayTreeKeyIterator(map) { |
3695 super._SplayTreeIterator(map); | 3708 super._SplayTreeIterator(map); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3765 for (let element of dart.as(elements, core.Iterable$(E))) { | 3778 for (let element of dart.as(elements, core.Iterable$(E))) { |
3766 result.add(element); | 3779 result.add(element); |
3767 } | 3780 } |
3768 return result; | 3781 return result; |
3769 } | 3782 } |
3770 [_compare](e1, e2) { | 3783 [_compare](e1, e2) { |
3771 dart.as(e1, E); | 3784 dart.as(e1, E); |
3772 dart.as(e2, E); | 3785 dart.as(e2, E); |
3773 return this[_comparator](e1, e2); | 3786 return this[_comparator](e1, e2); |
3774 } | 3787 } |
3775 get [core.$iterator]() { | 3788 get iterator() { |
3776 return new (_SplayTreeKeyIterator$(E))(this); | 3789 return new (_SplayTreeKeyIterator$(E))(this); |
3777 } | 3790 } |
3778 get [core.$length]() { | 3791 get length() { |
3779 return this[_count]; | 3792 return this[_count]; |
3780 } | 3793 } |
3781 get [core.$isEmpty]() { | 3794 get isEmpty() { |
3782 return this[_root] == null; | 3795 return this[_root] == null; |
3783 } | 3796 } |
3784 get [core.$isNotEmpty]() { | 3797 get isNotEmpty() { |
3785 return this[_root] != null; | 3798 return this[_root] != null; |
3786 } | 3799 } |
3787 get [core.$first]() { | 3800 get first() { |
3788 if (this[_count] == 0) | 3801 if (this[_count] == 0) |
3789 throw _internal.IterableElementError.noElement(); | 3802 throw _internal.IterableElementError.noElement(); |
3790 return dart.as(this[_first].key, E); | 3803 return dart.as(this[_first].key, E); |
3791 } | 3804 } |
3792 get [core.$last]() { | 3805 get last() { |
3793 if (this[_count] == 0) | 3806 if (this[_count] == 0) |
3794 throw _internal.IterableElementError.noElement(); | 3807 throw _internal.IterableElementError.noElement(); |
3795 return dart.as(this[_last].key, E); | 3808 return dart.as(this[_last].key, E); |
3796 } | 3809 } |
3797 get [core.$single]() { | 3810 get single() { |
3798 if (this[_count] == 0) | 3811 if (this[_count] == 0) |
3799 throw _internal.IterableElementError.noElement(); | 3812 throw _internal.IterableElementError.noElement(); |
3800 if (dart.notNull(this[_count]) > 1) | 3813 if (dart.notNull(this[_count]) > 1) |
3801 throw _internal.IterableElementError.tooMany(); | 3814 throw _internal.IterableElementError.tooMany(); |
3802 return this[_root].key; | 3815 return this[_root].key; |
3803 } | 3816 } |
3804 [core.$contains](object) { | 3817 contains(object) { |
3805 return dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obj
ect, E)) == 0; | 3818 return dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obj
ect, E)) == 0; |
3806 } | 3819 } |
3807 add(element) { | 3820 add(element) { |
3808 dart.as(element, E); | 3821 dart.as(element, E); |
3809 let compare = this[_splay](element); | 3822 let compare = this[_splay](element); |
3810 if (compare == 0) | 3823 if (compare == 0) |
3811 return false; | 3824 return false; |
3812 this[_addNewRoot](new (_SplayTreeNode$(E))(element), compare); | 3825 this[_addNewRoot](new (_SplayTreeNode$(E))(element), compare); |
3813 return true; | 3826 return true; |
3814 } | 3827 } |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3852 if (!dart.notNull(this[_validKey](object))) | 3865 if (!dart.notNull(this[_validKey](object))) |
3853 return null; | 3866 return null; |
3854 let comp = this[_splay](dart.as(object, E)); | 3867 let comp = this[_splay](dart.as(object, E)); |
3855 if (comp != 0) | 3868 if (comp != 0) |
3856 return null; | 3869 return null; |
3857 return this[_root].key; | 3870 return this[_root].key; |
3858 } | 3871 } |
3859 intersection(other) { | 3872 intersection(other) { |
3860 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); | 3873 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); |
3861 for (let element of this) { | 3874 for (let element of this) { |
3862 if (other[core.$contains](element)) | 3875 if (other.contains(element)) |
3863 result.add(element); | 3876 result.add(element); |
3864 } | 3877 } |
3865 return result; | 3878 return result; |
3866 } | 3879 } |
3867 difference(other) { | 3880 difference(other) { |
3868 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); | 3881 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); |
3869 for (let element of this) { | 3882 for (let element of this) { |
3870 if (!dart.notNull(other[core.$contains](element))) | 3883 if (!dart.notNull(other.contains(element))) |
3871 result.add(element); | 3884 result.add(element); |
3872 } | 3885 } |
3873 return result; | 3886 return result; |
3874 } | 3887 } |
3875 union(other) { | 3888 union(other) { |
3876 dart.as(other, core.Set$(E)); | 3889 dart.as(other, core.Set$(E)); |
3877 let _ = this[_clone](); | 3890 let _ = this[_clone](); |
3878 _.addAll(other); | 3891 _.addAll(other); |
3879 return _; | 3892 return _; |
3880 } | 3893 } |
3881 [_clone]() { | 3894 [_clone]() { |
3882 let set = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); | 3895 let set = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); |
3883 set[_count] = this[_count]; | 3896 set[_count] = this[_count]; |
3884 set[_root] = this[_copyNode](this[_root]); | 3897 set[_root] = this[_copyNode](this[_root]); |
3885 return set; | 3898 return set; |
3886 } | 3899 } |
3887 [_copyNode](node) { | 3900 [_copyNode](node) { |
3888 dart.as(node, _SplayTreeNode$(E)); | 3901 dart.as(node, _SplayTreeNode$(E)); |
3889 if (node == null) | 3902 if (node == null) |
3890 return null; | 3903 return null; |
3891 let _ = new (_SplayTreeNode$(E))(node.key); | 3904 let _ = new (_SplayTreeNode$(E))(node.key); |
3892 _.left = this[_copyNode](node.left); | 3905 _.left = this[_copyNode](node.left); |
3893 _.right = this[_copyNode](node.right); | 3906 _.right = this[_copyNode](node.right); |
3894 return _; | 3907 return _; |
3895 } | 3908 } |
3896 clear() { | 3909 clear() { |
3897 this[_clear](); | 3910 this[_clear](); |
3898 } | 3911 } |
3899 [core.$toSet]() { | 3912 toSet() { |
3900 return this[_clone](); | 3913 return this[_clone](); |
3901 } | 3914 } |
3902 toString() { | 3915 toString() { |
3903 return IterableBase.iterableToFullString(this, '{', '}'); | 3916 return IterableBase.iterableToFullString(this, '{', '}'); |
3904 } | 3917 } |
3905 } | 3918 } |
3906 dart.setSignature(SplayTreeSet, { | 3919 dart.setSignature(SplayTreeSet, { |
3907 constructors: () => ({ | 3920 constructors: () => ({ |
3908 SplayTreeSet: [SplayTreeSet$(E), [], [dart.functionType(core.int, [E, E]
), dart.functionType(core.bool, [core.Object])]], | 3921 SplayTreeSet: [SplayTreeSet$(E), [], [dart.functionType(core.int, [E, E]
), dart.functionType(core.bool, [core.Object])]], |
3909 from: [SplayTreeSet$(E), [core.Iterable], [dart.functionType(core.int, [
E, E]), dart.functionType(core.bool, [core.Object])]] | 3922 from: [SplayTreeSet$(E), [core.Iterable], [dart.functionType(core.int, [
E, E]), dart.functionType(core.bool, [core.Object])]] |
3910 }), | 3923 }), |
3911 methods: () => ({ | 3924 methods: () => ({ |
3912 [_compare]: [core.int, [E, E]], | 3925 [_compare]: [core.int, [E, E]], |
3913 [core.$contains]: [core.bool, [core.Object]], | 3926 contains: [core.bool, [core.Object]], |
3914 add: [core.bool, [E]], | 3927 add: [core.bool, [E]], |
3915 remove: [core.bool, [core.Object]], | 3928 remove: [core.bool, [core.Object]], |
3916 addAll: [dart.void, [core.Iterable$(E)]], | 3929 addAll: [dart.void, [core.Iterable$(E)]], |
3917 lookup: [E, [core.Object]], | 3930 lookup: [E, [core.Object]], |
3918 intersection: [core.Set$(E), [core.Set$(core.Object)]], | 3931 intersection: [core.Set$(E), [core.Set$(core.Object)]], |
3919 difference: [core.Set$(E), [core.Set$(core.Object)]], | 3932 difference: [core.Set$(E), [core.Set$(core.Object)]], |
3920 union: [core.Set$(E), [core.Set$(E)]], | 3933 union: [core.Set$(E), [core.Set$(E)]], |
3921 [_clone]: [SplayTreeSet$(E), []], | 3934 [_clone]: [SplayTreeSet$(E), []], |
3922 [_copyNode]: [_SplayTreeNode$(E), [_SplayTreeNode$(E)]], | 3935 [_copyNode]: [_SplayTreeNode$(E), [_SplayTreeNode$(E)]], |
3923 [core.$toSet]: [core.Set$(E), []] | 3936 toSet: [core.Set$(E), []] |
3924 }) | 3937 }) |
3925 }); | 3938 }); |
3926 return SplayTreeSet; | 3939 return SplayTreeSet; |
3927 }); | 3940 }); |
3928 let SplayTreeSet = SplayTreeSet$(); | 3941 let SplayTreeSet = SplayTreeSet$(); |
3929 let __CastType0$ = dart.generic(function(K) { | 3942 let __CastType0$ = dart.generic(function(K) { |
3930 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core.i
nt, [K, K])); | 3943 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(core.i
nt, [K, K])); |
3931 return __CastType0; | 3944 return __CastType0; |
3932 }); | 3945 }); |
3933 let __CastType0 = __CastType0$(); | 3946 let __CastType0 = __CastType0$(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3980 } | 3993 } |
3981 } | 3994 } |
3982 [_containsKey](key) { | 3995 [_containsKey](key) { |
3983 let rest = this[_rest]; | 3996 let rest = this[_rest]; |
3984 if (rest == null) | 3997 if (rest == null) |
3985 return false; | 3998 return false; |
3986 let bucket = this[_getBucket](rest, key); | 3999 let bucket = this[_getBucket](rest, key); |
3987 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; | 4000 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; |
3988 } | 4001 } |
3989 containsValue(value) { | 4002 containsValue(value) { |
3990 return this[_computeKeys]()[core.$any](dart.fn((each => dart.equals(this
.get(each), value)).bind(this), core.bool, [core.Object])); | 4003 return this[_computeKeys]()[dartx.any](dart.fn((each => dart.equals(this
.get(each), value)).bind(this), core.bool, [core.Object])); |
3991 } | 4004 } |
3992 addAll(other) { | 4005 addAll(other) { |
3993 dart.as(other, core.Map$(K, V)); | 4006 dart.as(other, core.Map$(K, V)); |
3994 other.forEach(dart.fn(((key, value) => { | 4007 other.forEach(dart.fn(((key, value) => { |
3995 dart.as(key, K); | 4008 dart.as(key, K); |
3996 dart.as(value, V); | 4009 dart.as(value, V); |
3997 this.set(key, value); | 4010 this.set(key, value); |
3998 }).bind(this), core.Object, [K, V])); | 4011 }).bind(this), core.Object, [K, V])); |
3999 } | 4012 } |
4000 get(key) { | 4013 get(key) { |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4088 } | 4101 } |
4089 clear() { | 4102 clear() { |
4090 if (dart.notNull(this[_length]) > 0) { | 4103 if (dart.notNull(this[_length]) > 0) { |
4091 this[_strings] = this[_nums] = this[_rest] = this[_keys] = null; | 4104 this[_strings] = this[_nums] = this[_rest] = this[_keys] = null; |
4092 this[_length] = 0; | 4105 this[_length] = 0; |
4093 } | 4106 } |
4094 } | 4107 } |
4095 forEach(action) { | 4108 forEach(action) { |
4096 dart.as(action, dart.functionType(dart.void, [K, V])); | 4109 dart.as(action, dart.functionType(dart.void, [K, V])); |
4097 let keys = this[_computeKeys](); | 4110 let keys = this[_computeKeys](); |
4098 for (let i = 0, length = keys[core.$length]; dart.notNull(i) < dart.notN
ull(length); i = dart.notNull(i) + 1) { | 4111 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len
gth); i = dart.notNull(i) + 1) { |
4099 let key = keys[i]; | 4112 let key = keys[i]; |
4100 action(dart.as(key, K), this.get(key)); | 4113 action(dart.as(key, K), this.get(key)); |
4101 if (keys !== this[_keys]) { | 4114 if (keys !== this[_keys]) { |
4102 throw new core.ConcurrentModificationError(this); | 4115 throw new core.ConcurrentModificationError(this); |
4103 } | 4116 } |
4104 } | 4117 } |
4105 } | 4118 } |
4106 [_computeKeys]() { | 4119 [_computeKeys]() { |
4107 if (this[_keys] != null) | 4120 if (this[_keys] != null) |
4108 return this[_keys]; | 4121 return this[_keys]; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4332 }); | 4345 }); |
4333 return _CustomHashMap; | 4346 return _CustomHashMap; |
4334 }); | 4347 }); |
4335 let _CustomHashMap = _CustomHashMap$(); | 4348 let _CustomHashMap = _CustomHashMap$(); |
4336 let HashMapKeyIterable$ = dart.generic(function(E) { | 4349 let HashMapKeyIterable$ = dart.generic(function(E) { |
4337 class HashMapKeyIterable extends IterableBase$(E) { | 4350 class HashMapKeyIterable extends IterableBase$(E) { |
4338 HashMapKeyIterable(map) { | 4351 HashMapKeyIterable(map) { |
4339 this[_map] = map; | 4352 this[_map] = map; |
4340 super.IterableBase(); | 4353 super.IterableBase(); |
4341 } | 4354 } |
4342 get [core.$length]() { | 4355 get length() { |
4343 return dart.as(dart.dload(this[_map], _length), core.int); | 4356 return dart.as(dart.dload(this[_map], _length), core.int); |
4344 } | 4357 } |
4345 get [core.$isEmpty]() { | 4358 get isEmpty() { |
4346 return dart.equals(dart.dload(this[_map], _length), 0); | 4359 return dart.equals(dart.dload(this[_map], _length), 0); |
4347 } | 4360 } |
4348 get [core.$iterator]() { | 4361 get iterator() { |
4349 return new (HashMapKeyIterator$(E))(this[_map], dart.as(dart.dsend(this[
_map], _computeKeys), core.List)); | 4362 return new (HashMapKeyIterator$(E))(this[_map], dart.as(dart.dsend(this[
_map], _computeKeys), core.List)); |
4350 } | 4363 } |
4351 [core.$contains](element) { | 4364 contains(element) { |
4352 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool
); | 4365 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool
); |
4353 } | 4366 } |
4354 [core.$forEach](f) { | 4367 forEach(f) { |
4355 dart.as(f, dart.functionType(dart.void, [E])); | 4368 dart.as(f, dart.functionType(dart.void, [E])); |
4356 let keys = dart.as(dart.dsend(this[_map], _computeKeys), core.List); | 4369 let keys = dart.as(dart.dsend(this[_map], _computeKeys), core.List); |
4357 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len
gth); i = dart.notNull(i) + 1) { | 4370 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len
gth); i = dart.notNull(i) + 1) { |
4358 f(dart.as(keys[i], E)); | 4371 f(dart.as(keys[i], E)); |
4359 if (keys !== dart.dload(this[_map], _keys)) { | 4372 if (keys !== dart.dload(this[_map], _keys)) { |
4360 throw new core.ConcurrentModificationError(this[_map]); | 4373 throw new core.ConcurrentModificationError(this[_map]); |
4361 } | 4374 } |
4362 } | 4375 } |
4363 } | 4376 } |
4364 } | 4377 } |
4365 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength]; | 4378 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength]; |
| 4379 dart.implementExtension(HashMapKeyIterable, () => [core.Iterable]); |
4366 dart.setSignature(HashMapKeyIterable, { | 4380 dart.setSignature(HashMapKeyIterable, { |
4367 constructors: () => ({HashMapKeyIterable: [HashMapKeyIterable$(E), [core.O
bject]]}), | 4381 constructors: () => ({HashMapKeyIterable: [HashMapKeyIterable$(E), [core.O
bject]]}), |
4368 methods: () => ({[core.$forEach]: [dart.void, [dart.functionType(dart.void
, [E])]]}) | 4382 methods: () => ({forEach: [dart.void, [dart.functionType(dart.void, [E])]]
}) |
4369 }); | 4383 }); |
4370 return HashMapKeyIterable; | 4384 return HashMapKeyIterable; |
4371 }); | 4385 }); |
4372 let HashMapKeyIterable = HashMapKeyIterable$(); | 4386 let HashMapKeyIterable = HashMapKeyIterable$(); |
4373 let _offset = Symbol('_offset'); | 4387 let _offset = Symbol('_offset'); |
4374 let HashMapKeyIterator$ = dart.generic(function(E) { | 4388 let HashMapKeyIterator$ = dart.generic(function(E) { |
4375 class HashMapKeyIterator extends core.Object { | 4389 class HashMapKeyIterator extends core.Object { |
4376 HashMapKeyIterator(map, keys) { | 4390 HashMapKeyIterator(map, keys) { |
4377 this[_map] = map; | 4391 this[_map] = map; |
4378 this[_keys] = keys; | 4392 this[_keys] = keys; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4455 } | 4469 } |
4456 } | 4470 } |
4457 [_containsKey](key) { | 4471 [_containsKey](key) { |
4458 let rest = this[_rest]; | 4472 let rest = this[_rest]; |
4459 if (rest == null) | 4473 if (rest == null) |
4460 return false; | 4474 return false; |
4461 let bucket = this[_getBucket](rest, key); | 4475 let bucket = this[_getBucket](rest, key); |
4462 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; | 4476 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; |
4463 } | 4477 } |
4464 containsValue(value) { | 4478 containsValue(value) { |
4465 return this.keys[core.$any](dart.fn((each => dart.equals(this.get(each),
value)).bind(this), core.bool, [core.Object])); | 4479 return this.keys[dartx.any](dart.fn((each => dart.equals(this.get(each),
value)).bind(this), core.bool, [core.Object])); |
4466 } | 4480 } |
4467 addAll(other) { | 4481 addAll(other) { |
4468 dart.as(other, core.Map$(K, V)); | 4482 dart.as(other, core.Map$(K, V)); |
4469 other.forEach(dart.fn(((key, value) => { | 4483 other.forEach(dart.fn(((key, value) => { |
4470 dart.as(key, K); | 4484 dart.as(key, K); |
4471 dart.as(value, V); | 4485 dart.as(value, V); |
4472 this.set(key, value); | 4486 this.set(key, value); |
4473 }).bind(this), core.Object, [K, V])); | 4487 }).bind(this), core.Object, [K, V])); |
4474 } | 4488 } |
4475 get(key) { | 4489 get(key) { |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4815 } | 4829 } |
4816 dart.setSignature(LinkedHashMapCell, { | 4830 dart.setSignature(LinkedHashMapCell, { |
4817 constructors: () => ({LinkedHashMapCell: [LinkedHashMapCell, [core.Object, c
ore.Object]]}) | 4831 constructors: () => ({LinkedHashMapCell: [LinkedHashMapCell, [core.Object, c
ore.Object]]}) |
4818 }); | 4832 }); |
4819 let LinkedHashMapKeyIterable$ = dart.generic(function(E) { | 4833 let LinkedHashMapKeyIterable$ = dart.generic(function(E) { |
4820 class LinkedHashMapKeyIterable extends IterableBase$(E) { | 4834 class LinkedHashMapKeyIterable extends IterableBase$(E) { |
4821 LinkedHashMapKeyIterable(map) { | 4835 LinkedHashMapKeyIterable(map) { |
4822 this[_map] = map; | 4836 this[_map] = map; |
4823 super.IterableBase(); | 4837 super.IterableBase(); |
4824 } | 4838 } |
4825 get [core.$length]() { | 4839 get length() { |
4826 return dart.as(dart.dload(this[_map], _length), core.int); | 4840 return dart.as(dart.dload(this[_map], _length), core.int); |
4827 } | 4841 } |
4828 get [core.$isEmpty]() { | 4842 get isEmpty() { |
4829 return dart.equals(dart.dload(this[_map], _length), 0); | 4843 return dart.equals(dart.dload(this[_map], _length), 0); |
4830 } | 4844 } |
4831 get [core.$iterator]() { | 4845 get iterator() { |
4832 return new (LinkedHashMapKeyIterator$(E))(this[_map], dart.as(dart.dload
(this[_map], _modifications), core.int)); | 4846 return new (LinkedHashMapKeyIterator$(E))(this[_map], dart.as(dart.dload
(this[_map], _modifications), core.int)); |
4833 } | 4847 } |
4834 [core.$contains](element) { | 4848 contains(element) { |
4835 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool
); | 4849 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool
); |
4836 } | 4850 } |
4837 [core.$forEach](f) { | 4851 forEach(f) { |
4838 dart.as(f, dart.functionType(dart.void, [E])); | 4852 dart.as(f, dart.functionType(dart.void, [E])); |
4839 let cell = dart.as(dart.dload(this[_map], _first), LinkedHashMapCell); | 4853 let cell = dart.as(dart.dload(this[_map], _first), LinkedHashMapCell); |
4840 let modifications = dart.as(dart.dload(this[_map], _modifications), core
.int); | 4854 let modifications = dart.as(dart.dload(this[_map], _modifications), core
.int); |
4841 while (cell != null) { | 4855 while (cell != null) { |
4842 f(dart.as(cell[_key], E)); | 4856 f(dart.as(cell[_key], E)); |
4843 if (!dart.equals(modifications, dart.dload(this[_map], _modifications)
)) { | 4857 if (!dart.equals(modifications, dart.dload(this[_map], _modifications)
)) { |
4844 throw new core.ConcurrentModificationError(this[_map]); | 4858 throw new core.ConcurrentModificationError(this[_map]); |
4845 } | 4859 } |
4846 cell = cell[_next]; | 4860 cell = cell[_next]; |
4847 } | 4861 } |
4848 } | 4862 } |
4849 } | 4863 } |
4850 LinkedHashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength
]; | 4864 LinkedHashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength
]; |
| 4865 dart.implementExtension(LinkedHashMapKeyIterable, () => [core.Iterable]); |
4851 dart.setSignature(LinkedHashMapKeyIterable, { | 4866 dart.setSignature(LinkedHashMapKeyIterable, { |
4852 constructors: () => ({LinkedHashMapKeyIterable: [LinkedHashMapKeyIterable$
(E), [core.Object]]}), | 4867 constructors: () => ({LinkedHashMapKeyIterable: [LinkedHashMapKeyIterable$
(E), [core.Object]]}), |
4853 methods: () => ({[core.$forEach]: [dart.void, [dart.functionType(dart.void
, [E])]]}) | 4868 methods: () => ({forEach: [dart.void, [dart.functionType(dart.void, [E])]]
}) |
4854 }); | 4869 }); |
4855 return LinkedHashMapKeyIterable; | 4870 return LinkedHashMapKeyIterable; |
4856 }); | 4871 }); |
4857 let LinkedHashMapKeyIterable = LinkedHashMapKeyIterable$(); | 4872 let LinkedHashMapKeyIterable = LinkedHashMapKeyIterable$(); |
4858 let _cell = Symbol('_cell'); | 4873 let _cell = Symbol('_cell'); |
4859 let LinkedHashMapKeyIterator$ = dart.generic(function(E) { | 4874 let LinkedHashMapKeyIterator$ = dart.generic(function(E) { |
4860 class LinkedHashMapKeyIterator extends core.Object { | 4875 class LinkedHashMapKeyIterator extends core.Object { |
4861 LinkedHashMapKeyIterator(map, modifications) { | 4876 LinkedHashMapKeyIterator(map, modifications) { |
4862 this[_map] = map; | 4877 this[_map] = map; |
4863 this[_modifications] = modifications; | 4878 this[_modifications] = modifications; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4898 _HashSet() { | 4913 _HashSet() { |
4899 this[_length] = 0; | 4914 this[_length] = 0; |
4900 this[_strings] = null; | 4915 this[_strings] = null; |
4901 this[_nums] = null; | 4916 this[_nums] = null; |
4902 this[_rest] = null; | 4917 this[_rest] = null; |
4903 this[_elements] = null; | 4918 this[_elements] = null; |
4904 } | 4919 } |
4905 [_newSet]() { | 4920 [_newSet]() { |
4906 return new (_HashSet$(E))(); | 4921 return new (_HashSet$(E))(); |
4907 } | 4922 } |
4908 get [core.$iterator]() { | 4923 get iterator() { |
4909 return new (HashSetIterator$(E))(this, this[_computeElements]()); | 4924 return new (HashSetIterator$(E))(this, this[_computeElements]()); |
4910 } | 4925 } |
4911 get [core.$length]() { | 4926 get length() { |
4912 return this[_length]; | 4927 return this[_length]; |
4913 } | 4928 } |
4914 get [core.$isEmpty]() { | 4929 get isEmpty() { |
4915 return this[_length] == 0; | 4930 return this[_length] == 0; |
4916 } | 4931 } |
4917 get [core.$isNotEmpty]() { | 4932 get isNotEmpty() { |
4918 return !dart.notNull(this[core.$isEmpty]); | 4933 return !dart.notNull(this.isEmpty); |
4919 } | 4934 } |
4920 [core.$contains](object) { | 4935 contains(object) { |
4921 if (_HashSet$()._isStringElement(object)) { | 4936 if (_HashSet$()._isStringElement(object)) { |
4922 let strings = this[_strings]; | 4937 let strings = this[_strings]; |
4923 return strings == null ? false : _HashSet$()._hasTableEntry(strings, o
bject); | 4938 return strings == null ? false : _HashSet$()._hasTableEntry(strings, o
bject); |
4924 } else if (_HashSet$()._isNumericElement(object)) { | 4939 } else if (_HashSet$()._isNumericElement(object)) { |
4925 let nums = this[_nums]; | 4940 let nums = this[_nums]; |
4926 return nums == null ? false : _HashSet$()._hasTableEntry(nums, object)
; | 4941 return nums == null ? false : _HashSet$()._hasTableEntry(nums, object)
; |
4927 } else { | 4942 } else { |
4928 return this[_contains](object); | 4943 return this[_contains](object); |
4929 } | 4944 } |
4930 } | 4945 } |
4931 [_contains](object) { | 4946 [_contains](object) { |
4932 let rest = this[_rest]; | 4947 let rest = this[_rest]; |
4933 if (rest == null) | 4948 if (rest == null) |
4934 return false; | 4949 return false; |
4935 let bucket = this[_getBucket](rest, object); | 4950 let bucket = this[_getBucket](rest, object); |
4936 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; | 4951 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; |
4937 } | 4952 } |
4938 lookup(object) { | 4953 lookup(object) { |
4939 if (dart.notNull(_HashSet$()._isStringElement(object)) || dart.notNull(_
HashSet$()._isNumericElement(object))) { | 4954 if (dart.notNull(_HashSet$()._isStringElement(object)) || dart.notNull(_
HashSet$()._isNumericElement(object))) { |
4940 return dart.as(this[core.$contains](object) ? object : null, E); | 4955 return dart.as(this.contains(object) ? object : null, E); |
4941 } | 4956 } |
4942 return this[_lookup](object); | 4957 return this[_lookup](object); |
4943 } | 4958 } |
4944 [_lookup](object) { | 4959 [_lookup](object) { |
4945 let rest = this[_rest]; | 4960 let rest = this[_rest]; |
4946 if (rest == null) | 4961 if (rest == null) |
4947 return null; | 4962 return null; |
4948 let bucket = this[_getBucket](rest, object); | 4963 let bucket = this[_getBucket](rest, object); |
4949 let index = this[_findBucketIndex](bucket, object); | 4964 let index = this[_findBucketIndex](bucket, object); |
4950 if (dart.notNull(index) < 0) | 4965 if (dart.notNull(index) < 0) |
4951 return null; | 4966 return null; |
4952 return dart.as(bucket[core.$get](index), E); | 4967 return dart.as(bucket[dartx.get](index), E); |
4953 } | 4968 } |
4954 add(element) { | 4969 add(element) { |
4955 dart.as(element, E); | 4970 dart.as(element, E); |
4956 if (_HashSet$()._isStringElement(element)) { | 4971 if (_HashSet$()._isStringElement(element)) { |
4957 let strings = this[_strings]; | 4972 let strings = this[_strings]; |
4958 if (strings == null) | 4973 if (strings == null) |
4959 this[_strings] = strings = _HashSet$()._newHashTable(); | 4974 this[_strings] = strings = _HashSet$()._newHashTable(); |
4960 return this[_addHashTableEntry](strings, element); | 4975 return this[_addHashTableEntry](strings, element); |
4961 } else if (_HashSet$()._isNumericElement(element)) { | 4976 } else if (_HashSet$()._isNumericElement(element)) { |
4962 let nums = this[_nums]; | 4977 let nums = this[_nums]; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5117 } | 5132 } |
5118 static _newHashTable() { | 5133 static _newHashTable() { |
5119 let table = Object.create(null); | 5134 let table = Object.create(null); |
5120 let temporaryKey = '<non-identifier-key>'; | 5135 let temporaryKey = '<non-identifier-key>'; |
5121 _HashSet$()._setTableEntry(table, temporaryKey, table); | 5136 _HashSet$()._setTableEntry(table, temporaryKey, table); |
5122 _HashSet$()._deleteTableEntry(table, temporaryKey); | 5137 _HashSet$()._deleteTableEntry(table, temporaryKey); |
5123 return table; | 5138 return table; |
5124 } | 5139 } |
5125 } | 5140 } |
5126 _HashSet[dart.implements] = () => [HashSet$(E)]; | 5141 _HashSet[dart.implements] = () => [HashSet$(E)]; |
| 5142 dart.implementExtension(_HashSet, () => [core.Iterable]); |
5127 dart.setSignature(_HashSet, { | 5143 dart.setSignature(_HashSet, { |
5128 constructors: () => ({_HashSet: [_HashSet$(E), []]}), | 5144 constructors: () => ({_HashSet: [_HashSet$(E), []]}), |
5129 methods: () => ({ | 5145 methods: () => ({ |
5130 [_newSet]: [core.Set$(E), []], | 5146 [_newSet]: [core.Set$(E), []], |
5131 [core.$contains]: [core.bool, [core.Object]], | 5147 contains: [core.bool, [core.Object]], |
5132 [_contains]: [core.bool, [core.Object]], | 5148 [_contains]: [core.bool, [core.Object]], |
5133 lookup: [E, [core.Object]], | 5149 lookup: [E, [core.Object]], |
5134 [_lookup]: [E, [core.Object]], | 5150 [_lookup]: [E, [core.Object]], |
5135 add: [core.bool, [E]], | 5151 add: [core.bool, [E]], |
5136 [_add]: [core.bool, [E]], | 5152 [_add]: [core.bool, [E]], |
5137 addAll: [dart.void, [core.Iterable$(E)]], | 5153 addAll: [dart.void, [core.Iterable$(E)]], |
5138 remove: [core.bool, [core.Object]], | 5154 remove: [core.bool, [core.Object]], |
5139 [_remove]: [core.bool, [core.Object]], | 5155 [_remove]: [core.bool, [core.Object]], |
5140 [_computeElements]: [core.List, []], | 5156 [_computeElements]: [core.List, []], |
5141 [_addHashTableEntry]: [core.bool, [core.Object, E]], | 5157 [_addHashTableEntry]: [core.bool, [core.Object, E]], |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5208 } | 5224 } |
5209 return -1; | 5225 return -1; |
5210 } | 5226 } |
5211 [_computeHashCode](element) { | 5227 [_computeHashCode](element) { |
5212 return this[_hasher](dart.as(element, E)) & 0x3ffffff; | 5228 return this[_hasher](dart.as(element, E)) & 0x3ffffff; |
5213 } | 5229 } |
5214 add(object) { | 5230 add(object) { |
5215 dart.as(object, E); | 5231 dart.as(object, E); |
5216 return super[_add](object); | 5232 return super[_add](object); |
5217 } | 5233 } |
5218 [core.$contains](object) { | 5234 contains(object) { |
5219 if (!dart.notNull(this[_validKey](object))) | 5235 if (!dart.notNull(this[_validKey](object))) |
5220 return false; | 5236 return false; |
5221 return super[_contains](object); | 5237 return super[_contains](object); |
5222 } | 5238 } |
5223 lookup(object) { | 5239 lookup(object) { |
5224 if (!dart.notNull(this[_validKey](object))) | 5240 if (!dart.notNull(this[_validKey](object))) |
5225 return null; | 5241 return null; |
5226 return super[_lookup](object); | 5242 return super[_lookup](object); |
5227 } | 5243 } |
5228 remove(object) { | 5244 remove(object) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5287 this[_first] = null; | 5303 this[_first] = null; |
5288 this[_last] = null; | 5304 this[_last] = null; |
5289 this[_modifications] = 0; | 5305 this[_modifications] = 0; |
5290 } | 5306 } |
5291 [_newSet]() { | 5307 [_newSet]() { |
5292 return new (_LinkedHashSet$(E))(); | 5308 return new (_LinkedHashSet$(E))(); |
5293 } | 5309 } |
5294 [_unsupported](operation) { | 5310 [_unsupported](operation) { |
5295 throw `LinkedHashSet: unsupported ${operation}`; | 5311 throw `LinkedHashSet: unsupported ${operation}`; |
5296 } | 5312 } |
5297 get [core.$iterator]() { | 5313 get iterator() { |
5298 return new (LinkedHashSetIterator$(E))(this, this[_modifications]); | 5314 return new (LinkedHashSetIterator$(E))(this, this[_modifications]); |
5299 } | 5315 } |
5300 get [core.$length]() { | 5316 get length() { |
5301 return this[_length]; | 5317 return this[_length]; |
5302 } | 5318 } |
5303 get [core.$isEmpty]() { | 5319 get isEmpty() { |
5304 return this[_length] == 0; | 5320 return this[_length] == 0; |
5305 } | 5321 } |
5306 get [core.$isNotEmpty]() { | 5322 get isNotEmpty() { |
5307 return !dart.notNull(this[core.$isEmpty]); | 5323 return !dart.notNull(this.isEmpty); |
5308 } | 5324 } |
5309 [core.$contains](object) { | 5325 contains(object) { |
5310 if (_LinkedHashSet$()._isStringElement(object)) { | 5326 if (_LinkedHashSet$()._isStringElement(object)) { |
5311 let strings = this[_strings]; | 5327 let strings = this[_strings]; |
5312 if (strings == null) | 5328 if (strings == null) |
5313 return false; | 5329 return false; |
5314 let cell = dart.as(_LinkedHashSet$()._getTableEntry(strings, object),
LinkedHashSetCell); | 5330 let cell = dart.as(_LinkedHashSet$()._getTableEntry(strings, object),
LinkedHashSetCell); |
5315 return cell != null; | 5331 return cell != null; |
5316 } else if (_LinkedHashSet$()._isNumericElement(object)) { | 5332 } else if (_LinkedHashSet$()._isNumericElement(object)) { |
5317 let nums = this[_nums]; | 5333 let nums = this[_nums]; |
5318 if (nums == null) | 5334 if (nums == null) |
5319 return false; | 5335 return false; |
5320 let cell = dart.as(_LinkedHashSet$()._getTableEntry(nums, object), Lin
kedHashSetCell); | 5336 let cell = dart.as(_LinkedHashSet$()._getTableEntry(nums, object), Lin
kedHashSetCell); |
5321 return cell != null; | 5337 return cell != null; |
5322 } else { | 5338 } else { |
5323 return this[_contains](object); | 5339 return this[_contains](object); |
5324 } | 5340 } |
5325 } | 5341 } |
5326 [_contains](object) { | 5342 [_contains](object) { |
5327 let rest = this[_rest]; | 5343 let rest = this[_rest]; |
5328 if (rest == null) | 5344 if (rest == null) |
5329 return false; | 5345 return false; |
5330 let bucket = this[_getBucket](rest, object); | 5346 let bucket = this[_getBucket](rest, object); |
5331 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; | 5347 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; |
5332 } | 5348 } |
5333 lookup(object) { | 5349 lookup(object) { |
5334 if (dart.notNull(_LinkedHashSet$()._isStringElement(object)) || dart.not
Null(_LinkedHashSet$()._isNumericElement(object))) { | 5350 if (dart.notNull(_LinkedHashSet$()._isStringElement(object)) || dart.not
Null(_LinkedHashSet$()._isNumericElement(object))) { |
5335 return dart.as(this[core.$contains](object) ? object : null, E); | 5351 return dart.as(this.contains(object) ? object : null, E); |
5336 } else { | 5352 } else { |
5337 return this[_lookup](object); | 5353 return this[_lookup](object); |
5338 } | 5354 } |
5339 } | 5355 } |
5340 [_lookup](object) { | 5356 [_lookup](object) { |
5341 let rest = this[_rest]; | 5357 let rest = this[_rest]; |
5342 if (rest == null) | 5358 if (rest == null) |
5343 return null; | 5359 return null; |
5344 let bucket = this[_getBucket](rest, object); | 5360 let bucket = this[_getBucket](rest, object); |
5345 let index = this[_findBucketIndex](bucket, object); | 5361 let index = this[_findBucketIndex](bucket, object); |
5346 if (dart.notNull(index) < 0) | 5362 if (dart.notNull(index) < 0) |
5347 return null; | 5363 return null; |
5348 return dart.as(dart.dload(bucket[core.$get](index), _element), E); | 5364 return dart.as(dart.dload(bucket[dartx.get](index), _element), E); |
5349 } | 5365 } |
5350 [core.$forEach](action) { | 5366 forEach(action) { |
5351 dart.as(action, dart.functionType(dart.void, [E])); | 5367 dart.as(action, dart.functionType(dart.void, [E])); |
5352 let cell = this[_first]; | 5368 let cell = this[_first]; |
5353 let modifications = this[_modifications]; | 5369 let modifications = this[_modifications]; |
5354 while (cell != null) { | 5370 while (cell != null) { |
5355 action(dart.as(cell[_element], E)); | 5371 action(dart.as(cell[_element], E)); |
5356 if (modifications != this[_modifications]) { | 5372 if (modifications != this[_modifications]) { |
5357 throw new core.ConcurrentModificationError(this); | 5373 throw new core.ConcurrentModificationError(this); |
5358 } | 5374 } |
5359 cell = cell[_next]; | 5375 cell = cell[_next]; |
5360 } | 5376 } |
5361 } | 5377 } |
5362 get [core.$first]() { | 5378 get first() { |
5363 if (this[_first] == null) | 5379 if (this[_first] == null) |
5364 throw new core.StateError("No elements"); | 5380 throw new core.StateError("No elements"); |
5365 return dart.as(this[_first][_element], E); | 5381 return dart.as(this[_first][_element], E); |
5366 } | 5382 } |
5367 get [core.$last]() { | 5383 get last() { |
5368 if (this[_last] == null) | 5384 if (this[_last] == null) |
5369 throw new core.StateError("No elements"); | 5385 throw new core.StateError("No elements"); |
5370 return dart.as(this[_last][_element], E); | 5386 return dart.as(this[_last][_element], E); |
5371 } | 5387 } |
5372 add(element) { | 5388 add(element) { |
5373 dart.as(element, E); | 5389 dart.as(element, E); |
5374 if (_LinkedHashSet$()._isStringElement(element)) { | 5390 if (_LinkedHashSet$()._isStringElement(element)) { |
5375 let strings = this[_strings]; | 5391 let strings = this[_strings]; |
5376 if (strings == null) | 5392 if (strings == null) |
5377 this[_strings] = strings = _LinkedHashSet$()._newHashTable(); | 5393 this[_strings] = strings = _LinkedHashSet$()._newHashTable(); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5545 } | 5561 } |
5546 static _newHashTable() { | 5562 static _newHashTable() { |
5547 let table = Object.create(null); | 5563 let table = Object.create(null); |
5548 let temporaryKey = '<non-identifier-key>'; | 5564 let temporaryKey = '<non-identifier-key>'; |
5549 _LinkedHashSet$()._setTableEntry(table, temporaryKey, table); | 5565 _LinkedHashSet$()._setTableEntry(table, temporaryKey, table); |
5550 _LinkedHashSet$()._deleteTableEntry(table, temporaryKey); | 5566 _LinkedHashSet$()._deleteTableEntry(table, temporaryKey); |
5551 return table; | 5567 return table; |
5552 } | 5568 } |
5553 } | 5569 } |
5554 _LinkedHashSet[dart.implements] = () => [LinkedHashSet$(E)]; | 5570 _LinkedHashSet[dart.implements] = () => [LinkedHashSet$(E)]; |
| 5571 dart.implementExtension(_LinkedHashSet, () => [core.Iterable]); |
5555 dart.setSignature(_LinkedHashSet, { | 5572 dart.setSignature(_LinkedHashSet, { |
5556 constructors: () => ({_LinkedHashSet: [_LinkedHashSet$(E), []]}), | 5573 constructors: () => ({_LinkedHashSet: [_LinkedHashSet$(E), []]}), |
5557 methods: () => ({ | 5574 methods: () => ({ |
5558 [_newSet]: [core.Set$(E), []], | 5575 [_newSet]: [core.Set$(E), []], |
5559 [_unsupported]: [dart.void, [core.String]], | 5576 [_unsupported]: [dart.void, [core.String]], |
5560 [core.$contains]: [core.bool, [core.Object]], | 5577 contains: [core.bool, [core.Object]], |
5561 [_contains]: [core.bool, [core.Object]], | 5578 [_contains]: [core.bool, [core.Object]], |
5562 lookup: [E, [core.Object]], | 5579 lookup: [E, [core.Object]], |
5563 [_lookup]: [E, [core.Object]], | 5580 [_lookup]: [E, [core.Object]], |
5564 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 5581 forEach: [dart.void, [dart.functionType(dart.void, [E])]], |
5565 add: [core.bool, [E]], | 5582 add: [core.bool, [E]], |
5566 [_add]: [core.bool, [E]], | 5583 [_add]: [core.bool, [E]], |
5567 remove: [core.bool, [core.Object]], | 5584 remove: [core.bool, [core.Object]], |
5568 [_remove]: [core.bool, [core.Object]], | 5585 [_remove]: [core.bool, [core.Object]], |
5569 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 5586 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
5570 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 5587 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
5571 [_filterWhere]: [dart.void, [dart.functionType(core.bool, [E]), core.boo
l]], | 5588 [_filterWhere]: [dart.void, [dart.functionType(core.bool, [E]), core.boo
l]], |
5572 [_addHashTableEntry]: [core.bool, [core.Object, E]], | 5589 [_addHashTableEntry]: [core.bool, [core.Object, E]], |
5573 [_removeHashTableEntry]: [core.bool, [core.Object, core.Object]], | 5590 [_removeHashTableEntry]: [core.bool, [core.Object, core.Object]], |
5574 [_modified]: [dart.void, []], | 5591 [_modified]: [dart.void, []], |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5642 } | 5659 } |
5643 return -1; | 5660 return -1; |
5644 } | 5661 } |
5645 [_computeHashCode](element) { | 5662 [_computeHashCode](element) { |
5646 return this[_hasher](dart.as(element, E)) & 0x3ffffff; | 5663 return this[_hasher](dart.as(element, E)) & 0x3ffffff; |
5647 } | 5664 } |
5648 add(element) { | 5665 add(element) { |
5649 dart.as(element, E); | 5666 dart.as(element, E); |
5650 return super[_add](element); | 5667 return super[_add](element); |
5651 } | 5668 } |
5652 [core.$contains](object) { | 5669 contains(object) { |
5653 if (!dart.notNull(this[_validKey](object))) | 5670 if (!dart.notNull(this[_validKey](object))) |
5654 return false; | 5671 return false; |
5655 return super[_contains](object); | 5672 return super[_contains](object); |
5656 } | 5673 } |
5657 lookup(object) { | 5674 lookup(object) { |
5658 if (!dart.notNull(this[_validKey](object))) | 5675 if (!dart.notNull(this[_validKey](object))) |
5659 return null; | 5676 return null; |
5660 return super[_lookup](object); | 5677 return super[_lookup](object); |
5661 } | 5678 } |
5662 remove(object) { | 5679 remove(object) { |
5663 if (!dart.notNull(this[_validKey](object))) | 5680 if (!dart.notNull(this[_validKey](object))) |
5664 return false; | 5681 return false; |
5665 return super[_remove](object); | 5682 return super[_remove](object); |
5666 } | 5683 } |
5667 containsAll(elements) { | 5684 containsAll(elements) { |
5668 for (let element of elements) { | 5685 for (let element of elements) { |
5669 if (!dart.notNull(this[_validKey](element)) || !dart.notNull(this[core
.$contains](element))) | 5686 if (!dart.notNull(this[_validKey](element)) || !dart.notNull(this.cont
ains(element))) |
5670 return false; | 5687 return false; |
5671 } | 5688 } |
5672 return true; | 5689 return true; |
5673 } | 5690 } |
5674 removeAll(elements) { | 5691 removeAll(elements) { |
5675 for (let element of elements) { | 5692 for (let element of elements) { |
5676 if (this[_validKey](element)) { | 5693 if (this[_validKey](element)) { |
5677 super[_remove](element); | 5694 super[_remove](element); |
5678 } | 5695 } |
5679 } | 5696 } |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5792 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; | 5809 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; |
5793 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; | 5810 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; |
5794 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; | 5811 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; |
5795 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; | 5812 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; |
5796 exports.HashSetIterator$ = HashSetIterator$; | 5813 exports.HashSetIterator$ = HashSetIterator$; |
5797 exports.HashSetIterator = HashSetIterator; | 5814 exports.HashSetIterator = HashSetIterator; |
5798 exports.LinkedHashSetCell = LinkedHashSetCell; | 5815 exports.LinkedHashSetCell = LinkedHashSetCell; |
5799 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; | 5816 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; |
5800 exports.LinkedHashSetIterator = LinkedHashSetIterator; | 5817 exports.LinkedHashSetIterator = LinkedHashSetIterator; |
5801 })(collection, _internal, core, _js_helper, math); | 5818 })(collection, _internal, core, _js_helper, math); |
OLD | NEW |