OLD | NEW |
1 dart_library.library('dart/collection', null, /* Imports */[ | 1 dart_library.library('dart/collection', null, /* Imports */[ |
2 "dart/_runtime", | 2 "dart/_runtime", |
3 'dart/core' | 3 'dart/core' |
4 ], /* Lazy imports */[ | 4 ], /* Lazy imports */[ |
5 'dart/_internal', | 5 'dart/_internal', |
6 'dart/_js_helper', | 6 'dart/_js_helper', |
7 'dart/math' | 7 'dart/math' |
8 ], function(exports, dart, core, _internal, _js_helper, math) { | 8 ], function(exports, dart, core, _internal, _js_helper, math) { |
9 'use strict'; | 9 'use strict'; |
10 let dartx = dart.dartx; | 10 let dartx = dart.dartx; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 let toRemove = this.toSet(); | 140 let toRemove = this.toSet(); |
141 for (let o of elements) { | 141 for (let o of elements) { |
142 toRemove.remove(o); | 142 toRemove.remove(o); |
143 } | 143 } |
144 this.removeAll(toRemove); | 144 this.removeAll(toRemove); |
145 } | 145 } |
146 removeWhere(test) { | 146 removeWhere(test) { |
147 dart.as(test, dart.functionType(core.bool, [E])); | 147 dart.as(test, dart.functionType(core.bool, [E])); |
148 let toRemove = []; | 148 let toRemove = []; |
149 for (let element of this) { | 149 for (let element of this) { |
150 if (dart.notNull(test(element))) | 150 if (dart.notNull(test(element))) toRemove[dartx.add](element); |
151 toRemove[dartx.add](element); | |
152 } | 151 } |
153 this.removeAll(toRemove); | 152 this.removeAll(toRemove); |
154 } | 153 } |
155 retainWhere(test) { | 154 retainWhere(test) { |
156 dart.as(test, dart.functionType(core.bool, [E])); | 155 dart.as(test, dart.functionType(core.bool, [E])); |
157 let toRemove = []; | 156 let toRemove = []; |
158 for (let element of this) { | 157 for (let element of this) { |
159 if (!dart.notNull(test(element))) | 158 if (!dart.notNull(test(element))) toRemove[dartx.add](element); |
160 toRemove[dartx.add](element); | |
161 } | 159 } |
162 this.removeAll(toRemove); | 160 this.removeAll(toRemove); |
163 } | 161 } |
164 containsAll(other) { | 162 containsAll(other) { |
165 for (let o of other) { | 163 for (let o of other) { |
166 if (!dart.notNull(this.contains(o))) | 164 if (!dart.notNull(this.contains(o))) return false; |
167 return false; | |
168 } | 165 } |
169 return true; | 166 return true; |
170 } | 167 } |
171 union(other) { | 168 union(other) { |
172 dart.as(other, core.Set$(E)); | 169 dart.as(other, core.Set$(E)); |
173 let _ = this.toSet(); | 170 let _ = this.toSet(); |
174 _.addAll(other); | 171 _.addAll(other); |
175 return _; | 172 return _; |
176 } | 173 } |
177 intersection(other) { | 174 intersection(other) { |
178 let result = this.toSet(); | 175 let result = this.toSet(); |
179 for (let element of this) { | 176 for (let element of this) { |
180 if (!dart.notNull(other.contains(element))) | 177 if (!dart.notNull(other.contains(element))) result.remove(element); |
181 result.remove(element); | |
182 } | 178 } |
183 return result; | 179 return result; |
184 } | 180 } |
185 difference(other) { | 181 difference(other) { |
186 let result = this.toSet(); | 182 let result = this.toSet(); |
187 for (let element of this) { | 183 for (let element of this) { |
188 if (dart.notNull(other.contains(element))) | 184 if (dart.notNull(other.contains(element))) result.remove(element); |
189 result.remove(element); | |
190 } | 185 } |
191 return result; | 186 return result; |
192 } | 187 } |
193 toList(opts) { | 188 toList(opts) { |
194 let growable = opts && 'growable' in opts ? opts.growable : true; | 189 let growable = opts && 'growable' in opts ? opts.growable : true; |
195 let result = dart.notNull(growable) ? (() => { | 190 let result = dart.notNull(growable) ? (() => { |
196 let _ = core.List$(E).new(); | 191 let _ = core.List$(E).new(); |
197 _[dartx.length] = this.length; | 192 _[dartx.length] = this.length; |
198 return _; | 193 return _; |
199 }).bind(this)() : core.List$(E).new(this.length); | 194 }).bind(this)() : core.List$(E).new(this.length); |
200 let i = 0; | 195 let i = 0; |
201 for (let element of this) | 196 for (let element of this) |
202 result[dartx.set]((() => { | 197 result[dartx.set]((() => { |
203 let x = i; | 198 let x = i; |
204 i = dart.notNull(x) + 1; | 199 i = dart.notNull(x) + 1; |
205 return x; | 200 return x; |
206 })(), element); | 201 })(), element); |
207 return result; | 202 return result; |
208 } | 203 } |
209 map(f) { | 204 map(f) { |
210 dart.as(f, dart.functionType(dart.dynamic, [E])); | 205 dart.as(f, dart.functionType(dart.dynamic, [E])); |
211 return new (_internal.EfficientLengthMappedIterable$(E, dart.dynamic))(t
his, f); | 206 return new (_internal.EfficientLengthMappedIterable$(E, dart.dynamic))(t
his, f); |
212 } | 207 } |
213 get single() { | 208 get single() { |
214 if (dart.notNull(this.length) > 1) | 209 if (dart.notNull(this.length) > 1) dart.throw(_internal.IterableElementE
rror.tooMany()); |
215 dart.throw(_internal.IterableElementError.tooMany()); | |
216 let it = this.iterator; | 210 let it = this.iterator; |
217 if (!dart.notNull(it.moveNext())) | 211 if (!dart.notNull(it.moveNext())) dart.throw(_internal.IterableElementEr
ror.noElement()); |
218 dart.throw(_internal.IterableElementError.noElement()); | |
219 let result = it.current; | 212 let result = it.current; |
220 return result; | 213 return result; |
221 } | 214 } |
222 toString() { | 215 toString() { |
223 return IterableBase.iterableToFullString(this, '{', '}'); | 216 return IterableBase.iterableToFullString(this, '{', '}'); |
224 } | 217 } |
225 where(f) { | 218 where(f) { |
226 dart.as(f, dart.functionType(core.bool, [E])); | 219 dart.as(f, dart.functionType(core.bool, [E])); |
227 return new (_internal.WhereIterable$(E))(this, f); | 220 return new (_internal.WhereIterable$(E))(this, f); |
228 } | 221 } |
(...skipping 21 matching lines...) Expand all Loading... |
250 fold(initialValue, combine) { | 243 fold(initialValue, combine) { |
251 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); | 244 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); |
252 let value = initialValue; | 245 let value = initialValue; |
253 for (let element of this) | 246 for (let element of this) |
254 value = dart.dcall(combine, value, element); | 247 value = dart.dcall(combine, value, element); |
255 return value; | 248 return value; |
256 } | 249 } |
257 every(f) { | 250 every(f) { |
258 dart.as(f, dart.functionType(core.bool, [E])); | 251 dart.as(f, dart.functionType(core.bool, [E])); |
259 for (let element of this) { | 252 for (let element of this) { |
260 if (!dart.notNull(f(element))) | 253 if (!dart.notNull(f(element))) return false; |
261 return false; | |
262 } | 254 } |
263 return true; | 255 return true; |
264 } | 256 } |
265 join(separator) { | 257 join(separator) { |
266 if (separator === void 0) | 258 if (separator === void 0) separator = ""; |
267 separator = ""; | |
268 let iterator = this.iterator; | 259 let iterator = this.iterator; |
269 if (!dart.notNull(iterator.moveNext())) | 260 if (!dart.notNull(iterator.moveNext())) return ""; |
270 return ""; | |
271 let buffer = new core.StringBuffer(); | 261 let buffer = new core.StringBuffer(); |
272 if (separator == null || separator == "") { | 262 if (separator == null || separator == "") { |
273 do { | 263 do { |
274 buffer.write(`${iterator.current}`); | 264 buffer.write(`${iterator.current}`); |
275 } while (dart.notNull(iterator.moveNext())); | 265 } while (dart.notNull(iterator.moveNext())); |
276 } else { | 266 } else { |
277 buffer.write(`${iterator.current}`); | 267 buffer.write(`${iterator.current}`); |
278 while (dart.notNull(iterator.moveNext())) { | 268 while (dart.notNull(iterator.moveNext())) { |
279 buffer.write(separator); | 269 buffer.write(separator); |
280 buffer.write(`${iterator.current}`); | 270 buffer.write(`${iterator.current}`); |
281 } | 271 } |
282 } | 272 } |
283 return dart.toString(buffer); | 273 return dart.toString(buffer); |
284 } | 274 } |
285 any(test) { | 275 any(test) { |
286 dart.as(test, dart.functionType(core.bool, [E])); | 276 dart.as(test, dart.functionType(core.bool, [E])); |
287 for (let element of this) { | 277 for (let element of this) { |
288 if (dart.notNull(test(element))) | 278 if (dart.notNull(test(element))) return true; |
289 return true; | |
290 } | 279 } |
291 return false; | 280 return false; |
292 } | 281 } |
293 take(n) { | 282 take(n) { |
294 return _internal.TakeIterable$(E).new(this, n); | 283 return _internal.TakeIterable$(E).new(this, n); |
295 } | 284 } |
296 takeWhile(test) { | 285 takeWhile(test) { |
297 dart.as(test, dart.functionType(core.bool, [E])); | 286 dart.as(test, dart.functionType(core.bool, [E])); |
298 return new (_internal.TakeWhileIterable$(E))(this, test); | 287 return new (_internal.TakeWhileIterable$(E))(this, test); |
299 } | 288 } |
(...skipping 20 matching lines...) Expand all Loading... |
320 do { | 309 do { |
321 result = it.current; | 310 result = it.current; |
322 } while (dart.notNull(it.moveNext())); | 311 } while (dart.notNull(it.moveNext())); |
323 return result; | 312 return result; |
324 } | 313 } |
325 firstWhere(test, opts) { | 314 firstWhere(test, opts) { |
326 dart.as(test, dart.functionType(core.bool, [E])); | 315 dart.as(test, dart.functionType(core.bool, [E])); |
327 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 316 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
328 dart.as(orElse, dart.functionType(E, [])); | 317 dart.as(orElse, dart.functionType(E, [])); |
329 for (let element of this) { | 318 for (let element of this) { |
330 if (dart.notNull(test(element))) | 319 if (dart.notNull(test(element))) return element; |
331 return element; | |
332 } | 320 } |
333 if (orElse != null) | 321 if (orElse != null) return orElse(); |
334 return orElse(); | |
335 dart.throw(_internal.IterableElementError.noElement()); | 322 dart.throw(_internal.IterableElementError.noElement()); |
336 } | 323 } |
337 lastWhere(test, opts) { | 324 lastWhere(test, opts) { |
338 dart.as(test, dart.functionType(core.bool, [E])); | 325 dart.as(test, dart.functionType(core.bool, [E])); |
339 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 326 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
340 dart.as(orElse, dart.functionType(E, [])); | 327 dart.as(orElse, dart.functionType(E, [])); |
341 let result = null; | 328 let result = null; |
342 let foundMatching = false; | 329 let foundMatching = false; |
343 for (let element of this) { | 330 for (let element of this) { |
344 if (dart.notNull(test(element))) { | 331 if (dart.notNull(test(element))) { |
345 result = element; | 332 result = element; |
346 foundMatching = true; | 333 foundMatching = true; |
347 } | 334 } |
348 } | 335 } |
349 if (dart.notNull(foundMatching)) | 336 if (dart.notNull(foundMatching)) return result; |
350 return result; | 337 if (orElse != null) return orElse(); |
351 if (orElse != null) | |
352 return orElse(); | |
353 dart.throw(_internal.IterableElementError.noElement()); | 338 dart.throw(_internal.IterableElementError.noElement()); |
354 } | 339 } |
355 singleWhere(test) { | 340 singleWhere(test) { |
356 dart.as(test, dart.functionType(core.bool, [E])); | 341 dart.as(test, dart.functionType(core.bool, [E])); |
357 let result = null; | 342 let result = null; |
358 let foundMatching = false; | 343 let foundMatching = false; |
359 for (let element of this) { | 344 for (let element of this) { |
360 if (dart.notNull(test(element))) { | 345 if (dart.notNull(test(element))) { |
361 if (dart.notNull(foundMatching)) { | 346 if (dart.notNull(foundMatching)) { |
362 dart.throw(_internal.IterableElementError.tooMany()); | 347 dart.throw(_internal.IterableElementError.tooMany()); |
363 } | 348 } |
364 result = element; | 349 result = element; |
365 foundMatching = true; | 350 foundMatching = true; |
366 } | 351 } |
367 } | 352 } |
368 if (dart.notNull(foundMatching)) | 353 if (dart.notNull(foundMatching)) return result; |
369 return result; | |
370 dart.throw(_internal.IterableElementError.noElement()); | 354 dart.throw(_internal.IterableElementError.noElement()); |
371 } | 355 } |
372 elementAt(index) { | 356 elementAt(index) { |
373 if (!(typeof index == 'number')) | 357 if (!(typeof index == 'number')) dart.throw(new core.ArgumentError.notNu
ll("index")); |
374 dart.throw(new core.ArgumentError.notNull("index")); | |
375 core.RangeError.checkNotNegative(index, "index"); | 358 core.RangeError.checkNotNegative(index, "index"); |
376 let elementIndex = 0; | 359 let elementIndex = 0; |
377 for (let element of this) { | 360 for (let element of this) { |
378 if (index == elementIndex) | 361 if (index == elementIndex) return element; |
379 return element; | |
380 elementIndex = dart.notNull(elementIndex) + 1; | 362 elementIndex = dart.notNull(elementIndex) + 1; |
381 } | 363 } |
382 dart.throw(core.RangeError.index(index, this, "index", null, elementInde
x)); | 364 dart.throw(core.RangeError.index(index, this, "index", null, elementInde
x)); |
383 } | 365 } |
384 } | 366 } |
385 SetMixin[dart.implements] = () => [core.Set$(E)]; | 367 SetMixin[dart.implements] = () => [core.Set$(E)]; |
386 dart.setSignature(SetMixin, { | 368 dart.setSignature(SetMixin, { |
387 methods: () => ({ | 369 methods: () => ({ |
388 clear: [dart.void, []], | 370 clear: [dart.void, []], |
389 addAll: [dart.void, [core.Iterable$(E)]], | 371 addAll: [dart.void, [core.Iterable$(E)]], |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 }); | 437 }); |
456 return SetBase; | 438 return SetBase; |
457 }); | 439 }); |
458 let SetBase = SetBase$(); | 440 let SetBase = SetBase$(); |
459 const _newSet = Symbol('_newSet'); | 441 const _newSet = Symbol('_newSet'); |
460 const _HashSetBase$ = dart.generic(function(E) { | 442 const _HashSetBase$ = dart.generic(function(E) { |
461 class _HashSetBase extends SetBase$(E) { | 443 class _HashSetBase extends SetBase$(E) { |
462 difference(other) { | 444 difference(other) { |
463 let result = this[_newSet](); | 445 let result = this[_newSet](); |
464 for (let element of this) { | 446 for (let element of this) { |
465 if (!dart.notNull(other.contains(element))) | 447 if (!dart.notNull(other.contains(element))) result.add(element); |
466 result.add(element); | |
467 } | 448 } |
468 return result; | 449 return result; |
469 } | 450 } |
470 intersection(other) { | 451 intersection(other) { |
471 let result = this[_newSet](); | 452 let result = this[_newSet](); |
472 for (let element of this) { | 453 for (let element of this) { |
473 if (dart.notNull(other.contains(element))) | 454 if (dart.notNull(other.contains(element))) result.add(element); |
474 result.add(element); | |
475 } | 455 } |
476 return result; | 456 return result; |
477 } | 457 } |
478 toSet() { | 458 toSet() { |
479 return (() => { | 459 return (() => { |
480 let _ = this[_newSet](); | 460 let _ = this[_newSet](); |
481 _.addAll(this); | 461 _.addAll(this); |
482 return _; | 462 return _; |
483 }).bind(this)(); | 463 }).bind(this)(); |
484 } | 464 } |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 where(f) { | 537 where(f) { |
558 dart.as(f, dart.functionType(core.bool, [E])); | 538 dart.as(f, dart.functionType(core.bool, [E])); |
559 return new (_internal.WhereIterable$(E))(this, f); | 539 return new (_internal.WhereIterable$(E))(this, f); |
560 } | 540 } |
561 expand(f) { | 541 expand(f) { |
562 dart.as(f, dart.functionType(core.Iterable, [E])); | 542 dart.as(f, dart.functionType(core.Iterable, [E])); |
563 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f); | 543 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f); |
564 } | 544 } |
565 contains(element) { | 545 contains(element) { |
566 for (let e of this) { | 546 for (let e of this) { |
567 if (dart.equals(e, element)) | 547 if (dart.equals(e, element)) return true; |
568 return true; | |
569 } | 548 } |
570 return false; | 549 return false; |
571 } | 550 } |
572 forEach(f) { | 551 forEach(f) { |
573 dart.as(f, dart.functionType(dart.void, [E])); | 552 dart.as(f, dart.functionType(dart.void, [E])); |
574 for (let element of this) | 553 for (let element of this) |
575 f(element); | 554 f(element); |
576 } | 555 } |
577 reduce(combine) { | 556 reduce(combine) { |
578 dart.as(combine, dart.functionType(E, [E, E])); | 557 dart.as(combine, dart.functionType(E, [E, E])); |
(...skipping 10 matching lines...) Expand all Loading... |
589 fold(initialValue, combine) { | 568 fold(initialValue, combine) { |
590 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); | 569 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); |
591 let value = initialValue; | 570 let value = initialValue; |
592 for (let element of this) | 571 for (let element of this) |
593 value = dart.dcall(combine, value, element); | 572 value = dart.dcall(combine, value, element); |
594 return value; | 573 return value; |
595 } | 574 } |
596 every(f) { | 575 every(f) { |
597 dart.as(f, dart.functionType(core.bool, [E])); | 576 dart.as(f, dart.functionType(core.bool, [E])); |
598 for (let element of this) { | 577 for (let element of this) { |
599 if (!dart.notNull(f(element))) | 578 if (!dart.notNull(f(element))) return false; |
600 return false; | |
601 } | 579 } |
602 return true; | 580 return true; |
603 } | 581 } |
604 join(separator) { | 582 join(separator) { |
605 if (separator === void 0) | 583 if (separator === void 0) separator = ""; |
606 separator = ""; | |
607 let iterator = this.iterator; | 584 let iterator = this.iterator; |
608 if (!dart.notNull(iterator.moveNext())) | 585 if (!dart.notNull(iterator.moveNext())) return ""; |
609 return ""; | |
610 let buffer = new core.StringBuffer(); | 586 let buffer = new core.StringBuffer(); |
611 if (separator == null || separator == "") { | 587 if (separator == null || separator == "") { |
612 do { | 588 do { |
613 buffer.write(`${iterator.current}`); | 589 buffer.write(`${iterator.current}`); |
614 } while (dart.notNull(iterator.moveNext())); | 590 } while (dart.notNull(iterator.moveNext())); |
615 } else { | 591 } else { |
616 buffer.write(`${iterator.current}`); | 592 buffer.write(`${iterator.current}`); |
617 while (dart.notNull(iterator.moveNext())) { | 593 while (dart.notNull(iterator.moveNext())) { |
618 buffer.write(separator); | 594 buffer.write(separator); |
619 buffer.write(`${iterator.current}`); | 595 buffer.write(`${iterator.current}`); |
620 } | 596 } |
621 } | 597 } |
622 return dart.toString(buffer); | 598 return dart.toString(buffer); |
623 } | 599 } |
624 any(f) { | 600 any(f) { |
625 dart.as(f, dart.functionType(core.bool, [E])); | 601 dart.as(f, dart.functionType(core.bool, [E])); |
626 for (let element of this) { | 602 for (let element of this) { |
627 if (dart.notNull(f(element))) | 603 if (dart.notNull(f(element))) return true; |
628 return true; | |
629 } | 604 } |
630 return false; | 605 return false; |
631 } | 606 } |
632 toList(opts) { | 607 toList(opts) { |
633 let growable = opts && 'growable' in opts ? opts.growable : true; | 608 let growable = opts && 'growable' in opts ? opts.growable : true; |
634 return core.List$(E).from(this, {growable: growable}); | 609 return core.List$(E).from(this, {growable: growable}); |
635 } | 610 } |
636 toSet() { | 611 toSet() { |
637 return core.Set$(E).from(this); | 612 return core.Set$(E).from(this); |
638 } | 613 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 dart.throw(_internal.IterableElementError.noElement()); | 653 dart.throw(_internal.IterableElementError.noElement()); |
679 } | 654 } |
680 let result = null; | 655 let result = null; |
681 do { | 656 do { |
682 result = it.current; | 657 result = it.current; |
683 } while (dart.notNull(it.moveNext())); | 658 } while (dart.notNull(it.moveNext())); |
684 return result; | 659 return result; |
685 } | 660 } |
686 get single() { | 661 get single() { |
687 let it = this[dartx.iterator]; | 662 let it = this[dartx.iterator]; |
688 if (!dart.notNull(it.moveNext())) | 663 if (!dart.notNull(it.moveNext())) dart.throw(_internal.IterableElementEr
ror.noElement()); |
689 dart.throw(_internal.IterableElementError.noElement()); | |
690 let result = it.current; | 664 let result = it.current; |
691 if (dart.notNull(it.moveNext())) | 665 if (dart.notNull(it.moveNext())) dart.throw(_internal.IterableElementErr
or.tooMany()); |
692 dart.throw(_internal.IterableElementError.tooMany()); | |
693 return result; | 666 return result; |
694 } | 667 } |
695 firstWhere(test, opts) { | 668 firstWhere(test, opts) { |
696 dart.as(test, dart.functionType(core.bool, [E])); | 669 dart.as(test, dart.functionType(core.bool, [E])); |
697 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 670 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
698 dart.as(orElse, dart.functionType(E, [])); | 671 dart.as(orElse, dart.functionType(E, [])); |
699 for (let element of this) { | 672 for (let element of this) { |
700 if (dart.notNull(test(element))) | 673 if (dart.notNull(test(element))) return element; |
701 return element; | |
702 } | 674 } |
703 if (orElse != null) | 675 if (orElse != null) return orElse(); |
704 return orElse(); | |
705 dart.throw(_internal.IterableElementError.noElement()); | 676 dart.throw(_internal.IterableElementError.noElement()); |
706 } | 677 } |
707 lastWhere(test, opts) { | 678 lastWhere(test, opts) { |
708 dart.as(test, dart.functionType(core.bool, [E])); | 679 dart.as(test, dart.functionType(core.bool, [E])); |
709 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 680 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
710 dart.as(orElse, dart.functionType(E, [])); | 681 dart.as(orElse, dart.functionType(E, [])); |
711 let result = null; | 682 let result = null; |
712 let foundMatching = false; | 683 let foundMatching = false; |
713 for (let element of this) { | 684 for (let element of this) { |
714 if (dart.notNull(test(element))) { | 685 if (dart.notNull(test(element))) { |
715 result = element; | 686 result = element; |
716 foundMatching = true; | 687 foundMatching = true; |
717 } | 688 } |
718 } | 689 } |
719 if (dart.notNull(foundMatching)) | 690 if (dart.notNull(foundMatching)) return result; |
720 return result; | 691 if (orElse != null) return orElse(); |
721 if (orElse != null) | |
722 return orElse(); | |
723 dart.throw(_internal.IterableElementError.noElement()); | 692 dart.throw(_internal.IterableElementError.noElement()); |
724 } | 693 } |
725 singleWhere(test) { | 694 singleWhere(test) { |
726 dart.as(test, dart.functionType(core.bool, [E])); | 695 dart.as(test, dart.functionType(core.bool, [E])); |
727 let result = null; | 696 let result = null; |
728 let foundMatching = false; | 697 let foundMatching = false; |
729 for (let element of this) { | 698 for (let element of this) { |
730 if (dart.notNull(test(element))) { | 699 if (dart.notNull(test(element))) { |
731 if (dart.notNull(foundMatching)) { | 700 if (dart.notNull(foundMatching)) { |
732 dart.throw(_internal.IterableElementError.tooMany()); | 701 dart.throw(_internal.IterableElementError.tooMany()); |
733 } | 702 } |
734 result = element; | 703 result = element; |
735 foundMatching = true; | 704 foundMatching = true; |
736 } | 705 } |
737 } | 706 } |
738 if (dart.notNull(foundMatching)) | 707 if (dart.notNull(foundMatching)) return result; |
739 return result; | |
740 dart.throw(_internal.IterableElementError.noElement()); | 708 dart.throw(_internal.IterableElementError.noElement()); |
741 } | 709 } |
742 elementAt(index) { | 710 elementAt(index) { |
743 if (!(typeof index == 'number')) | 711 if (!(typeof index == 'number')) dart.throw(new core.ArgumentError.notNu
ll("index")); |
744 dart.throw(new core.ArgumentError.notNull("index")); | |
745 core.RangeError.checkNotNegative(index, "index"); | 712 core.RangeError.checkNotNegative(index, "index"); |
746 let elementIndex = 0; | 713 let elementIndex = 0; |
747 for (let element of this) { | 714 for (let element of this) { |
748 if (index == elementIndex) | 715 if (index == elementIndex) return element; |
749 return element; | |
750 elementIndex = dart.notNull(elementIndex) + 1; | 716 elementIndex = dart.notNull(elementIndex) + 1; |
751 } | 717 } |
752 dart.throw(core.RangeError.index(index, this, "index", null, elementInde
x)); | 718 dart.throw(core.RangeError.index(index, this, "index", null, elementInde
x)); |
753 } | 719 } |
754 toString() { | 720 toString() { |
755 return IterableBase.iterableToShortString(this, '(', ')'); | 721 return IterableBase.iterableToShortString(this, '(', ')'); |
756 } | 722 } |
757 [Symbol.iterator]() { | 723 [Symbol.iterator]() { |
758 return new dart.JsIterator(this.iterator); | 724 return new dart.JsIterator(this.iterator); |
759 } | 725 } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 where(f) { | 791 where(f) { |
826 dart.as(f, dart.functionType(core.bool, [E])); | 792 dart.as(f, dart.functionType(core.bool, [E])); |
827 return new (_internal.WhereIterable$(E))(this, f); | 793 return new (_internal.WhereIterable$(E))(this, f); |
828 } | 794 } |
829 expand(f) { | 795 expand(f) { |
830 dart.as(f, dart.functionType(core.Iterable, [E])); | 796 dart.as(f, dart.functionType(core.Iterable, [E])); |
831 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f); | 797 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f); |
832 } | 798 } |
833 contains(element) { | 799 contains(element) { |
834 for (let e of this) { | 800 for (let e of this) { |
835 if (dart.equals(e, element)) | 801 if (dart.equals(e, element)) return true; |
836 return true; | |
837 } | 802 } |
838 return false; | 803 return false; |
839 } | 804 } |
840 forEach(f) { | 805 forEach(f) { |
841 dart.as(f, dart.functionType(dart.void, [E])); | 806 dart.as(f, dart.functionType(dart.void, [E])); |
842 for (let element of this) | 807 for (let element of this) |
843 f(element); | 808 f(element); |
844 } | 809 } |
845 reduce(combine) { | 810 reduce(combine) { |
846 dart.as(combine, dart.functionType(E, [E, E])); | 811 dart.as(combine, dart.functionType(E, [E, E])); |
(...skipping 10 matching lines...) Expand all Loading... |
857 fold(initialValue, combine) { | 822 fold(initialValue, combine) { |
858 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); | 823 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); |
859 let value = initialValue; | 824 let value = initialValue; |
860 for (let element of this) | 825 for (let element of this) |
861 value = dart.dcall(combine, value, element); | 826 value = dart.dcall(combine, value, element); |
862 return value; | 827 return value; |
863 } | 828 } |
864 every(f) { | 829 every(f) { |
865 dart.as(f, dart.functionType(core.bool, [E])); | 830 dart.as(f, dart.functionType(core.bool, [E])); |
866 for (let element of this) { | 831 for (let element of this) { |
867 if (!dart.notNull(f(element))) | 832 if (!dart.notNull(f(element))) return false; |
868 return false; | |
869 } | 833 } |
870 return true; | 834 return true; |
871 } | 835 } |
872 join(separator) { | 836 join(separator) { |
873 if (separator === void 0) | 837 if (separator === void 0) separator = ""; |
874 separator = ""; | |
875 let iterator = this.iterator; | 838 let iterator = this.iterator; |
876 if (!dart.notNull(iterator.moveNext())) | 839 if (!dart.notNull(iterator.moveNext())) return ""; |
877 return ""; | |
878 let buffer = new core.StringBuffer(); | 840 let buffer = new core.StringBuffer(); |
879 if (separator == null || separator == "") { | 841 if (separator == null || separator == "") { |
880 do { | 842 do { |
881 buffer.write(`${iterator.current}`); | 843 buffer.write(`${iterator.current}`); |
882 } while (dart.notNull(iterator.moveNext())); | 844 } while (dart.notNull(iterator.moveNext())); |
883 } else { | 845 } else { |
884 buffer.write(`${iterator.current}`); | 846 buffer.write(`${iterator.current}`); |
885 while (dart.notNull(iterator.moveNext())) { | 847 while (dart.notNull(iterator.moveNext())) { |
886 buffer.write(separator); | 848 buffer.write(separator); |
887 buffer.write(`${iterator.current}`); | 849 buffer.write(`${iterator.current}`); |
888 } | 850 } |
889 } | 851 } |
890 return dart.toString(buffer); | 852 return dart.toString(buffer); |
891 } | 853 } |
892 any(f) { | 854 any(f) { |
893 dart.as(f, dart.functionType(core.bool, [E])); | 855 dart.as(f, dart.functionType(core.bool, [E])); |
894 for (let element of this) { | 856 for (let element of this) { |
895 if (dart.notNull(f(element))) | 857 if (dart.notNull(f(element))) return true; |
896 return true; | |
897 } | 858 } |
898 return false; | 859 return false; |
899 } | 860 } |
900 toList(opts) { | 861 toList(opts) { |
901 let growable = opts && 'growable' in opts ? opts.growable : true; | 862 let growable = opts && 'growable' in opts ? opts.growable : true; |
902 return core.List$(E).from(this, {growable: growable}); | 863 return core.List$(E).from(this, {growable: growable}); |
903 } | 864 } |
904 toSet() { | 865 toSet() { |
905 return core.Set$(E).from(this); | 866 return core.Set$(E).from(this); |
906 } | 867 } |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 dart.throw(_internal.IterableElementError.noElement()); | 907 dart.throw(_internal.IterableElementError.noElement()); |
947 } | 908 } |
948 let result = null; | 909 let result = null; |
949 do { | 910 do { |
950 result = it.current; | 911 result = it.current; |
951 } while (dart.notNull(it.moveNext())); | 912 } while (dart.notNull(it.moveNext())); |
952 return result; | 913 return result; |
953 } | 914 } |
954 get single() { | 915 get single() { |
955 let it = this[dartx.iterator]; | 916 let it = this[dartx.iterator]; |
956 if (!dart.notNull(it.moveNext())) | 917 if (!dart.notNull(it.moveNext())) dart.throw(_internal.IterableElementEr
ror.noElement()); |
957 dart.throw(_internal.IterableElementError.noElement()); | |
958 let result = it.current; | 918 let result = it.current; |
959 if (dart.notNull(it.moveNext())) | 919 if (dart.notNull(it.moveNext())) dart.throw(_internal.IterableElementErr
or.tooMany()); |
960 dart.throw(_internal.IterableElementError.tooMany()); | |
961 return result; | 920 return result; |
962 } | 921 } |
963 firstWhere(test, opts) { | 922 firstWhere(test, opts) { |
964 dart.as(test, dart.functionType(core.bool, [E])); | 923 dart.as(test, dart.functionType(core.bool, [E])); |
965 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 924 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
966 dart.as(orElse, dart.functionType(E, [])); | 925 dart.as(orElse, dart.functionType(E, [])); |
967 for (let element of this) { | 926 for (let element of this) { |
968 if (dart.notNull(test(element))) | 927 if (dart.notNull(test(element))) return element; |
969 return element; | |
970 } | 928 } |
971 if (orElse != null) | 929 if (orElse != null) return orElse(); |
972 return orElse(); | |
973 dart.throw(_internal.IterableElementError.noElement()); | 930 dart.throw(_internal.IterableElementError.noElement()); |
974 } | 931 } |
975 lastWhere(test, opts) { | 932 lastWhere(test, opts) { |
976 dart.as(test, dart.functionType(core.bool, [E])); | 933 dart.as(test, dart.functionType(core.bool, [E])); |
977 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 934 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
978 dart.as(orElse, dart.functionType(E, [])); | 935 dart.as(orElse, dart.functionType(E, [])); |
979 let result = null; | 936 let result = null; |
980 let foundMatching = false; | 937 let foundMatching = false; |
981 for (let element of this) { | 938 for (let element of this) { |
982 if (dart.notNull(test(element))) { | 939 if (dart.notNull(test(element))) { |
983 result = element; | 940 result = element; |
984 foundMatching = true; | 941 foundMatching = true; |
985 } | 942 } |
986 } | 943 } |
987 if (dart.notNull(foundMatching)) | 944 if (dart.notNull(foundMatching)) return result; |
988 return result; | 945 if (orElse != null) return orElse(); |
989 if (orElse != null) | |
990 return orElse(); | |
991 dart.throw(_internal.IterableElementError.noElement()); | 946 dart.throw(_internal.IterableElementError.noElement()); |
992 } | 947 } |
993 singleWhere(test) { | 948 singleWhere(test) { |
994 dart.as(test, dart.functionType(core.bool, [E])); | 949 dart.as(test, dart.functionType(core.bool, [E])); |
995 let result = null; | 950 let result = null; |
996 let foundMatching = false; | 951 let foundMatching = false; |
997 for (let element of this) { | 952 for (let element of this) { |
998 if (dart.notNull(test(element))) { | 953 if (dart.notNull(test(element))) { |
999 if (dart.notNull(foundMatching)) { | 954 if (dart.notNull(foundMatching)) { |
1000 dart.throw(_internal.IterableElementError.tooMany()); | 955 dart.throw(_internal.IterableElementError.tooMany()); |
1001 } | 956 } |
1002 result = element; | 957 result = element; |
1003 foundMatching = true; | 958 foundMatching = true; |
1004 } | 959 } |
1005 } | 960 } |
1006 if (dart.notNull(foundMatching)) | 961 if (dart.notNull(foundMatching)) return result; |
1007 return result; | |
1008 dart.throw(_internal.IterableElementError.noElement()); | 962 dart.throw(_internal.IterableElementError.noElement()); |
1009 } | 963 } |
1010 elementAt(index) { | 964 elementAt(index) { |
1011 if (!(typeof index == 'number')) | 965 if (!(typeof index == 'number')) dart.throw(new core.ArgumentError.notNu
ll("index")); |
1012 dart.throw(new core.ArgumentError.notNull("index")); | |
1013 core.RangeError.checkNotNegative(index, "index"); | 966 core.RangeError.checkNotNegative(index, "index"); |
1014 let elementIndex = 0; | 967 let elementIndex = 0; |
1015 for (let element of this) { | 968 for (let element of this) { |
1016 if (index == elementIndex) | 969 if (index == elementIndex) return element; |
1017 return element; | |
1018 elementIndex = dart.notNull(elementIndex) + 1; | 970 elementIndex = dart.notNull(elementIndex) + 1; |
1019 } | 971 } |
1020 dart.throw(core.RangeError.index(index, this, "index", null, elementInde
x)); | 972 dart.throw(core.RangeError.index(index, this, "index", null, elementInde
x)); |
1021 } | 973 } |
1022 toString() { | 974 toString() { |
1023 return IterableBase$().iterableToShortString(this, '(', ')'); | 975 return IterableBase$().iterableToShortString(this, '(', ')'); |
1024 } | 976 } |
1025 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { | 977 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { |
1026 if (leftDelimiter === void 0) | 978 if (leftDelimiter === void 0) leftDelimiter = '('; |
1027 leftDelimiter = '('; | 979 if (rightDelimiter === void 0) rightDelimiter = ')'; |
1028 if (rightDelimiter === void 0) | |
1029 rightDelimiter = ')'; | |
1030 if (dart.notNull(IterableBase$()._isToStringVisiting(iterable))) { | 980 if (dart.notNull(IterableBase$()._isToStringVisiting(iterable))) { |
1031 if (leftDelimiter == "(" && rightDelimiter == ")") { | 981 if (leftDelimiter == "(" && rightDelimiter == ")") { |
1032 return "(...)"; | 982 return "(...)"; |
1033 } | 983 } |
1034 return `${leftDelimiter}...${rightDelimiter}`; | 984 return `${leftDelimiter}...${rightDelimiter}`; |
1035 } | 985 } |
1036 let parts = []; | 986 let parts = []; |
1037 IterableBase$()._toStringVisiting[dartx.add](iterable); | 987 IterableBase$()._toStringVisiting[dartx.add](iterable); |
1038 try { | 988 try { |
1039 IterableBase$()._iterablePartsToStrings(iterable, parts); | 989 IterableBase$()._iterablePartsToStrings(iterable, parts); |
1040 } finally { | 990 } finally { |
1041 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las
t], iterable)); | 991 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las
t], iterable)); |
1042 IterableBase$()._toStringVisiting[dartx.removeLast](); | 992 IterableBase$()._toStringVisiting[dartx.removeLast](); |
1043 } | 993 } |
1044 return dart.toString((() => { | 994 return dart.toString((() => { |
1045 let _ = new core.StringBuffer(leftDelimiter); | 995 let _ = new core.StringBuffer(leftDelimiter); |
1046 _.writeAll(parts, ", "); | 996 _.writeAll(parts, ", "); |
1047 _.write(rightDelimiter); | 997 _.write(rightDelimiter); |
1048 return _; | 998 return _; |
1049 })()); | 999 })()); |
1050 } | 1000 } |
1051 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { | 1001 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { |
1052 if (leftDelimiter === void 0) | 1002 if (leftDelimiter === void 0) leftDelimiter = '('; |
1053 leftDelimiter = '('; | 1003 if (rightDelimiter === void 0) rightDelimiter = ')'; |
1054 if (rightDelimiter === void 0) | |
1055 rightDelimiter = ')'; | |
1056 if (dart.notNull(IterableBase$()._isToStringVisiting(iterable))) { | 1004 if (dart.notNull(IterableBase$()._isToStringVisiting(iterable))) { |
1057 return `${leftDelimiter}...${rightDelimiter}`; | 1005 return `${leftDelimiter}...${rightDelimiter}`; |
1058 } | 1006 } |
1059 let buffer = new core.StringBuffer(leftDelimiter); | 1007 let buffer = new core.StringBuffer(leftDelimiter); |
1060 IterableBase$()._toStringVisiting[dartx.add](iterable); | 1008 IterableBase$()._toStringVisiting[dartx.add](iterable); |
1061 try { | 1009 try { |
1062 buffer.writeAll(iterable, ", "); | 1010 buffer.writeAll(iterable, ", "); |
1063 } finally { | 1011 } finally { |
1064 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las
t], iterable)); | 1012 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las
t], iterable)); |
1065 IterableBase$()._toStringVisiting[dartx.removeLast](); | 1013 IterableBase$()._toStringVisiting[dartx.removeLast](); |
1066 } | 1014 } |
1067 buffer.write(rightDelimiter); | 1015 buffer.write(rightDelimiter); |
1068 return dart.toString(buffer); | 1016 return dart.toString(buffer); |
1069 } | 1017 } |
1070 static _isToStringVisiting(o) { | 1018 static _isToStringVisiting(o) { |
1071 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase$()._toString
Visiting[dartx.length]); i = dart.notNull(i) + 1) { | 1019 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase$()._toString
Visiting[dartx.length]); i = dart.notNull(i) + 1) { |
1072 if (dart.notNull(core.identical(o, IterableBase$()._toStringVisiting[d
artx.get](i)))) | 1020 if (dart.notNull(core.identical(o, IterableBase$()._toStringVisiting[d
artx.get](i)))) return true; |
1073 return true; | |
1074 } | 1021 } |
1075 return false; | 1022 return false; |
1076 } | 1023 } |
1077 static _iterablePartsToStrings(iterable, parts) { | 1024 static _iterablePartsToStrings(iterable, parts) { |
1078 let LENGTH_LIMIT = 80; | 1025 let LENGTH_LIMIT = 80; |
1079 let HEAD_COUNT = 3; | 1026 let HEAD_COUNT = 3; |
1080 let TAIL_COUNT = 2; | 1027 let TAIL_COUNT = 2; |
1081 let MAX_COUNT = 100; | 1028 let MAX_COUNT = 100; |
1082 let OVERHEAD = 2; | 1029 let OVERHEAD = 2; |
1083 let ELLIPSIS_SIZE = 3; | 1030 let ELLIPSIS_SIZE = 3; |
1084 let length = 0; | 1031 let length = 0; |
1085 let count = 0; | 1032 let count = 0; |
1086 let it = iterable[dartx.iterator]; | 1033 let it = iterable[dartx.iterator]; |
1087 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull
(count) < dart.notNull(HEAD_COUNT)) { | 1034 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull
(count) < dart.notNull(HEAD_COUNT)) { |
1088 if (!dart.notNull(it.moveNext())) | 1035 if (!dart.notNull(it.moveNext())) return; |
1089 return; | |
1090 let next = `${it.current}`; | 1036 let next = `${it.current}`; |
1091 parts[dartx.add](next); | 1037 parts[dartx.add](next); |
1092 length = dart.notNull(length) + (dart.notNull(next[dartx.length]) + da
rt.notNull(OVERHEAD)); | 1038 length = dart.notNull(length) + (dart.notNull(next[dartx.length]) + da
rt.notNull(OVERHEAD)); |
1093 count = dart.notNull(count) + 1; | 1039 count = dart.notNull(count) + 1; |
1094 } | 1040 } |
1095 let penultimateString = null; | 1041 let penultimateString = null; |
1096 let ultimateString = null; | 1042 let ultimateString = null; |
1097 let penultimate = null; | 1043 let penultimate = null; |
1098 let ultimate = null; | 1044 let ultimate = null; |
1099 if (!dart.notNull(it.moveNext())) { | 1045 if (!dart.notNull(it.moveNext())) { |
1100 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + dart.notNull(TAI
L_COUNT)) | 1046 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + dart.notNull(TAI
L_COUNT)) return; |
1101 return; | |
1102 ultimateString = dart.as(parts[dartx.removeLast](), core.String); | 1047 ultimateString = dart.as(parts[dartx.removeLast](), core.String); |
1103 penultimateString = dart.as(parts[dartx.removeLast](), core.String); | 1048 penultimateString = dart.as(parts[dartx.removeLast](), core.String); |
1104 } else { | 1049 } else { |
1105 penultimate = it.current; | 1050 penultimate = it.current; |
1106 count = dart.notNull(count) + 1; | 1051 count = dart.notNull(count) + 1; |
1107 if (!dart.notNull(it.moveNext())) { | 1052 if (!dart.notNull(it.moveNext())) { |
1108 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + 1) { | 1053 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + 1) { |
1109 parts[dartx.add](`${penultimate}`); | 1054 parts[dartx.add](`${penultimate}`); |
1110 return; | 1055 return; |
1111 } | 1056 } |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1228 const _iterator = Symbol('_iterator'); | 1173 const _iterator = Symbol('_iterator'); |
1229 const _state = Symbol('_state'); | 1174 const _state = Symbol('_state'); |
1230 const _move = Symbol('_move'); | 1175 const _move = Symbol('_move'); |
1231 const HasNextIterator$ = dart.generic(function(E) { | 1176 const HasNextIterator$ = dart.generic(function(E) { |
1232 class HasNextIterator extends core.Object { | 1177 class HasNextIterator extends core.Object { |
1233 HasNextIterator(iterator) { | 1178 HasNextIterator(iterator) { |
1234 this[_iterator] = iterator; | 1179 this[_iterator] = iterator; |
1235 this[_state] = HasNextIterator$()._NOT_MOVED_YET; | 1180 this[_state] = HasNextIterator$()._NOT_MOVED_YET; |
1236 } | 1181 } |
1237 get hasNext() { | 1182 get hasNext() { |
1238 if (this[_state] == HasNextIterator$()._NOT_MOVED_YET) | 1183 if (this[_state] == HasNextIterator$()._NOT_MOVED_YET) this[_move](); |
1239 this[_move](); | |
1240 return this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT; | 1184 return this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT; |
1241 } | 1185 } |
1242 next() { | 1186 next() { |
1243 if (!dart.notNull(this.hasNext)) | 1187 if (!dart.notNull(this.hasNext)) dart.throw(new core.StateError("No more
elements")); |
1244 dart.throw(new core.StateError("No more elements")); | |
1245 dart.assert(this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CUR
RENT); | 1188 dart.assert(this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CUR
RENT); |
1246 let result = dart.as(this[_iterator].current, E); | 1189 let result = dart.as(this[_iterator].current, E); |
1247 this[_move](); | 1190 this[_move](); |
1248 return result; | 1191 return result; |
1249 } | 1192 } |
1250 [_move]() { | 1193 [_move]() { |
1251 if (dart.notNull(this[_iterator].moveNext())) { | 1194 if (dart.notNull(this[_iterator].moveNext())) { |
1252 this[_state] = HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT; | 1195 this[_state] = HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT; |
1253 } else { | 1196 } else { |
1254 this[_state] = HasNextIterator$()._NO_NEXT; | 1197 this[_state] = HasNextIterator$()._NO_NEXT; |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1421 add(entry) { | 1364 add(entry) { |
1422 dart.as(entry, E); | 1365 dart.as(entry, E); |
1423 this[_insertAfter](this[_previous], entry); | 1366 this[_insertAfter](this[_previous], entry); |
1424 } | 1367 } |
1425 addAll(entries) { | 1368 addAll(entries) { |
1426 dart.as(entries, core.Iterable$(E)); | 1369 dart.as(entries, core.Iterable$(E)); |
1427 entries[dartx.forEach](dart.fn((entry => this[_insertAfter](this[_previo
us], dart.as(entry, E))).bind(this), dart.void, [dart.dynamic])); | 1370 entries[dartx.forEach](dart.fn((entry => this[_insertAfter](this[_previo
us], dart.as(entry, E))).bind(this), dart.void, [dart.dynamic])); |
1428 } | 1371 } |
1429 remove(entry) { | 1372 remove(entry) { |
1430 dart.as(entry, E); | 1373 dart.as(entry, E); |
1431 if (!dart.equals(entry[_list], this)) | 1374 if (!dart.equals(entry[_list], this)) return false; |
1432 return false; | |
1433 this[_unlink](entry); | 1375 this[_unlink](entry); |
1434 return true; | 1376 return true; |
1435 } | 1377 } |
1436 get iterator() { | 1378 get iterator() { |
1437 return new (_LinkedListIterator$(E))(this); | 1379 return new (_LinkedListIterator$(E))(this); |
1438 } | 1380 } |
1439 get length() { | 1381 get length() { |
1440 return this[_length]; | 1382 return this[_length]; |
1441 } | 1383 } |
1442 clear() { | 1384 clear() { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1582 this[_next] = null; | 1524 this[_next] = null; |
1583 this[_previous] = null; | 1525 this[_previous] = null; |
1584 } | 1526 } |
1585 get list() { | 1527 get list() { |
1586 return this[_list]; | 1528 return this[_list]; |
1587 } | 1529 } |
1588 unlink() { | 1530 unlink() { |
1589 this[_list][_unlink](this); | 1531 this[_list][_unlink](this); |
1590 } | 1532 } |
1591 get next() { | 1533 get next() { |
1592 if (dart.notNull(core.identical(this[_next], this[_list]))) | 1534 if (dart.notNull(core.identical(this[_next], this[_list]))) return null; |
1593 return null; | |
1594 let result = dart.as(this[_next], E); | 1535 let result = dart.as(this[_next], E); |
1595 return result; | 1536 return result; |
1596 } | 1537 } |
1597 get previous() { | 1538 get previous() { |
1598 if (dart.notNull(core.identical(this[_previous], this[_list]))) | 1539 if (dart.notNull(core.identical(this[_previous], this[_list]))) return n
ull; |
1599 return null; | |
1600 return dart.as(this[_previous], E); | 1540 return dart.as(this[_previous], E); |
1601 } | 1541 } |
1602 insertAfter(entry) { | 1542 insertAfter(entry) { |
1603 dart.as(entry, E); | 1543 dart.as(entry, E); |
1604 this[_list][_insertAfter](this, entry); | 1544 this[_list][_insertAfter](this, entry); |
1605 } | 1545 } |
1606 insertBefore(entry) { | 1546 insertBefore(entry) { |
1607 dart.as(entry, E); | 1547 dart.as(entry, E); |
1608 this[_list][_insertAfter](this[_previous], entry); | 1548 this[_list][_insertAfter](this[_previous], entry); |
1609 } | 1549 } |
(...skipping 30 matching lines...) Expand all Loading... |
1640 } | 1580 } |
1641 } | 1581 } |
1642 } | 1582 } |
1643 get isEmpty() { | 1583 get isEmpty() { |
1644 return this[dartx.length] == 0; | 1584 return this[dartx.length] == 0; |
1645 } | 1585 } |
1646 get isNotEmpty() { | 1586 get isNotEmpty() { |
1647 return !dart.notNull(this.isEmpty); | 1587 return !dart.notNull(this.isEmpty); |
1648 } | 1588 } |
1649 get first() { | 1589 get first() { |
1650 if (this[dartx.length] == 0) | 1590 if (this[dartx.length] == 0) dart.throw(_internal.IterableElementError.n
oElement()); |
1651 dart.throw(_internal.IterableElementError.noElement()); | |
1652 return this.get(0); | 1591 return this.get(0); |
1653 } | 1592 } |
1654 get last() { | 1593 get last() { |
1655 if (this[dartx.length] == 0) | 1594 if (this[dartx.length] == 0) dart.throw(_internal.IterableElementError.n
oElement()); |
1656 dart.throw(_internal.IterableElementError.noElement()); | |
1657 return this.get(dart.notNull(this[dartx.length]) - 1); | 1595 return this.get(dart.notNull(this[dartx.length]) - 1); |
1658 } | 1596 } |
1659 get single() { | 1597 get single() { |
1660 if (this[dartx.length] == 0) | 1598 if (this[dartx.length] == 0) dart.throw(_internal.IterableElementError.n
oElement()); |
1661 dart.throw(_internal.IterableElementError.noElement()); | 1599 if (dart.notNull(this[dartx.length]) > 1) dart.throw(_internal.IterableE
lementError.tooMany()); |
1662 if (dart.notNull(this[dartx.length]) > 1) | |
1663 dart.throw(_internal.IterableElementError.tooMany()); | |
1664 return this.get(0); | 1600 return this.get(0); |
1665 } | 1601 } |
1666 contains(element) { | 1602 contains(element) { |
1667 let length = this.length; | 1603 let length = this.length; |
1668 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no
tNull(i) + 1) { | 1604 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no
tNull(i) + 1) { |
1669 if (dart.equals(this.get(i), element)) | 1605 if (dart.equals(this.get(i), element)) return true; |
1670 return true; | |
1671 if (length != this.length) { | 1606 if (length != this.length) { |
1672 dart.throw(new core.ConcurrentModificationError(this)); | 1607 dart.throw(new core.ConcurrentModificationError(this)); |
1673 } | 1608 } |
1674 } | 1609 } |
1675 return false; | 1610 return false; |
1676 } | 1611 } |
1677 every(test) { | 1612 every(test) { |
1678 dart.as(test, dart.functionType(core.bool, [E])); | 1613 dart.as(test, dart.functionType(core.bool, [E])); |
1679 let length = this.length; | 1614 let length = this.length; |
1680 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1615 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1681 if (!dart.notNull(test(this.get(i)))) | 1616 if (!dart.notNull(test(this.get(i)))) return false; |
1682 return false; | |
1683 if (length != this.length) { | 1617 if (length != this.length) { |
1684 dart.throw(new core.ConcurrentModificationError(this)); | 1618 dart.throw(new core.ConcurrentModificationError(this)); |
1685 } | 1619 } |
1686 } | 1620 } |
1687 return true; | 1621 return true; |
1688 } | 1622 } |
1689 any(test) { | 1623 any(test) { |
1690 dart.as(test, dart.functionType(core.bool, [E])); | 1624 dart.as(test, dart.functionType(core.bool, [E])); |
1691 let length = this.length; | 1625 let length = this.length; |
1692 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1626 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1693 if (dart.notNull(test(this.get(i)))) | 1627 if (dart.notNull(test(this.get(i)))) return true; |
1694 return true; | |
1695 if (length != this.length) { | 1628 if (length != this.length) { |
1696 dart.throw(new core.ConcurrentModificationError(this)); | 1629 dart.throw(new core.ConcurrentModificationError(this)); |
1697 } | 1630 } |
1698 } | 1631 } |
1699 return false; | 1632 return false; |
1700 } | 1633 } |
1701 firstWhere(test, opts) { | 1634 firstWhere(test, opts) { |
1702 dart.as(test, dart.functionType(core.bool, [E])); | 1635 dart.as(test, dart.functionType(core.bool, [E])); |
1703 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 1636 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
1704 dart.as(orElse, dart.functionType(E, [])); | 1637 dart.as(orElse, dart.functionType(E, [])); |
1705 let length = this.length; | 1638 let length = this.length; |
1706 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1639 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1707 let element = this.get(i); | 1640 let element = this.get(i); |
1708 if (dart.notNull(test(element))) | 1641 if (dart.notNull(test(element))) return element; |
1709 return element; | |
1710 if (length != this.length) { | 1642 if (length != this.length) { |
1711 dart.throw(new core.ConcurrentModificationError(this)); | 1643 dart.throw(new core.ConcurrentModificationError(this)); |
1712 } | 1644 } |
1713 } | 1645 } |
1714 if (orElse != null) | 1646 if (orElse != null) return orElse(); |
1715 return orElse(); | |
1716 dart.throw(_internal.IterableElementError.noElement()); | 1647 dart.throw(_internal.IterableElementError.noElement()); |
1717 } | 1648 } |
1718 lastWhere(test, opts) { | 1649 lastWhere(test, opts) { |
1719 dart.as(test, dart.functionType(core.bool, [E])); | 1650 dart.as(test, dart.functionType(core.bool, [E])); |
1720 let orElse = opts && 'orElse' in opts ? opts.orElse : null; | 1651 let orElse = opts && 'orElse' in opts ? opts.orElse : null; |
1721 dart.as(orElse, dart.functionType(E, [])); | 1652 dart.as(orElse, dart.functionType(E, [])); |
1722 let length = this.length; | 1653 let length = this.length; |
1723 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no
tNull(i) - 1) { | 1654 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no
tNull(i) - 1) { |
1724 let element = this.get(i); | 1655 let element = this.get(i); |
1725 if (dart.notNull(test(element))) | 1656 if (dart.notNull(test(element))) return element; |
1726 return element; | |
1727 if (length != this.length) { | 1657 if (length != this.length) { |
1728 dart.throw(new core.ConcurrentModificationError(this)); | 1658 dart.throw(new core.ConcurrentModificationError(this)); |
1729 } | 1659 } |
1730 } | 1660 } |
1731 if (orElse != null) | 1661 if (orElse != null) return orElse(); |
1732 return orElse(); | |
1733 dart.throw(_internal.IterableElementError.noElement()); | 1662 dart.throw(_internal.IterableElementError.noElement()); |
1734 } | 1663 } |
1735 singleWhere(test) { | 1664 singleWhere(test) { |
1736 dart.as(test, dart.functionType(core.bool, [E])); | 1665 dart.as(test, dart.functionType(core.bool, [E])); |
1737 let length = this.length; | 1666 let length = this.length; |
1738 let match = null; | 1667 let match = null; |
1739 let matchFound = false; | 1668 let matchFound = false; |
1740 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1669 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1741 let element = this.get(i); | 1670 let element = this.get(i); |
1742 if (dart.notNull(test(element))) { | 1671 if (dart.notNull(test(element))) { |
1743 if (dart.notNull(matchFound)) { | 1672 if (dart.notNull(matchFound)) { |
1744 dart.throw(_internal.IterableElementError.tooMany()); | 1673 dart.throw(_internal.IterableElementError.tooMany()); |
1745 } | 1674 } |
1746 matchFound = true; | 1675 matchFound = true; |
1747 match = element; | 1676 match = element; |
1748 } | 1677 } |
1749 if (length != this.length) { | 1678 if (length != this.length) { |
1750 dart.throw(new core.ConcurrentModificationError(this)); | 1679 dart.throw(new core.ConcurrentModificationError(this)); |
1751 } | 1680 } |
1752 } | 1681 } |
1753 if (dart.notNull(matchFound)) | 1682 if (dart.notNull(matchFound)) return match; |
1754 return match; | |
1755 dart.throw(_internal.IterableElementError.noElement()); | 1683 dart.throw(_internal.IterableElementError.noElement()); |
1756 } | 1684 } |
1757 join(separator) { | 1685 join(separator) { |
1758 if (separator === void 0) | 1686 if (separator === void 0) separator = ""; |
1759 separator = ""; | 1687 if (this[dartx.length] == 0) return ""; |
1760 if (this[dartx.length] == 0) | |
1761 return ""; | |
1762 let buffer = new core.StringBuffer(); | 1688 let buffer = new core.StringBuffer(); |
1763 buffer.writeAll(this, separator); | 1689 buffer.writeAll(this, separator); |
1764 return dart.toString(buffer); | 1690 return dart.toString(buffer); |
1765 } | 1691 } |
1766 where(test) { | 1692 where(test) { |
1767 dart.as(test, dart.functionType(core.bool, [E])); | 1693 dart.as(test, dart.functionType(core.bool, [E])); |
1768 return new (_internal.WhereIterable$(E))(this, test); | 1694 return new (_internal.WhereIterable$(E))(this, test); |
1769 } | 1695 } |
1770 map(f) { | 1696 map(f) { |
1771 dart.as(f, dart.functionType(dart.dynamic, [E])); | 1697 dart.as(f, dart.functionType(dart.dynamic, [E])); |
1772 return new _internal.MappedListIterable(this, f); | 1698 return new _internal.MappedListIterable(this, f); |
1773 } | 1699 } |
1774 expand(f) { | 1700 expand(f) { |
1775 dart.as(f, dart.functionType(core.Iterable, [E])); | 1701 dart.as(f, dart.functionType(core.Iterable, [E])); |
1776 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f); | 1702 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f); |
1777 } | 1703 } |
1778 reduce(combine) { | 1704 reduce(combine) { |
1779 dart.as(combine, dart.functionType(E, [E, E])); | 1705 dart.as(combine, dart.functionType(E, [E, E])); |
1780 let length = this.length; | 1706 let length = this.length; |
1781 if (length == 0) | 1707 if (length == 0) dart.throw(_internal.IterableElementError.noElement()); |
1782 dart.throw(_internal.IterableElementError.noElement()); | |
1783 let value = this.get(0); | 1708 let value = this.get(0); |
1784 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1709 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1785 value = combine(value, this.get(i)); | 1710 value = combine(value, this.get(i)); |
1786 if (length != this.length) { | 1711 if (length != this.length) { |
1787 dart.throw(new core.ConcurrentModificationError(this)); | 1712 dart.throw(new core.ConcurrentModificationError(this)); |
1788 } | 1713 } |
1789 } | 1714 } |
1790 return value; | 1715 return value; |
1791 } | 1716 } |
1792 fold(initialValue, combine) { | 1717 fold(initialValue, combine) { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1895 } | 1820 } |
1896 removeLast() { | 1821 removeLast() { |
1897 if (this[dartx.length] == 0) { | 1822 if (this[dartx.length] == 0) { |
1898 dart.throw(_internal.IterableElementError.noElement()); | 1823 dart.throw(_internal.IterableElementError.noElement()); |
1899 } | 1824 } |
1900 let result = this.get(dart.notNull(this[dartx.length]) - 1); | 1825 let result = this.get(dart.notNull(this[dartx.length]) - 1); |
1901 this[dartx.length] = dart.notNull(this[dartx.length]) - 1; | 1826 this[dartx.length] = dart.notNull(this[dartx.length]) - 1; |
1902 return result; | 1827 return result; |
1903 } | 1828 } |
1904 sort(compare) { | 1829 sort(compare) { |
1905 if (compare === void 0) | 1830 if (compare === void 0) compare = null; |
1906 compare = null; | |
1907 dart.as(compare, dart.functionType(core.int, [E, E])); | 1831 dart.as(compare, dart.functionType(core.int, [E, E])); |
1908 _internal.Sort.sort(this, compare == null ? core.Comparable.compare : co
mpare); | 1832 _internal.Sort.sort(this, compare == null ? core.Comparable.compare : co
mpare); |
1909 } | 1833 } |
1910 shuffle(random) { | 1834 shuffle(random) { |
1911 if (random === void 0) | 1835 if (random === void 0) random = null; |
1912 random = null; | 1836 if (random == null) random = math.Random.new(); |
1913 if (random == null) | |
1914 random = math.Random.new(); | |
1915 let length = this.length; | 1837 let length = this.length; |
1916 while (dart.notNull(length) > 1) { | 1838 while (dart.notNull(length) > 1) { |
1917 let pos = random.nextInt(length); | 1839 let pos = random.nextInt(length); |
1918 length = dart.notNull(length) - 1; | 1840 length = dart.notNull(length) - 1; |
1919 let tmp = this.get(length); | 1841 let tmp = this.get(length); |
1920 this.set(length, this.get(pos)); | 1842 this.set(length, this.get(pos)); |
1921 this.set(pos, tmp); | 1843 this.set(pos, tmp); |
1922 } | 1844 } |
1923 } | 1845 } |
1924 asMap() { | 1846 asMap() { |
1925 return new (_internal.ListMapView$(E))(this); | 1847 return new (_internal.ListMapView$(E))(this); |
1926 } | 1848 } |
1927 sublist(start, end) { | 1849 sublist(start, end) { |
1928 if (end === void 0) | 1850 if (end === void 0) end = null; |
1929 end = null; | |
1930 let listLength = this.length; | 1851 let listLength = this.length; |
1931 if (end == null) | 1852 if (end == null) end = listLength; |
1932 end = listLength; | |
1933 core.RangeError.checkValidRange(start, end, listLength); | 1853 core.RangeError.checkValidRange(start, end, listLength); |
1934 let length = dart.notNull(end) - dart.notNull(start); | 1854 let length = dart.notNull(end) - dart.notNull(start); |
1935 let result = core.List$(E).new(); | 1855 let result = core.List$(E).new(); |
1936 result[dartx.length] = length; | 1856 result[dartx.length] = length; |
1937 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1857 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
1938 result[dartx.set](i, this.get(dart.notNull(start) + dart.notNull(i))); | 1858 result[dartx.set](i, this.get(dart.notNull(start) + dart.notNull(i))); |
1939 } | 1859 } |
1940 return result; | 1860 return result; |
1941 } | 1861 } |
1942 getRange(start, end) { | 1862 getRange(start, end) { |
1943 core.RangeError.checkValidRange(start, end, this.length); | 1863 core.RangeError.checkValidRange(start, end, this.length); |
1944 return new (_internal.SubListIterable$(E))(this, start, end); | 1864 return new (_internal.SubListIterable$(E))(this, start, end); |
1945 } | 1865 } |
1946 removeRange(start, end) { | 1866 removeRange(start, end) { |
1947 core.RangeError.checkValidRange(start, end, this.length); | 1867 core.RangeError.checkValidRange(start, end, this.length); |
1948 let length = dart.notNull(end) - dart.notNull(start); | 1868 let length = dart.notNull(end) - dart.notNull(start); |
1949 this.setRange(start, dart.notNull(this.length) - dart.notNull(length), t
his, end); | 1869 this.setRange(start, dart.notNull(this.length) - dart.notNull(length), t
his, end); |
1950 this.length = dart.notNull(this.length) - dart.notNull(length); | 1870 this.length = dart.notNull(this.length) - dart.notNull(length); |
1951 } | 1871 } |
1952 fillRange(start, end, fill) { | 1872 fillRange(start, end, fill) { |
1953 if (fill === void 0) | 1873 if (fill === void 0) fill = null; |
1954 fill = null; | |
1955 dart.as(fill, E); | 1874 dart.as(fill, E); |
1956 core.RangeError.checkValidRange(start, end, this.length); | 1875 core.RangeError.checkValidRange(start, end, this.length); |
1957 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul
l(i) + 1) { | 1876 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul
l(i) + 1) { |
1958 this.set(i, fill); | 1877 this.set(i, fill); |
1959 } | 1878 } |
1960 } | 1879 } |
1961 setRange(start, end, iterable, skipCount) { | 1880 setRange(start, end, iterable, skipCount) { |
1962 dart.as(iterable, core.Iterable$(E)); | 1881 dart.as(iterable, core.Iterable$(E)); |
1963 if (skipCount === void 0) | 1882 if (skipCount === void 0) skipCount = 0; |
1964 skipCount = 0; | |
1965 core.RangeError.checkValidRange(start, end, this.length); | 1883 core.RangeError.checkValidRange(start, end, this.length); |
1966 let length = dart.notNull(end) - dart.notNull(start); | 1884 let length = dart.notNull(end) - dart.notNull(start); |
1967 if (length == 0) | 1885 if (length == 0) return; |
1968 return; | |
1969 core.RangeError.checkNotNegative(skipCount, "skipCount"); | 1886 core.RangeError.checkNotNegative(skipCount, "skipCount"); |
1970 let otherList = null; | 1887 let otherList = null; |
1971 let otherStart = null; | 1888 let otherStart = null; |
1972 if (dart.is(iterable, core.List)) { | 1889 if (dart.is(iterable, core.List)) { |
1973 otherList = dart.as(iterable, core.List); | 1890 otherList = dart.as(iterable, core.List); |
1974 otherStart = skipCount; | 1891 otherStart = skipCount; |
1975 } else { | 1892 } else { |
1976 otherList = iterable[dartx.skip](skipCount)[dartx.toList]({growable: f
alse}); | 1893 otherList = iterable[dartx.skip](skipCount)[dartx.toList]({growable: f
alse}); |
1977 otherStart = 0; | 1894 otherStart = 0; |
1978 } | 1895 } |
(...skipping 30 matching lines...) Expand all Loading... |
2009 } else { | 1926 } else { |
2010 let delta = dart.notNull(insertLength) - dart.notNull(removeLength); | 1927 let delta = dart.notNull(insertLength) - dart.notNull(removeLength); |
2011 let newLength = dart.notNull(this.length) + dart.notNull(delta); | 1928 let newLength = dart.notNull(this.length) + dart.notNull(delta); |
2012 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); | 1929 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); |
2013 this.length = newLength; | 1930 this.length = newLength; |
2014 this.setRange(insertEnd, newLength, this, end); | 1931 this.setRange(insertEnd, newLength, this, end); |
2015 this.setRange(start, insertEnd, newContents); | 1932 this.setRange(start, insertEnd, newContents); |
2016 } | 1933 } |
2017 } | 1934 } |
2018 indexOf(element, startIndex) { | 1935 indexOf(element, startIndex) { |
2019 if (startIndex === void 0) | 1936 if (startIndex === void 0) startIndex = 0; |
2020 startIndex = 0; | |
2021 if (dart.notNull(startIndex) >= dart.notNull(this.length)) { | 1937 if (dart.notNull(startIndex) >= dart.notNull(this.length)) { |
2022 return -1; | 1938 return -1; |
2023 } | 1939 } |
2024 if (dart.notNull(startIndex) < 0) { | 1940 if (dart.notNull(startIndex) < 0) { |
2025 startIndex = 0; | 1941 startIndex = 0; |
2026 } | 1942 } |
2027 for (let i = startIndex; dart.notNull(i) < dart.notNull(this.length); i
= dart.notNull(i) + 1) { | 1943 for (let i = startIndex; dart.notNull(i) < dart.notNull(this.length); i
= dart.notNull(i) + 1) { |
2028 if (dart.equals(this.get(i), element)) { | 1944 if (dart.equals(this.get(i), element)) { |
2029 return i; | 1945 return i; |
2030 } | 1946 } |
2031 } | 1947 } |
2032 return -1; | 1948 return -1; |
2033 } | 1949 } |
2034 lastIndexOf(element, startIndex) { | 1950 lastIndexOf(element, startIndex) { |
2035 if (startIndex === void 0) | 1951 if (startIndex === void 0) startIndex = null; |
2036 startIndex = null; | |
2037 if (startIndex == null) { | 1952 if (startIndex == null) { |
2038 startIndex = dart.notNull(this.length) - 1; | 1953 startIndex = dart.notNull(this.length) - 1; |
2039 } else { | 1954 } else { |
2040 if (dart.notNull(startIndex) < 0) { | 1955 if (dart.notNull(startIndex) < 0) { |
2041 return -1; | 1956 return -1; |
2042 } | 1957 } |
2043 if (dart.notNull(startIndex) >= dart.notNull(this.length)) { | 1958 if (dart.notNull(startIndex) >= dart.notNull(this.length)) { |
2044 startIndex = dart.notNull(this.length) - 1; | 1959 startIndex = dart.notNull(this.length) - 1; |
2045 } | 1960 } |
2046 } | 1961 } |
2047 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1)
{ | 1962 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1)
{ |
2048 if (dart.equals(this.get(i), element)) { | 1963 if (dart.equals(this.get(i), element)) { |
2049 return i; | 1964 return i; |
2050 } | 1965 } |
2051 } | 1966 } |
2052 return -1; | 1967 return -1; |
2053 } | 1968 } |
2054 insert(index, element) { | 1969 insert(index, element) { |
2055 dart.as(element, E); | 1970 dart.as(element, E); |
2056 core.RangeError.checkValueInInterval(index, 0, this[dartx.length], "inde
x"); | 1971 core.RangeError.checkValueInInterval(index, 0, this[dartx.length], "inde
x"); |
2057 if (index == this.length) { | 1972 if (index == this.length) { |
2058 this.add(element); | 1973 this.add(element); |
2059 return; | 1974 return; |
2060 } | 1975 } |
2061 if (!(typeof index == 'number')) | 1976 if (!(typeof index == 'number')) dart.throw(new core.ArgumentError(index
)); |
2062 dart.throw(new core.ArgumentError(index)); | |
2063 this.length = dart.notNull(this.length) + 1; | 1977 this.length = dart.notNull(this.length) + 1; |
2064 this.setRange(dart.notNull(index) + 1, this.length, this, index); | 1978 this.setRange(dart.notNull(index) + 1, this.length, this, index); |
2065 this.set(index, element); | 1979 this.set(index, element); |
2066 } | 1980 } |
2067 removeAt(index) { | 1981 removeAt(index) { |
2068 let result = this.get(index); | 1982 let result = this.get(index); |
2069 this.setRange(index, dart.notNull(this.length) - 1, this, dart.notNull(i
ndex) + 1); | 1983 this.setRange(index, dart.notNull(this.length) - 1, this, dart.notNull(i
ndex) + 1); |
2070 this[dartx.length] = dart.notNull(this[dartx.length]) - 1; | 1984 this[dartx.length] = dart.notNull(this[dartx.length]) - 1; |
2071 return result; | 1985 return result; |
2072 } | 1986 } |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2227 } | 2141 } |
2228 } | 2142 } |
2229 addAll(other) { | 2143 addAll(other) { |
2230 dart.as(other, core.Map$(K, V)); | 2144 dart.as(other, core.Map$(K, V)); |
2231 for (let key of other.keys) { | 2145 for (let key of other.keys) { |
2232 this.set(key, other.get(key)); | 2146 this.set(key, other.get(key)); |
2233 } | 2147 } |
2234 } | 2148 } |
2235 containsValue(value) { | 2149 containsValue(value) { |
2236 for (let key of this.keys) { | 2150 for (let key of this.keys) { |
2237 if (dart.equals(this.get(key), value)) | 2151 if (dart.equals(this.get(key), value)) return true; |
2238 return true; | |
2239 } | 2152 } |
2240 return false; | 2153 return false; |
2241 } | 2154 } |
2242 putIfAbsent(key, ifAbsent) { | 2155 putIfAbsent(key, ifAbsent) { |
2243 dart.as(key, K); | 2156 dart.as(key, K); |
2244 dart.as(ifAbsent, dart.functionType(V, [])); | 2157 dart.as(ifAbsent, dart.functionType(V, [])); |
2245 if (dart.notNull(this.keys[dartx.contains](key))) { | 2158 if (dart.notNull(this.keys[dartx.contains](key))) { |
2246 return this.get(key); | 2159 return this.get(key); |
2247 } | 2160 } |
2248 return this.set(key, ifAbsent()); | 2161 return this.set(key, ifAbsent()); |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2557 } finally { | 2470 } finally { |
2558 dart.assert(core.identical(IterableBase._toStringVisiting[dartx.last], m
)); | 2471 dart.assert(core.identical(IterableBase._toStringVisiting[dartx.last], m
)); |
2559 IterableBase._toStringVisiting[dartx.removeLast](); | 2472 IterableBase._toStringVisiting[dartx.removeLast](); |
2560 } | 2473 } |
2561 return dart.toString(result); | 2474 return dart.toString(result); |
2562 } | 2475 } |
2563 static _id(x) { | 2476 static _id(x) { |
2564 return x; | 2477 return x; |
2565 } | 2478 } |
2566 static _fillMapWithMappedIterable(map, iterable, key, value) { | 2479 static _fillMapWithMappedIterable(map, iterable, key, value) { |
2567 if (key == null) | 2480 if (key == null) key = Maps._id; |
2568 key = Maps._id; | 2481 if (value == null) value = Maps._id; |
2569 if (value == null) | |
2570 value = Maps._id; | |
2571 for (let element of iterable) { | 2482 for (let element of iterable) { |
2572 map.set(dart.dcall(key, element), dart.dcall(value, element)); | 2483 map.set(dart.dcall(key, element), dart.dcall(value, element)); |
2573 } | 2484 } |
2574 } | 2485 } |
2575 static _fillMapWithIterables(map, keys, values) { | 2486 static _fillMapWithIterables(map, keys, values) { |
2576 let keyIterator = keys[dartx.iterator]; | 2487 let keyIterator = keys[dartx.iterator]; |
2577 let valueIterator = values[dartx.iterator]; | 2488 let valueIterator = values[dartx.iterator]; |
2578 let hasNextKey = keyIterator.moveNext(); | 2489 let hasNextKey = keyIterator.moveNext(); |
2579 let hasNextValue = valueIterator.moveNext(); | 2490 let hasNextValue = valueIterator.moveNext(); |
2580 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { | 2491 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2919 const _checkModification = Symbol('_checkModification'); | 2830 const _checkModification = Symbol('_checkModification'); |
2920 const _writeToList = Symbol('_writeToList'); | 2831 const _writeToList = Symbol('_writeToList'); |
2921 const _add = Symbol('_add'); | 2832 const _add = Symbol('_add'); |
2922 const _preGrow = Symbol('_preGrow'); | 2833 const _preGrow = Symbol('_preGrow'); |
2923 const _remove = Symbol('_remove'); | 2834 const _remove = Symbol('_remove'); |
2924 const _filterWhere = Symbol('_filterWhere'); | 2835 const _filterWhere = Symbol('_filterWhere'); |
2925 const _grow = Symbol('_grow'); | 2836 const _grow = Symbol('_grow'); |
2926 const ListQueue$ = dart.generic(function(E) { | 2837 const ListQueue$ = dart.generic(function(E) { |
2927 class ListQueue extends IterableBase$(E) { | 2838 class ListQueue extends IterableBase$(E) { |
2928 ListQueue(initialCapacity) { | 2839 ListQueue(initialCapacity) { |
2929 if (initialCapacity === void 0) | 2840 if (initialCapacity === void 0) initialCapacity = null; |
2930 initialCapacity = null; | |
2931 this[_head] = 0; | 2841 this[_head] = 0; |
2932 this[_tail] = 0; | 2842 this[_tail] = 0; |
2933 this[_table] = null; | 2843 this[_table] = null; |
2934 this[_modificationCount] = 0; | 2844 this[_modificationCount] = 0; |
2935 super.IterableBase(); | 2845 super.IterableBase(); |
2936 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN
ull(ListQueue$()._INITIAL_CAPACITY)) { | 2846 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN
ull(ListQueue$()._INITIAL_CAPACITY)) { |
2937 initialCapacity = ListQueue$()._INITIAL_CAPACITY; | 2847 initialCapacity = ListQueue$()._INITIAL_CAPACITY; |
2938 } else if (!dart.notNull(ListQueue$()._isPowerOf2(initialCapacity))) { | 2848 } else if (!dart.notNull(ListQueue$()._isPowerOf2(initialCapacity))) { |
2939 initialCapacity = ListQueue$()._nextPowerOf2(initialCapacity); | 2849 initialCapacity = ListQueue$()._nextPowerOf2(initialCapacity); |
2940 } | 2850 } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2973 this[_checkModification](modificationCount); | 2883 this[_checkModification](modificationCount); |
2974 } | 2884 } |
2975 } | 2885 } |
2976 get isEmpty() { | 2886 get isEmpty() { |
2977 return this[_head] == this[_tail]; | 2887 return this[_head] == this[_tail]; |
2978 } | 2888 } |
2979 get length() { | 2889 get length() { |
2980 return dart.notNull(this[_tail]) - dart.notNull(this[_head]) & dart.notN
ull(this[_table][dartx.length]) - 1; | 2890 return dart.notNull(this[_tail]) - dart.notNull(this[_head]) & dart.notN
ull(this[_table][dartx.length]) - 1; |
2981 } | 2891 } |
2982 get first() { | 2892 get first() { |
2983 if (this[_head] == this[_tail]) | 2893 if (this[_head] == this[_tail]) dart.throw(_internal.IterableElementErro
r.noElement()); |
2984 dart.throw(_internal.IterableElementError.noElement()); | |
2985 return this[_table][dartx.get](this[_head]); | 2894 return this[_table][dartx.get](this[_head]); |
2986 } | 2895 } |
2987 get last() { | 2896 get last() { |
2988 if (this[_head] == this[_tail]) | 2897 if (this[_head] == this[_tail]) dart.throw(_internal.IterableElementErro
r.noElement()); |
2989 dart.throw(_internal.IterableElementError.noElement()); | |
2990 return this[_table][dartx.get](dart.notNull(this[_tail]) - 1 & dart.notN
ull(this[_table][dartx.length]) - 1); | 2898 return this[_table][dartx.get](dart.notNull(this[_tail]) - 1 & dart.notN
ull(this[_table][dartx.length]) - 1); |
2991 } | 2899 } |
2992 get single() { | 2900 get single() { |
2993 if (this[_head] == this[_tail]) | 2901 if (this[_head] == this[_tail]) dart.throw(_internal.IterableElementErro
r.noElement()); |
2994 dart.throw(_internal.IterableElementError.noElement()); | 2902 if (dart.notNull(this.length) > 1) dart.throw(_internal.IterableElementE
rror.tooMany()); |
2995 if (dart.notNull(this.length) > 1) | |
2996 dart.throw(_internal.IterableElementError.tooMany()); | |
2997 return this[_table][dartx.get](this[_head]); | 2903 return this[_table][dartx.get](this[_head]); |
2998 } | 2904 } |
2999 elementAt(index) { | 2905 elementAt(index) { |
3000 core.RangeError.checkValidIndex(index, this); | 2906 core.RangeError.checkValidIndex(index, this); |
3001 return this[_table][dartx.get](dart.notNull(this[_head]) + dart.notNull(
index) & dart.notNull(this[_table][dartx.length]) - 1); | 2907 return this[_table][dartx.get](dart.notNull(this[_head]) + dart.notNull(
index) & dart.notNull(this[_table][dartx.length]) - 1); |
3002 } | 2908 } |
3003 toList(opts) { | 2909 toList(opts) { |
3004 let growable = opts && 'growable' in opts ? opts.growable : true; | 2910 let growable = opts && 'growable' in opts ? opts.growable : true; |
3005 let list = null; | 2911 let list = null; |
3006 if (dart.notNull(growable)) { | 2912 if (dart.notNull(growable)) { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3093 return IterableBase.iterableToFullString(this, "{", "}"); | 2999 return IterableBase.iterableToFullString(this, "{", "}"); |
3094 } | 3000 } |
3095 addLast(element) { | 3001 addLast(element) { |
3096 dart.as(element, E); | 3002 dart.as(element, E); |
3097 this[_add](element); | 3003 this[_add](element); |
3098 } | 3004 } |
3099 addFirst(element) { | 3005 addFirst(element) { |
3100 dart.as(element, E); | 3006 dart.as(element, E); |
3101 this[_head] = dart.notNull(this[_head]) - 1 & dart.notNull(this[_table][
dartx.length]) - 1; | 3007 this[_head] = dart.notNull(this[_head]) - 1 & dart.notNull(this[_table][
dartx.length]) - 1; |
3102 this[_table][dartx.set](this[_head], element); | 3008 this[_table][dartx.set](this[_head], element); |
3103 if (this[_head] == this[_tail]) | 3009 if (this[_head] == this[_tail]) this[_grow](); |
3104 this[_grow](); | |
3105 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 3010 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
3106 } | 3011 } |
3107 removeFirst() { | 3012 removeFirst() { |
3108 if (this[_head] == this[_tail]) | 3013 if (this[_head] == this[_tail]) dart.throw(_internal.IterableElementErro
r.noElement()); |
3109 dart.throw(_internal.IterableElementError.noElement()); | |
3110 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 3014 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
3111 let result = this[_table][dartx.get](this[_head]); | 3015 let result = this[_table][dartx.get](this[_head]); |
3112 this[_table][dartx.set](this[_head], null); | 3016 this[_table][dartx.set](this[_head], null); |
3113 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(this[_table][
dartx.length]) - 1; | 3017 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(this[_table][
dartx.length]) - 1; |
3114 return result; | 3018 return result; |
3115 } | 3019 } |
3116 removeLast() { | 3020 removeLast() { |
3117 if (this[_head] == this[_tail]) | 3021 if (this[_head] == this[_tail]) dart.throw(_internal.IterableElementErro
r.noElement()); |
3118 dart.throw(_internal.IterableElementError.noElement()); | |
3119 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 3022 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
3120 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table][
dartx.length]) - 1; | 3023 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table][
dartx.length]) - 1; |
3121 let result = this[_table][dartx.get](this[_tail]); | 3024 let result = this[_table][dartx.get](this[_tail]); |
3122 this[_table][dartx.set](this[_tail], null); | 3025 this[_table][dartx.set](this[_tail], null); |
3123 return result; | 3026 return result; |
3124 } | 3027 } |
3125 static _isPowerOf2(number) { | 3028 static _isPowerOf2(number) { |
3126 return (dart.notNull(number) & dart.notNull(number) - 1) == 0; | 3029 return (dart.notNull(number) & dart.notNull(number) - 1) == 0; |
3127 } | 3030 } |
3128 static _nextPowerOf2(number) { | 3031 static _nextPowerOf2(number) { |
3129 dart.assert(dart.notNull(number) > 0); | 3032 dart.assert(dart.notNull(number) > 0); |
3130 number = (dart.notNull(number) << 1) - 1; | 3033 number = (dart.notNull(number) << 1) - 1; |
3131 for (;;) { | 3034 for (;;) { |
3132 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1; | 3035 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1; |
3133 if (nextNumber == 0) | 3036 if (nextNumber == 0) return number; |
3134 return number; | |
3135 number = nextNumber; | 3037 number = nextNumber; |
3136 } | 3038 } |
3137 } | 3039 } |
3138 [_checkModification](expectedModificationCount) { | 3040 [_checkModification](expectedModificationCount) { |
3139 if (expectedModificationCount != this[_modificationCount]) { | 3041 if (expectedModificationCount != this[_modificationCount]) { |
3140 dart.throw(new core.ConcurrentModificationError(this)); | 3042 dart.throw(new core.ConcurrentModificationError(this)); |
3141 } | 3043 } |
3142 } | 3044 } |
3143 [_add](element) { | 3045 [_add](element) { |
3144 dart.as(element, E); | 3046 dart.as(element, E); |
3145 this[_table][dartx.set](this[_tail], element); | 3047 this[_table][dartx.set](this[_tail], element); |
3146 this[_tail] = dart.notNull(this[_tail]) + 1 & dart.notNull(this[_table][
dartx.length]) - 1; | 3048 this[_tail] = dart.notNull(this[_tail]) + 1 & dart.notNull(this[_table][
dartx.length]) - 1; |
3147 if (this[_head] == this[_tail]) | 3049 if (this[_head] == this[_tail]) this[_grow](); |
3148 this[_grow](); | |
3149 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 3050 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
3150 } | 3051 } |
3151 [_remove](offset) { | 3052 [_remove](offset) { |
3152 let mask = dart.notNull(this[_table][dartx.length]) - 1; | 3053 let mask = dart.notNull(this[_table][dartx.length]) - 1; |
3153 let startDistance = dart.notNull(offset) - dart.notNull(this[_head]) & d
art.notNull(mask); | 3054 let startDistance = dart.notNull(offset) - dart.notNull(this[_head]) & d
art.notNull(mask); |
3154 let endDistance = dart.notNull(this[_tail]) - dart.notNull(offset) & dar
t.notNull(mask); | 3055 let endDistance = dart.notNull(this[_tail]) - dart.notNull(offset) & dar
t.notNull(mask); |
3155 if (dart.notNull(startDistance) < dart.notNull(endDistance)) { | 3056 if (dart.notNull(startDistance) < dart.notNull(endDistance)) { |
3156 let i = offset; | 3057 let i = offset; |
3157 while (i != this[_head]) { | 3058 while (i != this[_head]) { |
3158 let prevOffset = dart.notNull(i) - 1 & dart.notNull(mask); | 3059 let prevOffset = dart.notNull(i) - 1 & dart.notNull(mask); |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3338 class _SplayTree extends core.Object { | 3239 class _SplayTree extends core.Object { |
3339 _SplayTree() { | 3240 _SplayTree() { |
3340 this[_dummy] = new (_SplayTreeNode$(K))(null); | 3241 this[_dummy] = new (_SplayTreeNode$(K))(null); |
3341 this[_root] = null; | 3242 this[_root] = null; |
3342 this[_count] = 0; | 3243 this[_count] = 0; |
3343 this[_modificationCount] = 0; | 3244 this[_modificationCount] = 0; |
3344 this[_splayCount] = 0; | 3245 this[_splayCount] = 0; |
3345 } | 3246 } |
3346 [_splay](key) { | 3247 [_splay](key) { |
3347 dart.as(key, K); | 3248 dart.as(key, K); |
3348 if (this[_root] == null) | 3249 if (this[_root] == null) return -1; |
3349 return -1; | |
3350 let left = this[_dummy]; | 3250 let left = this[_dummy]; |
3351 let right = this[_dummy]; | 3251 let right = this[_dummy]; |
3352 let current = this[_root]; | 3252 let current = this[_root]; |
3353 let comp = null; | 3253 let comp = null; |
3354 while (true) { | 3254 while (true) { |
3355 comp = this[_compare](current.key, key); | 3255 comp = this[_compare](current.key, key); |
3356 if (dart.notNull(comp) > 0) { | 3256 if (dart.notNull(comp) > 0) { |
3357 if (current.left == null) | 3257 if (current.left == null) break; |
3358 break; | |
3359 comp = this[_compare](current.left.key, key); | 3258 comp = this[_compare](current.left.key, key); |
3360 if (dart.notNull(comp) > 0) { | 3259 if (dart.notNull(comp) > 0) { |
3361 let tmp = current.left; | 3260 let tmp = current.left; |
3362 current.left = tmp.right; | 3261 current.left = tmp.right; |
3363 tmp.right = current; | 3262 tmp.right = current; |
3364 current = tmp; | 3263 current = tmp; |
3365 if (current.left == null) | 3264 if (current.left == null) break; |
3366 break; | |
3367 } | 3265 } |
3368 right.left = current; | 3266 right.left = current; |
3369 right = current; | 3267 right = current; |
3370 current = current.left; | 3268 current = current.left; |
3371 } else if (dart.notNull(comp) < 0) { | 3269 } else if (dart.notNull(comp) < 0) { |
3372 if (current.right == null) | 3270 if (current.right == null) break; |
3373 break; | |
3374 comp = this[_compare](current.right.key, key); | 3271 comp = this[_compare](current.right.key, key); |
3375 if (dart.notNull(comp) < 0) { | 3272 if (dart.notNull(comp) < 0) { |
3376 let tmp = current.right; | 3273 let tmp = current.right; |
3377 current.right = tmp.left; | 3274 current.right = tmp.left; |
3378 tmp.left = current; | 3275 tmp.left = current; |
3379 current = tmp; | 3276 current = tmp; |
3380 if (current.right == null) | 3277 if (current.right == null) break; |
3381 break; | |
3382 } | 3278 } |
3383 left.right = current; | 3279 left.right = current; |
3384 left = current; | 3280 left = current; |
3385 current = current.right; | 3281 current = current.right; |
3386 } else { | 3282 } else { |
3387 break; | 3283 break; |
3388 } | 3284 } |
3389 } | 3285 } |
3390 left.right = current.left; | 3286 left.right = current.left; |
3391 right.left = current.right; | 3287 right.left = current.right; |
(...skipping 22 matching lines...) Expand all Loading... |
3414 while (current.right != null) { | 3310 while (current.right != null) { |
3415 let right = current.right; | 3311 let right = current.right; |
3416 current.right = right.left; | 3312 current.right = right.left; |
3417 right.left = current; | 3313 right.left = current; |
3418 current = right; | 3314 current = right; |
3419 } | 3315 } |
3420 return dart.as(current, _SplayTreeNode$(K)); | 3316 return dart.as(current, _SplayTreeNode$(K)); |
3421 } | 3317 } |
3422 [_remove](key) { | 3318 [_remove](key) { |
3423 dart.as(key, K); | 3319 dart.as(key, K); |
3424 if (this[_root] == null) | 3320 if (this[_root] == null) return null; |
3425 return null; | |
3426 let comp = this[_splay](key); | 3321 let comp = this[_splay](key); |
3427 if (comp != 0) | 3322 if (comp != 0) return null; |
3428 return null; | |
3429 let result = this[_root]; | 3323 let result = this[_root]; |
3430 this[_count] = dart.notNull(this[_count]) - 1; | 3324 this[_count] = dart.notNull(this[_count]) - 1; |
3431 if (this[_root].left == null) { | 3325 if (this[_root].left == null) { |
3432 this[_root] = this[_root].right; | 3326 this[_root] = this[_root].right; |
3433 } else { | 3327 } else { |
3434 let right = this[_root].right; | 3328 let right = this[_root].right; |
3435 this[_root] = this[_splayMax](this[_root].left); | 3329 this[_root] = this[_splayMax](this[_root].left); |
3436 this[_root].right = right; | 3330 this[_root].right = right; |
3437 } | 3331 } |
3438 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 3332 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
(...skipping 12 matching lines...) Expand all Loading... |
3451 node.right = this[_root].right; | 3345 node.right = this[_root].right; |
3452 this[_root].right = null; | 3346 this[_root].right = null; |
3453 } else { | 3347 } else { |
3454 node.right = this[_root]; | 3348 node.right = this[_root]; |
3455 node.left = this[_root].left; | 3349 node.left = this[_root].left; |
3456 this[_root].left = null; | 3350 this[_root].left = null; |
3457 } | 3351 } |
3458 this[_root] = node; | 3352 this[_root] = node; |
3459 } | 3353 } |
3460 get [_first]() { | 3354 get [_first]() { |
3461 if (this[_root] == null) | 3355 if (this[_root] == null) return null; |
3462 return null; | |
3463 this[_root] = this[_splayMin](this[_root]); | 3356 this[_root] = this[_splayMin](this[_root]); |
3464 return this[_root]; | 3357 return this[_root]; |
3465 } | 3358 } |
3466 get [_last]() { | 3359 get [_last]() { |
3467 if (this[_root] == null) | 3360 if (this[_root] == null) return null; |
3468 return null; | |
3469 this[_root] = this[_splayMax](this[_root]); | 3361 this[_root] = this[_splayMax](this[_root]); |
3470 return this[_root]; | 3362 return this[_root]; |
3471 } | 3363 } |
3472 [_clear]() { | 3364 [_clear]() { |
3473 this[_root] = null; | 3365 this[_root] = null; |
3474 this[_count] = 0; | 3366 this[_count] = 0; |
3475 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 3367 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
3476 } | 3368 } |
3477 } | 3369 } |
3478 dart.setSignature(_SplayTree, { | 3370 dart.setSignature(_SplayTree, { |
3479 methods: () => ({ | 3371 methods: () => ({ |
3480 [_splay]: [core.int, [K]], | 3372 [_splay]: [core.int, [K]], |
3481 [_splayMin]: [_SplayTreeNode$(K), [_SplayTreeNode$(K)]], | 3373 [_splayMin]: [_SplayTreeNode$(K), [_SplayTreeNode$(K)]], |
3482 [_splayMax]: [_SplayTreeNode$(K), [_SplayTreeNode$(K)]], | 3374 [_splayMax]: [_SplayTreeNode$(K), [_SplayTreeNode$(K)]], |
3483 [_remove]: [_SplayTreeNode, [K]], | 3375 [_remove]: [_SplayTreeNode, [K]], |
3484 [_addNewRoot]: [dart.void, [_SplayTreeNode$(K), core.int]], | 3376 [_addNewRoot]: [dart.void, [_SplayTreeNode$(K), core.int]], |
3485 [_clear]: [dart.void, []] | 3377 [_clear]: [dart.void, []] |
3486 }) | 3378 }) |
3487 }); | 3379 }); |
3488 return _SplayTree; | 3380 return _SplayTree; |
3489 }); | 3381 }); |
3490 let _SplayTree = _SplayTree$(); | 3382 let _SplayTree = _SplayTree$(); |
3491 const _comparator = Symbol('_comparator'); | 3383 const _comparator = Symbol('_comparator'); |
3492 const _validKey = Symbol('_validKey'); | 3384 const _validKey = Symbol('_validKey'); |
3493 const SplayTreeMap$ = dart.generic(function(K, V) { | 3385 const SplayTreeMap$ = dart.generic(function(K, V) { |
3494 class SplayTreeMap extends _SplayTree$(K) { | 3386 class SplayTreeMap extends _SplayTree$(K) { |
3495 SplayTreeMap(compare, isValidKey) { | 3387 SplayTreeMap(compare, isValidKey) { |
3496 if (compare === void 0) | 3388 if (compare === void 0) compare = null; |
3497 compare = null; | 3389 if (isValidKey === void 0) isValidKey = null; |
3498 if (isValidKey === void 0) | |
3499 isValidKey = null; | |
3500 this[_comparator] = dart.as(compare == null ? core.Comparable.compare :
compare, core.Comparator$(K)); | 3390 this[_comparator] = dart.as(compare == null ? core.Comparable.compare :
compare, core.Comparator$(K)); |
3501 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is
(v, K), core.bool, [dart.dynamic]); | 3391 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is
(v, K), core.bool, [dart.dynamic]); |
3502 super._SplayTree(); | 3392 super._SplayTree(); |
3503 } | 3393 } |
3504 static from(other, compare, isValidKey) { | 3394 static from(other, compare, isValidKey) { |
3505 if (compare === void 0) | 3395 if (compare === void 0) compare = null; |
3506 compare = null; | 3396 if (isValidKey === void 0) isValidKey = null; |
3507 if (isValidKey === void 0) | |
3508 isValidKey = null; | |
3509 let result = new (SplayTreeMap$(K, V))(); | 3397 let result = new (SplayTreeMap$(K, V))(); |
3510 other.forEach(dart.fn((k, v) => { | 3398 other.forEach(dart.fn((k, v) => { |
3511 result.set(dart.as(k, K), dart.as(v, V)); | 3399 result.set(dart.as(k, K), dart.as(v, V)); |
3512 })); | 3400 })); |
3513 return result; | 3401 return result; |
3514 } | 3402 } |
3515 static fromIterable(iterable, opts) { | 3403 static fromIterable(iterable, opts) { |
3516 let key = opts && 'key' in opts ? opts.key : null; | 3404 let key = opts && 'key' in opts ? opts.key : null; |
3517 let value = opts && 'value' in opts ? opts.value : null; | 3405 let value = opts && 'value' in opts ? opts.value : null; |
3518 let compare = opts && 'compare' in opts ? opts.compare : null; | 3406 let compare = opts && 'compare' in opts ? opts.compare : null; |
3519 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; | 3407 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; |
3520 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); | 3408 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); |
3521 Maps._fillMapWithMappedIterable(map, iterable, key, value); | 3409 Maps._fillMapWithMappedIterable(map, iterable, key, value); |
3522 return map; | 3410 return map; |
3523 } | 3411 } |
3524 static fromIterables(keys, values, compare, isValidKey) { | 3412 static fromIterables(keys, values, compare, isValidKey) { |
3525 if (compare === void 0) | 3413 if (compare === void 0) compare = null; |
3526 compare = null; | 3414 if (isValidKey === void 0) isValidKey = null; |
3527 if (isValidKey === void 0) | |
3528 isValidKey = null; | |
3529 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); | 3415 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); |
3530 Maps._fillMapWithIterables(map, keys, values); | 3416 Maps._fillMapWithIterables(map, keys, values); |
3531 return map; | 3417 return map; |
3532 } | 3418 } |
3533 [_compare](key1, key2) { | 3419 [_compare](key1, key2) { |
3534 dart.as(key1, K); | 3420 dart.as(key1, K); |
3535 dart.as(key2, K); | 3421 dart.as(key2, K); |
3536 return this[_comparator](key1, key2); | 3422 return this[_comparator](key1, key2); |
3537 } | 3423 } |
3538 _internal() { | 3424 _internal() { |
3539 this[_comparator] = null; | 3425 this[_comparator] = null; |
3540 this[_validKey] = null; | 3426 this[_validKey] = null; |
3541 super._SplayTree(); | 3427 super._SplayTree(); |
3542 } | 3428 } |
3543 get(key) { | 3429 get(key) { |
3544 if (key == null) | 3430 if (key == null) dart.throw(new core.ArgumentError(key)); |
3545 dart.throw(new core.ArgumentError(key)); | 3431 if (!dart.notNull(this[_validKey](key))) return null; |
3546 if (!dart.notNull(this[_validKey](key))) | |
3547 return null; | |
3548 if (this[_root] != null) { | 3432 if (this[_root] != null) { |
3549 let comp = this[_splay](dart.as(key, K)); | 3433 let comp = this[_splay](dart.as(key, K)); |
3550 if (comp == 0) { | 3434 if (comp == 0) { |
3551 let mapRoot = dart.as(this[_root], _SplayTreeMapNode); | 3435 let mapRoot = dart.as(this[_root], _SplayTreeMapNode); |
3552 return dart.as(mapRoot.value, V); | 3436 return dart.as(mapRoot.value, V); |
3553 } | 3437 } |
3554 } | 3438 } |
3555 return null; | 3439 return null; |
3556 } | 3440 } |
3557 remove(key) { | 3441 remove(key) { |
3558 if (!dart.notNull(this[_validKey](key))) | 3442 if (!dart.notNull(this[_validKey](key))) return null; |
3559 return null; | |
3560 let mapRoot = dart.as(this[_remove](dart.as(key, K)), _SplayTreeMapNode)
; | 3443 let mapRoot = dart.as(this[_remove](dart.as(key, K)), _SplayTreeMapNode)
; |
3561 if (mapRoot != null) | 3444 if (mapRoot != null) return dart.as(mapRoot.value, V); |
3562 return dart.as(mapRoot.value, V); | |
3563 return null; | 3445 return null; |
3564 } | 3446 } |
3565 set(key, value) { | 3447 set(key, value) { |
3566 ((() => { | 3448 ((() => { |
3567 dart.as(key, K); | 3449 dart.as(key, K); |
3568 dart.as(value, V); | 3450 dart.as(value, V); |
3569 if (key == null) | 3451 if (key == null) dart.throw(new core.ArgumentError(key)); |
3570 dart.throw(new core.ArgumentError(key)); | |
3571 let comp = this[_splay](key); | 3452 let comp = this[_splay](key); |
3572 if (comp == 0) { | 3453 if (comp == 0) { |
3573 let mapRoot = dart.as(this[_root], _SplayTreeMapNode); | 3454 let mapRoot = dart.as(this[_root], _SplayTreeMapNode); |
3574 mapRoot.value = value; | 3455 mapRoot.value = value; |
3575 return; | 3456 return; |
3576 } | 3457 } |
3577 this[_addNewRoot](new (_SplayTreeMapNode$(K, dart.dynamic))(key, value
), comp); | 3458 this[_addNewRoot](new (_SplayTreeMapNode$(K, dart.dynamic))(key, value
), comp); |
3578 }).bind(this))(); | 3459 }).bind(this))(); |
3579 return value; | 3460 return value; |
3580 } | 3461 } |
3581 putIfAbsent(key, ifAbsent) { | 3462 putIfAbsent(key, ifAbsent) { |
3582 dart.as(key, K); | 3463 dart.as(key, K); |
3583 dart.as(ifAbsent, dart.functionType(V, [])); | 3464 dart.as(ifAbsent, dart.functionType(V, [])); |
3584 if (key == null) | 3465 if (key == null) dart.throw(new core.ArgumentError(key)); |
3585 dart.throw(new core.ArgumentError(key)); | |
3586 let comp = this[_splay](key); | 3466 let comp = this[_splay](key); |
3587 if (comp == 0) { | 3467 if (comp == 0) { |
3588 let mapRoot = dart.as(this[_root], _SplayTreeMapNode); | 3468 let mapRoot = dart.as(this[_root], _SplayTreeMapNode); |
3589 return dart.as(mapRoot.value, V); | 3469 return dart.as(mapRoot.value, V); |
3590 } | 3470 } |
3591 let modificationCount = this[_modificationCount]; | 3471 let modificationCount = this[_modificationCount]; |
3592 let splayCount = this[_splayCount]; | 3472 let splayCount = this[_splayCount]; |
3593 let value = ifAbsent(); | 3473 let value = ifAbsent(); |
3594 if (modificationCount != this[_modificationCount]) { | 3474 if (modificationCount != this[_modificationCount]) { |
3595 dart.throw(new core.ConcurrentModificationError(this)); | 3475 dart.throw(new core.ConcurrentModificationError(this)); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3630 this[_clear](); | 3510 this[_clear](); |
3631 } | 3511 } |
3632 containsKey(key) { | 3512 containsKey(key) { |
3633 return dart.notNull(this[_validKey](key)) && this[_splay](dart.as(key, K
)) == 0; | 3513 return dart.notNull(this[_validKey](key)) && this[_splay](dart.as(key, K
)) == 0; |
3634 } | 3514 } |
3635 containsValue(value) { | 3515 containsValue(value) { |
3636 let found = false; | 3516 let found = false; |
3637 let initialSplayCount = this[_splayCount]; | 3517 let initialSplayCount = this[_splayCount]; |
3638 const visit = (function(node) { | 3518 const visit = (function(node) { |
3639 while (node != null) { | 3519 while (node != null) { |
3640 if (dart.equals(node.value, value)) | 3520 if (dart.equals(node.value, value)) return true; |
3641 return true; | |
3642 if (initialSplayCount != this[_splayCount]) { | 3521 if (initialSplayCount != this[_splayCount]) { |
3643 dart.throw(new core.ConcurrentModificationError(this)); | 3522 dart.throw(new core.ConcurrentModificationError(this)); |
3644 } | 3523 } |
3645 if (node.right != null && dart.notNull(visit(dart.as(node.right, _Sp
layTreeMapNode)))) | 3524 if (node.right != null && dart.notNull(visit(dart.as(node.right, _Sp
layTreeMapNode)))) return true; |
3646 return true; | |
3647 node = dart.as(node.left, _SplayTreeMapNode); | 3525 node = dart.as(node.left, _SplayTreeMapNode); |
3648 } | 3526 } |
3649 return false; | 3527 return false; |
3650 }).bind(this); | 3528 }).bind(this); |
3651 dart.fn(visit, core.bool, [_SplayTreeMapNode]); | 3529 dart.fn(visit, core.bool, [_SplayTreeMapNode]); |
3652 return visit(dart.as(this[_root], _SplayTreeMapNode)); | 3530 return visit(dart.as(this[_root], _SplayTreeMapNode)); |
3653 } | 3531 } |
3654 get keys() { | 3532 get keys() { |
3655 return new (_SplayTreeKeyIterable$(K))(this); | 3533 return new (_SplayTreeKeyIterable$(K))(this); |
3656 } | 3534 } |
3657 get values() { | 3535 get values() { |
3658 return new (_SplayTreeValueIterable$(K, V))(this); | 3536 return new (_SplayTreeValueIterable$(K, V))(this); |
3659 } | 3537 } |
3660 toString() { | 3538 toString() { |
3661 return Maps.mapToString(this); | 3539 return Maps.mapToString(this); |
3662 } | 3540 } |
3663 firstKey() { | 3541 firstKey() { |
3664 if (this[_root] == null) | 3542 if (this[_root] == null) return null; |
3665 return null; | |
3666 return dart.as(this[_first].key, K); | 3543 return dart.as(this[_first].key, K); |
3667 } | 3544 } |
3668 lastKey() { | 3545 lastKey() { |
3669 if (this[_root] == null) | 3546 if (this[_root] == null) return null; |
3670 return null; | |
3671 return dart.as(this[_last].key, K); | 3547 return dart.as(this[_last].key, K); |
3672 } | 3548 } |
3673 lastKeyBefore(key) { | 3549 lastKeyBefore(key) { |
3674 dart.as(key, K); | 3550 dart.as(key, K); |
3675 if (key == null) | 3551 if (key == null) dart.throw(new core.ArgumentError(key)); |
3676 dart.throw(new core.ArgumentError(key)); | 3552 if (this[_root] == null) return null; |
3677 if (this[_root] == null) | |
3678 return null; | |
3679 let comp = this[_splay](key); | 3553 let comp = this[_splay](key); |
3680 if (dart.notNull(comp) < 0) | 3554 if (dart.notNull(comp) < 0) return this[_root].key; |
3681 return this[_root].key; | |
3682 let node = this[_root].left; | 3555 let node = this[_root].left; |
3683 if (node == null) | 3556 if (node == null) return null; |
3684 return null; | |
3685 while (node.right != null) { | 3557 while (node.right != null) { |
3686 node = node.right; | 3558 node = node.right; |
3687 } | 3559 } |
3688 return node.key; | 3560 return node.key; |
3689 } | 3561 } |
3690 firstKeyAfter(key) { | 3562 firstKeyAfter(key) { |
3691 dart.as(key, K); | 3563 dart.as(key, K); |
3692 if (key == null) | 3564 if (key == null) dart.throw(new core.ArgumentError(key)); |
3693 dart.throw(new core.ArgumentError(key)); | 3565 if (this[_root] == null) return null; |
3694 if (this[_root] == null) | |
3695 return null; | |
3696 let comp = this[_splay](key); | 3566 let comp = this[_splay](key); |
3697 if (dart.notNull(comp) > 0) | 3567 if (dart.notNull(comp) > 0) return this[_root].key; |
3698 return this[_root].key; | |
3699 let node = this[_root].right; | 3568 let node = this[_root].right; |
3700 if (node == null) | 3569 if (node == null) return null; |
3701 return null; | |
3702 while (node.left != null) { | 3570 while (node.left != null) { |
3703 node = node.left; | 3571 node = node.left; |
3704 } | 3572 } |
3705 return node.key; | 3573 return node.key; |
3706 } | 3574 } |
3707 } | 3575 } |
3708 SplayTreeMap[dart.implements] = () => [core.Map$(K, V)]; | 3576 SplayTreeMap[dart.implements] = () => [core.Map$(K, V)]; |
3709 dart.defineNamedConstructor(SplayTreeMap, '_internal'); | 3577 dart.defineNamedConstructor(SplayTreeMap, '_internal'); |
3710 dart.setSignature(SplayTreeMap, { | 3578 dart.setSignature(SplayTreeMap, { |
3711 constructors: () => ({ | 3579 constructors: () => ({ |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3750 this[_splayCount] = tree[_splayCount]; | 3618 this[_splayCount] = tree[_splayCount]; |
3751 this[_currentNode] = null; | 3619 this[_currentNode] = null; |
3752 this[_findLeftMostDescendent](tree[_root]); | 3620 this[_findLeftMostDescendent](tree[_root]); |
3753 } | 3621 } |
3754 startAt(tree, startKey) { | 3622 startAt(tree, startKey) { |
3755 this[_workList] = dart.list([], _SplayTreeNode); | 3623 this[_workList] = dart.list([], _SplayTreeNode); |
3756 this[_tree] = tree; | 3624 this[_tree] = tree; |
3757 this[_modificationCount] = tree[_modificationCount]; | 3625 this[_modificationCount] = tree[_modificationCount]; |
3758 this[_splayCount] = null; | 3626 this[_splayCount] = null; |
3759 this[_currentNode] = null; | 3627 this[_currentNode] = null; |
3760 if (tree[_root] == null) | 3628 if (tree[_root] == null) return; |
3761 return; | |
3762 let compare = tree[_splay](startKey); | 3629 let compare = tree[_splay](startKey); |
3763 this[_splayCount] = tree[_splayCount]; | 3630 this[_splayCount] = tree[_splayCount]; |
3764 if (dart.notNull(compare) < 0) { | 3631 if (dart.notNull(compare) < 0) { |
3765 this[_findLeftMostDescendent](tree[_root].right); | 3632 this[_findLeftMostDescendent](tree[_root].right); |
3766 } else { | 3633 } else { |
3767 this[_workList][dartx.add](tree[_root]); | 3634 this[_workList][dartx.add](tree[_root]); |
3768 } | 3635 } |
3769 } | 3636 } |
3770 get current() { | 3637 get current() { |
3771 if (this[_currentNode] == null) | 3638 if (this[_currentNode] == null) return null; |
3772 return null; | |
3773 return this[_getValue](dart.as(this[_currentNode], _SplayTreeMapNode)); | 3639 return this[_getValue](dart.as(this[_currentNode], _SplayTreeMapNode)); |
3774 } | 3640 } |
3775 [_findLeftMostDescendent](node) { | 3641 [_findLeftMostDescendent](node) { |
3776 while (node != null) { | 3642 while (node != null) { |
3777 this[_workList][dartx.add](node); | 3643 this[_workList][dartx.add](node); |
3778 node = node.left; | 3644 node = node.left; |
3779 } | 3645 } |
3780 } | 3646 } |
3781 [_rebuildWorkList](currentNode) { | 3647 [_rebuildWorkList](currentNode) { |
3782 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty])); | 3648 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty])); |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3930 }), | 3796 }), |
3931 methods: () => ({[_getValue]: [_SplayTreeNode$(K), [_SplayTreeNode]]}) | 3797 methods: () => ({[_getValue]: [_SplayTreeNode$(K), [_SplayTreeNode]]}) |
3932 }); | 3798 }); |
3933 return _SplayTreeNodeIterator; | 3799 return _SplayTreeNodeIterator; |
3934 }); | 3800 }); |
3935 let _SplayTreeNodeIterator = _SplayTreeNodeIterator$(); | 3801 let _SplayTreeNodeIterator = _SplayTreeNodeIterator$(); |
3936 const _clone = Symbol('_clone'); | 3802 const _clone = Symbol('_clone'); |
3937 const SplayTreeSet$ = dart.generic(function(E) { | 3803 const SplayTreeSet$ = dart.generic(function(E) { |
3938 class SplayTreeSet extends dart.mixin(_SplayTree$(E), IterableMixin$(E), Set
Mixin$(E)) { | 3804 class SplayTreeSet extends dart.mixin(_SplayTree$(E), IterableMixin$(E), Set
Mixin$(E)) { |
3939 SplayTreeSet(compare, isValidKey) { | 3805 SplayTreeSet(compare, isValidKey) { |
3940 if (compare === void 0) | 3806 if (compare === void 0) compare = null; |
3941 compare = null; | 3807 if (isValidKey === void 0) isValidKey = null; |
3942 if (isValidKey === void 0) | |
3943 isValidKey = null; | |
3944 this[_comparator] = dart.as(compare == null ? core.Comparable.compare :
compare, core.Comparator$(E)); | 3808 this[_comparator] = dart.as(compare == null ? core.Comparable.compare :
compare, core.Comparator$(E)); |
3945 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is
(v, E), core.bool, [dart.dynamic]); | 3809 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is
(v, E), core.bool, [dart.dynamic]); |
3946 super._SplayTree(); | 3810 super._SplayTree(); |
3947 } | 3811 } |
3948 static from(elements, compare, isValidKey) { | 3812 static from(elements, compare, isValidKey) { |
3949 if (compare === void 0) | 3813 if (compare === void 0) compare = null; |
3950 compare = null; | 3814 if (isValidKey === void 0) isValidKey = null; |
3951 if (isValidKey === void 0) | |
3952 isValidKey = null; | |
3953 let result = new (SplayTreeSet$(E))(compare, isValidKey); | 3815 let result = new (SplayTreeSet$(E))(compare, isValidKey); |
3954 for (let element of dart.as(elements, core.Iterable$(E))) { | 3816 for (let element of dart.as(elements, core.Iterable$(E))) { |
3955 result.add(element); | 3817 result.add(element); |
3956 } | 3818 } |
3957 return result; | 3819 return result; |
3958 } | 3820 } |
3959 [_compare](e1, e2) { | 3821 [_compare](e1, e2) { |
3960 dart.as(e1, E); | 3822 dart.as(e1, E); |
3961 dart.as(e2, E); | 3823 dart.as(e2, E); |
3962 return this[_comparator](e1, e2); | 3824 return this[_comparator](e1, e2); |
3963 } | 3825 } |
3964 get iterator() { | 3826 get iterator() { |
3965 return new (_SplayTreeKeyIterator$(E))(this); | 3827 return new (_SplayTreeKeyIterator$(E))(this); |
3966 } | 3828 } |
3967 get length() { | 3829 get length() { |
3968 return this[_count]; | 3830 return this[_count]; |
3969 } | 3831 } |
3970 get isEmpty() { | 3832 get isEmpty() { |
3971 return this[_root] == null; | 3833 return this[_root] == null; |
3972 } | 3834 } |
3973 get isNotEmpty() { | 3835 get isNotEmpty() { |
3974 return this[_root] != null; | 3836 return this[_root] != null; |
3975 } | 3837 } |
3976 get first() { | 3838 get first() { |
3977 if (this[_count] == 0) | 3839 if (this[_count] == 0) dart.throw(_internal.IterableElementError.noEleme
nt()); |
3978 dart.throw(_internal.IterableElementError.noElement()); | |
3979 return dart.as(this[_first].key, E); | 3840 return dart.as(this[_first].key, E); |
3980 } | 3841 } |
3981 get last() { | 3842 get last() { |
3982 if (this[_count] == 0) | 3843 if (this[_count] == 0) dart.throw(_internal.IterableElementError.noEleme
nt()); |
3983 dart.throw(_internal.IterableElementError.noElement()); | |
3984 return dart.as(this[_last].key, E); | 3844 return dart.as(this[_last].key, E); |
3985 } | 3845 } |
3986 get single() { | 3846 get single() { |
3987 if (this[_count] == 0) | 3847 if (this[_count] == 0) dart.throw(_internal.IterableElementError.noEleme
nt()); |
3988 dart.throw(_internal.IterableElementError.noElement()); | 3848 if (dart.notNull(this[_count]) > 1) dart.throw(_internal.IterableElement
Error.tooMany()); |
3989 if (dart.notNull(this[_count]) > 1) | |
3990 dart.throw(_internal.IterableElementError.tooMany()); | |
3991 return this[_root].key; | 3849 return this[_root].key; |
3992 } | 3850 } |
3993 contains(object) { | 3851 contains(object) { |
3994 return dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obj
ect, E)) == 0; | 3852 return dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obj
ect, E)) == 0; |
3995 } | 3853 } |
3996 add(element) { | 3854 add(element) { |
3997 dart.as(element, E); | 3855 dart.as(element, E); |
3998 let compare = this[_splay](element); | 3856 let compare = this[_splay](element); |
3999 if (compare == 0) | 3857 if (compare == 0) return false; |
4000 return false; | |
4001 this[_addNewRoot](new (_SplayTreeNode$(E))(element), compare); | 3858 this[_addNewRoot](new (_SplayTreeNode$(E))(element), compare); |
4002 return true; | 3859 return true; |
4003 } | 3860 } |
4004 remove(object) { | 3861 remove(object) { |
4005 if (!dart.notNull(this[_validKey](object))) | 3862 if (!dart.notNull(this[_validKey](object))) return false; |
4006 return false; | |
4007 return this[_remove](dart.as(object, E)) != null; | 3863 return this[_remove](dart.as(object, E)) != null; |
4008 } | 3864 } |
4009 addAll(elements) { | 3865 addAll(elements) { |
4010 dart.as(elements, core.Iterable$(E)); | 3866 dart.as(elements, core.Iterable$(E)); |
4011 for (let element of elements) { | 3867 for (let element of elements) { |
4012 let compare = this[_splay](element); | 3868 let compare = this[_splay](element); |
4013 if (compare != 0) { | 3869 if (compare != 0) { |
4014 this[_addNewRoot](new (_SplayTreeNode$(E))(element), compare); | 3870 this[_addNewRoot](new (_SplayTreeNode$(E))(element), compare); |
4015 } | 3871 } |
4016 } | 3872 } |
4017 } | 3873 } |
4018 removeAll(elements) { | 3874 removeAll(elements) { |
4019 for (let element of elements) { | 3875 for (let element of elements) { |
4020 if (dart.notNull(this[_validKey](element))) | 3876 if (dart.notNull(this[_validKey](element))) this[_remove](dart.as(elem
ent, E)); |
4021 this[_remove](dart.as(element, E)); | |
4022 } | 3877 } |
4023 } | 3878 } |
4024 retainAll(elements) { | 3879 retainAll(elements) { |
4025 let retainSet = new (SplayTreeSet$(E))(this[_comparator], this[_validKey
]); | 3880 let retainSet = new (SplayTreeSet$(E))(this[_comparator], this[_validKey
]); |
4026 let modificationCount = this[_modificationCount]; | 3881 let modificationCount = this[_modificationCount]; |
4027 for (let object of elements) { | 3882 for (let object of elements) { |
4028 if (modificationCount != this[_modificationCount]) { | 3883 if (modificationCount != this[_modificationCount]) { |
4029 dart.throw(new core.ConcurrentModificationError(this)); | 3884 dart.throw(new core.ConcurrentModificationError(this)); |
4030 } | 3885 } |
4031 if (dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obje
ct, E)) == 0) | 3886 if (dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obje
ct, E)) == 0) retainSet.add(this[_root].key); |
4032 retainSet.add(this[_root].key); | |
4033 } | 3887 } |
4034 if (retainSet[_count] != this[_count]) { | 3888 if (retainSet[_count] != this[_count]) { |
4035 this[_root] = retainSet[_root]; | 3889 this[_root] = retainSet[_root]; |
4036 this[_count] = retainSet[_count]; | 3890 this[_count] = retainSet[_count]; |
4037 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 3891 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
4038 } | 3892 } |
4039 } | 3893 } |
4040 lookup(object) { | 3894 lookup(object) { |
4041 if (!dart.notNull(this[_validKey](object))) | 3895 if (!dart.notNull(this[_validKey](object))) return null; |
4042 return null; | |
4043 let comp = this[_splay](dart.as(object, E)); | 3896 let comp = this[_splay](dart.as(object, E)); |
4044 if (comp != 0) | 3897 if (comp != 0) return null; |
4045 return null; | |
4046 return this[_root].key; | 3898 return this[_root].key; |
4047 } | 3899 } |
4048 intersection(other) { | 3900 intersection(other) { |
4049 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); | 3901 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); |
4050 for (let element of this) { | 3902 for (let element of this) { |
4051 if (dart.notNull(other.contains(element))) | 3903 if (dart.notNull(other.contains(element))) result.add(element); |
4052 result.add(element); | |
4053 } | 3904 } |
4054 return result; | 3905 return result; |
4055 } | 3906 } |
4056 difference(other) { | 3907 difference(other) { |
4057 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); | 3908 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); |
4058 for (let element of this) { | 3909 for (let element of this) { |
4059 if (!dart.notNull(other.contains(element))) | 3910 if (!dart.notNull(other.contains(element))) result.add(element); |
4060 result.add(element); | |
4061 } | 3911 } |
4062 return result; | 3912 return result; |
4063 } | 3913 } |
4064 union(other) { | 3914 union(other) { |
4065 dart.as(other, core.Set$(E)); | 3915 dart.as(other, core.Set$(E)); |
4066 let _ = this[_clone](); | 3916 let _ = this[_clone](); |
4067 _.addAll(other); | 3917 _.addAll(other); |
4068 return _; | 3918 return _; |
4069 } | 3919 } |
4070 [_clone]() { | 3920 [_clone]() { |
4071 let set = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); | 3921 let set = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); |
4072 set[_count] = this[_count]; | 3922 set[_count] = this[_count]; |
4073 set[_root] = this[_copyNode](this[_root]); | 3923 set[_root] = this[_copyNode](this[_root]); |
4074 return set; | 3924 return set; |
4075 } | 3925 } |
4076 [_copyNode](node) { | 3926 [_copyNode](node) { |
4077 dart.as(node, _SplayTreeNode$(E)); | 3927 dart.as(node, _SplayTreeNode$(E)); |
4078 if (node == null) | 3928 if (node == null) return null; |
4079 return null; | |
4080 let _ = new (_SplayTreeNode$(E))(node.key); | 3929 let _ = new (_SplayTreeNode$(E))(node.key); |
4081 _.left = this[_copyNode](node.left); | 3930 _.left = this[_copyNode](node.left); |
4082 _.right = this[_copyNode](node.right); | 3931 _.right = this[_copyNode](node.right); |
4083 return _; | 3932 return _; |
4084 } | 3933 } |
4085 clear() { | 3934 clear() { |
4086 this[_clear](); | 3935 this[_clear](); |
4087 } | 3936 } |
4088 toSet() { | 3937 toSet() { |
4089 return this[_clone](); | 3938 return this[_clone](); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4168 return strings == null ? false : _HashMap$()._hasTableEntry(strings, k
ey); | 4017 return strings == null ? false : _HashMap$()._hasTableEntry(strings, k
ey); |
4169 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) { | 4018 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) { |
4170 let nums = this[_nums]; | 4019 let nums = this[_nums]; |
4171 return nums == null ? false : _HashMap$()._hasTableEntry(nums, key); | 4020 return nums == null ? false : _HashMap$()._hasTableEntry(nums, key); |
4172 } else { | 4021 } else { |
4173 return this[_containsKey](key); | 4022 return this[_containsKey](key); |
4174 } | 4023 } |
4175 } | 4024 } |
4176 [_containsKey](key) { | 4025 [_containsKey](key) { |
4177 let rest = this[_rest]; | 4026 let rest = this[_rest]; |
4178 if (rest == null) | 4027 if (rest == null) return false; |
4179 return false; | |
4180 let bucket = this[_getBucket](rest, key); | 4028 let bucket = this[_getBucket](rest, key); |
4181 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; | 4029 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; |
4182 } | 4030 } |
4183 containsValue(value) { | 4031 containsValue(value) { |
4184 return this[_computeKeys]()[dartx.any](dart.fn((each => dart.equals(this
.get(each), value)).bind(this), core.bool, [dart.dynamic])); | 4032 return this[_computeKeys]()[dartx.any](dart.fn((each => dart.equals(this
.get(each), value)).bind(this), core.bool, [dart.dynamic])); |
4185 } | 4033 } |
4186 addAll(other) { | 4034 addAll(other) { |
4187 dart.as(other, core.Map$(K, V)); | 4035 dart.as(other, core.Map$(K, V)); |
4188 other.forEach(dart.fn(((key, value) => { | 4036 other.forEach(dart.fn(((key, value) => { |
4189 dart.as(key, K); | 4037 dart.as(key, K); |
4190 dart.as(value, V); | 4038 dart.as(value, V); |
4191 this.set(key, value); | 4039 this.set(key, value); |
4192 }).bind(this), dart.dynamic, [K, V])); | 4040 }).bind(this), dart.dynamic, [K, V])); |
4193 } | 4041 } |
4194 get(key) { | 4042 get(key) { |
4195 if (dart.notNull(_HashMap$()._isStringKey(key))) { | 4043 if (dart.notNull(_HashMap$()._isStringKey(key))) { |
4196 let strings = this[_strings]; | 4044 let strings = this[_strings]; |
4197 return strings == null ? null : dart.as(_HashMap$()._getTableEntry(str
ings, key), V); | 4045 return strings == null ? null : dart.as(_HashMap$()._getTableEntry(str
ings, key), V); |
4198 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) { | 4046 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) { |
4199 let nums = this[_nums]; | 4047 let nums = this[_nums]; |
4200 return nums == null ? null : dart.as(_HashMap$()._getTableEntry(nums,
key), V); | 4048 return nums == null ? null : dart.as(_HashMap$()._getTableEntry(nums,
key), V); |
4201 } else { | 4049 } else { |
4202 return this[_get](key); | 4050 return this[_get](key); |
4203 } | 4051 } |
4204 } | 4052 } |
4205 [_get](key) { | 4053 [_get](key) { |
4206 let rest = this[_rest]; | 4054 let rest = this[_rest]; |
4207 if (rest == null) | 4055 if (rest == null) return null; |
4208 return null; | |
4209 let bucket = this[_getBucket](rest, key); | 4056 let bucket = this[_getBucket](rest, key); |
4210 let index = this[_findBucketIndex](bucket, key); | 4057 let index = this[_findBucketIndex](bucket, key); |
4211 return dart.notNull(index) < 0 ? null : dart.as(bucket[dart.notNull(inde
x) + 1], V); | 4058 return dart.notNull(index) < 0 ? null : dart.as(bucket[dart.notNull(inde
x) + 1], V); |
4212 } | 4059 } |
4213 set(key, value) { | 4060 set(key, value) { |
4214 dart.as(key, K); | 4061 dart.as(key, K); |
4215 dart.as(value, V); | 4062 dart.as(value, V); |
4216 if (dart.notNull(_HashMap$()._isStringKey(key))) { | 4063 if (dart.notNull(_HashMap$()._isStringKey(key))) { |
4217 let strings = this[_strings]; | 4064 let strings = this[_strings]; |
4218 if (strings == null) | 4065 if (strings == null) this[_strings] = strings = _HashMap$()._newHashTa
ble(); |
4219 this[_strings] = strings = _HashMap$()._newHashTable(); | |
4220 this[_addHashTableEntry](strings, key, value); | 4066 this[_addHashTableEntry](strings, key, value); |
4221 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) { | 4067 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) { |
4222 let nums = this[_nums]; | 4068 let nums = this[_nums]; |
4223 if (nums == null) | 4069 if (nums == null) this[_nums] = nums = _HashMap$()._newHashTable(); |
4224 this[_nums] = nums = _HashMap$()._newHashTable(); | |
4225 this[_addHashTableEntry](nums, key, value); | 4070 this[_addHashTableEntry](nums, key, value); |
4226 } else { | 4071 } else { |
4227 this[_set](key, value); | 4072 this[_set](key, value); |
4228 } | 4073 } |
4229 return value; | 4074 return value; |
4230 } | 4075 } |
4231 [_set](key, value) { | 4076 [_set](key, value) { |
4232 dart.as(key, K); | 4077 dart.as(key, K); |
4233 dart.as(value, V); | 4078 dart.as(value, V); |
4234 let rest = this[_rest]; | 4079 let rest = this[_rest]; |
4235 if (rest == null) | 4080 if (rest == null) this[_rest] = rest = _HashMap$()._newHashTable(); |
4236 this[_rest] = rest = _HashMap$()._newHashTable(); | |
4237 let hash = this[_computeHashCode](key); | 4081 let hash = this[_computeHashCode](key); |
4238 let bucket = rest[hash]; | 4082 let bucket = rest[hash]; |
4239 if (bucket == null) { | 4083 if (bucket == null) { |
4240 _HashMap$()._setTableEntry(rest, hash, [key, value]); | 4084 _HashMap$()._setTableEntry(rest, hash, [key, value]); |
4241 this[_length] = dart.notNull(this[_length]) + 1; | 4085 this[_length] = dart.notNull(this[_length]) + 1; |
4242 this[_keys] = null; | 4086 this[_keys] = null; |
4243 } else { | 4087 } else { |
4244 let index = this[_findBucketIndex](bucket, key); | 4088 let index = this[_findBucketIndex](bucket, key); |
4245 if (dart.notNull(index) >= 0) { | 4089 if (dart.notNull(index) >= 0) { |
4246 bucket[dart.notNull(index) + 1] = value; | 4090 bucket[dart.notNull(index) + 1] = value; |
4247 } else { | 4091 } else { |
4248 bucket.push(key, value); | 4092 bucket.push(key, value); |
4249 this[_length] = dart.notNull(this[_length]) + 1; | 4093 this[_length] = dart.notNull(this[_length]) + 1; |
4250 this[_keys] = null; | 4094 this[_keys] = null; |
4251 } | 4095 } |
4252 } | 4096 } |
4253 } | 4097 } |
4254 putIfAbsent(key, ifAbsent) { | 4098 putIfAbsent(key, ifAbsent) { |
4255 dart.as(key, K); | 4099 dart.as(key, K); |
4256 dart.as(ifAbsent, dart.functionType(V, [])); | 4100 dart.as(ifAbsent, dart.functionType(V, [])); |
4257 if (dart.notNull(this.containsKey(key))) | 4101 if (dart.notNull(this.containsKey(key))) return this.get(key); |
4258 return this.get(key); | |
4259 let value = ifAbsent(); | 4102 let value = ifAbsent(); |
4260 this.set(key, value); | 4103 this.set(key, value); |
4261 return value; | 4104 return value; |
4262 } | 4105 } |
4263 remove(key) { | 4106 remove(key) { |
4264 if (dart.notNull(_HashMap$()._isStringKey(key))) { | 4107 if (dart.notNull(_HashMap$()._isStringKey(key))) { |
4265 return this[_removeHashTableEntry](this[_strings], key); | 4108 return this[_removeHashTableEntry](this[_strings], key); |
4266 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) { | 4109 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) { |
4267 return this[_removeHashTableEntry](this[_nums], key); | 4110 return this[_removeHashTableEntry](this[_nums], key); |
4268 } else { | 4111 } else { |
4269 return this[_remove](key); | 4112 return this[_remove](key); |
4270 } | 4113 } |
4271 } | 4114 } |
4272 [_remove](key) { | 4115 [_remove](key) { |
4273 let rest = this[_rest]; | 4116 let rest = this[_rest]; |
4274 if (rest == null) | 4117 if (rest == null) return null; |
4275 return null; | |
4276 let bucket = this[_getBucket](rest, key); | 4118 let bucket = this[_getBucket](rest, key); |
4277 let index = this[_findBucketIndex](bucket, key); | 4119 let index = this[_findBucketIndex](bucket, key); |
4278 if (dart.notNull(index) < 0) | 4120 if (dart.notNull(index) < 0) return null; |
4279 return null; | |
4280 this[_length] = dart.notNull(this[_length]) - 1; | 4121 this[_length] = dart.notNull(this[_length]) - 1; |
4281 this[_keys] = null; | 4122 this[_keys] = null; |
4282 return dart.as(bucket.splice(index, 2)[1], V); | 4123 return dart.as(bucket.splice(index, 2)[1], V); |
4283 } | 4124 } |
4284 clear() { | 4125 clear() { |
4285 if (dart.notNull(this[_length]) > 0) { | 4126 if (dart.notNull(this[_length]) > 0) { |
4286 this[_strings] = this[_nums] = this[_rest] = this[_keys] = null; | 4127 this[_strings] = this[_nums] = this[_rest] = this[_keys] = null; |
4287 this[_length] = 0; | 4128 this[_length] = 0; |
4288 } | 4129 } |
4289 } | 4130 } |
4290 forEach(action) { | 4131 forEach(action) { |
4291 dart.as(action, dart.functionType(dart.void, [K, V])); | 4132 dart.as(action, dart.functionType(dart.void, [K, V])); |
4292 let keys = this[_computeKeys](); | 4133 let keys = this[_computeKeys](); |
4293 for (let i = 0, length = keys[dartx.length]; dart.notNull(i) < dart.notN
ull(length); i = dart.notNull(i) + 1) { | 4134 for (let i = 0, length = keys[dartx.length]; dart.notNull(i) < dart.notN
ull(length); i = dart.notNull(i) + 1) { |
4294 let key = keys[i]; | 4135 let key = keys[i]; |
4295 action(dart.as(key, K), this.get(key)); | 4136 action(dart.as(key, K), this.get(key)); |
4296 if (keys !== this[_keys]) { | 4137 if (keys !== this[_keys]) { |
4297 dart.throw(new core.ConcurrentModificationError(this)); | 4138 dart.throw(new core.ConcurrentModificationError(this)); |
4298 } | 4139 } |
4299 } | 4140 } |
4300 } | 4141 } |
4301 [_computeKeys]() { | 4142 [_computeKeys]() { |
4302 if (this[_keys] != null) | 4143 if (this[_keys] != null) return this[_keys]; |
4303 return this[_keys]; | |
4304 let result = core.List.new(this[_length]); | 4144 let result = core.List.new(this[_length]); |
4305 let index = 0; | 4145 let index = 0; |
4306 let strings = this[_strings]; | 4146 let strings = this[_strings]; |
4307 if (strings != null) { | 4147 if (strings != null) { |
4308 let names = Object.getOwnPropertyNames(strings); | 4148 let names = Object.getOwnPropertyNames(strings); |
4309 let entries = names.length; | 4149 let entries = names.length; |
4310 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN
ull(i) + 1) { | 4150 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN
ull(i) + 1) { |
4311 let key = names[i]; | 4151 let key = names[i]; |
4312 result[index] = key; | 4152 result[index] = key; |
4313 index = dart.notNull(index) + 1; | 4153 index = dart.notNull(index) + 1; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4386 } | 4226 } |
4387 } | 4227 } |
4388 static _deleteTableEntry(table, key) { | 4228 static _deleteTableEntry(table, key) { |
4389 delete table[key]; | 4229 delete table[key]; |
4390 } | 4230 } |
4391 [_getBucket](table, key) { | 4231 [_getBucket](table, key) { |
4392 let hash = this[_computeHashCode](key); | 4232 let hash = this[_computeHashCode](key); |
4393 return dart.as(table[hash], core.List); | 4233 return dart.as(table[hash], core.List); |
4394 } | 4234 } |
4395 [_findBucketIndex](bucket, key) { | 4235 [_findBucketIndex](bucket, key) { |
4396 if (bucket == null) | 4236 if (bucket == null) return -1; |
4397 return -1; | |
4398 let length = bucket.length; | 4237 let length = bucket.length; |
4399 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { | 4238 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { |
4400 if (dart.equals(bucket[i], key)) | 4239 if (dart.equals(bucket[i], key)) return i; |
4401 return i; | |
4402 } | 4240 } |
4403 return -1; | 4241 return -1; |
4404 } | 4242 } |
4405 static _newHashTable() { | 4243 static _newHashTable() { |
4406 let table = Object.create(null); | 4244 let table = Object.create(null); |
4407 let temporaryKey = '<non-identifier-key>'; | 4245 let temporaryKey = '<non-identifier-key>'; |
4408 _HashMap$()._setTableEntry(table, temporaryKey, table); | 4246 _HashMap$()._setTableEntry(table, temporaryKey, table); |
4409 _HashMap$()._deleteTableEntry(table, temporaryKey); | 4247 _HashMap$()._deleteTableEntry(table, temporaryKey); |
4410 return table; | 4248 return table; |
4411 } | 4249 } |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4450 let _HashMap = _HashMap$(); | 4288 let _HashMap = _HashMap$(); |
4451 const _IdentityHashMap$ = dart.generic(function(K, V) { | 4289 const _IdentityHashMap$ = dart.generic(function(K, V) { |
4452 class _IdentityHashMap extends _HashMap$(K, V) { | 4290 class _IdentityHashMap extends _HashMap$(K, V) { |
4453 _IdentityHashMap() { | 4291 _IdentityHashMap() { |
4454 super._HashMap(); | 4292 super._HashMap(); |
4455 } | 4293 } |
4456 [_computeHashCode](key) { | 4294 [_computeHashCode](key) { |
4457 return core.identityHashCode(key) & 0x3ffffff; | 4295 return core.identityHashCode(key) & 0x3ffffff; |
4458 } | 4296 } |
4459 [_findBucketIndex](bucket, key) { | 4297 [_findBucketIndex](bucket, key) { |
4460 if (bucket == null) | 4298 if (bucket == null) return -1; |
4461 return -1; | |
4462 let length = bucket.length; | 4299 let length = bucket.length; |
4463 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { | 4300 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { |
4464 if (dart.notNull(core.identical(bucket[i], key))) | 4301 if (dart.notNull(core.identical(bucket[i], key))) return i; |
4465 return i; | |
4466 } | 4302 } |
4467 return -1; | 4303 return -1; |
4468 } | 4304 } |
4469 } | 4305 } |
4470 return _IdentityHashMap; | 4306 return _IdentityHashMap; |
4471 }); | 4307 }); |
4472 let _IdentityHashMap = _IdentityHashMap$(); | 4308 let _IdentityHashMap = _IdentityHashMap$(); |
4473 const _equals = Symbol('_equals'); | 4309 const _equals = Symbol('_equals'); |
4474 const _hashCode = Symbol('_hashCode'); | 4310 const _hashCode = Symbol('_hashCode'); |
4475 const _CustomHashMap$ = dart.generic(function(K, V) { | 4311 const _CustomHashMap$ = dart.generic(function(K, V) { |
4476 class _CustomHashMap extends _HashMap$(K, V) { | 4312 class _CustomHashMap extends _HashMap$(K, V) { |
4477 _CustomHashMap(equals, hashCode, validKey) { | 4313 _CustomHashMap(equals, hashCode, validKey) { |
4478 this[_equals] = equals; | 4314 this[_equals] = equals; |
4479 this[_hashCode] = hashCode; | 4315 this[_hashCode] = hashCode; |
4480 this[_validKey] = validKey != null ? validKey : dart.fn(v => dart.is(v,
K), core.bool, [dart.dynamic]); | 4316 this[_validKey] = validKey != null ? validKey : dart.fn(v => dart.is(v,
K), core.bool, [dart.dynamic]); |
4481 super._HashMap(); | 4317 super._HashMap(); |
4482 } | 4318 } |
4483 get(key) { | 4319 get(key) { |
4484 if (!dart.notNull(this[_validKey](key))) | 4320 if (!dart.notNull(this[_validKey](key))) return null; |
4485 return null; | |
4486 return super[_get](key); | 4321 return super[_get](key); |
4487 } | 4322 } |
4488 set(key, value) { | 4323 set(key, value) { |
4489 dart.as(key, K); | 4324 dart.as(key, K); |
4490 dart.as(value, V); | 4325 dart.as(value, V); |
4491 super[_set](key, value); | 4326 super[_set](key, value); |
4492 return value; | 4327 return value; |
4493 } | 4328 } |
4494 containsKey(key) { | 4329 containsKey(key) { |
4495 if (!dart.notNull(this[_validKey](key))) | 4330 if (!dart.notNull(this[_validKey](key))) return false; |
4496 return false; | |
4497 return super[_containsKey](key); | 4331 return super[_containsKey](key); |
4498 } | 4332 } |
4499 remove(key) { | 4333 remove(key) { |
4500 if (!dart.notNull(this[_validKey](key))) | 4334 if (!dart.notNull(this[_validKey](key))) return null; |
4501 return null; | |
4502 return super[_remove](key); | 4335 return super[_remove](key); |
4503 } | 4336 } |
4504 [_computeHashCode](key) { | 4337 [_computeHashCode](key) { |
4505 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; | 4338 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; |
4506 } | 4339 } |
4507 [_findBucketIndex](bucket, key) { | 4340 [_findBucketIndex](bucket, key) { |
4508 if (bucket == null) | 4341 if (bucket == null) return -1; |
4509 return -1; | |
4510 let length = bucket.length; | 4342 let length = bucket.length; |
4511 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { | 4343 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { |
4512 if (dart.notNull(this[_equals](dart.as(bucket[i], K), dart.as(key, K))
)) | 4344 if (dart.notNull(this[_equals](dart.as(bucket[i], K), dart.as(key, K))
)) return i; |
4513 return i; | |
4514 } | 4345 } |
4515 return -1; | 4346 return -1; |
4516 } | 4347 } |
4517 toString() { | 4348 toString() { |
4518 return Maps.mapToString(this); | 4349 return Maps.mapToString(this); |
4519 } | 4350 } |
4520 } | 4351 } |
4521 dart.setSignature(_CustomHashMap, { | 4352 dart.setSignature(_CustomHashMap, { |
4522 constructors: () => ({_CustomHashMap: [_CustomHashMap$(K, V), [_Equality$(
K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}), | 4353 constructors: () => ({_CustomHashMap: [_CustomHashMap$(K, V), [_Equality$(
K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}), |
4523 methods: () => ({ | 4354 methods: () => ({ |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4636 } | 4467 } |
4637 get keys() { | 4468 get keys() { |
4638 return new (LinkedHashMapKeyIterable$(K))(this); | 4469 return new (LinkedHashMapKeyIterable$(K))(this); |
4639 } | 4470 } |
4640 get values() { | 4471 get values() { |
4641 return _internal.MappedIterable$(K, V).new(this.keys, dart.fn((each => t
his.get(each)).bind(this), V, [dart.dynamic])); | 4472 return _internal.MappedIterable$(K, V).new(this.keys, dart.fn((each => t
his.get(each)).bind(this), V, [dart.dynamic])); |
4642 } | 4473 } |
4643 containsKey(key) { | 4474 containsKey(key) { |
4644 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { | 4475 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { |
4645 let strings = this[_strings]; | 4476 let strings = this[_strings]; |
4646 if (strings == null) | 4477 if (strings == null) return false; |
4647 return false; | |
4648 let cell = dart.as(_LinkedHashMap$()._getTableEntry(strings, key), Lin
kedHashMapCell); | 4478 let cell = dart.as(_LinkedHashMap$()._getTableEntry(strings, key), Lin
kedHashMapCell); |
4649 return cell != null; | 4479 return cell != null; |
4650 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { | 4480 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { |
4651 let nums = this[_nums]; | 4481 let nums = this[_nums]; |
4652 if (nums == null) | 4482 if (nums == null) return false; |
4653 return false; | |
4654 let cell = dart.as(_LinkedHashMap$()._getTableEntry(nums, key), Linked
HashMapCell); | 4483 let cell = dart.as(_LinkedHashMap$()._getTableEntry(nums, key), Linked
HashMapCell); |
4655 return cell != null; | 4484 return cell != null; |
4656 } else { | 4485 } else { |
4657 return this[_containsKey](key); | 4486 return this[_containsKey](key); |
4658 } | 4487 } |
4659 } | 4488 } |
4660 [_containsKey](key) { | 4489 [_containsKey](key) { |
4661 let rest = this[_rest]; | 4490 let rest = this[_rest]; |
4662 if (rest == null) | 4491 if (rest == null) return false; |
4663 return false; | |
4664 let bucket = this[_getBucket](rest, key); | 4492 let bucket = this[_getBucket](rest, key); |
4665 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; | 4493 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; |
4666 } | 4494 } |
4667 containsValue(value) { | 4495 containsValue(value) { |
4668 return this.keys[dartx.any](dart.fn((each => dart.equals(this.get(each),
value)).bind(this), core.bool, [dart.dynamic])); | 4496 return this.keys[dartx.any](dart.fn((each => dart.equals(this.get(each),
value)).bind(this), core.bool, [dart.dynamic])); |
4669 } | 4497 } |
4670 addAll(other) { | 4498 addAll(other) { |
4671 dart.as(other, core.Map$(K, V)); | 4499 dart.as(other, core.Map$(K, V)); |
4672 other.forEach(dart.fn(((key, value) => { | 4500 other.forEach(dart.fn(((key, value) => { |
4673 dart.as(key, K); | 4501 dart.as(key, K); |
4674 dart.as(value, V); | 4502 dart.as(value, V); |
4675 this.set(key, value); | 4503 this.set(key, value); |
4676 }).bind(this), dart.dynamic, [K, V])); | 4504 }).bind(this), dart.dynamic, [K, V])); |
4677 } | 4505 } |
4678 get(key) { | 4506 get(key) { |
4679 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { | 4507 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { |
4680 let strings = this[_strings]; | 4508 let strings = this[_strings]; |
4681 if (strings == null) | 4509 if (strings == null) return null; |
4682 return null; | |
4683 let cell = dart.as(_LinkedHashMap$()._getTableEntry(strings, key), Lin
kedHashMapCell); | 4510 let cell = dart.as(_LinkedHashMap$()._getTableEntry(strings, key), Lin
kedHashMapCell); |
4684 return cell == null ? null : dart.as(cell[_value], V); | 4511 return cell == null ? null : dart.as(cell[_value], V); |
4685 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { | 4512 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { |
4686 let nums = this[_nums]; | 4513 let nums = this[_nums]; |
4687 if (nums == null) | 4514 if (nums == null) return null; |
4688 return null; | |
4689 let cell = dart.as(_LinkedHashMap$()._getTableEntry(nums, key), Linked
HashMapCell); | 4515 let cell = dart.as(_LinkedHashMap$()._getTableEntry(nums, key), Linked
HashMapCell); |
4690 return cell == null ? null : dart.as(cell[_value], V); | 4516 return cell == null ? null : dart.as(cell[_value], V); |
4691 } else { | 4517 } else { |
4692 return this[_get](key); | 4518 return this[_get](key); |
4693 } | 4519 } |
4694 } | 4520 } |
4695 [_get](key) { | 4521 [_get](key) { |
4696 let rest = this[_rest]; | 4522 let rest = this[_rest]; |
4697 if (rest == null) | 4523 if (rest == null) return null; |
4698 return null; | |
4699 let bucket = this[_getBucket](rest, key); | 4524 let bucket = this[_getBucket](rest, key); |
4700 let index = this[_findBucketIndex](bucket, key); | 4525 let index = this[_findBucketIndex](bucket, key); |
4701 if (dart.notNull(index) < 0) | 4526 if (dart.notNull(index) < 0) return null; |
4702 return null; | |
4703 let cell = dart.as(bucket[index], LinkedHashMapCell); | 4527 let cell = dart.as(bucket[index], LinkedHashMapCell); |
4704 return dart.as(cell[_value], V); | 4528 return dart.as(cell[_value], V); |
4705 } | 4529 } |
4706 set(key, value) { | 4530 set(key, value) { |
4707 dart.as(key, K); | 4531 dart.as(key, K); |
4708 dart.as(value, V); | 4532 dart.as(value, V); |
4709 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { | 4533 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { |
4710 let strings = this[_strings]; | 4534 let strings = this[_strings]; |
4711 if (strings == null) | 4535 if (strings == null) this[_strings] = strings = _LinkedHashMap$()._new
HashTable(); |
4712 this[_strings] = strings = _LinkedHashMap$()._newHashTable(); | |
4713 this[_addHashTableEntry](strings, key, value); | 4536 this[_addHashTableEntry](strings, key, value); |
4714 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { | 4537 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { |
4715 let nums = this[_nums]; | 4538 let nums = this[_nums]; |
4716 if (nums == null) | 4539 if (nums == null) this[_nums] = nums = _LinkedHashMap$()._newHashTable
(); |
4717 this[_nums] = nums = _LinkedHashMap$()._newHashTable(); | |
4718 this[_addHashTableEntry](nums, key, value); | 4540 this[_addHashTableEntry](nums, key, value); |
4719 } else { | 4541 } else { |
4720 this[_set](key, value); | 4542 this[_set](key, value); |
4721 } | 4543 } |
4722 return value; | 4544 return value; |
4723 } | 4545 } |
4724 [_set](key, value) { | 4546 [_set](key, value) { |
4725 dart.as(key, K); | 4547 dart.as(key, K); |
4726 dart.as(value, V); | 4548 dart.as(value, V); |
4727 let rest = this[_rest]; | 4549 let rest = this[_rest]; |
4728 if (rest == null) | 4550 if (rest == null) this[_rest] = rest = _LinkedHashMap$()._newHashTable()
; |
4729 this[_rest] = rest = _LinkedHashMap$()._newHashTable(); | |
4730 let hash = this[_computeHashCode](key); | 4551 let hash = this[_computeHashCode](key); |
4731 let bucket = rest[hash]; | 4552 let bucket = rest[hash]; |
4732 if (bucket == null) { | 4553 if (bucket == null) { |
4733 let cell = this[_newLinkedCell](key, value); | 4554 let cell = this[_newLinkedCell](key, value); |
4734 _LinkedHashMap$()._setTableEntry(rest, hash, [cell]); | 4555 _LinkedHashMap$()._setTableEntry(rest, hash, [cell]); |
4735 } else { | 4556 } else { |
4736 let index = this[_findBucketIndex](bucket, key); | 4557 let index = this[_findBucketIndex](bucket, key); |
4737 if (dart.notNull(index) >= 0) { | 4558 if (dart.notNull(index) >= 0) { |
4738 let cell = dart.as(bucket[index], LinkedHashMapCell); | 4559 let cell = dart.as(bucket[index], LinkedHashMapCell); |
4739 cell[_value] = value; | 4560 cell[_value] = value; |
4740 } else { | 4561 } else { |
4741 let cell = this[_newLinkedCell](key, value); | 4562 let cell = this[_newLinkedCell](key, value); |
4742 bucket.push(cell); | 4563 bucket.push(cell); |
4743 } | 4564 } |
4744 } | 4565 } |
4745 } | 4566 } |
4746 putIfAbsent(key, ifAbsent) { | 4567 putIfAbsent(key, ifAbsent) { |
4747 dart.as(key, K); | 4568 dart.as(key, K); |
4748 dart.as(ifAbsent, dart.functionType(V, [])); | 4569 dart.as(ifAbsent, dart.functionType(V, [])); |
4749 if (dart.notNull(this.containsKey(key))) | 4570 if (dart.notNull(this.containsKey(key))) return this.get(key); |
4750 return this.get(key); | |
4751 let value = ifAbsent(); | 4571 let value = ifAbsent(); |
4752 this.set(key, value); | 4572 this.set(key, value); |
4753 return value; | 4573 return value; |
4754 } | 4574 } |
4755 remove(key) { | 4575 remove(key) { |
4756 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { | 4576 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { |
4757 return this[_removeHashTableEntry](this[_strings], key); | 4577 return this[_removeHashTableEntry](this[_strings], key); |
4758 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { | 4578 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { |
4759 return this[_removeHashTableEntry](this[_nums], key); | 4579 return this[_removeHashTableEntry](this[_nums], key); |
4760 } else { | 4580 } else { |
4761 return this[_remove](key); | 4581 return this[_remove](key); |
4762 } | 4582 } |
4763 } | 4583 } |
4764 [_remove](key) { | 4584 [_remove](key) { |
4765 let rest = this[_rest]; | 4585 let rest = this[_rest]; |
4766 if (rest == null) | 4586 if (rest == null) return null; |
4767 return null; | |
4768 let bucket = this[_getBucket](rest, key); | 4587 let bucket = this[_getBucket](rest, key); |
4769 let index = this[_findBucketIndex](bucket, key); | 4588 let index = this[_findBucketIndex](bucket, key); |
4770 if (dart.notNull(index) < 0) | 4589 if (dart.notNull(index) < 0) return null; |
4771 return null; | |
4772 let cell = dart.as(bucket.splice(index, 1)[0], LinkedHashMapCell); | 4590 let cell = dart.as(bucket.splice(index, 1)[0], LinkedHashMapCell); |
4773 this[_unlinkCell](cell); | 4591 this[_unlinkCell](cell); |
4774 return dart.as(cell[_value], V); | 4592 return dart.as(cell[_value], V); |
4775 } | 4593 } |
4776 clear() { | 4594 clear() { |
4777 if (dart.notNull(this[_length]) > 0) { | 4595 if (dart.notNull(this[_length]) > 0) { |
4778 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last
] = null; | 4596 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last
] = null; |
4779 this[_length] = 0; | 4597 this[_length] = 0; |
4780 this[_modified](); | 4598 this[_modified](); |
4781 } | 4599 } |
(...skipping 14 matching lines...) Expand all Loading... |
4796 dart.as(key, K); | 4614 dart.as(key, K); |
4797 dart.as(value, V); | 4615 dart.as(value, V); |
4798 let cell = dart.as(_LinkedHashMap$()._getTableEntry(table, key), LinkedH
ashMapCell); | 4616 let cell = dart.as(_LinkedHashMap$()._getTableEntry(table, key), LinkedH
ashMapCell); |
4799 if (cell == null) { | 4617 if (cell == null) { |
4800 _LinkedHashMap$()._setTableEntry(table, key, this[_newLinkedCell](key,
value)); | 4618 _LinkedHashMap$()._setTableEntry(table, key, this[_newLinkedCell](key,
value)); |
4801 } else { | 4619 } else { |
4802 cell[_value] = value; | 4620 cell[_value] = value; |
4803 } | 4621 } |
4804 } | 4622 } |
4805 [_removeHashTableEntry](table, key) { | 4623 [_removeHashTableEntry](table, key) { |
4806 if (table == null) | 4624 if (table == null) return null; |
4807 return null; | |
4808 let cell = dart.as(_LinkedHashMap$()._getTableEntry(table, key), LinkedH
ashMapCell); | 4625 let cell = dart.as(_LinkedHashMap$()._getTableEntry(table, key), LinkedH
ashMapCell); |
4809 if (cell == null) | 4626 if (cell == null) return null; |
4810 return null; | |
4811 this[_unlinkCell](cell); | 4627 this[_unlinkCell](cell); |
4812 _LinkedHashMap$()._deleteTableEntry(table, key); | 4628 _LinkedHashMap$()._deleteTableEntry(table, key); |
4813 return dart.as(cell[_value], V); | 4629 return dart.as(cell[_value], V); |
4814 } | 4630 } |
4815 [_modified]() { | 4631 [_modified]() { |
4816 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863
; | 4632 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863
; |
4817 } | 4633 } |
4818 [_newLinkedCell](key, value) { | 4634 [_newLinkedCell](key, value) { |
4819 dart.as(key, K); | 4635 dart.as(key, K); |
4820 dart.as(value, V); | 4636 dart.as(value, V); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4865 table[key] = value; | 4681 table[key] = value; |
4866 } | 4682 } |
4867 static _deleteTableEntry(table, key) { | 4683 static _deleteTableEntry(table, key) { |
4868 delete table[key]; | 4684 delete table[key]; |
4869 } | 4685 } |
4870 [_getBucket](table, key) { | 4686 [_getBucket](table, key) { |
4871 let hash = this[_computeHashCode](key); | 4687 let hash = this[_computeHashCode](key); |
4872 return dart.as(table[hash], core.List); | 4688 return dart.as(table[hash], core.List); |
4873 } | 4689 } |
4874 [_findBucketIndex](bucket, key) { | 4690 [_findBucketIndex](bucket, key) { |
4875 if (bucket == null) | 4691 if (bucket == null) return -1; |
4876 return -1; | |
4877 let length = bucket.length; | 4692 let length = bucket.length; |
4878 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 4693 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
4879 let cell = dart.as(bucket[i], LinkedHashMapCell); | 4694 let cell = dart.as(bucket[i], LinkedHashMapCell); |
4880 if (dart.equals(cell[_key], key)) | 4695 if (dart.equals(cell[_key], key)) return i; |
4881 return i; | |
4882 } | 4696 } |
4883 return -1; | 4697 return -1; |
4884 } | 4698 } |
4885 static _newHashTable() { | 4699 static _newHashTable() { |
4886 let table = Object.create(null); | 4700 let table = Object.create(null); |
4887 let temporaryKey = '<non-identifier-key>'; | 4701 let temporaryKey = '<non-identifier-key>'; |
4888 _LinkedHashMap$()._setTableEntry(table, temporaryKey, table); | 4702 _LinkedHashMap$()._setTableEntry(table, temporaryKey, table); |
4889 _LinkedHashMap$()._deleteTableEntry(table, temporaryKey); | 4703 _LinkedHashMap$()._deleteTableEntry(table, temporaryKey); |
4890 return table; | 4704 return table; |
4891 } | 4705 } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4934 let _LinkedHashMap = _LinkedHashMap$(); | 4748 let _LinkedHashMap = _LinkedHashMap$(); |
4935 const _LinkedIdentityHashMap$ = dart.generic(function(K, V) { | 4749 const _LinkedIdentityHashMap$ = dart.generic(function(K, V) { |
4936 class _LinkedIdentityHashMap extends _LinkedHashMap$(K, V) { | 4750 class _LinkedIdentityHashMap extends _LinkedHashMap$(K, V) { |
4937 _LinkedIdentityHashMap() { | 4751 _LinkedIdentityHashMap() { |
4938 super._LinkedHashMap(); | 4752 super._LinkedHashMap(); |
4939 } | 4753 } |
4940 [_computeHashCode](key) { | 4754 [_computeHashCode](key) { |
4941 return core.identityHashCode(key) & 0x3ffffff; | 4755 return core.identityHashCode(key) & 0x3ffffff; |
4942 } | 4756 } |
4943 [_findBucketIndex](bucket, key) { | 4757 [_findBucketIndex](bucket, key) { |
4944 if (bucket == null) | 4758 if (bucket == null) return -1; |
4945 return -1; | |
4946 let length = bucket.length; | 4759 let length = bucket.length; |
4947 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 4760 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
4948 let cell = dart.as(bucket[i], LinkedHashMapCell); | 4761 let cell = dart.as(bucket[i], LinkedHashMapCell); |
4949 if (dart.notNull(core.identical(cell[_key], key))) | 4762 if (dart.notNull(core.identical(cell[_key], key))) return i; |
4950 return i; | |
4951 } | 4763 } |
4952 return -1; | 4764 return -1; |
4953 } | 4765 } |
4954 } | 4766 } |
4955 return _LinkedIdentityHashMap; | 4767 return _LinkedIdentityHashMap; |
4956 }); | 4768 }); |
4957 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(); | 4769 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(); |
4958 const _LinkedCustomHashMap$ = dart.generic(function(K, V) { | 4770 const _LinkedCustomHashMap$ = dart.generic(function(K, V) { |
4959 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) { | 4771 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) { |
4960 _LinkedCustomHashMap(equals, hashCode, validKey) { | 4772 _LinkedCustomHashMap(equals, hashCode, validKey) { |
4961 this[_equals] = equals; | 4773 this[_equals] = equals; |
4962 this[_hashCode] = hashCode; | 4774 this[_hashCode] = hashCode; |
4963 this[_validKey] = validKey != null ? validKey : dart.fn(v => dart.is(v,
K), core.bool, [dart.dynamic]); | 4775 this[_validKey] = validKey != null ? validKey : dart.fn(v => dart.is(v,
K), core.bool, [dart.dynamic]); |
4964 super._LinkedHashMap(); | 4776 super._LinkedHashMap(); |
4965 } | 4777 } |
4966 get(key) { | 4778 get(key) { |
4967 if (!dart.notNull(this[_validKey](key))) | 4779 if (!dart.notNull(this[_validKey](key))) return null; |
4968 return null; | |
4969 return super[_get](key); | 4780 return super[_get](key); |
4970 } | 4781 } |
4971 set(key, value) { | 4782 set(key, value) { |
4972 dart.as(key, K); | 4783 dart.as(key, K); |
4973 dart.as(value, V); | 4784 dart.as(value, V); |
4974 super[_set](key, value); | 4785 super[_set](key, value); |
4975 return value; | 4786 return value; |
4976 } | 4787 } |
4977 containsKey(key) { | 4788 containsKey(key) { |
4978 if (!dart.notNull(this[_validKey](key))) | 4789 if (!dart.notNull(this[_validKey](key))) return false; |
4979 return false; | |
4980 return super[_containsKey](key); | 4790 return super[_containsKey](key); |
4981 } | 4791 } |
4982 remove(key) { | 4792 remove(key) { |
4983 if (!dart.notNull(this[_validKey](key))) | 4793 if (!dart.notNull(this[_validKey](key))) return null; |
4984 return null; | |
4985 return super[_remove](key); | 4794 return super[_remove](key); |
4986 } | 4795 } |
4987 [_computeHashCode](key) { | 4796 [_computeHashCode](key) { |
4988 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; | 4797 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; |
4989 } | 4798 } |
4990 [_findBucketIndex](bucket, key) { | 4799 [_findBucketIndex](bucket, key) { |
4991 if (bucket == null) | 4800 if (bucket == null) return -1; |
4992 return -1; | |
4993 let length = bucket.length; | 4801 let length = bucket.length; |
4994 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 4802 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
4995 let cell = dart.as(bucket[i], LinkedHashMapCell); | 4803 let cell = dart.as(bucket[i], LinkedHashMapCell); |
4996 if (dart.notNull(this[_equals](dart.as(cell[_key], K), dart.as(key, K)
))) | 4804 if (dart.notNull(this[_equals](dart.as(cell[_key], K), dart.as(key, K)
))) return i; |
4997 return i; | |
4998 } | 4805 } |
4999 return -1; | 4806 return -1; |
5000 } | 4807 } |
5001 } | 4808 } |
5002 dart.setSignature(_LinkedCustomHashMap, { | 4809 dart.setSignature(_LinkedCustomHashMap, { |
5003 constructors: () => ({_LinkedCustomHashMap: [_LinkedCustomHashMap$(K, V),
[_Equality$(K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}), | 4810 constructors: () => ({_LinkedCustomHashMap: [_LinkedCustomHashMap$(K, V),
[_Equality$(K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}), |
5004 methods: () => ({ | 4811 methods: () => ({ |
5005 get: [V, [core.Object]], | 4812 get: [V, [core.Object]], |
5006 set: [dart.void, [K, V]], | 4813 set: [dart.void, [K, V]], |
5007 remove: [V, [core.Object]] | 4814 remove: [V, [core.Object]] |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5135 return strings == null ? false : _HashSet$()._hasTableEntry(strings, o
bject); | 4942 return strings == null ? false : _HashSet$()._hasTableEntry(strings, o
bject); |
5136 } else if (dart.notNull(_HashSet$()._isNumericElement(object))) { | 4943 } else if (dart.notNull(_HashSet$()._isNumericElement(object))) { |
5137 let nums = this[_nums]; | 4944 let nums = this[_nums]; |
5138 return nums == null ? false : _HashSet$()._hasTableEntry(nums, object)
; | 4945 return nums == null ? false : _HashSet$()._hasTableEntry(nums, object)
; |
5139 } else { | 4946 } else { |
5140 return this[_contains](object); | 4947 return this[_contains](object); |
5141 } | 4948 } |
5142 } | 4949 } |
5143 [_contains](object) { | 4950 [_contains](object) { |
5144 let rest = this[_rest]; | 4951 let rest = this[_rest]; |
5145 if (rest == null) | 4952 if (rest == null) return false; |
5146 return false; | |
5147 let bucket = this[_getBucket](rest, object); | 4953 let bucket = this[_getBucket](rest, object); |
5148 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; | 4954 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; |
5149 } | 4955 } |
5150 lookup(object) { | 4956 lookup(object) { |
5151 if (dart.notNull(_HashSet$()._isStringElement(object)) || dart.notNull(_
HashSet$()._isNumericElement(object))) { | 4957 if (dart.notNull(_HashSet$()._isStringElement(object)) || dart.notNull(_
HashSet$()._isNumericElement(object))) { |
5152 return dart.as(dart.notNull(this.contains(object)) ? object : null, E)
; | 4958 return dart.as(dart.notNull(this.contains(object)) ? object : null, E)
; |
5153 } | 4959 } |
5154 return this[_lookup](object); | 4960 return this[_lookup](object); |
5155 } | 4961 } |
5156 [_lookup](object) { | 4962 [_lookup](object) { |
5157 let rest = this[_rest]; | 4963 let rest = this[_rest]; |
5158 if (rest == null) | 4964 if (rest == null) return null; |
5159 return null; | |
5160 let bucket = this[_getBucket](rest, object); | 4965 let bucket = this[_getBucket](rest, object); |
5161 let index = this[_findBucketIndex](bucket, object); | 4966 let index = this[_findBucketIndex](bucket, object); |
5162 if (dart.notNull(index) < 0) | 4967 if (dart.notNull(index) < 0) return null; |
5163 return null; | |
5164 return dart.as(bucket[dartx.get](index), E); | 4968 return dart.as(bucket[dartx.get](index), E); |
5165 } | 4969 } |
5166 add(element) { | 4970 add(element) { |
5167 dart.as(element, E); | 4971 dart.as(element, E); |
5168 if (dart.notNull(_HashSet$()._isStringElement(element))) { | 4972 if (dart.notNull(_HashSet$()._isStringElement(element))) { |
5169 let strings = this[_strings]; | 4973 let strings = this[_strings]; |
5170 if (strings == null) | 4974 if (strings == null) this[_strings] = strings = _HashSet$()._newHashTa
ble(); |
5171 this[_strings] = strings = _HashSet$()._newHashTable(); | |
5172 return this[_addHashTableEntry](strings, element); | 4975 return this[_addHashTableEntry](strings, element); |
5173 } else if (dart.notNull(_HashSet$()._isNumericElement(element))) { | 4976 } else if (dart.notNull(_HashSet$()._isNumericElement(element))) { |
5174 let nums = this[_nums]; | 4977 let nums = this[_nums]; |
5175 if (nums == null) | 4978 if (nums == null) this[_nums] = nums = _HashSet$()._newHashTable(); |
5176 this[_nums] = nums = _HashSet$()._newHashTable(); | |
5177 return this[_addHashTableEntry](nums, element); | 4979 return this[_addHashTableEntry](nums, element); |
5178 } else { | 4980 } else { |
5179 return this[_add](element); | 4981 return this[_add](element); |
5180 } | 4982 } |
5181 } | 4983 } |
5182 [_add](element) { | 4984 [_add](element) { |
5183 dart.as(element, E); | 4985 dart.as(element, E); |
5184 let rest = this[_rest]; | 4986 let rest = this[_rest]; |
5185 if (rest == null) | 4987 if (rest == null) this[_rest] = rest = _HashSet$()._newHashTable(); |
5186 this[_rest] = rest = _HashSet$()._newHashTable(); | |
5187 let hash = this[_computeHashCode](element); | 4988 let hash = this[_computeHashCode](element); |
5188 let bucket = rest[hash]; | 4989 let bucket = rest[hash]; |
5189 if (bucket == null) { | 4990 if (bucket == null) { |
5190 _HashSet$()._setTableEntry(rest, hash, [element]); | 4991 _HashSet$()._setTableEntry(rest, hash, [element]); |
5191 } else { | 4992 } else { |
5192 let index = this[_findBucketIndex](bucket, element); | 4993 let index = this[_findBucketIndex](bucket, element); |
5193 if (dart.notNull(index) >= 0) | 4994 if (dart.notNull(index) >= 0) return false; |
5194 return false; | |
5195 bucket.push(element); | 4995 bucket.push(element); |
5196 } | 4996 } |
5197 this[_length] = dart.notNull(this[_length]) + 1; | 4997 this[_length] = dart.notNull(this[_length]) + 1; |
5198 this[_elements] = null; | 4998 this[_elements] = null; |
5199 return true; | 4999 return true; |
5200 } | 5000 } |
5201 addAll(objects) { | 5001 addAll(objects) { |
5202 dart.as(objects, core.Iterable$(E)); | 5002 dart.as(objects, core.Iterable$(E)); |
5203 for (let each of objects) { | 5003 for (let each of objects) { |
5204 this.add(each); | 5004 this.add(each); |
5205 } | 5005 } |
5206 } | 5006 } |
5207 remove(object) { | 5007 remove(object) { |
5208 if (dart.notNull(_HashSet$()._isStringElement(object))) { | 5008 if (dart.notNull(_HashSet$()._isStringElement(object))) { |
5209 return this[_removeHashTableEntry](this[_strings], object); | 5009 return this[_removeHashTableEntry](this[_strings], object); |
5210 } else if (dart.notNull(_HashSet$()._isNumericElement(object))) { | 5010 } else if (dart.notNull(_HashSet$()._isNumericElement(object))) { |
5211 return this[_removeHashTableEntry](this[_nums], object); | 5011 return this[_removeHashTableEntry](this[_nums], object); |
5212 } else { | 5012 } else { |
5213 return this[_remove](object); | 5013 return this[_remove](object); |
5214 } | 5014 } |
5215 } | 5015 } |
5216 [_remove](object) { | 5016 [_remove](object) { |
5217 let rest = this[_rest]; | 5017 let rest = this[_rest]; |
5218 if (rest == null) | 5018 if (rest == null) return false; |
5219 return false; | |
5220 let bucket = this[_getBucket](rest, object); | 5019 let bucket = this[_getBucket](rest, object); |
5221 let index = this[_findBucketIndex](bucket, object); | 5020 let index = this[_findBucketIndex](bucket, object); |
5222 if (dart.notNull(index) < 0) | 5021 if (dart.notNull(index) < 0) return false; |
5223 return false; | |
5224 this[_length] = dart.notNull(this[_length]) - 1; | 5022 this[_length] = dart.notNull(this[_length]) - 1; |
5225 this[_elements] = null; | 5023 this[_elements] = null; |
5226 bucket.splice(index, 1); | 5024 bucket.splice(index, 1); |
5227 return true; | 5025 return true; |
5228 } | 5026 } |
5229 clear() { | 5027 clear() { |
5230 if (dart.notNull(this[_length]) > 0) { | 5028 if (dart.notNull(this[_length]) > 0) { |
5231 this[_strings] = this[_nums] = this[_rest] = this[_elements] = null; | 5029 this[_strings] = this[_nums] = this[_rest] = this[_elements] = null; |
5232 this[_length] = 0; | 5030 this[_length] = 0; |
5233 } | 5031 } |
5234 } | 5032 } |
5235 [_computeElements]() { | 5033 [_computeElements]() { |
5236 if (this[_elements] != null) | 5034 if (this[_elements] != null) return this[_elements]; |
5237 return this[_elements]; | |
5238 let result = core.List.new(this[_length]); | 5035 let result = core.List.new(this[_length]); |
5239 let index = 0; | 5036 let index = 0; |
5240 let strings = this[_strings]; | 5037 let strings = this[_strings]; |
5241 if (strings != null) { | 5038 if (strings != null) { |
5242 let names = Object.getOwnPropertyNames(strings); | 5039 let names = Object.getOwnPropertyNames(strings); |
5243 let entries = names.length; | 5040 let entries = names.length; |
5244 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN
ull(i) + 1) { | 5041 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN
ull(i) + 1) { |
5245 let element = names[i]; | 5042 let element = names[i]; |
5246 result[index] = element; | 5043 result[index] = element; |
5247 index = dart.notNull(index) + 1; | 5044 index = dart.notNull(index) + 1; |
(...skipping 21 matching lines...) Expand all Loading... |
5269 result[index] = bucket[i]; | 5066 result[index] = bucket[i]; |
5270 index = dart.notNull(index) + 1; | 5067 index = dart.notNull(index) + 1; |
5271 } | 5068 } |
5272 } | 5069 } |
5273 } | 5070 } |
5274 dart.assert(index == this[_length]); | 5071 dart.assert(index == this[_length]); |
5275 return this[_elements] = result; | 5072 return this[_elements] = result; |
5276 } | 5073 } |
5277 [_addHashTableEntry](table, element) { | 5074 [_addHashTableEntry](table, element) { |
5278 dart.as(element, E); | 5075 dart.as(element, E); |
5279 if (dart.notNull(_HashSet$()._hasTableEntry(table, element))) | 5076 if (dart.notNull(_HashSet$()._hasTableEntry(table, element))) return fal
se; |
5280 return false; | |
5281 _HashSet$()._setTableEntry(table, element, 0); | 5077 _HashSet$()._setTableEntry(table, element, 0); |
5282 this[_length] = dart.notNull(this[_length]) + 1; | 5078 this[_length] = dart.notNull(this[_length]) + 1; |
5283 this[_elements] = null; | 5079 this[_elements] = null; |
5284 return true; | 5080 return true; |
5285 } | 5081 } |
5286 [_removeHashTableEntry](table, element) { | 5082 [_removeHashTableEntry](table, element) { |
5287 if (table != null && dart.notNull(_HashSet$()._hasTableEntry(table, elem
ent))) { | 5083 if (table != null && dart.notNull(_HashSet$()._hasTableEntry(table, elem
ent))) { |
5288 _HashSet$()._deleteTableEntry(table, element); | 5084 _HashSet$()._deleteTableEntry(table, element); |
5289 this[_length] = dart.notNull(this[_length]) - 1; | 5085 this[_length] = dart.notNull(this[_length]) - 1; |
5290 this[_elements] = null; | 5086 this[_elements] = null; |
(...skipping 20 matching lines...) Expand all Loading... |
5311 table[key] = value; | 5107 table[key] = value; |
5312 } | 5108 } |
5313 static _deleteTableEntry(table, key) { | 5109 static _deleteTableEntry(table, key) { |
5314 delete table[key]; | 5110 delete table[key]; |
5315 } | 5111 } |
5316 [_getBucket](table, element) { | 5112 [_getBucket](table, element) { |
5317 let hash = this[_computeHashCode](element); | 5113 let hash = this[_computeHashCode](element); |
5318 return dart.as(table[hash], core.List); | 5114 return dart.as(table[hash], core.List); |
5319 } | 5115 } |
5320 [_findBucketIndex](bucket, element) { | 5116 [_findBucketIndex](bucket, element) { |
5321 if (bucket == null) | 5117 if (bucket == null) return -1; |
5322 return -1; | |
5323 let length = bucket.length; | 5118 let length = bucket.length; |
5324 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 5119 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
5325 if (dart.equals(bucket[i], element)) | 5120 if (dart.equals(bucket[i], element)) return i; |
5326 return i; | |
5327 } | 5121 } |
5328 return -1; | 5122 return -1; |
5329 } | 5123 } |
5330 static _newHashTable() { | 5124 static _newHashTable() { |
5331 let table = Object.create(null); | 5125 let table = Object.create(null); |
5332 let temporaryKey = '<non-identifier-key>'; | 5126 let temporaryKey = '<non-identifier-key>'; |
5333 _HashSet$()._setTableEntry(table, temporaryKey, table); | 5127 _HashSet$()._setTableEntry(table, temporaryKey, table); |
5334 _HashSet$()._deleteTableEntry(table, temporaryKey); | 5128 _HashSet$()._deleteTableEntry(table, temporaryKey); |
5335 return table; | 5129 return table; |
5336 } | 5130 } |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5381 _IdentityHashSet() { | 5175 _IdentityHashSet() { |
5382 super._HashSet(); | 5176 super._HashSet(); |
5383 } | 5177 } |
5384 [_newSet]() { | 5178 [_newSet]() { |
5385 return new (_IdentityHashSet$(E))(); | 5179 return new (_IdentityHashSet$(E))(); |
5386 } | 5180 } |
5387 [_computeHashCode](key) { | 5181 [_computeHashCode](key) { |
5388 return core.identityHashCode(key) & 0x3ffffff; | 5182 return core.identityHashCode(key) & 0x3ffffff; |
5389 } | 5183 } |
5390 [_findBucketIndex](bucket, element) { | 5184 [_findBucketIndex](bucket, element) { |
5391 if (bucket == null) | 5185 if (bucket == null) return -1; |
5392 return -1; | |
5393 let length = bucket.length; | 5186 let length = bucket.length; |
5394 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 5187 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
5395 if (dart.notNull(core.identical(bucket[i], element))) | 5188 if (dart.notNull(core.identical(bucket[i], element))) return i; |
5396 return i; | |
5397 } | 5189 } |
5398 return -1; | 5190 return -1; |
5399 } | 5191 } |
5400 } | 5192 } |
5401 dart.setSignature(_IdentityHashSet, { | 5193 dart.setSignature(_IdentityHashSet, { |
5402 methods: () => ({[_newSet]: [core.Set$(E), []]}) | 5194 methods: () => ({[_newSet]: [core.Set$(E), []]}) |
5403 }); | 5195 }); |
5404 return _IdentityHashSet; | 5196 return _IdentityHashSet; |
5405 }); | 5197 }); |
5406 let _IdentityHashSet = _IdentityHashSet$(); | 5198 let _IdentityHashSet = _IdentityHashSet$(); |
5407 const _equality = Symbol('_equality'); | 5199 const _equality = Symbol('_equality'); |
5408 const _hasher = Symbol('_hasher'); | 5200 const _hasher = Symbol('_hasher'); |
5409 const _CustomHashSet$ = dart.generic(function(E) { | 5201 const _CustomHashSet$ = dart.generic(function(E) { |
5410 class _CustomHashSet extends _HashSet$(E) { | 5202 class _CustomHashSet extends _HashSet$(E) { |
5411 _CustomHashSet(equality, hasher, validKey) { | 5203 _CustomHashSet(equality, hasher, validKey) { |
5412 this[_equality] = equality; | 5204 this[_equality] = equality; |
5413 this[_hasher] = hasher; | 5205 this[_hasher] = hasher; |
5414 this[_validKey] = validKey != null ? validKey : dart.fn(x => dart.is(x,
E), core.bool, [dart.dynamic]); | 5206 this[_validKey] = validKey != null ? validKey : dart.fn(x => dart.is(x,
E), core.bool, [dart.dynamic]); |
5415 super._HashSet(); | 5207 super._HashSet(); |
5416 } | 5208 } |
5417 [_newSet]() { | 5209 [_newSet]() { |
5418 return new (_CustomHashSet$(E))(this[_equality], this[_hasher], this[_va
lidKey]); | 5210 return new (_CustomHashSet$(E))(this[_equality], this[_hasher], this[_va
lidKey]); |
5419 } | 5211 } |
5420 [_findBucketIndex](bucket, element) { | 5212 [_findBucketIndex](bucket, element) { |
5421 if (bucket == null) | 5213 if (bucket == null) return -1; |
5422 return -1; | |
5423 let length = bucket.length; | 5214 let length = bucket.length; |
5424 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 5215 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
5425 if (dart.notNull(this[_equality](dart.as(bucket[i], E), dart.as(elemen
t, E)))) | 5216 if (dart.notNull(this[_equality](dart.as(bucket[i], E), dart.as(elemen
t, E)))) return i; |
5426 return i; | |
5427 } | 5217 } |
5428 return -1; | 5218 return -1; |
5429 } | 5219 } |
5430 [_computeHashCode](element) { | 5220 [_computeHashCode](element) { |
5431 return this[_hasher](dart.as(element, E)) & 0x3ffffff; | 5221 return this[_hasher](dart.as(element, E)) & 0x3ffffff; |
5432 } | 5222 } |
5433 add(object) { | 5223 add(object) { |
5434 dart.as(object, E); | 5224 dart.as(object, E); |
5435 return super[_add](object); | 5225 return super[_add](object); |
5436 } | 5226 } |
5437 contains(object) { | 5227 contains(object) { |
5438 if (!dart.notNull(this[_validKey](object))) | 5228 if (!dart.notNull(this[_validKey](object))) return false; |
5439 return false; | |
5440 return super[_contains](object); | 5229 return super[_contains](object); |
5441 } | 5230 } |
5442 lookup(object) { | 5231 lookup(object) { |
5443 if (!dart.notNull(this[_validKey](object))) | 5232 if (!dart.notNull(this[_validKey](object))) return null; |
5444 return null; | |
5445 return super[_lookup](object); | 5233 return super[_lookup](object); |
5446 } | 5234 } |
5447 remove(object) { | 5235 remove(object) { |
5448 if (!dart.notNull(this[_validKey](object))) | 5236 if (!dart.notNull(this[_validKey](object))) return false; |
5449 return false; | |
5450 return super[_remove](object); | 5237 return super[_remove](object); |
5451 } | 5238 } |
5452 } | 5239 } |
5453 dart.setSignature(_CustomHashSet, { | 5240 dart.setSignature(_CustomHashSet, { |
5454 constructors: () => ({_CustomHashSet: [_CustomHashSet$(E), [_Equality$(E),
_Hasher$(E), dart.functionType(core.bool, [core.Object])]]}), | 5241 constructors: () => ({_CustomHashSet: [_CustomHashSet$(E), [_Equality$(E),
_Hasher$(E), dart.functionType(core.bool, [core.Object])]]}), |
5455 methods: () => ({ | 5242 methods: () => ({ |
5456 [_newSet]: [core.Set$(E), []], | 5243 [_newSet]: [core.Set$(E), []], |
5457 add: [core.bool, [E]], | 5244 add: [core.bool, [E]], |
5458 lookup: [E, [core.Object]] | 5245 lookup: [E, [core.Object]] |
5459 }) | 5246 }) |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5522 } | 5309 } |
5523 get isEmpty() { | 5310 get isEmpty() { |
5524 return this[_length] == 0; | 5311 return this[_length] == 0; |
5525 } | 5312 } |
5526 get isNotEmpty() { | 5313 get isNotEmpty() { |
5527 return !dart.notNull(this.isEmpty); | 5314 return !dart.notNull(this.isEmpty); |
5528 } | 5315 } |
5529 contains(object) { | 5316 contains(object) { |
5530 if (dart.notNull(_LinkedHashSet$()._isStringElement(object))) { | 5317 if (dart.notNull(_LinkedHashSet$()._isStringElement(object))) { |
5531 let strings = this[_strings]; | 5318 let strings = this[_strings]; |
5532 if (strings == null) | 5319 if (strings == null) return false; |
5533 return false; | |
5534 let cell = dart.as(_LinkedHashSet$()._getTableEntry(strings, object),
LinkedHashSetCell); | 5320 let cell = dart.as(_LinkedHashSet$()._getTableEntry(strings, object),
LinkedHashSetCell); |
5535 return cell != null; | 5321 return cell != null; |
5536 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(object))) { | 5322 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(object))) { |
5537 let nums = this[_nums]; | 5323 let nums = this[_nums]; |
5538 if (nums == null) | 5324 if (nums == null) return false; |
5539 return false; | |
5540 let cell = dart.as(_LinkedHashSet$()._getTableEntry(nums, object), Lin
kedHashSetCell); | 5325 let cell = dart.as(_LinkedHashSet$()._getTableEntry(nums, object), Lin
kedHashSetCell); |
5541 return cell != null; | 5326 return cell != null; |
5542 } else { | 5327 } else { |
5543 return this[_contains](object); | 5328 return this[_contains](object); |
5544 } | 5329 } |
5545 } | 5330 } |
5546 [_contains](object) { | 5331 [_contains](object) { |
5547 let rest = this[_rest]; | 5332 let rest = this[_rest]; |
5548 if (rest == null) | 5333 if (rest == null) return false; |
5549 return false; | |
5550 let bucket = this[_getBucket](rest, object); | 5334 let bucket = this[_getBucket](rest, object); |
5551 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; | 5335 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; |
5552 } | 5336 } |
5553 lookup(object) { | 5337 lookup(object) { |
5554 if (dart.notNull(_LinkedHashSet$()._isStringElement(object)) || dart.not
Null(_LinkedHashSet$()._isNumericElement(object))) { | 5338 if (dart.notNull(_LinkedHashSet$()._isStringElement(object)) || dart.not
Null(_LinkedHashSet$()._isNumericElement(object))) { |
5555 return dart.as(dart.notNull(this.contains(object)) ? object : null, E)
; | 5339 return dart.as(dart.notNull(this.contains(object)) ? object : null, E)
; |
5556 } else { | 5340 } else { |
5557 return this[_lookup](object); | 5341 return this[_lookup](object); |
5558 } | 5342 } |
5559 } | 5343 } |
5560 [_lookup](object) { | 5344 [_lookup](object) { |
5561 let rest = this[_rest]; | 5345 let rest = this[_rest]; |
5562 if (rest == null) | 5346 if (rest == null) return null; |
5563 return null; | |
5564 let bucket = this[_getBucket](rest, object); | 5347 let bucket = this[_getBucket](rest, object); |
5565 let index = this[_findBucketIndex](bucket, object); | 5348 let index = this[_findBucketIndex](bucket, object); |
5566 if (dart.notNull(index) < 0) | 5349 if (dart.notNull(index) < 0) return null; |
5567 return null; | |
5568 return dart.as(dart.dload(bucket[dartx.get](index), _element), E); | 5350 return dart.as(dart.dload(bucket[dartx.get](index), _element), E); |
5569 } | 5351 } |
5570 forEach(action) { | 5352 forEach(action) { |
5571 dart.as(action, dart.functionType(dart.void, [E])); | 5353 dart.as(action, dart.functionType(dart.void, [E])); |
5572 let cell = this[_first]; | 5354 let cell = this[_first]; |
5573 let modifications = this[_modifications]; | 5355 let modifications = this[_modifications]; |
5574 while (cell != null) { | 5356 while (cell != null) { |
5575 action(dart.as(cell[_element], E)); | 5357 action(dart.as(cell[_element], E)); |
5576 if (modifications != this[_modifications]) { | 5358 if (modifications != this[_modifications]) { |
5577 dart.throw(new core.ConcurrentModificationError(this)); | 5359 dart.throw(new core.ConcurrentModificationError(this)); |
5578 } | 5360 } |
5579 cell = cell[_next]; | 5361 cell = cell[_next]; |
5580 } | 5362 } |
5581 } | 5363 } |
5582 get first() { | 5364 get first() { |
5583 if (this[_first] == null) | 5365 if (this[_first] == null) dart.throw(new core.StateError("No elements"))
; |
5584 dart.throw(new core.StateError("No elements")); | |
5585 return dart.as(this[_first][_element], E); | 5366 return dart.as(this[_first][_element], E); |
5586 } | 5367 } |
5587 get last() { | 5368 get last() { |
5588 if (this[_last] == null) | 5369 if (this[_last] == null) dart.throw(new core.StateError("No elements")); |
5589 dart.throw(new core.StateError("No elements")); | |
5590 return dart.as(this[_last][_element], E); | 5370 return dart.as(this[_last][_element], E); |
5591 } | 5371 } |
5592 add(element) { | 5372 add(element) { |
5593 dart.as(element, E); | 5373 dart.as(element, E); |
5594 if (dart.notNull(_LinkedHashSet$()._isStringElement(element))) { | 5374 if (dart.notNull(_LinkedHashSet$()._isStringElement(element))) { |
5595 let strings = this[_strings]; | 5375 let strings = this[_strings]; |
5596 if (strings == null) | 5376 if (strings == null) this[_strings] = strings = _LinkedHashSet$()._new
HashTable(); |
5597 this[_strings] = strings = _LinkedHashSet$()._newHashTable(); | |
5598 return this[_addHashTableEntry](strings, element); | 5377 return this[_addHashTableEntry](strings, element); |
5599 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(element))) { | 5378 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(element))) { |
5600 let nums = this[_nums]; | 5379 let nums = this[_nums]; |
5601 if (nums == null) | 5380 if (nums == null) this[_nums] = nums = _LinkedHashSet$()._newHashTable
(); |
5602 this[_nums] = nums = _LinkedHashSet$()._newHashTable(); | |
5603 return this[_addHashTableEntry](nums, element); | 5381 return this[_addHashTableEntry](nums, element); |
5604 } else { | 5382 } else { |
5605 return this[_add](element); | 5383 return this[_add](element); |
5606 } | 5384 } |
5607 } | 5385 } |
5608 [_add](element) { | 5386 [_add](element) { |
5609 dart.as(element, E); | 5387 dart.as(element, E); |
5610 let rest = this[_rest]; | 5388 let rest = this[_rest]; |
5611 if (rest == null) | 5389 if (rest == null) this[_rest] = rest = _LinkedHashSet$()._newHashTable()
; |
5612 this[_rest] = rest = _LinkedHashSet$()._newHashTable(); | |
5613 let hash = this[_computeHashCode](element); | 5390 let hash = this[_computeHashCode](element); |
5614 let bucket = rest[hash]; | 5391 let bucket = rest[hash]; |
5615 if (bucket == null) { | 5392 if (bucket == null) { |
5616 let cell = this[_newLinkedCell](element); | 5393 let cell = this[_newLinkedCell](element); |
5617 _LinkedHashSet$()._setTableEntry(rest, hash, [cell]); | 5394 _LinkedHashSet$()._setTableEntry(rest, hash, [cell]); |
5618 } else { | 5395 } else { |
5619 let index = this[_findBucketIndex](bucket, element); | 5396 let index = this[_findBucketIndex](bucket, element); |
5620 if (dart.notNull(index) >= 0) | 5397 if (dart.notNull(index) >= 0) return false; |
5621 return false; | |
5622 let cell = this[_newLinkedCell](element); | 5398 let cell = this[_newLinkedCell](element); |
5623 bucket.push(cell); | 5399 bucket.push(cell); |
5624 } | 5400 } |
5625 return true; | 5401 return true; |
5626 } | 5402 } |
5627 remove(object) { | 5403 remove(object) { |
5628 if (dart.notNull(_LinkedHashSet$()._isStringElement(object))) { | 5404 if (dart.notNull(_LinkedHashSet$()._isStringElement(object))) { |
5629 return this[_removeHashTableEntry](this[_strings], object); | 5405 return this[_removeHashTableEntry](this[_strings], object); |
5630 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(object))) { | 5406 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(object))) { |
5631 return this[_removeHashTableEntry](this[_nums], object); | 5407 return this[_removeHashTableEntry](this[_nums], object); |
5632 } else { | 5408 } else { |
5633 return this[_remove](object); | 5409 return this[_remove](object); |
5634 } | 5410 } |
5635 } | 5411 } |
5636 [_remove](object) { | 5412 [_remove](object) { |
5637 let rest = this[_rest]; | 5413 let rest = this[_rest]; |
5638 if (rest == null) | 5414 if (rest == null) return false; |
5639 return false; | |
5640 let bucket = this[_getBucket](rest, object); | 5415 let bucket = this[_getBucket](rest, object); |
5641 let index = this[_findBucketIndex](bucket, object); | 5416 let index = this[_findBucketIndex](bucket, object); |
5642 if (dart.notNull(index) < 0) | 5417 if (dart.notNull(index) < 0) return false; |
5643 return false; | |
5644 let cell = dart.as(bucket.splice(index, 1)[0], LinkedHashSetCell); | 5418 let cell = dart.as(bucket.splice(index, 1)[0], LinkedHashSetCell); |
5645 this[_unlinkCell](cell); | 5419 this[_unlinkCell](cell); |
5646 return true; | 5420 return true; |
5647 } | 5421 } |
5648 removeWhere(test) { | 5422 removeWhere(test) { |
5649 dart.as(test, dart.functionType(core.bool, [E])); | 5423 dart.as(test, dart.functionType(core.bool, [E])); |
5650 this[_filterWhere](test, true); | 5424 this[_filterWhere](test, true); |
5651 } | 5425 } |
5652 retainWhere(test) { | 5426 retainWhere(test) { |
5653 dart.as(test, dart.functionType(core.bool, [E])); | 5427 dart.as(test, dart.functionType(core.bool, [E])); |
5654 this[_filterWhere](test, false); | 5428 this[_filterWhere](test, false); |
5655 } | 5429 } |
5656 [_filterWhere](test, removeMatching) { | 5430 [_filterWhere](test, removeMatching) { |
5657 dart.as(test, dart.functionType(core.bool, [E])); | 5431 dart.as(test, dart.functionType(core.bool, [E])); |
5658 let cell = this[_first]; | 5432 let cell = this[_first]; |
5659 while (cell != null) { | 5433 while (cell != null) { |
5660 let element = dart.as(cell[_element], E); | 5434 let element = dart.as(cell[_element], E); |
5661 let next = cell[_next]; | 5435 let next = cell[_next]; |
5662 let modifications = this[_modifications]; | 5436 let modifications = this[_modifications]; |
5663 let shouldRemove = removeMatching == test(element); | 5437 let shouldRemove = removeMatching == test(element); |
5664 if (modifications != this[_modifications]) { | 5438 if (modifications != this[_modifications]) { |
5665 dart.throw(new core.ConcurrentModificationError(this)); | 5439 dart.throw(new core.ConcurrentModificationError(this)); |
5666 } | 5440 } |
5667 if (dart.notNull(shouldRemove)) | 5441 if (dart.notNull(shouldRemove)) this.remove(element); |
5668 this.remove(element); | |
5669 cell = next; | 5442 cell = next; |
5670 } | 5443 } |
5671 } | 5444 } |
5672 clear() { | 5445 clear() { |
5673 if (dart.notNull(this[_length]) > 0) { | 5446 if (dart.notNull(this[_length]) > 0) { |
5674 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last
] = null; | 5447 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last
] = null; |
5675 this[_length] = 0; | 5448 this[_length] = 0; |
5676 this[_modified](); | 5449 this[_modified](); |
5677 } | 5450 } |
5678 } | 5451 } |
5679 [_addHashTableEntry](table, element) { | 5452 [_addHashTableEntry](table, element) { |
5680 dart.as(element, E); | 5453 dart.as(element, E); |
5681 let cell = dart.as(_LinkedHashSet$()._getTableEntry(table, element), Lin
kedHashSetCell); | 5454 let cell = dart.as(_LinkedHashSet$()._getTableEntry(table, element), Lin
kedHashSetCell); |
5682 if (cell != null) | 5455 if (cell != null) return false; |
5683 return false; | |
5684 _LinkedHashSet$()._setTableEntry(table, element, this[_newLinkedCell](el
ement)); | 5456 _LinkedHashSet$()._setTableEntry(table, element, this[_newLinkedCell](el
ement)); |
5685 return true; | 5457 return true; |
5686 } | 5458 } |
5687 [_removeHashTableEntry](table, element) { | 5459 [_removeHashTableEntry](table, element) { |
5688 if (table == null) | 5460 if (table == null) return false; |
5689 return false; | |
5690 let cell = dart.as(_LinkedHashSet$()._getTableEntry(table, element), Lin
kedHashSetCell); | 5461 let cell = dart.as(_LinkedHashSet$()._getTableEntry(table, element), Lin
kedHashSetCell); |
5691 if (cell == null) | 5462 if (cell == null) return false; |
5692 return false; | |
5693 this[_unlinkCell](cell); | 5463 this[_unlinkCell](cell); |
5694 _LinkedHashSet$()._deleteTableEntry(table, element); | 5464 _LinkedHashSet$()._deleteTableEntry(table, element); |
5695 return true; | 5465 return true; |
5696 } | 5466 } |
5697 [_modified]() { | 5467 [_modified]() { |
5698 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863
; | 5468 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863
; |
5699 } | 5469 } |
5700 [_newLinkedCell](element) { | 5470 [_newLinkedCell](element) { |
5701 dart.as(element, E); | 5471 dart.as(element, E); |
5702 let cell = new LinkedHashSetCell(element); | 5472 let cell = new LinkedHashSetCell(element); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5746 table[key] = value; | 5516 table[key] = value; |
5747 } | 5517 } |
5748 static _deleteTableEntry(table, key) { | 5518 static _deleteTableEntry(table, key) { |
5749 delete table[key]; | 5519 delete table[key]; |
5750 } | 5520 } |
5751 [_getBucket](table, element) { | 5521 [_getBucket](table, element) { |
5752 let hash = this[_computeHashCode](element); | 5522 let hash = this[_computeHashCode](element); |
5753 return dart.as(table[hash], core.List); | 5523 return dart.as(table[hash], core.List); |
5754 } | 5524 } |
5755 [_findBucketIndex](bucket, element) { | 5525 [_findBucketIndex](bucket, element) { |
5756 if (bucket == null) | 5526 if (bucket == null) return -1; |
5757 return -1; | |
5758 let length = bucket.length; | 5527 let length = bucket.length; |
5759 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 5528 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
5760 let cell = dart.as(bucket[i], LinkedHashSetCell); | 5529 let cell = dart.as(bucket[i], LinkedHashSetCell); |
5761 if (dart.equals(cell[_element], element)) | 5530 if (dart.equals(cell[_element], element)) return i; |
5762 return i; | |
5763 } | 5531 } |
5764 return -1; | 5532 return -1; |
5765 } | 5533 } |
5766 static _newHashTable() { | 5534 static _newHashTable() { |
5767 let table = Object.create(null); | 5535 let table = Object.create(null); |
5768 let temporaryKey = '<non-identifier-key>'; | 5536 let temporaryKey = '<non-identifier-key>'; |
5769 _LinkedHashSet$()._setTableEntry(table, temporaryKey, table); | 5537 _LinkedHashSet$()._setTableEntry(table, temporaryKey, table); |
5770 _LinkedHashSet$()._deleteTableEntry(table, temporaryKey); | 5538 _LinkedHashSet$()._deleteTableEntry(table, temporaryKey); |
5771 return table; | 5539 return table; |
5772 } | 5540 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5826 _LinkedIdentityHashSet() { | 5594 _LinkedIdentityHashSet() { |
5827 super._LinkedHashSet(); | 5595 super._LinkedHashSet(); |
5828 } | 5596 } |
5829 [_newSet]() { | 5597 [_newSet]() { |
5830 return new (_LinkedIdentityHashSet$(E))(); | 5598 return new (_LinkedIdentityHashSet$(E))(); |
5831 } | 5599 } |
5832 [_computeHashCode](key) { | 5600 [_computeHashCode](key) { |
5833 return core.identityHashCode(key) & 0x3ffffff; | 5601 return core.identityHashCode(key) & 0x3ffffff; |
5834 } | 5602 } |
5835 [_findBucketIndex](bucket, element) { | 5603 [_findBucketIndex](bucket, element) { |
5836 if (bucket == null) | 5604 if (bucket == null) return -1; |
5837 return -1; | |
5838 let length = bucket.length; | 5605 let length = bucket.length; |
5839 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 5606 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
5840 let cell = dart.as(bucket[i], LinkedHashSetCell); | 5607 let cell = dart.as(bucket[i], LinkedHashSetCell); |
5841 if (dart.notNull(core.identical(cell[_element], element))) | 5608 if (dart.notNull(core.identical(cell[_element], element))) return i; |
5842 return i; | |
5843 } | 5609 } |
5844 return -1; | 5610 return -1; |
5845 } | 5611 } |
5846 } | 5612 } |
5847 dart.setSignature(_LinkedIdentityHashSet, { | 5613 dart.setSignature(_LinkedIdentityHashSet, { |
5848 methods: () => ({[_newSet]: [core.Set$(E), []]}) | 5614 methods: () => ({[_newSet]: [core.Set$(E), []]}) |
5849 }); | 5615 }); |
5850 return _LinkedIdentityHashSet; | 5616 return _LinkedIdentityHashSet; |
5851 }); | 5617 }); |
5852 let _LinkedIdentityHashSet = _LinkedIdentityHashSet$(); | 5618 let _LinkedIdentityHashSet = _LinkedIdentityHashSet$(); |
5853 const _LinkedCustomHashSet$ = dart.generic(function(E) { | 5619 const _LinkedCustomHashSet$ = dart.generic(function(E) { |
5854 class _LinkedCustomHashSet extends _LinkedHashSet$(E) { | 5620 class _LinkedCustomHashSet extends _LinkedHashSet$(E) { |
5855 _LinkedCustomHashSet(equality, hasher, validKey) { | 5621 _LinkedCustomHashSet(equality, hasher, validKey) { |
5856 this[_equality] = equality; | 5622 this[_equality] = equality; |
5857 this[_hasher] = hasher; | 5623 this[_hasher] = hasher; |
5858 this[_validKey] = validKey != null ? validKey : dart.fn(x => dart.is(x,
E), core.bool, [dart.dynamic]); | 5624 this[_validKey] = validKey != null ? validKey : dart.fn(x => dart.is(x,
E), core.bool, [dart.dynamic]); |
5859 super._LinkedHashSet(); | 5625 super._LinkedHashSet(); |
5860 } | 5626 } |
5861 [_newSet]() { | 5627 [_newSet]() { |
5862 return new (_LinkedCustomHashSet$(E))(this[_equality], this[_hasher], th
is[_validKey]); | 5628 return new (_LinkedCustomHashSet$(E))(this[_equality], this[_hasher], th
is[_validKey]); |
5863 } | 5629 } |
5864 [_findBucketIndex](bucket, element) { | 5630 [_findBucketIndex](bucket, element) { |
5865 if (bucket == null) | 5631 if (bucket == null) return -1; |
5866 return -1; | |
5867 let length = bucket.length; | 5632 let length = bucket.length; |
5868 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 5633 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
5869 let cell = dart.as(bucket[i], LinkedHashSetCell); | 5634 let cell = dart.as(bucket[i], LinkedHashSetCell); |
5870 if (dart.notNull(this[_equality](dart.as(cell[_element], E), dart.as(e
lement, E)))) | 5635 if (dart.notNull(this[_equality](dart.as(cell[_element], E), dart.as(e
lement, E)))) return i; |
5871 return i; | |
5872 } | 5636 } |
5873 return -1; | 5637 return -1; |
5874 } | 5638 } |
5875 [_computeHashCode](element) { | 5639 [_computeHashCode](element) { |
5876 return this[_hasher](dart.as(element, E)) & 0x3ffffff; | 5640 return this[_hasher](dart.as(element, E)) & 0x3ffffff; |
5877 } | 5641 } |
5878 add(element) { | 5642 add(element) { |
5879 dart.as(element, E); | 5643 dart.as(element, E); |
5880 return super[_add](element); | 5644 return super[_add](element); |
5881 } | 5645 } |
5882 contains(object) { | 5646 contains(object) { |
5883 if (!dart.notNull(this[_validKey](object))) | 5647 if (!dart.notNull(this[_validKey](object))) return false; |
5884 return false; | |
5885 return super[_contains](object); | 5648 return super[_contains](object); |
5886 } | 5649 } |
5887 lookup(object) { | 5650 lookup(object) { |
5888 if (!dart.notNull(this[_validKey](object))) | 5651 if (!dart.notNull(this[_validKey](object))) return null; |
5889 return null; | |
5890 return super[_lookup](object); | 5652 return super[_lookup](object); |
5891 } | 5653 } |
5892 remove(object) { | 5654 remove(object) { |
5893 if (!dart.notNull(this[_validKey](object))) | 5655 if (!dart.notNull(this[_validKey](object))) return false; |
5894 return false; | |
5895 return super[_remove](object); | 5656 return super[_remove](object); |
5896 } | 5657 } |
5897 containsAll(elements) { | 5658 containsAll(elements) { |
5898 for (let element of elements) { | 5659 for (let element of elements) { |
5899 if (!dart.notNull(this[_validKey](element)) || !dart.notNull(this.cont
ains(element))) | 5660 if (!dart.notNull(this[_validKey](element)) || !dart.notNull(this.cont
ains(element))) return false; |
5900 return false; | |
5901 } | 5661 } |
5902 return true; | 5662 return true; |
5903 } | 5663 } |
5904 removeAll(elements) { | 5664 removeAll(elements) { |
5905 for (let element of elements) { | 5665 for (let element of elements) { |
5906 if (dart.notNull(this[_validKey](element))) { | 5666 if (dart.notNull(this[_validKey](element))) { |
5907 super[_remove](element); | 5667 super[_remove](element); |
5908 } | 5668 } |
5909 } | 5669 } |
5910 } | 5670 } |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6023 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; | 5783 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; |
6024 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; | 5784 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; |
6025 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; | 5785 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; |
6026 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; | 5786 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; |
6027 exports.HashSetIterator$ = HashSetIterator$; | 5787 exports.HashSetIterator$ = HashSetIterator$; |
6028 exports.HashSetIterator = HashSetIterator; | 5788 exports.HashSetIterator = HashSetIterator; |
6029 exports.LinkedHashSetCell = LinkedHashSetCell; | 5789 exports.LinkedHashSetCell = LinkedHashSetCell; |
6030 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; | 5790 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; |
6031 exports.LinkedHashSetIterator = LinkedHashSetIterator; | 5791 exports.LinkedHashSetIterator = LinkedHashSetIterator; |
6032 }); | 5792 }); |
OLD | NEW |