Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: lib/runtime/dart/collection.js

Issue 1147143007: fixes #206, add checking for unary ops (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merged Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/runtime/dart/async.js ('k') | lib/runtime/dart/convert.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var collection = dart.defineLibrary(collection, {}); 1 var collection = dart.defineLibrary(collection, {});
2 var _internal = dart.lazyImport(_internal); 2 var _internal = dart.lazyImport(_internal);
3 var core = dart.import(core); 3 var core = dart.import(core);
4 var _js_helper = dart.lazyImport(_js_helper); 4 var _js_helper = dart.lazyImport(_js_helper);
5 var math = dart.lazyImport(math); 5 var math = dart.lazyImport(math);
6 (function(exports, _internal, core, _js_helper, math) { 6 (function(exports, _internal, core, _js_helper, math) {
7 'use strict'; 7 'use strict';
8 let _source = Symbol('_source'); 8 let _source = Symbol('_source');
9 let UnmodifiableListView$ = dart.generic(function(E) { 9 let UnmodifiableListView$ = dart.generic(function(E) {
10 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { 10 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) {
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 let toRemove = this.toSet(); 136 let toRemove = this.toSet();
137 for (let o of elements) { 137 for (let o of elements) {
138 toRemove.remove(o); 138 toRemove.remove(o);
139 } 139 }
140 this.removeAll(toRemove); 140 this.removeAll(toRemove);
141 } 141 }
142 removeWhere(test) { 142 removeWhere(test) {
143 dart.as(test, dart.functionType(core.bool, [E])); 143 dart.as(test, dart.functionType(core.bool, [E]));
144 let toRemove = []; 144 let toRemove = [];
145 for (let element of this) { 145 for (let element of this) {
146 if (test(element)) 146 if (dart.notNull(test(element)))
147 toRemove[dartx.add](element); 147 toRemove[dartx.add](element);
148 } 148 }
149 this.removeAll(toRemove); 149 this.removeAll(toRemove);
150 } 150 }
151 retainWhere(test) { 151 retainWhere(test) {
152 dart.as(test, dart.functionType(core.bool, [E])); 152 dart.as(test, dart.functionType(core.bool, [E]));
153 let toRemove = []; 153 let toRemove = [];
154 for (let element of this) { 154 for (let element of this) {
155 if (!dart.notNull(test(element))) 155 if (!dart.notNull(test(element)))
156 toRemove[dartx.add](element); 156 toRemove[dartx.add](element);
(...skipping 17 matching lines...) Expand all
174 let result = this.toSet(); 174 let result = this.toSet();
175 for (let element of this) { 175 for (let element of this) {
176 if (!dart.notNull(other.contains(element))) 176 if (!dart.notNull(other.contains(element)))
177 result.remove(element); 177 result.remove(element);
178 } 178 }
179 return result; 179 return result;
180 } 180 }
181 difference(other) { 181 difference(other) {
182 let result = this.toSet(); 182 let result = this.toSet();
183 for (let element of this) { 183 for (let element of this) {
184 if (other.contains(element)) 184 if (dart.notNull(other.contains(element)))
185 result.remove(element); 185 result.remove(element);
186 } 186 }
187 return result; 187 return result;
188 } 188 }
189 toList(opts) { 189 toList(opts) {
190 let growable = opts && 'growable' in opts ? opts.growable : true; 190 let growable = opts && 'growable' in opts ? opts.growable : true;
191 let result = growable ? (() => { 191 let result = dart.notNull(growable) ? (() => {
192 let _ = core.List$(E).new(); 192 let _ = core.List$(E).new();
193 _.length = this.length; 193 _.length = this.length;
194 return _; 194 return _;
195 })() : core.List$(E).new(this.length); 195 })() : core.List$(E).new(this.length);
196 let i = 0; 196 let i = 0;
197 for (let element of this) 197 for (let element of this)
198 result[dartx.set]((() => { 198 result[dartx.set]((() => {
199 let x = i; 199 let x = i;
200 i = dart.notNull(x) + 1; 200 i = dart.notNull(x) + 1;
201 return x; 201 return x;
(...skipping 29 matching lines...) Expand all
231 for (let element of this) 231 for (let element of this)
232 f(element); 232 f(element);
233 } 233 }
234 reduce(combine) { 234 reduce(combine) {
235 dart.as(combine, dart.functionType(E, [E, E])); 235 dart.as(combine, dart.functionType(E, [E, E]));
236 let iterator = this.iterator; 236 let iterator = this.iterator;
237 if (!dart.notNull(iterator.moveNext())) { 237 if (!dart.notNull(iterator.moveNext())) {
238 throw _internal.IterableElementError.noElement(); 238 throw _internal.IterableElementError.noElement();
239 } 239 }
240 let value = iterator.current; 240 let value = iterator.current;
241 while (iterator.moveNext()) { 241 while (dart.notNull(iterator.moveNext())) {
242 value = combine(value, iterator.current); 242 value = combine(value, iterator.current);
243 } 243 }
244 return value; 244 return value;
245 } 245 }
246 fold(initialValue, combine) { 246 fold(initialValue, combine) {
247 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); 247 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E]));
248 let value = initialValue; 248 let value = initialValue;
249 for (let element of this) 249 for (let element of this)
250 value = dart.dcall(combine, value, element); 250 value = dart.dcall(combine, value, element);
251 return value; 251 return value;
252 } 252 }
253 every(f) { 253 every(f) {
254 dart.as(f, dart.functionType(core.bool, [E])); 254 dart.as(f, dart.functionType(core.bool, [E]));
255 for (let element of this) { 255 for (let element of this) {
256 if (!dart.notNull(f(element))) 256 if (!dart.notNull(f(element)))
257 return false; 257 return false;
258 } 258 }
259 return true; 259 return true;
260 } 260 }
261 join(separator) { 261 join(separator) {
262 if (separator === void 0) 262 if (separator === void 0)
263 separator = ""; 263 separator = "";
264 let iterator = this.iterator; 264 let iterator = this.iterator;
265 if (!dart.notNull(iterator.moveNext())) 265 if (!dart.notNull(iterator.moveNext()))
266 return ""; 266 return "";
267 let buffer = new core.StringBuffer(); 267 let buffer = new core.StringBuffer();
268 if (separator == null || separator == "") { 268 if (separator == null || separator == "") {
269 do { 269 do {
270 buffer.write(`${iterator.current}`); 270 buffer.write(`${iterator.current}`);
271 } while (iterator.moveNext()); 271 } while (dart.notNull(iterator.moveNext()));
272 } else { 272 } else {
273 buffer.write(`${iterator.current}`); 273 buffer.write(`${iterator.current}`);
274 while (iterator.moveNext()) { 274 while (dart.notNull(iterator.moveNext())) {
275 buffer.write(separator); 275 buffer.write(separator);
276 buffer.write(`${iterator.current}`); 276 buffer.write(`${iterator.current}`);
277 } 277 }
278 } 278 }
279 return dart.toString(buffer); 279 return dart.toString(buffer);
280 } 280 }
281 any(test) { 281 any(test) {
282 dart.as(test, dart.functionType(core.bool, [E])); 282 dart.as(test, dart.functionType(core.bool, [E]));
283 for (let element of this) { 283 for (let element of this) {
284 if (test(element)) 284 if (dart.notNull(test(element)))
285 return true; 285 return true;
286 } 286 }
287 return false; 287 return false;
288 } 288 }
289 take(n) { 289 take(n) {
290 return _internal.TakeIterable$(E).new(this, n); 290 return _internal.TakeIterable$(E).new(this, n);
291 } 291 }
292 takeWhile(test) { 292 takeWhile(test) {
293 dart.as(test, dart.functionType(core.bool, [E])); 293 dart.as(test, dart.functionType(core.bool, [E]));
294 return new (_internal.TakeWhileIterable$(E))(this, test); 294 return new (_internal.TakeWhileIterable$(E))(this, test);
(...skipping 13 matching lines...) Expand all
308 return it.current; 308 return it.current;
309 } 309 }
310 get last() { 310 get last() {
311 let it = this.iterator; 311 let it = this.iterator;
312 if (!dart.notNull(it.moveNext())) { 312 if (!dart.notNull(it.moveNext())) {
313 throw _internal.IterableElementError.noElement(); 313 throw _internal.IterableElementError.noElement();
314 } 314 }
315 let result = null; 315 let result = null;
316 do { 316 do {
317 result = it.current; 317 result = it.current;
318 } while (it.moveNext()); 318 } while (dart.notNull(it.moveNext()));
319 return result; 319 return result;
320 } 320 }
321 firstWhere(test, opts) { 321 firstWhere(test, opts) {
322 dart.as(test, dart.functionType(core.bool, [E])); 322 dart.as(test, dart.functionType(core.bool, [E]));
323 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 323 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
324 dart.as(orElse, dart.functionType(E, [])); 324 dart.as(orElse, dart.functionType(E, []));
325 for (let element of this) { 325 for (let element of this) {
326 if (test(element)) 326 if (dart.notNull(test(element)))
327 return element; 327 return element;
328 } 328 }
329 if (orElse != null) 329 if (orElse != null)
330 return orElse(); 330 return orElse();
331 throw _internal.IterableElementError.noElement(); 331 throw _internal.IterableElementError.noElement();
332 } 332 }
333 lastWhere(test, opts) { 333 lastWhere(test, opts) {
334 dart.as(test, dart.functionType(core.bool, [E])); 334 dart.as(test, dart.functionType(core.bool, [E]));
335 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 335 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
336 dart.as(orElse, dart.functionType(E, [])); 336 dart.as(orElse, dart.functionType(E, []));
337 let result = null; 337 let result = null;
338 let foundMatching = false; 338 let foundMatching = false;
339 for (let element of this) { 339 for (let element of this) {
340 if (test(element)) { 340 if (dart.notNull(test(element))) {
341 result = element; 341 result = element;
342 foundMatching = true; 342 foundMatching = true;
343 } 343 }
344 } 344 }
345 if (foundMatching) 345 if (dart.notNull(foundMatching))
346 return result; 346 return result;
347 if (orElse != null) 347 if (orElse != null)
348 return orElse(); 348 return orElse();
349 throw _internal.IterableElementError.noElement(); 349 throw _internal.IterableElementError.noElement();
350 } 350 }
351 singleWhere(test) { 351 singleWhere(test) {
352 dart.as(test, dart.functionType(core.bool, [E])); 352 dart.as(test, dart.functionType(core.bool, [E]));
353 let result = null; 353 let result = null;
354 let foundMatching = false; 354 let foundMatching = false;
355 for (let element of this) { 355 for (let element of this) {
356 if (test(element)) { 356 if (dart.notNull(test(element))) {
357 if (foundMatching) { 357 if (dart.notNull(foundMatching)) {
358 throw _internal.IterableElementError.tooMany(); 358 throw _internal.IterableElementError.tooMany();
359 } 359 }
360 result = element; 360 result = element;
361 foundMatching = true; 361 foundMatching = true;
362 } 362 }
363 } 363 }
364 if (foundMatching) 364 if (dart.notNull(foundMatching))
365 return result; 365 return result;
366 throw _internal.IterableElementError.noElement(); 366 throw _internal.IterableElementError.noElement();
367 } 367 }
368 elementAt(index) { 368 elementAt(index) {
369 if (!(typeof index == 'number')) 369 if (!(typeof index == 'number'))
370 throw new core.ArgumentError.notNull("index"); 370 throw new core.ArgumentError.notNull("index");
371 core.RangeError.checkNotNegative(index, "index"); 371 core.RangeError.checkNotNegative(index, "index");
372 let elementIndex = 0; 372 let elementIndex = 0;
373 for (let element of this) { 373 for (let element of this) {
374 if (index == elementIndex) 374 if (index == elementIndex)
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 let result = this[_newSet](); 459 let result = this[_newSet]();
460 for (let element of this) { 460 for (let element of this) {
461 if (!dart.notNull(other.contains(element))) 461 if (!dart.notNull(other.contains(element)))
462 result.add(element); 462 result.add(element);
463 } 463 }
464 return result; 464 return result;
465 } 465 }
466 intersection(other) { 466 intersection(other) {
467 let result = this[_newSet](); 467 let result = this[_newSet]();
468 for (let element of this) { 468 for (let element of this) {
469 if (other.contains(element)) 469 if (dart.notNull(other.contains(element)))
470 result.add(element); 470 result.add(element);
471 } 471 }
472 return result; 472 return result;
473 } 473 }
474 toSet() { 474 toSet() {
475 return (() => { 475 return (() => {
476 let _ = this[_newSet](); 476 let _ = this[_newSet]();
477 _.addAll(this); 477 _.addAll(this);
478 return _; 478 return _;
479 })(); 479 })();
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 for (let element of this) 569 for (let element of this)
570 f(element); 570 f(element);
571 } 571 }
572 reduce(combine) { 572 reduce(combine) {
573 dart.as(combine, dart.functionType(E, [E, E])); 573 dart.as(combine, dart.functionType(E, [E, E]));
574 let iterator = this.iterator; 574 let iterator = this.iterator;
575 if (!dart.notNull(iterator.moveNext())) { 575 if (!dart.notNull(iterator.moveNext())) {
576 throw _internal.IterableElementError.noElement(); 576 throw _internal.IterableElementError.noElement();
577 } 577 }
578 let value = iterator.current; 578 let value = iterator.current;
579 while (iterator.moveNext()) { 579 while (dart.notNull(iterator.moveNext())) {
580 value = combine(value, iterator.current); 580 value = combine(value, iterator.current);
581 } 581 }
582 return value; 582 return value;
583 } 583 }
584 fold(initialValue, combine) { 584 fold(initialValue, combine) {
585 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); 585 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E]));
586 let value = initialValue; 586 let value = initialValue;
587 for (let element of this) 587 for (let element of this)
588 value = dart.dcall(combine, value, element); 588 value = dart.dcall(combine, value, element);
589 return value; 589 return value;
590 } 590 }
591 every(f) { 591 every(f) {
592 dart.as(f, dart.functionType(core.bool, [E])); 592 dart.as(f, dart.functionType(core.bool, [E]));
593 for (let element of this) { 593 for (let element of this) {
594 if (!dart.notNull(f(element))) 594 if (!dart.notNull(f(element)))
595 return false; 595 return false;
596 } 596 }
597 return true; 597 return true;
598 } 598 }
599 join(separator) { 599 join(separator) {
600 if (separator === void 0) 600 if (separator === void 0)
601 separator = ""; 601 separator = "";
602 let iterator = this.iterator; 602 let iterator = this.iterator;
603 if (!dart.notNull(iterator.moveNext())) 603 if (!dart.notNull(iterator.moveNext()))
604 return ""; 604 return "";
605 let buffer = new core.StringBuffer(); 605 let buffer = new core.StringBuffer();
606 if (separator == null || separator == "") { 606 if (separator == null || separator == "") {
607 do { 607 do {
608 buffer.write(`${iterator.current}`); 608 buffer.write(`${iterator.current}`);
609 } while (iterator.moveNext()); 609 } while (dart.notNull(iterator.moveNext()));
610 } else { 610 } else {
611 buffer.write(`${iterator.current}`); 611 buffer.write(`${iterator.current}`);
612 while (iterator.moveNext()) { 612 while (dart.notNull(iterator.moveNext())) {
613 buffer.write(separator); 613 buffer.write(separator);
614 buffer.write(`${iterator.current}`); 614 buffer.write(`${iterator.current}`);
615 } 615 }
616 } 616 }
617 return dart.toString(buffer); 617 return dart.toString(buffer);
618 } 618 }
619 any(f) { 619 any(f) {
620 dart.as(f, dart.functionType(core.bool, [E])); 620 dart.as(f, dart.functionType(core.bool, [E]));
621 for (let element of this) { 621 for (let element of this) {
622 if (f(element)) 622 if (dart.notNull(f(element)))
623 return true; 623 return true;
624 } 624 }
625 return false; 625 return false;
626 } 626 }
627 toList(opts) { 627 toList(opts) {
628 let growable = opts && 'growable' in opts ? opts.growable : true; 628 let growable = opts && 'growable' in opts ? opts.growable : true;
629 return core.List$(E).from(this, {growable: growable}); 629 return core.List$(E).from(this, {growable: growable});
630 } 630 }
631 toSet() { 631 toSet() {
632 return core.Set$(E).from(this); 632 return core.Set$(E).from(this);
633 } 633 }
634 get length() { 634 get length() {
635 dart.assert(!dart.is(this, _internal.EfficientLength)); 635 dart.assert(!dart.is(this, _internal.EfficientLength));
636 let count = 0; 636 let count = 0;
637 let it = this[dartx.iterator]; 637 let it = this[dartx.iterator];
638 while (it.moveNext()) { 638 while (dart.notNull(it.moveNext())) {
639 count = dart.notNull(count) + 1; 639 count = dart.notNull(count) + 1;
640 } 640 }
641 return count; 641 return count;
642 } 642 }
643 get isEmpty() { 643 get isEmpty() {
644 return !dart.notNull(this[dartx.iterator].moveNext()); 644 return !dart.notNull(this[dartx.iterator].moveNext());
645 } 645 }
646 get isNotEmpty() { 646 get isNotEmpty() {
647 return !dart.notNull(this.isEmpty); 647 return !dart.notNull(this.isEmpty);
648 } 648 }
(...skipping 19 matching lines...) Expand all
668 return it.current; 668 return it.current;
669 } 669 }
670 get last() { 670 get last() {
671 let it = this[dartx.iterator]; 671 let it = this[dartx.iterator];
672 if (!dart.notNull(it.moveNext())) { 672 if (!dart.notNull(it.moveNext())) {
673 throw _internal.IterableElementError.noElement(); 673 throw _internal.IterableElementError.noElement();
674 } 674 }
675 let result = null; 675 let result = null;
676 do { 676 do {
677 result = it.current; 677 result = it.current;
678 } while (it.moveNext()); 678 } while (dart.notNull(it.moveNext()));
679 return result; 679 return result;
680 } 680 }
681 get single() { 681 get single() {
682 let it = this[dartx.iterator]; 682 let it = this[dartx.iterator];
683 if (!dart.notNull(it.moveNext())) 683 if (!dart.notNull(it.moveNext()))
684 throw _internal.IterableElementError.noElement(); 684 throw _internal.IterableElementError.noElement();
685 let result = it.current; 685 let result = it.current;
686 if (it.moveNext()) 686 if (dart.notNull(it.moveNext()))
687 throw _internal.IterableElementError.tooMany(); 687 throw _internal.IterableElementError.tooMany();
688 return result; 688 return result;
689 } 689 }
690 firstWhere(test, opts) { 690 firstWhere(test, opts) {
691 dart.as(test, dart.functionType(core.bool, [E])); 691 dart.as(test, dart.functionType(core.bool, [E]));
692 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 692 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
693 dart.as(orElse, dart.functionType(E, [])); 693 dart.as(orElse, dart.functionType(E, []));
694 for (let element of this) { 694 for (let element of this) {
695 if (test(element)) 695 if (dart.notNull(test(element)))
696 return element; 696 return element;
697 } 697 }
698 if (orElse != null) 698 if (orElse != null)
699 return orElse(); 699 return orElse();
700 throw _internal.IterableElementError.noElement(); 700 throw _internal.IterableElementError.noElement();
701 } 701 }
702 lastWhere(test, opts) { 702 lastWhere(test, opts) {
703 dart.as(test, dart.functionType(core.bool, [E])); 703 dart.as(test, dart.functionType(core.bool, [E]));
704 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 704 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
705 dart.as(orElse, dart.functionType(E, [])); 705 dart.as(orElse, dart.functionType(E, []));
706 let result = null; 706 let result = null;
707 let foundMatching = false; 707 let foundMatching = false;
708 for (let element of this) { 708 for (let element of this) {
709 if (test(element)) { 709 if (dart.notNull(test(element))) {
710 result = element; 710 result = element;
711 foundMatching = true; 711 foundMatching = true;
712 } 712 }
713 } 713 }
714 if (foundMatching) 714 if (dart.notNull(foundMatching))
715 return result; 715 return result;
716 if (orElse != null) 716 if (orElse != null)
717 return orElse(); 717 return orElse();
718 throw _internal.IterableElementError.noElement(); 718 throw _internal.IterableElementError.noElement();
719 } 719 }
720 singleWhere(test) { 720 singleWhere(test) {
721 dart.as(test, dart.functionType(core.bool, [E])); 721 dart.as(test, dart.functionType(core.bool, [E]));
722 let result = null; 722 let result = null;
723 let foundMatching = false; 723 let foundMatching = false;
724 for (let element of this) { 724 for (let element of this) {
725 if (test(element)) { 725 if (dart.notNull(test(element))) {
726 if (foundMatching) { 726 if (dart.notNull(foundMatching)) {
727 throw _internal.IterableElementError.tooMany(); 727 throw _internal.IterableElementError.tooMany();
728 } 728 }
729 result = element; 729 result = element;
730 foundMatching = true; 730 foundMatching = true;
731 } 731 }
732 } 732 }
733 if (foundMatching) 733 if (dart.notNull(foundMatching))
734 return result; 734 return result;
735 throw _internal.IterableElementError.noElement(); 735 throw _internal.IterableElementError.noElement();
736 } 736 }
737 elementAt(index) { 737 elementAt(index) {
738 if (!(typeof index == 'number')) 738 if (!(typeof index == 'number'))
739 throw new core.ArgumentError.notNull("index"); 739 throw new core.ArgumentError.notNull("index");
740 core.RangeError.checkNotNegative(index, "index"); 740 core.RangeError.checkNotNegative(index, "index");
741 let elementIndex = 0; 741 let elementIndex = 0;
742 for (let element of this) { 742 for (let element of this) {
743 if (index == elementIndex) 743 if (index == elementIndex)
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 for (let element of this) 837 for (let element of this)
838 f(element); 838 f(element);
839 } 839 }
840 reduce(combine) { 840 reduce(combine) {
841 dart.as(combine, dart.functionType(E, [E, E])); 841 dart.as(combine, dart.functionType(E, [E, E]));
842 let iterator = this.iterator; 842 let iterator = this.iterator;
843 if (!dart.notNull(iterator.moveNext())) { 843 if (!dart.notNull(iterator.moveNext())) {
844 throw _internal.IterableElementError.noElement(); 844 throw _internal.IterableElementError.noElement();
845 } 845 }
846 let value = iterator.current; 846 let value = iterator.current;
847 while (iterator.moveNext()) { 847 while (dart.notNull(iterator.moveNext())) {
848 value = combine(value, iterator.current); 848 value = combine(value, iterator.current);
849 } 849 }
850 return value; 850 return value;
851 } 851 }
852 fold(initialValue, combine) { 852 fold(initialValue, combine) {
853 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E])); 853 dart.as(combine, dart.functionType(core.Object, [dart.bottom, E]));
854 let value = initialValue; 854 let value = initialValue;
855 for (let element of this) 855 for (let element of this)
856 value = dart.dcall(combine, value, element); 856 value = dart.dcall(combine, value, element);
857 return value; 857 return value;
858 } 858 }
859 every(f) { 859 every(f) {
860 dart.as(f, dart.functionType(core.bool, [E])); 860 dart.as(f, dart.functionType(core.bool, [E]));
861 for (let element of this) { 861 for (let element of this) {
862 if (!dart.notNull(f(element))) 862 if (!dart.notNull(f(element)))
863 return false; 863 return false;
864 } 864 }
865 return true; 865 return true;
866 } 866 }
867 join(separator) { 867 join(separator) {
868 if (separator === void 0) 868 if (separator === void 0)
869 separator = ""; 869 separator = "";
870 let iterator = this.iterator; 870 let iterator = this.iterator;
871 if (!dart.notNull(iterator.moveNext())) 871 if (!dart.notNull(iterator.moveNext()))
872 return ""; 872 return "";
873 let buffer = new core.StringBuffer(); 873 let buffer = new core.StringBuffer();
874 if (separator == null || separator == "") { 874 if (separator == null || separator == "") {
875 do { 875 do {
876 buffer.write(`${iterator.current}`); 876 buffer.write(`${iterator.current}`);
877 } while (iterator.moveNext()); 877 } while (dart.notNull(iterator.moveNext()));
878 } else { 878 } else {
879 buffer.write(`${iterator.current}`); 879 buffer.write(`${iterator.current}`);
880 while (iterator.moveNext()) { 880 while (dart.notNull(iterator.moveNext())) {
881 buffer.write(separator); 881 buffer.write(separator);
882 buffer.write(`${iterator.current}`); 882 buffer.write(`${iterator.current}`);
883 } 883 }
884 } 884 }
885 return dart.toString(buffer); 885 return dart.toString(buffer);
886 } 886 }
887 any(f) { 887 any(f) {
888 dart.as(f, dart.functionType(core.bool, [E])); 888 dart.as(f, dart.functionType(core.bool, [E]));
889 for (let element of this) { 889 for (let element of this) {
890 if (f(element)) 890 if (dart.notNull(f(element)))
891 return true; 891 return true;
892 } 892 }
893 return false; 893 return false;
894 } 894 }
895 toList(opts) { 895 toList(opts) {
896 let growable = opts && 'growable' in opts ? opts.growable : true; 896 let growable = opts && 'growable' in opts ? opts.growable : true;
897 return core.List$(E).from(this, {growable: growable}); 897 return core.List$(E).from(this, {growable: growable});
898 } 898 }
899 toSet() { 899 toSet() {
900 return core.Set$(E).from(this); 900 return core.Set$(E).from(this);
901 } 901 }
902 get length() { 902 get length() {
903 dart.assert(!dart.is(this, _internal.EfficientLength)); 903 dart.assert(!dart.is(this, _internal.EfficientLength));
904 let count = 0; 904 let count = 0;
905 let it = this[dartx.iterator]; 905 let it = this[dartx.iterator];
906 while (it.moveNext()) { 906 while (dart.notNull(it.moveNext())) {
907 count = dart.notNull(count) + 1; 907 count = dart.notNull(count) + 1;
908 } 908 }
909 return count; 909 return count;
910 } 910 }
911 get isEmpty() { 911 get isEmpty() {
912 return !dart.notNull(this[dartx.iterator].moveNext()); 912 return !dart.notNull(this[dartx.iterator].moveNext());
913 } 913 }
914 get isNotEmpty() { 914 get isNotEmpty() {
915 return !dart.notNull(this.isEmpty); 915 return !dart.notNull(this.isEmpty);
916 } 916 }
(...skipping 19 matching lines...) Expand all
936 return it.current; 936 return it.current;
937 } 937 }
938 get last() { 938 get last() {
939 let it = this[dartx.iterator]; 939 let it = this[dartx.iterator];
940 if (!dart.notNull(it.moveNext())) { 940 if (!dart.notNull(it.moveNext())) {
941 throw _internal.IterableElementError.noElement(); 941 throw _internal.IterableElementError.noElement();
942 } 942 }
943 let result = null; 943 let result = null;
944 do { 944 do {
945 result = it.current; 945 result = it.current;
946 } while (it.moveNext()); 946 } while (dart.notNull(it.moveNext()));
947 return result; 947 return result;
948 } 948 }
949 get single() { 949 get single() {
950 let it = this[dartx.iterator]; 950 let it = this[dartx.iterator];
951 if (!dart.notNull(it.moveNext())) 951 if (!dart.notNull(it.moveNext()))
952 throw _internal.IterableElementError.noElement(); 952 throw _internal.IterableElementError.noElement();
953 let result = it.current; 953 let result = it.current;
954 if (it.moveNext()) 954 if (dart.notNull(it.moveNext()))
955 throw _internal.IterableElementError.tooMany(); 955 throw _internal.IterableElementError.tooMany();
956 return result; 956 return result;
957 } 957 }
958 firstWhere(test, opts) { 958 firstWhere(test, opts) {
959 dart.as(test, dart.functionType(core.bool, [E])); 959 dart.as(test, dart.functionType(core.bool, [E]));
960 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 960 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
961 dart.as(orElse, dart.functionType(E, [])); 961 dart.as(orElse, dart.functionType(E, []));
962 for (let element of this) { 962 for (let element of this) {
963 if (test(element)) 963 if (dart.notNull(test(element)))
964 return element; 964 return element;
965 } 965 }
966 if (orElse != null) 966 if (orElse != null)
967 return orElse(); 967 return orElse();
968 throw _internal.IterableElementError.noElement(); 968 throw _internal.IterableElementError.noElement();
969 } 969 }
970 lastWhere(test, opts) { 970 lastWhere(test, opts) {
971 dart.as(test, dart.functionType(core.bool, [E])); 971 dart.as(test, dart.functionType(core.bool, [E]));
972 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 972 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
973 dart.as(orElse, dart.functionType(E, [])); 973 dart.as(orElse, dart.functionType(E, []));
974 let result = null; 974 let result = null;
975 let foundMatching = false; 975 let foundMatching = false;
976 for (let element of this) { 976 for (let element of this) {
977 if (test(element)) { 977 if (dart.notNull(test(element))) {
978 result = element; 978 result = element;
979 foundMatching = true; 979 foundMatching = true;
980 } 980 }
981 } 981 }
982 if (foundMatching) 982 if (dart.notNull(foundMatching))
983 return result; 983 return result;
984 if (orElse != null) 984 if (orElse != null)
985 return orElse(); 985 return orElse();
986 throw _internal.IterableElementError.noElement(); 986 throw _internal.IterableElementError.noElement();
987 } 987 }
988 singleWhere(test) { 988 singleWhere(test) {
989 dart.as(test, dart.functionType(core.bool, [E])); 989 dart.as(test, dart.functionType(core.bool, [E]));
990 let result = null; 990 let result = null;
991 let foundMatching = false; 991 let foundMatching = false;
992 for (let element of this) { 992 for (let element of this) {
993 if (test(element)) { 993 if (dart.notNull(test(element))) {
994 if (foundMatching) { 994 if (dart.notNull(foundMatching)) {
995 throw _internal.IterableElementError.tooMany(); 995 throw _internal.IterableElementError.tooMany();
996 } 996 }
997 result = element; 997 result = element;
998 foundMatching = true; 998 foundMatching = true;
999 } 999 }
1000 } 1000 }
1001 if (foundMatching) 1001 if (dart.notNull(foundMatching))
1002 return result; 1002 return result;
1003 throw _internal.IterableElementError.noElement(); 1003 throw _internal.IterableElementError.noElement();
1004 } 1004 }
1005 elementAt(index) { 1005 elementAt(index) {
1006 if (!(typeof index == 'number')) 1006 if (!(typeof index == 'number'))
1007 throw new core.ArgumentError.notNull("index"); 1007 throw new core.ArgumentError.notNull("index");
1008 core.RangeError.checkNotNegative(index, "index"); 1008 core.RangeError.checkNotNegative(index, "index");
1009 let elementIndex = 0; 1009 let elementIndex = 0;
1010 for (let element of this) { 1010 for (let element of this) {
1011 if (index == elementIndex) 1011 if (index == elementIndex)
1012 return element; 1012 return element;
1013 elementIndex = dart.notNull(elementIndex) + 1; 1013 elementIndex = dart.notNull(elementIndex) + 1;
1014 } 1014 }
1015 throw core.RangeError.index(index, this, "index", null, elementIndex); 1015 throw core.RangeError.index(index, this, "index", null, elementIndex);
1016 } 1016 }
1017 toString() { 1017 toString() {
1018 return IterableBase$().iterableToShortString(this, '(', ')'); 1018 return IterableBase$().iterableToShortString(this, '(', ')');
1019 } 1019 }
1020 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { 1020 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) {
1021 if (leftDelimiter === void 0) 1021 if (leftDelimiter === void 0)
1022 leftDelimiter = '('; 1022 leftDelimiter = '(';
1023 if (rightDelimiter === void 0) 1023 if (rightDelimiter === void 0)
1024 rightDelimiter = ')'; 1024 rightDelimiter = ')';
1025 if (IterableBase$()._isToStringVisiting(iterable)) { 1025 if (dart.notNull(IterableBase$()._isToStringVisiting(iterable))) {
1026 if (leftDelimiter == "(" && rightDelimiter == ")") { 1026 if (leftDelimiter == "(" && rightDelimiter == ")") {
1027 return "(...)"; 1027 return "(...)";
1028 } 1028 }
1029 return `${leftDelimiter}...${rightDelimiter}`; 1029 return `${leftDelimiter}...${rightDelimiter}`;
1030 } 1030 }
1031 let parts = []; 1031 let parts = [];
1032 IterableBase$()._toStringVisiting[dartx.add](iterable); 1032 IterableBase$()._toStringVisiting[dartx.add](iterable);
1033 try { 1033 try {
1034 IterableBase$()._iterablePartsToStrings(iterable, parts); 1034 IterableBase$()._iterablePartsToStrings(iterable, parts);
1035 } finally { 1035 } finally {
1036 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las t], iterable)); 1036 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las t], iterable));
1037 IterableBase$()._toStringVisiting[dartx.removeLast](); 1037 IterableBase$()._toStringVisiting[dartx.removeLast]();
1038 } 1038 }
1039 return dart.toString((() => { 1039 return dart.toString((() => {
1040 let _ = new core.StringBuffer(leftDelimiter); 1040 let _ = new core.StringBuffer(leftDelimiter);
1041 _.writeAll(parts, ", "); 1041 _.writeAll(parts, ", ");
1042 _.write(rightDelimiter); 1042 _.write(rightDelimiter);
1043 return _; 1043 return _;
1044 })()); 1044 })());
1045 } 1045 }
1046 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { 1046 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) {
1047 if (leftDelimiter === void 0) 1047 if (leftDelimiter === void 0)
1048 leftDelimiter = '('; 1048 leftDelimiter = '(';
1049 if (rightDelimiter === void 0) 1049 if (rightDelimiter === void 0)
1050 rightDelimiter = ')'; 1050 rightDelimiter = ')';
1051 if (IterableBase$()._isToStringVisiting(iterable)) { 1051 if (dart.notNull(IterableBase$()._isToStringVisiting(iterable))) {
1052 return `${leftDelimiter}...${rightDelimiter}`; 1052 return `${leftDelimiter}...${rightDelimiter}`;
1053 } 1053 }
1054 let buffer = new core.StringBuffer(leftDelimiter); 1054 let buffer = new core.StringBuffer(leftDelimiter);
1055 IterableBase$()._toStringVisiting[dartx.add](iterable); 1055 IterableBase$()._toStringVisiting[dartx.add](iterable);
1056 try { 1056 try {
1057 buffer.writeAll(iterable, ", "); 1057 buffer.writeAll(iterable, ", ");
1058 } finally { 1058 } finally {
1059 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las t], iterable)); 1059 dart.assert(core.identical(IterableBase$()._toStringVisiting[dartx.las t], iterable));
1060 IterableBase$()._toStringVisiting[dartx.removeLast](); 1060 IterableBase$()._toStringVisiting[dartx.removeLast]();
1061 } 1061 }
1062 buffer.write(rightDelimiter); 1062 buffer.write(rightDelimiter);
1063 return dart.toString(buffer); 1063 return dart.toString(buffer);
1064 } 1064 }
1065 static _isToStringVisiting(o) { 1065 static _isToStringVisiting(o) {
1066 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase$()._toString Visiting.length); i = dart.notNull(i) + 1) { 1066 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase$()._toString Visiting.length); i = dart.notNull(i) + 1) {
1067 if (core.identical(o, IterableBase$()._toStringVisiting[dartx.get](i)) ) 1067 if (dart.notNull(core.identical(o, IterableBase$()._toStringVisiting[d artx.get](i))))
1068 return true; 1068 return true;
1069 } 1069 }
1070 return false; 1070 return false;
1071 } 1071 }
1072 static _iterablePartsToStrings(iterable, parts) { 1072 static _iterablePartsToStrings(iterable, parts) {
1073 let LENGTH_LIMIT = 80; 1073 let LENGTH_LIMIT = 80;
1074 let HEAD_COUNT = 3; 1074 let HEAD_COUNT = 3;
1075 let TAIL_COUNT = 2; 1075 let TAIL_COUNT = 2;
1076 let MAX_COUNT = 100; 1076 let MAX_COUNT = 100;
1077 let OVERHEAD = 2; 1077 let OVERHEAD = 2;
(...skipping 26 matching lines...) Expand all
1104 parts[dartx.add](`${penultimate}`); 1104 parts[dartx.add](`${penultimate}`);
1105 return; 1105 return;
1106 } 1106 }
1107 ultimateString = `${penultimate}`; 1107 ultimateString = `${penultimate}`;
1108 penultimateString = dart.as(parts[dartx.removeLast](), core.String); 1108 penultimateString = dart.as(parts[dartx.removeLast](), core.String);
1109 length = dart.notNull(length) + (dart.notNull(ultimateString.length) + dart.notNull(OVERHEAD)); 1109 length = dart.notNull(length) + (dart.notNull(ultimateString.length) + dart.notNull(OVERHEAD));
1110 } else { 1110 } else {
1111 ultimate = it.current; 1111 ultimate = it.current;
1112 count = dart.notNull(count) + 1; 1112 count = dart.notNull(count) + 1;
1113 dart.assert(dart.notNull(count) < dart.notNull(MAX_COUNT)); 1113 dart.assert(dart.notNull(count) < dart.notNull(MAX_COUNT));
1114 while (it.moveNext()) { 1114 while (dart.notNull(it.moveNext())) {
1115 penultimate = ultimate; 1115 penultimate = ultimate;
1116 ultimate = it.current; 1116 ultimate = it.current;
1117 count = dart.notNull(count) + 1; 1117 count = dart.notNull(count) + 1;
1118 if (dart.notNull(count) > dart.notNull(MAX_COUNT)) { 1118 if (dart.notNull(count) > dart.notNull(MAX_COUNT)) {
1119 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) - dart. notNull(ELLIPSIS_SIZE) - dart.notNull(OVERHEAD) && dart.notNull(count) > dart.no tNull(HEAD_COUNT)) { 1119 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) - dart. notNull(ELLIPSIS_SIZE) - dart.notNull(OVERHEAD) && dart.notNull(count) > dart.no tNull(HEAD_COUNT)) {
1120 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsen d(dart.dload(parts[dartx.removeLast](), 'length'), '+', OVERHEAD), core.int)); 1120 length = dart.notNull(length) - dart.notNull(dart.as(dart.dsen d(dart.dload(parts[dartx.removeLast](), 'length'), '+', OVERHEAD), core.int));
1121 count = dart.notNull(count) - 1; 1121 count = dart.notNull(count) - 1;
1122 } 1122 }
1123 parts[dartx.add]("..."); 1123 parts[dartx.add]("...");
1124 return; 1124 return;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 } 1236 }
1237 next() { 1237 next() {
1238 if (!dart.notNull(this.hasNext)) 1238 if (!dart.notNull(this.hasNext))
1239 throw new core.StateError("No more elements"); 1239 throw new core.StateError("No more elements");
1240 dart.assert(this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CUR RENT); 1240 dart.assert(this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CUR RENT);
1241 let result = dart.as(this[_iterator].current, E); 1241 let result = dart.as(this[_iterator].current, E);
1242 this[_move](); 1242 this[_move]();
1243 return result; 1243 return result;
1244 } 1244 }
1245 [_move]() { 1245 [_move]() {
1246 if (this[_iterator].moveNext()) { 1246 if (dart.notNull(this[_iterator].moveNext())) {
1247 this[_state] = HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT; 1247 this[_state] = HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT;
1248 } else { 1248 } else {
1249 this[_state] = HasNextIterator$()._NO_NEXT; 1249 this[_state] = HasNextIterator$()._NO_NEXT;
1250 } 1250 }
1251 } 1251 }
1252 } 1252 }
1253 dart.setSignature(HasNextIterator, { 1253 dart.setSignature(HasNextIterator, {
1254 constructors: () => ({HasNextIterator: [HasNextIterator$(E), [core.Iterato r]]}), 1254 constructors: () => ({HasNextIterator: [HasNextIterator$(E), [core.Iterato r]]}),
1255 methods: () => ({ 1255 methods: () => ({
1256 next: [E, []], 1256 next: [E, []],
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1439 let next = this[_next]; 1439 let next = this[_next];
1440 while (!dart.notNull(core.identical(next, this))) { 1440 while (!dart.notNull(core.identical(next, this))) {
1441 let entry = dart.as(next, E); 1441 let entry = dart.as(next, E);
1442 next = entry[_next]; 1442 next = entry[_next];
1443 entry[_next] = entry[_previous] = entry[_list] = null; 1443 entry[_next] = entry[_previous] = entry[_list] = null;
1444 } 1444 }
1445 this[_next] = this[_previous] = this; 1445 this[_next] = this[_previous] = this;
1446 this[_length] = 0; 1446 this[_length] = 0;
1447 } 1447 }
1448 get first() { 1448 get first() {
1449 if (core.identical(this[_next], this)) { 1449 if (dart.notNull(core.identical(this[_next], this))) {
1450 throw new core.StateError('No such element'); 1450 throw new core.StateError('No such element');
1451 } 1451 }
1452 return dart.as(this[_next], E); 1452 return dart.as(this[_next], E);
1453 } 1453 }
1454 get last() { 1454 get last() {
1455 if (core.identical(this[_previous], this)) { 1455 if (dart.notNull(core.identical(this[_previous], this))) {
1456 throw new core.StateError('No such element'); 1456 throw new core.StateError('No such element');
1457 } 1457 }
1458 return dart.as(this[_previous], E); 1458 return dart.as(this[_previous], E);
1459 } 1459 }
1460 get single() { 1460 get single() {
1461 if (core.identical(this[_previous], this)) { 1461 if (dart.notNull(core.identical(this[_previous], this))) {
1462 throw new core.StateError('No such element'); 1462 throw new core.StateError('No such element');
1463 } 1463 }
1464 if (!dart.notNull(core.identical(this[_previous], this[_next]))) { 1464 if (!dart.notNull(core.identical(this[_previous], this[_next]))) {
1465 throw new core.StateError('Too many elements'); 1465 throw new core.StateError('Too many elements');
1466 } 1466 }
1467 return dart.as(this[_next], E); 1467 return dart.as(this[_next], E);
1468 } 1468 }
1469 forEach(action) { 1469 forEach(action) {
1470 dart.as(action, dart.functionType(dart.void, [E])); 1470 dart.as(action, dart.functionType(dart.void, [E]));
1471 let modificationCount = this[_modificationCount]; 1471 let modificationCount = this[_modificationCount];
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 _LinkedListIterator(list) { 1537 _LinkedListIterator(list) {
1538 this[_list] = list; 1538 this[_list] = list;
1539 this[_modificationCount] = list[_modificationCount]; 1539 this[_modificationCount] = list[_modificationCount];
1540 this[_next] = list[_next]; 1540 this[_next] = list[_next];
1541 this[_current] = null; 1541 this[_current] = null;
1542 } 1542 }
1543 get current() { 1543 get current() {
1544 return this[_current]; 1544 return this[_current];
1545 } 1545 }
1546 moveNext() { 1546 moveNext() {
1547 if (core.identical(this[_next], this[_list])) { 1547 if (dart.notNull(core.identical(this[_next], this[_list]))) {
1548 this[_current] = null; 1548 this[_current] = null;
1549 return false; 1549 return false;
1550 } 1550 }
1551 if (this[_modificationCount] != this[_list][_modificationCount]) { 1551 if (this[_modificationCount] != this[_list][_modificationCount]) {
1552 throw new core.ConcurrentModificationError(this); 1552 throw new core.ConcurrentModificationError(this);
1553 } 1553 }
1554 this[_current] = dart.as(this[_next], E); 1554 this[_current] = dart.as(this[_next], E);
1555 this[_next] = this[_next][_next]; 1555 this[_next] = this[_next][_next];
1556 return true; 1556 return true;
1557 } 1557 }
(...skipping 19 matching lines...) Expand all
1577 this[_next] = null; 1577 this[_next] = null;
1578 this[_previous] = null; 1578 this[_previous] = null;
1579 } 1579 }
1580 get list() { 1580 get list() {
1581 return this[_list]; 1581 return this[_list];
1582 } 1582 }
1583 unlink() { 1583 unlink() {
1584 this[_list][_unlink](this); 1584 this[_list][_unlink](this);
1585 } 1585 }
1586 get next() { 1586 get next() {
1587 if (core.identical(this[_next], this[_list])) 1587 if (dart.notNull(core.identical(this[_next], this[_list])))
1588 return null; 1588 return null;
1589 let result = dart.as(this[_next], E); 1589 let result = dart.as(this[_next], E);
1590 return result; 1590 return result;
1591 } 1591 }
1592 get previous() { 1592 get previous() {
1593 if (core.identical(this[_previous], this[_list])) 1593 if (dart.notNull(core.identical(this[_previous], this[_list])))
1594 return null; 1594 return null;
1595 return dart.as(this[_previous], E); 1595 return dart.as(this[_previous], E);
1596 } 1596 }
1597 insertAfter(entry) { 1597 insertAfter(entry) {
1598 dart.as(entry, E); 1598 dart.as(entry, E);
1599 this[_list][_insertAfter](this, entry); 1599 this[_list][_insertAfter](this, entry);
1600 } 1600 }
1601 insertBefore(entry) { 1601 insertBefore(entry) {
1602 dart.as(entry, E); 1602 dart.as(entry, E);
1603 this[_list][_insertAfter](this[_previous], entry); 1603 this[_list][_insertAfter](this[_previous], entry);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 if (length != this.length) { 1678 if (length != this.length) {
1679 throw new core.ConcurrentModificationError(this); 1679 throw new core.ConcurrentModificationError(this);
1680 } 1680 }
1681 } 1681 }
1682 return true; 1682 return true;
1683 } 1683 }
1684 any(test) { 1684 any(test) {
1685 dart.as(test, dart.functionType(core.bool, [E])); 1685 dart.as(test, dart.functionType(core.bool, [E]));
1686 let length = this.length; 1686 let length = this.length;
1687 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1687 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1688 if (test(this.get(i))) 1688 if (dart.notNull(test(this.get(i))))
1689 return true; 1689 return true;
1690 if (length != this.length) { 1690 if (length != this.length) {
1691 throw new core.ConcurrentModificationError(this); 1691 throw new core.ConcurrentModificationError(this);
1692 } 1692 }
1693 } 1693 }
1694 return false; 1694 return false;
1695 } 1695 }
1696 firstWhere(test, opts) { 1696 firstWhere(test, opts) {
1697 dart.as(test, dart.functionType(core.bool, [E])); 1697 dart.as(test, dart.functionType(core.bool, [E]));
1698 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 1698 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
1699 dart.as(orElse, dart.functionType(E, [])); 1699 dart.as(orElse, dart.functionType(E, []));
1700 let length = this.length; 1700 let length = this.length;
1701 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1701 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1702 let element = this.get(i); 1702 let element = this.get(i);
1703 if (test(element)) 1703 if (dart.notNull(test(element)))
1704 return element; 1704 return element;
1705 if (length != this.length) { 1705 if (length != this.length) {
1706 throw new core.ConcurrentModificationError(this); 1706 throw new core.ConcurrentModificationError(this);
1707 } 1707 }
1708 } 1708 }
1709 if (orElse != null) 1709 if (orElse != null)
1710 return orElse(); 1710 return orElse();
1711 throw _internal.IterableElementError.noElement(); 1711 throw _internal.IterableElementError.noElement();
1712 } 1712 }
1713 lastWhere(test, opts) { 1713 lastWhere(test, opts) {
1714 dart.as(test, dart.functionType(core.bool, [E])); 1714 dart.as(test, dart.functionType(core.bool, [E]));
1715 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 1715 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
1716 dart.as(orElse, dart.functionType(E, [])); 1716 dart.as(orElse, dart.functionType(E, []));
1717 let length = this.length; 1717 let length = this.length;
1718 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no tNull(i) - 1) { 1718 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no tNull(i) - 1) {
1719 let element = this.get(i); 1719 let element = this.get(i);
1720 if (test(element)) 1720 if (dart.notNull(test(element)))
1721 return element; 1721 return element;
1722 if (length != this.length) { 1722 if (length != this.length) {
1723 throw new core.ConcurrentModificationError(this); 1723 throw new core.ConcurrentModificationError(this);
1724 } 1724 }
1725 } 1725 }
1726 if (orElse != null) 1726 if (orElse != null)
1727 return orElse(); 1727 return orElse();
1728 throw _internal.IterableElementError.noElement(); 1728 throw _internal.IterableElementError.noElement();
1729 } 1729 }
1730 singleWhere(test) { 1730 singleWhere(test) {
1731 dart.as(test, dart.functionType(core.bool, [E])); 1731 dart.as(test, dart.functionType(core.bool, [E]));
1732 let length = this.length; 1732 let length = this.length;
1733 let match = null; 1733 let match = null;
1734 let matchFound = false; 1734 let matchFound = false;
1735 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1735 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1736 let element = this.get(i); 1736 let element = this.get(i);
1737 if (test(element)) { 1737 if (dart.notNull(test(element))) {
1738 if (matchFound) { 1738 if (dart.notNull(matchFound)) {
1739 throw _internal.IterableElementError.tooMany(); 1739 throw _internal.IterableElementError.tooMany();
1740 } 1740 }
1741 matchFound = true; 1741 matchFound = true;
1742 match = element; 1742 match = element;
1743 } 1743 }
1744 if (length != this.length) { 1744 if (length != this.length) {
1745 throw new core.ConcurrentModificationError(this); 1745 throw new core.ConcurrentModificationError(this);
1746 } 1746 }
1747 } 1747 }
1748 if (matchFound) 1748 if (dart.notNull(matchFound))
1749 return match; 1749 return match;
1750 throw _internal.IterableElementError.noElement(); 1750 throw _internal.IterableElementError.noElement();
1751 } 1751 }
1752 join(separator) { 1752 join(separator) {
1753 if (separator === void 0) 1753 if (separator === void 0)
1754 separator = ""; 1754 separator = "";
1755 if (this.length == 0) 1755 if (this.length == 0)
1756 return ""; 1756 return "";
1757 let buffer = new core.StringBuffer(); 1757 let buffer = new core.StringBuffer();
1758 buffer.writeAll(this, separator); 1758 buffer.writeAll(this, separator);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 take(count) { 1806 take(count) {
1807 return new (_internal.SubListIterable$(E))(this, 0, count); 1807 return new (_internal.SubListIterable$(E))(this, 0, count);
1808 } 1808 }
1809 takeWhile(test) { 1809 takeWhile(test) {
1810 dart.as(test, dart.functionType(core.bool, [E])); 1810 dart.as(test, dart.functionType(core.bool, [E]));
1811 return new (_internal.TakeWhileIterable$(E))(this, test); 1811 return new (_internal.TakeWhileIterable$(E))(this, test);
1812 } 1812 }
1813 toList(opts) { 1813 toList(opts) {
1814 let growable = opts && 'growable' in opts ? opts.growable : true; 1814 let growable = opts && 'growable' in opts ? opts.growable : true;
1815 let result = null; 1815 let result = null;
1816 if (growable) { 1816 if (dart.notNull(growable)) {
1817 result = core.List$(E).new(); 1817 result = core.List$(E).new();
1818 result.length = this.length; 1818 result.length = this.length;
1819 } else { 1819 } else {
1820 result = core.List$(E).new(this.length); 1820 result = core.List$(E).new(this.length);
1821 } 1821 }
1822 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) { 1822 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) {
1823 result[dartx.set](i, this.get(i)); 1823 result[dartx.set](i, this.get(i));
1824 } 1824 }
1825 return result; 1825 return result;
1826 } 1826 }
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2230 containsValue(value) { 2230 containsValue(value) {
2231 for (let key of this.keys) { 2231 for (let key of this.keys) {
2232 if (dart.equals(this.get(key), value)) 2232 if (dart.equals(this.get(key), value))
2233 return true; 2233 return true;
2234 } 2234 }
2235 return false; 2235 return false;
2236 } 2236 }
2237 putIfAbsent(key, ifAbsent) { 2237 putIfAbsent(key, ifAbsent) {
2238 dart.as(key, K); 2238 dart.as(key, K);
2239 dart.as(ifAbsent, dart.functionType(V, [])); 2239 dart.as(ifAbsent, dart.functionType(V, []));
2240 if (this.keys[dartx.contains](key)) { 2240 if (dart.notNull(this.keys[dartx.contains](key))) {
2241 return this.get(key); 2241 return this.get(key);
2242 } 2242 }
2243 return this.set(key, ifAbsent()); 2243 return this.set(key, ifAbsent());
2244 } 2244 }
2245 containsKey(key) { 2245 containsKey(key) {
2246 return this.keys[dartx.contains](key); 2246 return this.keys[dartx.contains](key);
2247 } 2247 }
2248 get length() { 2248 get length() {
2249 return this.keys.length; 2249 return this.keys.length;
2250 } 2250 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 let _MapBaseValueIterable = _MapBaseValueIterable$(); 2367 let _MapBaseValueIterable = _MapBaseValueIterable$();
2368 let _keys = Symbol('_keys'); 2368 let _keys = Symbol('_keys');
2369 let _MapBaseValueIterator$ = dart.generic(function(V) { 2369 let _MapBaseValueIterator$ = dart.generic(function(V) {
2370 class _MapBaseValueIterator extends core.Object { 2370 class _MapBaseValueIterator extends core.Object {
2371 _MapBaseValueIterator(map) { 2371 _MapBaseValueIterator(map) {
2372 this[_map] = map; 2372 this[_map] = map;
2373 this[_keys] = map.keys[dartx.iterator]; 2373 this[_keys] = map.keys[dartx.iterator];
2374 this[_current] = null; 2374 this[_current] = null;
2375 } 2375 }
2376 moveNext() { 2376 moveNext() {
2377 if (this[_keys].moveNext()) { 2377 if (dart.notNull(this[_keys].moveNext())) {
2378 this[_current] = dart.as(this[_map].get(this[_keys].current), V); 2378 this[_current] = dart.as(this[_map].get(this[_keys].current), V);
2379 return true; 2379 return true;
2380 } 2380 }
2381 this[_current] = null; 2381 this[_current] = null;
2382 return false; 2382 return false;
2383 } 2383 }
2384 get current() { 2384 get current() {
2385 return this[_current]; 2385 return this[_current];
2386 } 2386 }
2387 } 2387 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
2484 } 2484 }
2485 static containsKey(map, key) { 2485 static containsKey(map, key) {
2486 for (let k of map.keys) { 2486 for (let k of map.keys) {
2487 if (dart.equals(key, k)) { 2487 if (dart.equals(key, k)) {
2488 return true; 2488 return true;
2489 } 2489 }
2490 } 2490 }
2491 return false; 2491 return false;
2492 } 2492 }
2493 static putIfAbsent(map, key, ifAbsent) { 2493 static putIfAbsent(map, key, ifAbsent) {
2494 if (map.containsKey(key)) { 2494 if (dart.notNull(map.containsKey(key))) {
2495 return map.get(key); 2495 return map.get(key);
2496 } 2496 }
2497 let v = ifAbsent(); 2497 let v = ifAbsent();
2498 map.set(key, v); 2498 map.set(key, v);
2499 return v; 2499 return v;
2500 } 2500 }
2501 static clear(map) { 2501 static clear(map) {
2502 for (let k of map.keys[dartx.toList]()) { 2502 for (let k of map.keys[dartx.toList]()) {
2503 map.remove(k); 2503 map.remove(k);
2504 } 2504 }
2505 } 2505 }
2506 static forEach(map, f) { 2506 static forEach(map, f) {
2507 for (let k of map.keys) { 2507 for (let k of map.keys) {
2508 dart.dcall(f, k, map.get(k)); 2508 dart.dcall(f, k, map.get(k));
2509 } 2509 }
2510 } 2510 }
2511 static getValues(map) { 2511 static getValues(map) {
2512 return map.keys[dartx.map](dart.fn(key => map.get(key))); 2512 return map.keys[dartx.map](dart.fn(key => map.get(key)));
2513 } 2513 }
2514 static length(map) { 2514 static length(map) {
2515 return map.keys.length; 2515 return map.keys.length;
2516 } 2516 }
2517 static isEmpty(map) { 2517 static isEmpty(map) {
2518 return map.keys[dartx.isEmpty]; 2518 return map.keys[dartx.isEmpty];
2519 } 2519 }
2520 static isNotEmpty(map) { 2520 static isNotEmpty(map) {
2521 return map.keys[dartx.isNotEmpty]; 2521 return map.keys[dartx.isNotEmpty];
2522 } 2522 }
2523 static mapToString(m) { 2523 static mapToString(m) {
2524 if (IterableBase._isToStringVisiting(m)) { 2524 if (dart.notNull(IterableBase._isToStringVisiting(m))) {
2525 return '{...}'; 2525 return '{...}';
2526 } 2526 }
2527 let result = new core.StringBuffer(); 2527 let result = new core.StringBuffer();
2528 try { 2528 try {
2529 IterableBase._toStringVisiting[dartx.add](m); 2529 IterableBase._toStringVisiting[dartx.add](m);
2530 result.write('{'); 2530 result.write('{');
2531 let first = true; 2531 let first = true;
2532 m.forEach(dart.fn((k, v) => { 2532 m.forEach(dart.fn((k, v) => {
2533 if (!dart.notNull(first)) { 2533 if (!dart.notNull(first)) {
2534 result.write(', '); 2534 result.write(', ');
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
2770 } 2770 }
2771 entry = entry[_next]; 2771 entry = entry[_next];
2772 } 2772 }
2773 return false; 2773 return false;
2774 } 2774 }
2775 [_filter](test, removeMatching) { 2775 [_filter](test, removeMatching) {
2776 dart.as(test, dart.functionType(core.bool, [E])); 2776 dart.as(test, dart.functionType(core.bool, [E]));
2777 let entry = this[_sentinel][_next]; 2777 let entry = this[_sentinel][_next];
2778 while (!dart.notNull(core.identical(entry, this[_sentinel]))) { 2778 while (!dart.notNull(core.identical(entry, this[_sentinel]))) {
2779 let next = entry[_next]; 2779 let next = entry[_next];
2780 if (core.identical(removeMatching, test(entry.element))) { 2780 if (dart.notNull(core.identical(removeMatching, test(entry.element)))) {
2781 entry.remove(); 2781 entry.remove();
2782 this[_elementCount] = dart.notNull(this[_elementCount]) - 1; 2782 this[_elementCount] = dart.notNull(this[_elementCount]) - 1;
2783 } 2783 }
2784 entry = next; 2784 entry = next;
2785 } 2785 }
2786 } 2786 }
2787 removeWhere(test) { 2787 removeWhere(test) {
2788 dart.as(test, dart.functionType(core.bool, [E])); 2788 dart.as(test, dart.functionType(core.bool, [E]));
2789 this[_filter](test, true); 2789 this[_filter](test, true);
2790 } 2790 }
2791 retainWhere(test) { 2791 retainWhere(test) {
2792 dart.as(test, dart.functionType(core.bool, [E])); 2792 dart.as(test, dart.functionType(core.bool, [E]));
2793 this[_filter](test, false); 2793 this[_filter](test, false);
2794 } 2794 }
2795 get first() { 2795 get first() {
2796 return this[_sentinel][_next].element; 2796 return this[_sentinel][_next].element;
2797 } 2797 }
2798 get last() { 2798 get last() {
2799 return this[_sentinel][_previous].element; 2799 return this[_sentinel][_previous].element;
2800 } 2800 }
2801 get single() { 2801 get single() {
2802 if (core.identical(this[_sentinel][_next], this[_sentinel][_previous])) { 2802 if (dart.notNull(core.identical(this[_sentinel][_next], this[_sentinel][ _previous]))) {
2803 return this[_sentinel][_next].element; 2803 return this[_sentinel][_next].element;
2804 } 2804 }
2805 throw _internal.IterableElementError.tooMany(); 2805 throw _internal.IterableElementError.tooMany();
2806 } 2806 }
2807 lastEntry() { 2807 lastEntry() {
2808 return this[_sentinel].previousEntry(); 2808 return this[_sentinel].previousEntry();
2809 } 2809 }
2810 firstEntry() { 2810 firstEntry() {
2811 return this[_sentinel].nextEntry(); 2811 return this[_sentinel].nextEntry();
2812 } 2812 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
2981 throw _internal.IterableElementError.tooMany(); 2981 throw _internal.IterableElementError.tooMany();
2982 return this[_table][dartx.get](this[_head]); 2982 return this[_table][dartx.get](this[_head]);
2983 } 2983 }
2984 elementAt(index) { 2984 elementAt(index) {
2985 core.RangeError.checkValidIndex(index, this); 2985 core.RangeError.checkValidIndex(index, this);
2986 return this[_table][dartx.get](dart.notNull(this[_head]) + dart.notNull( index) & dart.notNull(this[_table].length) - 1); 2986 return this[_table][dartx.get](dart.notNull(this[_head]) + dart.notNull( index) & dart.notNull(this[_table].length) - 1);
2987 } 2987 }
2988 toList(opts) { 2988 toList(opts) {
2989 let growable = opts && 'growable' in opts ? opts.growable : true; 2989 let growable = opts && 'growable' in opts ? opts.growable : true;
2990 let list = null; 2990 let list = null;
2991 if (growable) { 2991 if (dart.notNull(growable)) {
2992 list = core.List$(E).new(); 2992 list = core.List$(E).new();
2993 list.length = this.length; 2993 list.length = this.length;
2994 } else { 2994 } else {
2995 list = core.List$(E).new(this.length); 2995 list = core.List$(E).new(this.length);
2996 } 2996 }
2997 this[_writeToList](list); 2997 this[_writeToList](list);
2998 return list; 2998 return list;
2999 } 2999 }
3000 add(element) { 3000 add(element) {
3001 dart.as(element, E); 3001 dart.as(element, E);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
3042 } 3042 }
3043 [_filterWhere](test, removeMatching) { 3043 [_filterWhere](test, removeMatching) {
3044 dart.as(test, dart.functionType(core.bool, [E])); 3044 dart.as(test, dart.functionType(core.bool, [E]));
3045 let index = this[_head]; 3045 let index = this[_head];
3046 let modificationCount = this[_modificationCount]; 3046 let modificationCount = this[_modificationCount];
3047 let i = this[_head]; 3047 let i = this[_head];
3048 while (i != this[_tail]) { 3048 while (i != this[_tail]) {
3049 let element = this[_table][dartx.get](i); 3049 let element = this[_table][dartx.get](i);
3050 let remove = core.identical(removeMatching, test(element)); 3050 let remove = core.identical(removeMatching, test(element));
3051 this[_checkModification](modificationCount); 3051 this[_checkModification](modificationCount);
3052 if (remove) { 3052 if (dart.notNull(remove)) {
3053 i = this[_remove](i); 3053 i = this[_remove](i);
3054 modificationCount = this[_modificationCount] = dart.notNull(this[_mo dificationCount]) + 1; 3054 modificationCount = this[_modificationCount] = dart.notNull(this[_mo dificationCount]) + 1;
3055 } else { 3055 } else {
3056 i = dart.notNull(i) + 1 & dart.notNull(this[_table].length) - 1; 3056 i = dart.notNull(i) + 1 & dart.notNull(this[_table].length) - 1;
3057 } 3057 }
3058 } 3058 }
3059 } 3059 }
3060 removeWhere(test) { 3060 removeWhere(test) {
3061 dart.as(test, dart.functionType(core.bool, [E])); 3061 dart.as(test, dart.functionType(core.bool, [E]));
3062 this[_filterWhere](test, true); 3062 this[_filterWhere](test, true);
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
3593 } 3593 }
3594 get isEmpty() { 3594 get isEmpty() {
3595 return this[_root] == null; 3595 return this[_root] == null;
3596 } 3596 }
3597 get isNotEmpty() { 3597 get isNotEmpty() {
3598 return !dart.notNull(this.isEmpty); 3598 return !dart.notNull(this.isEmpty);
3599 } 3599 }
3600 forEach(f) { 3600 forEach(f) {
3601 dart.as(f, dart.functionType(dart.void, [K, V])); 3601 dart.as(f, dart.functionType(dart.void, [K, V]));
3602 let nodes = new (_SplayTreeNodeIterator$(K))(this); 3602 let nodes = new (_SplayTreeNodeIterator$(K))(this);
3603 while (nodes.moveNext()) { 3603 while (dart.notNull(nodes.moveNext())) {
3604 let node = dart.as(nodes.current, _SplayTreeMapNode$(K, V)); 3604 let node = dart.as(nodes.current, _SplayTreeMapNode$(K, V));
3605 f(node.key, node.value); 3605 f(node.key, node.value);
3606 } 3606 }
3607 } 3607 }
3608 get length() { 3608 get length() {
3609 return this[_count]; 3609 return this[_count];
3610 } 3610 }
3611 clear() { 3611 clear() {
3612 this[_clear](); 3612 this[_clear]();
3613 } 3613 }
3614 containsKey(key) { 3614 containsKey(key) {
3615 return dart.notNull(this[_validKey](key)) && this[_splay](dart.as(key, K )) == 0; 3615 return dart.notNull(this[_validKey](key)) && this[_splay](dart.as(key, K )) == 0;
3616 } 3616 }
3617 containsValue(value) { 3617 containsValue(value) {
3618 let found = false; 3618 let found = false;
3619 let initialSplayCount = this[_splayCount]; 3619 let initialSplayCount = this[_splayCount];
3620 let visit = node => { 3620 let visit = node => {
3621 while (node != null) { 3621 while (node != null) {
3622 if (dart.equals(node.value, value)) 3622 if (dart.equals(node.value, value))
3623 return true; 3623 return true;
3624 if (initialSplayCount != this[_splayCount]) { 3624 if (initialSplayCount != this[_splayCount]) {
3625 throw new core.ConcurrentModificationError(this); 3625 throw new core.ConcurrentModificationError(this);
3626 } 3626 }
3627 if (dart.notNull(node.right != null) && dart.notNull(visit(dart.as(n ode.right, _SplayTreeMapNode)))) 3627 if (node.right != null && dart.notNull(visit(dart.as(node.right, _Sp layTreeMapNode))))
3628 return true; 3628 return true;
3629 node = dart.as(node.left, _SplayTreeMapNode); 3629 node = dart.as(node.left, _SplayTreeMapNode);
3630 } 3630 }
3631 return false; 3631 return false;
3632 }; 3632 };
3633 dart.fn(visit, core.bool, [_SplayTreeMapNode]); 3633 dart.fn(visit, core.bool, [_SplayTreeMapNode]);
3634 return visit(dart.as(this[_root], _SplayTreeMapNode)); 3634 return visit(dart.as(this[_root], _SplayTreeMapNode));
3635 } 3635 }
3636 get keys() { 3636 get keys() {
3637 return new (_SplayTreeKeyIterable$(K))(this); 3637 return new (_SplayTreeKeyIterable$(K))(this);
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
3768 } else { 3768 } else {
3769 this[_tree][_splay](currentNode.key); 3769 this[_tree][_splay](currentNode.key);
3770 this[_findLeftMostDescendent](this[_tree][_root].right); 3770 this[_findLeftMostDescendent](this[_tree][_root].right);
3771 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty])); 3771 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty]));
3772 } 3772 }
3773 } 3773 }
3774 moveNext() { 3774 moveNext() {
3775 if (this[_modificationCount] != this[_tree][_modificationCount]) { 3775 if (this[_modificationCount] != this[_tree][_modificationCount]) {
3776 throw new core.ConcurrentModificationError(this[_tree]); 3776 throw new core.ConcurrentModificationError(this[_tree]);
3777 } 3777 }
3778 if (this[_workList][dartx.isEmpty]) { 3778 if (dart.notNull(this[_workList][dartx.isEmpty])) {
3779 this[_currentNode] = null; 3779 this[_currentNode] = null;
3780 return false; 3780 return false;
3781 } 3781 }
3782 if (this[_tree][_splayCount] != this[_splayCount] && dart.notNull(this[_ currentNode] != null)) { 3782 if (this[_tree][_splayCount] != this[_splayCount] && this[_currentNode] != null) {
3783 this[_rebuildWorkList](this[_currentNode]); 3783 this[_rebuildWorkList](this[_currentNode]);
3784 } 3784 }
3785 this[_currentNode] = this[_workList][dartx.removeLast](); 3785 this[_currentNode] = this[_workList][dartx.removeLast]();
3786 this[_findLeftMostDescendent](this[_currentNode].right); 3786 this[_findLeftMostDescendent](this[_currentNode].right);
3787 return true; 3787 return true;
3788 } 3788 }
3789 } 3789 }
3790 _SplayTreeIterator[dart.implements] = () => [core.Iterator$(T)]; 3790 _SplayTreeIterator[dart.implements] = () => [core.Iterator$(T)];
3791 dart.defineNamedConstructor(_SplayTreeIterator, 'startAt'); 3791 dart.defineNamedConstructor(_SplayTreeIterator, 'startAt');
3792 dart.setSignature(_SplayTreeIterator, { 3792 dart.setSignature(_SplayTreeIterator, {
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
3992 dart.as(elements, core.Iterable$(E)); 3992 dart.as(elements, core.Iterable$(E));
3993 for (let element of elements) { 3993 for (let element of elements) {
3994 let compare = this[_splay](element); 3994 let compare = this[_splay](element);
3995 if (compare != 0) { 3995 if (compare != 0) {
3996 this[_addNewRoot](new (_SplayTreeNode$(E))(element), compare); 3996 this[_addNewRoot](new (_SplayTreeNode$(E))(element), compare);
3997 } 3997 }
3998 } 3998 }
3999 } 3999 }
4000 removeAll(elements) { 4000 removeAll(elements) {
4001 for (let element of elements) { 4001 for (let element of elements) {
4002 if (this[_validKey](element)) 4002 if (dart.notNull(this[_validKey](element)))
4003 this[_remove](dart.as(element, E)); 4003 this[_remove](dart.as(element, E));
4004 } 4004 }
4005 } 4005 }
4006 retainAll(elements) { 4006 retainAll(elements) {
4007 let retainSet = new (SplayTreeSet$(E))(this[_comparator], this[_validKey ]); 4007 let retainSet = new (SplayTreeSet$(E))(this[_comparator], this[_validKey ]);
4008 let modificationCount = this[_modificationCount]; 4008 let modificationCount = this[_modificationCount];
4009 for (let object of elements) { 4009 for (let object of elements) {
4010 if (modificationCount != this[_modificationCount]) { 4010 if (modificationCount != this[_modificationCount]) {
4011 throw new core.ConcurrentModificationError(this); 4011 throw new core.ConcurrentModificationError(this);
4012 } 4012 }
(...skipping 10 matching lines...) Expand all
4023 if (!dart.notNull(this[_validKey](object))) 4023 if (!dart.notNull(this[_validKey](object)))
4024 return null; 4024 return null;
4025 let comp = this[_splay](dart.as(object, E)); 4025 let comp = this[_splay](dart.as(object, E));
4026 if (comp != 0) 4026 if (comp != 0)
4027 return null; 4027 return null;
4028 return this[_root].key; 4028 return this[_root].key;
4029 } 4029 }
4030 intersection(other) { 4030 intersection(other) {
4031 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); 4031 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]);
4032 for (let element of this) { 4032 for (let element of this) {
4033 if (other.contains(element)) 4033 if (dart.notNull(other.contains(element)))
4034 result.add(element); 4034 result.add(element);
4035 } 4035 }
4036 return result; 4036 return result;
4037 } 4037 }
4038 difference(other) { 4038 difference(other) {
4039 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]); 4039 let result = new (SplayTreeSet$(E))(this[_comparator], this[_validKey]);
4040 for (let element of this) { 4040 for (let element of this) {
4041 if (!dart.notNull(other.contains(element))) 4041 if (!dart.notNull(other.contains(element)))
4042 result.add(element); 4042 result.add(element);
4043 } 4043 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
4133 get isNotEmpty() { 4133 get isNotEmpty() {
4134 return !dart.notNull(this.isEmpty); 4134 return !dart.notNull(this.isEmpty);
4135 } 4135 }
4136 get keys() { 4136 get keys() {
4137 return new (HashMapKeyIterable$(K))(this); 4137 return new (HashMapKeyIterable$(K))(this);
4138 } 4138 }
4139 get values() { 4139 get values() {
4140 return _internal.MappedIterable$(K, V).new(this.keys, dart.fn(each => th is.get(each), V, [core.Object])); 4140 return _internal.MappedIterable$(K, V).new(this.keys, dart.fn(each => th is.get(each), V, [core.Object]));
4141 } 4141 }
4142 containsKey(key) { 4142 containsKey(key) {
4143 if (_HashMap$()._isStringKey(key)) { 4143 if (dart.notNull(_HashMap$()._isStringKey(key))) {
4144 let strings = this[_strings]; 4144 let strings = this[_strings];
4145 return strings == null ? false : _HashMap$()._hasTableEntry(strings, k ey); 4145 return strings == null ? false : _HashMap$()._hasTableEntry(strings, k ey);
4146 } else if (_HashMap$()._isNumericKey(key)) { 4146 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) {
4147 let nums = this[_nums]; 4147 let nums = this[_nums];
4148 return nums == null ? false : _HashMap$()._hasTableEntry(nums, key); 4148 return nums == null ? false : _HashMap$()._hasTableEntry(nums, key);
4149 } else { 4149 } else {
4150 return this[_containsKey](key); 4150 return this[_containsKey](key);
4151 } 4151 }
4152 } 4152 }
4153 [_containsKey](key) { 4153 [_containsKey](key) {
4154 let rest = this[_rest]; 4154 let rest = this[_rest];
4155 if (rest == null) 4155 if (rest == null)
4156 return false; 4156 return false;
4157 let bucket = this[_getBucket](rest, key); 4157 let bucket = this[_getBucket](rest, key);
4158 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; 4158 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0;
4159 } 4159 }
4160 containsValue(value) { 4160 containsValue(value) {
4161 return this[_computeKeys]()[dartx.any](dart.fn(each => dart.equals(this. get(each), value), core.bool, [core.Object])); 4161 return this[_computeKeys]()[dartx.any](dart.fn(each => dart.equals(this. get(each), value), core.bool, [core.Object]));
4162 } 4162 }
4163 addAll(other) { 4163 addAll(other) {
4164 dart.as(other, core.Map$(K, V)); 4164 dart.as(other, core.Map$(K, V));
4165 other.forEach(dart.fn((key, value) => { 4165 other.forEach(dart.fn((key, value) => {
4166 dart.as(key, K); 4166 dart.as(key, K);
4167 dart.as(value, V); 4167 dart.as(value, V);
4168 this.set(key, value); 4168 this.set(key, value);
4169 }, core.Object, [K, V])); 4169 }, core.Object, [K, V]));
4170 } 4170 }
4171 get(key) { 4171 get(key) {
4172 if (_HashMap$()._isStringKey(key)) { 4172 if (dart.notNull(_HashMap$()._isStringKey(key))) {
4173 let strings = this[_strings]; 4173 let strings = this[_strings];
4174 return strings == null ? null : dart.as(_HashMap$()._getTableEntry(str ings, key), V); 4174 return strings == null ? null : dart.as(_HashMap$()._getTableEntry(str ings, key), V);
4175 } else if (_HashMap$()._isNumericKey(key)) { 4175 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) {
4176 let nums = this[_nums]; 4176 let nums = this[_nums];
4177 return nums == null ? null : dart.as(_HashMap$()._getTableEntry(nums, key), V); 4177 return nums == null ? null : dart.as(_HashMap$()._getTableEntry(nums, key), V);
4178 } else { 4178 } else {
4179 return this[_get](key); 4179 return this[_get](key);
4180 } 4180 }
4181 } 4181 }
4182 [_get](key) { 4182 [_get](key) {
4183 let rest = this[_rest]; 4183 let rest = this[_rest];
4184 if (rest == null) 4184 if (rest == null)
4185 return null; 4185 return null;
4186 let bucket = this[_getBucket](rest, key); 4186 let bucket = this[_getBucket](rest, key);
4187 let index = this[_findBucketIndex](bucket, key); 4187 let index = this[_findBucketIndex](bucket, key);
4188 return dart.notNull(index) < 0 ? null : dart.as(bucket[dart.notNull(inde x) + 1], V); 4188 return dart.notNull(index) < 0 ? null : dart.as(bucket[dart.notNull(inde x) + 1], V);
4189 } 4189 }
4190 set(key, value) { 4190 set(key, value) {
4191 dart.as(key, K); 4191 dart.as(key, K);
4192 dart.as(value, V); 4192 dart.as(value, V);
4193 if (_HashMap$()._isStringKey(key)) { 4193 if (dart.notNull(_HashMap$()._isStringKey(key))) {
4194 let strings = this[_strings]; 4194 let strings = this[_strings];
4195 if (strings == null) 4195 if (strings == null)
4196 this[_strings] = strings = _HashMap$()._newHashTable(); 4196 this[_strings] = strings = _HashMap$()._newHashTable();
4197 this[_addHashTableEntry](strings, key, value); 4197 this[_addHashTableEntry](strings, key, value);
4198 } else if (_HashMap$()._isNumericKey(key)) { 4198 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) {
4199 let nums = this[_nums]; 4199 let nums = this[_nums];
4200 if (nums == null) 4200 if (nums == null)
4201 this[_nums] = nums = _HashMap$()._newHashTable(); 4201 this[_nums] = nums = _HashMap$()._newHashTable();
4202 this[_addHashTableEntry](nums, key, value); 4202 this[_addHashTableEntry](nums, key, value);
4203 } else { 4203 } else {
4204 this[_set](key, value); 4204 this[_set](key, value);
4205 } 4205 }
4206 } 4206 }
4207 [_set](key, value) { 4207 [_set](key, value) {
4208 dart.as(key, K); 4208 dart.as(key, K);
(...skipping 14 matching lines...) Expand all
4223 } else { 4223 } else {
4224 bucket.push(key, value); 4224 bucket.push(key, value);
4225 this[_length] = dart.notNull(this[_length]) + 1; 4225 this[_length] = dart.notNull(this[_length]) + 1;
4226 this[_keys] = null; 4226 this[_keys] = null;
4227 } 4227 }
4228 } 4228 }
4229 } 4229 }
4230 putIfAbsent(key, ifAbsent) { 4230 putIfAbsent(key, ifAbsent) {
4231 dart.as(key, K); 4231 dart.as(key, K);
4232 dart.as(ifAbsent, dart.functionType(V, [])); 4232 dart.as(ifAbsent, dart.functionType(V, []));
4233 if (this.containsKey(key)) 4233 if (dart.notNull(this.containsKey(key)))
4234 return this.get(key); 4234 return this.get(key);
4235 let value = ifAbsent(); 4235 let value = ifAbsent();
4236 this.set(key, value); 4236 this.set(key, value);
4237 return value; 4237 return value;
4238 } 4238 }
4239 remove(key) { 4239 remove(key) {
4240 if (_HashMap$()._isStringKey(key)) { 4240 if (dart.notNull(_HashMap$()._isStringKey(key))) {
4241 return this[_removeHashTableEntry](this[_strings], key); 4241 return this[_removeHashTableEntry](this[_strings], key);
4242 } else if (_HashMap$()._isNumericKey(key)) { 4242 } else if (dart.notNull(_HashMap$()._isNumericKey(key))) {
4243 return this[_removeHashTableEntry](this[_nums], key); 4243 return this[_removeHashTableEntry](this[_nums], key);
4244 } else { 4244 } else {
4245 return this[_remove](key); 4245 return this[_remove](key);
4246 } 4246 }
4247 } 4247 }
4248 [_remove](key) { 4248 [_remove](key) {
4249 let rest = this[_rest]; 4249 let rest = this[_rest];
4250 if (rest == null) 4250 if (rest == null)
4251 return null; 4251 return null;
4252 let bucket = this[_getBucket](rest, key); 4252 let bucket = this[_getBucket](rest, key);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
4320 [_addHashTableEntry](table, key, value) { 4320 [_addHashTableEntry](table, key, value) {
4321 dart.as(key, K); 4321 dart.as(key, K);
4322 dart.as(value, V); 4322 dart.as(value, V);
4323 if (!dart.notNull(_HashMap$()._hasTableEntry(table, key))) { 4323 if (!dart.notNull(_HashMap$()._hasTableEntry(table, key))) {
4324 this[_length] = dart.notNull(this[_length]) + 1; 4324 this[_length] = dart.notNull(this[_length]) + 1;
4325 this[_keys] = null; 4325 this[_keys] = null;
4326 } 4326 }
4327 _HashMap$()._setTableEntry(table, key, value); 4327 _HashMap$()._setTableEntry(table, key, value);
4328 } 4328 }
4329 [_removeHashTableEntry](table, key) { 4329 [_removeHashTableEntry](table, key) {
4330 if (dart.notNull(table != null) && dart.notNull(_HashMap$()._hasTableEnt ry(table, key))) { 4330 if (table != null && dart.notNull(_HashMap$()._hasTableEntry(table, key) )) {
4331 let value = dart.as(_HashMap$()._getTableEntry(table, key), V); 4331 let value = dart.as(_HashMap$()._getTableEntry(table, key), V);
4332 _HashMap$()._deleteTableEntry(table, key); 4332 _HashMap$()._deleteTableEntry(table, key);
4333 this[_length] = dart.notNull(this[_length]) - 1; 4333 this[_length] = dart.notNull(this[_length]) - 1;
4334 this[_keys] = null; 4334 this[_keys] = null;
4335 return value; 4335 return value;
4336 } else { 4336 } else {
4337 return null; 4337 return null;
4338 } 4338 }
4339 } 4339 }
4340 static _isStringKey(key) { 4340 static _isStringKey(key) {
4341 return typeof key == 'string' && dart.notNull(!dart.equals(key, '__proto __')); 4341 return typeof key == 'string' && !dart.equals(key, '__proto__');
4342 } 4342 }
4343 static _isNumericKey(key) { 4343 static _isNumericKey(key) {
4344 return dart.is(key, core.num) && (key & 0x3ffffff) === key; 4344 return dart.is(key, core.num) && (key & 0x3ffffff) === key;
4345 } 4345 }
4346 [_computeHashCode](key) { 4346 [_computeHashCode](key) {
4347 return dart.hashCode(key) & 0x3ffffff; 4347 return dart.hashCode(key) & 0x3ffffff;
4348 } 4348 }
4349 static _hasTableEntry(table, key) { 4349 static _hasTableEntry(table, key) {
4350 let entry = table[key]; 4350 let entry = table[key];
4351 return entry != null; 4351 return entry != null;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
4430 super._HashMap(); 4430 super._HashMap();
4431 } 4431 }
4432 [_computeHashCode](key) { 4432 [_computeHashCode](key) {
4433 return core.identityHashCode(key) & 0x3ffffff; 4433 return core.identityHashCode(key) & 0x3ffffff;
4434 } 4434 }
4435 [_findBucketIndex](bucket, key) { 4435 [_findBucketIndex](bucket, key) {
4436 if (bucket == null) 4436 if (bucket == null)
4437 return -1; 4437 return -1;
4438 let length = bucket.length; 4438 let length = bucket.length;
4439 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 2) { 4439 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 2) {
4440 if (core.identical(bucket[i], key)) 4440 if (dart.notNull(core.identical(bucket[i], key)))
4441 return i; 4441 return i;
4442 } 4442 }
4443 return -1; 4443 return -1;
4444 } 4444 }
4445 } 4445 }
4446 return _IdentityHashMap; 4446 return _IdentityHashMap;
4447 }); 4447 });
4448 let _IdentityHashMap = _IdentityHashMap$(); 4448 let _IdentityHashMap = _IdentityHashMap$();
4449 let _equals = Symbol('_equals'); 4449 let _equals = Symbol('_equals');
4450 let _hashCode = Symbol('_hashCode'); 4450 let _hashCode = Symbol('_hashCode');
(...skipping 26 matching lines...) Expand all
4477 return super[_remove](key); 4477 return super[_remove](key);
4478 } 4478 }
4479 [_computeHashCode](key) { 4479 [_computeHashCode](key) {
4480 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; 4480 return this[_hashCode](dart.as(key, K)) & 0x3ffffff;
4481 } 4481 }
4482 [_findBucketIndex](bucket, key) { 4482 [_findBucketIndex](bucket, key) {
4483 if (bucket == null) 4483 if (bucket == null)
4484 return -1; 4484 return -1;
4485 let length = bucket.length; 4485 let length = bucket.length;
4486 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 2) { 4486 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 2) {
4487 if (this[_equals](dart.as(bucket[i], K), dart.as(key, K))) 4487 if (dart.notNull(this[_equals](dart.as(bucket[i], K), dart.as(key, K)) ))
4488 return i; 4488 return i;
4489 } 4489 }
4490 return -1; 4490 return -1;
4491 } 4491 }
4492 toString() { 4492 toString() {
4493 return Maps.mapToString(this); 4493 return Maps.mapToString(this);
4494 } 4494 }
4495 } 4495 }
4496 dart.setSignature(_CustomHashMap, { 4496 dart.setSignature(_CustomHashMap, {
4497 constructors: () => ({_CustomHashMap: [_CustomHashMap$(K, V), [_Equality$( K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}), 4497 constructors: () => ({_CustomHashMap: [_CustomHashMap$(K, V), [_Equality$( K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}),
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
4609 get isNotEmpty() { 4609 get isNotEmpty() {
4610 return !dart.notNull(this.isEmpty); 4610 return !dart.notNull(this.isEmpty);
4611 } 4611 }
4612 get keys() { 4612 get keys() {
4613 return new (LinkedHashMapKeyIterable$(K))(this); 4613 return new (LinkedHashMapKeyIterable$(K))(this);
4614 } 4614 }
4615 get values() { 4615 get values() {
4616 return _internal.MappedIterable$(K, V).new(this.keys, dart.fn(each => th is.get(each), V, [core.Object])); 4616 return _internal.MappedIterable$(K, V).new(this.keys, dart.fn(each => th is.get(each), V, [core.Object]));
4617 } 4617 }
4618 containsKey(key) { 4618 containsKey(key) {
4619 if (_LinkedHashMap$()._isStringKey(key)) { 4619 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) {
4620 let strings = this[_strings]; 4620 let strings = this[_strings];
4621 if (strings == null) 4621 if (strings == null)
4622 return false; 4622 return false;
4623 let cell = dart.as(_LinkedHashMap$()._getTableEntry(strings, key), Lin kedHashMapCell); 4623 let cell = dart.as(_LinkedHashMap$()._getTableEntry(strings, key), Lin kedHashMapCell);
4624 return cell != null; 4624 return cell != null;
4625 } else if (_LinkedHashMap$()._isNumericKey(key)) { 4625 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) {
4626 let nums = this[_nums]; 4626 let nums = this[_nums];
4627 if (nums == null) 4627 if (nums == null)
4628 return false; 4628 return false;
4629 let cell = dart.as(_LinkedHashMap$()._getTableEntry(nums, key), Linked HashMapCell); 4629 let cell = dart.as(_LinkedHashMap$()._getTableEntry(nums, key), Linked HashMapCell);
4630 return cell != null; 4630 return cell != null;
4631 } else { 4631 } else {
4632 return this[_containsKey](key); 4632 return this[_containsKey](key);
4633 } 4633 }
4634 } 4634 }
4635 [_containsKey](key) { 4635 [_containsKey](key) {
4636 let rest = this[_rest]; 4636 let rest = this[_rest];
4637 if (rest == null) 4637 if (rest == null)
4638 return false; 4638 return false;
4639 let bucket = this[_getBucket](rest, key); 4639 let bucket = this[_getBucket](rest, key);
4640 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; 4640 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0;
4641 } 4641 }
4642 containsValue(value) { 4642 containsValue(value) {
4643 return this.keys[dartx.any](dart.fn(each => dart.equals(this.get(each), value), core.bool, [core.Object])); 4643 return this.keys[dartx.any](dart.fn(each => dart.equals(this.get(each), value), core.bool, [core.Object]));
4644 } 4644 }
4645 addAll(other) { 4645 addAll(other) {
4646 dart.as(other, core.Map$(K, V)); 4646 dart.as(other, core.Map$(K, V));
4647 other.forEach(dart.fn((key, value) => { 4647 other.forEach(dart.fn((key, value) => {
4648 dart.as(key, K); 4648 dart.as(key, K);
4649 dart.as(value, V); 4649 dart.as(value, V);
4650 this.set(key, value); 4650 this.set(key, value);
4651 }, core.Object, [K, V])); 4651 }, core.Object, [K, V]));
4652 } 4652 }
4653 get(key) { 4653 get(key) {
4654 if (_LinkedHashMap$()._isStringKey(key)) { 4654 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) {
4655 let strings = this[_strings]; 4655 let strings = this[_strings];
4656 if (strings == null) 4656 if (strings == null)
4657 return null; 4657 return null;
4658 let cell = dart.as(_LinkedHashMap$()._getTableEntry(strings, key), Lin kedHashMapCell); 4658 let cell = dart.as(_LinkedHashMap$()._getTableEntry(strings, key), Lin kedHashMapCell);
4659 return cell == null ? null : dart.as(cell[_value], V); 4659 return cell == null ? null : dart.as(cell[_value], V);
4660 } else if (_LinkedHashMap$()._isNumericKey(key)) { 4660 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) {
4661 let nums = this[_nums]; 4661 let nums = this[_nums];
4662 if (nums == null) 4662 if (nums == null)
4663 return null; 4663 return null;
4664 let cell = dart.as(_LinkedHashMap$()._getTableEntry(nums, key), Linked HashMapCell); 4664 let cell = dart.as(_LinkedHashMap$()._getTableEntry(nums, key), Linked HashMapCell);
4665 return cell == null ? null : dart.as(cell[_value], V); 4665 return cell == null ? null : dart.as(cell[_value], V);
4666 } else { 4666 } else {
4667 return this[_get](key); 4667 return this[_get](key);
4668 } 4668 }
4669 } 4669 }
4670 [_get](key) { 4670 [_get](key) {
4671 let rest = this[_rest]; 4671 let rest = this[_rest];
4672 if (rest == null) 4672 if (rest == null)
4673 return null; 4673 return null;
4674 let bucket = this[_getBucket](rest, key); 4674 let bucket = this[_getBucket](rest, key);
4675 let index = this[_findBucketIndex](bucket, key); 4675 let index = this[_findBucketIndex](bucket, key);
4676 if (dart.notNull(index) < 0) 4676 if (dart.notNull(index) < 0)
4677 return null; 4677 return null;
4678 let cell = dart.as(bucket[index], LinkedHashMapCell); 4678 let cell = dart.as(bucket[index], LinkedHashMapCell);
4679 return dart.as(cell[_value], V); 4679 return dart.as(cell[_value], V);
4680 } 4680 }
4681 set(key, value) { 4681 set(key, value) {
4682 dart.as(key, K); 4682 dart.as(key, K);
4683 dart.as(value, V); 4683 dart.as(value, V);
4684 if (_LinkedHashMap$()._isStringKey(key)) { 4684 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) {
4685 let strings = this[_strings]; 4685 let strings = this[_strings];
4686 if (strings == null) 4686 if (strings == null)
4687 this[_strings] = strings = _LinkedHashMap$()._newHashTable(); 4687 this[_strings] = strings = _LinkedHashMap$()._newHashTable();
4688 this[_addHashTableEntry](strings, key, value); 4688 this[_addHashTableEntry](strings, key, value);
4689 } else if (_LinkedHashMap$()._isNumericKey(key)) { 4689 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) {
4690 let nums = this[_nums]; 4690 let nums = this[_nums];
4691 if (nums == null) 4691 if (nums == null)
4692 this[_nums] = nums = _LinkedHashMap$()._newHashTable(); 4692 this[_nums] = nums = _LinkedHashMap$()._newHashTable();
4693 this[_addHashTableEntry](nums, key, value); 4693 this[_addHashTableEntry](nums, key, value);
4694 } else { 4694 } else {
4695 this[_set](key, value); 4695 this[_set](key, value);
4696 } 4696 }
4697 } 4697 }
4698 [_set](key, value) { 4698 [_set](key, value) {
4699 dart.as(key, K); 4699 dart.as(key, K);
(...skipping 13 matching lines...) Expand all
4713 cell[_value] = value; 4713 cell[_value] = value;
4714 } else { 4714 } else {
4715 let cell = this[_newLinkedCell](key, value); 4715 let cell = this[_newLinkedCell](key, value);
4716 bucket.push(cell); 4716 bucket.push(cell);
4717 } 4717 }
4718 } 4718 }
4719 } 4719 }
4720 putIfAbsent(key, ifAbsent) { 4720 putIfAbsent(key, ifAbsent) {
4721 dart.as(key, K); 4721 dart.as(key, K);
4722 dart.as(ifAbsent, dart.functionType(V, [])); 4722 dart.as(ifAbsent, dart.functionType(V, []));
4723 if (this.containsKey(key)) 4723 if (dart.notNull(this.containsKey(key)))
4724 return this.get(key); 4724 return this.get(key);
4725 let value = ifAbsent(); 4725 let value = ifAbsent();
4726 this.set(key, value); 4726 this.set(key, value);
4727 return value; 4727 return value;
4728 } 4728 }
4729 remove(key) { 4729 remove(key) {
4730 if (_LinkedHashMap$()._isStringKey(key)) { 4730 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) {
4731 return this[_removeHashTableEntry](this[_strings], key); 4731 return this[_removeHashTableEntry](this[_strings], key);
4732 } else if (_LinkedHashMap$()._isNumericKey(key)) { 4732 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) {
4733 return this[_removeHashTableEntry](this[_nums], key); 4733 return this[_removeHashTableEntry](this[_nums], key);
4734 } else { 4734 } else {
4735 return this[_remove](key); 4735 return this[_remove](key);
4736 } 4736 }
4737 } 4737 }
4738 [_remove](key) { 4738 [_remove](key) {
4739 let rest = this[_rest]; 4739 let rest = this[_rest];
4740 if (rest == null) 4740 if (rest == null)
4741 return null; 4741 return null;
4742 let bucket = this[_getBucket](rest, key); 4742 let bucket = this[_getBucket](rest, key);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
4816 if (next == null) { 4816 if (next == null) {
4817 dart.assert(dart.equals(cell, this[_last])); 4817 dart.assert(dart.equals(cell, this[_last]));
4818 this[_last] = previous; 4818 this[_last] = previous;
4819 } else { 4819 } else {
4820 next[_previous] = previous; 4820 next[_previous] = previous;
4821 } 4821 }
4822 this[_length] = dart.notNull(this[_length]) - 1; 4822 this[_length] = dart.notNull(this[_length]) - 1;
4823 this[_modified](); 4823 this[_modified]();
4824 } 4824 }
4825 static _isStringKey(key) { 4825 static _isStringKey(key) {
4826 return typeof key == 'string' && dart.notNull(!dart.equals(key, '__proto __')); 4826 return typeof key == 'string' && !dart.equals(key, '__proto__');
4827 } 4827 }
4828 static _isNumericKey(key) { 4828 static _isNumericKey(key) {
4829 return dart.is(key, core.num) && (key & 0x3ffffff) === key; 4829 return dart.is(key, core.num) && (key & 0x3ffffff) === key;
4830 } 4830 }
4831 [_computeHashCode](key) { 4831 [_computeHashCode](key) {
4832 return dart.hashCode(key) & 0x3ffffff; 4832 return dart.hashCode(key) & 0x3ffffff;
4833 } 4833 }
4834 static _getTableEntry(table, key) { 4834 static _getTableEntry(table, key) {
4835 return table[key]; 4835 return table[key];
4836 } 4836 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
4913 } 4913 }
4914 [_computeHashCode](key) { 4914 [_computeHashCode](key) {
4915 return core.identityHashCode(key) & 0x3ffffff; 4915 return core.identityHashCode(key) & 0x3ffffff;
4916 } 4916 }
4917 [_findBucketIndex](bucket, key) { 4917 [_findBucketIndex](bucket, key) {
4918 if (bucket == null) 4918 if (bucket == null)
4919 return -1; 4919 return -1;
4920 let length = bucket.length; 4920 let length = bucket.length;
4921 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 4921 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
4922 let cell = dart.as(bucket[i], LinkedHashMapCell); 4922 let cell = dart.as(bucket[i], LinkedHashMapCell);
4923 if (core.identical(cell[_key], key)) 4923 if (dart.notNull(core.identical(cell[_key], key)))
4924 return i; 4924 return i;
4925 } 4925 }
4926 return -1; 4926 return -1;
4927 } 4927 }
4928 } 4928 }
4929 return _LinkedIdentityHashMap; 4929 return _LinkedIdentityHashMap;
4930 }); 4930 });
4931 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(); 4931 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$();
4932 let _LinkedCustomHashMap$ = dart.generic(function(K, V) { 4932 let _LinkedCustomHashMap$ = dart.generic(function(K, V) {
4933 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) { 4933 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) {
(...skipping 25 matching lines...) Expand all
4959 } 4959 }
4960 [_computeHashCode](key) { 4960 [_computeHashCode](key) {
4961 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; 4961 return this[_hashCode](dart.as(key, K)) & 0x3ffffff;
4962 } 4962 }
4963 [_findBucketIndex](bucket, key) { 4963 [_findBucketIndex](bucket, key) {
4964 if (bucket == null) 4964 if (bucket == null)
4965 return -1; 4965 return -1;
4966 let length = bucket.length; 4966 let length = bucket.length;
4967 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 4967 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
4968 let cell = dart.as(bucket[i], LinkedHashMapCell); 4968 let cell = dart.as(bucket[i], LinkedHashMapCell);
4969 if (this[_equals](dart.as(cell[_key], K), dart.as(key, K))) 4969 if (dart.notNull(this[_equals](dart.as(cell[_key], K), dart.as(key, K) )))
4970 return i; 4970 return i;
4971 } 4971 }
4972 return -1; 4972 return -1;
4973 } 4973 }
4974 } 4974 }
4975 dart.setSignature(_LinkedCustomHashMap, { 4975 dart.setSignature(_LinkedCustomHashMap, {
4976 constructors: () => ({_LinkedCustomHashMap: [_LinkedCustomHashMap$(K, V), [_Equality$(K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}), 4976 constructors: () => ({_LinkedCustomHashMap: [_LinkedCustomHashMap$(K, V), [_Equality$(K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}),
4977 methods: () => ({ 4977 methods: () => ({
4978 get: [V, [core.Object]], 4978 get: [V, [core.Object]],
4979 set: [dart.void, [K, V]], 4979 set: [dart.void, [K, V]],
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
5096 get length() { 5096 get length() {
5097 return this[_length]; 5097 return this[_length];
5098 } 5098 }
5099 get isEmpty() { 5099 get isEmpty() {
5100 return this[_length] == 0; 5100 return this[_length] == 0;
5101 } 5101 }
5102 get isNotEmpty() { 5102 get isNotEmpty() {
5103 return !dart.notNull(this.isEmpty); 5103 return !dart.notNull(this.isEmpty);
5104 } 5104 }
5105 contains(object) { 5105 contains(object) {
5106 if (_HashSet$()._isStringElement(object)) { 5106 if (dart.notNull(_HashSet$()._isStringElement(object))) {
5107 let strings = this[_strings]; 5107 let strings = this[_strings];
5108 return strings == null ? false : _HashSet$()._hasTableEntry(strings, o bject); 5108 return strings == null ? false : _HashSet$()._hasTableEntry(strings, o bject);
5109 } else if (_HashSet$()._isNumericElement(object)) { 5109 } else if (dart.notNull(_HashSet$()._isNumericElement(object))) {
5110 let nums = this[_nums]; 5110 let nums = this[_nums];
5111 return nums == null ? false : _HashSet$()._hasTableEntry(nums, object) ; 5111 return nums == null ? false : _HashSet$()._hasTableEntry(nums, object) ;
5112 } else { 5112 } else {
5113 return this[_contains](object); 5113 return this[_contains](object);
5114 } 5114 }
5115 } 5115 }
5116 [_contains](object) { 5116 [_contains](object) {
5117 let rest = this[_rest]; 5117 let rest = this[_rest];
5118 if (rest == null) 5118 if (rest == null)
5119 return false; 5119 return false;
5120 let bucket = this[_getBucket](rest, object); 5120 let bucket = this[_getBucket](rest, object);
5121 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; 5121 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0;
5122 } 5122 }
5123 lookup(object) { 5123 lookup(object) {
5124 if (dart.notNull(_HashSet$()._isStringElement(object)) || dart.notNull(_ HashSet$()._isNumericElement(object))) { 5124 if (dart.notNull(_HashSet$()._isStringElement(object)) || dart.notNull(_ HashSet$()._isNumericElement(object))) {
5125 return dart.as(this.contains(object) ? object : null, E); 5125 return dart.as(dart.notNull(this.contains(object)) ? object : null, E) ;
5126 } 5126 }
5127 return this[_lookup](object); 5127 return this[_lookup](object);
5128 } 5128 }
5129 [_lookup](object) { 5129 [_lookup](object) {
5130 let rest = this[_rest]; 5130 let rest = this[_rest];
5131 if (rest == null) 5131 if (rest == null)
5132 return null; 5132 return null;
5133 let bucket = this[_getBucket](rest, object); 5133 let bucket = this[_getBucket](rest, object);
5134 let index = this[_findBucketIndex](bucket, object); 5134 let index = this[_findBucketIndex](bucket, object);
5135 if (dart.notNull(index) < 0) 5135 if (dart.notNull(index) < 0)
5136 return null; 5136 return null;
5137 return dart.as(bucket[dartx.get](index), E); 5137 return dart.as(bucket[dartx.get](index), E);
5138 } 5138 }
5139 add(element) { 5139 add(element) {
5140 dart.as(element, E); 5140 dart.as(element, E);
5141 if (_HashSet$()._isStringElement(element)) { 5141 if (dart.notNull(_HashSet$()._isStringElement(element))) {
5142 let strings = this[_strings]; 5142 let strings = this[_strings];
5143 if (strings == null) 5143 if (strings == null)
5144 this[_strings] = strings = _HashSet$()._newHashTable(); 5144 this[_strings] = strings = _HashSet$()._newHashTable();
5145 return this[_addHashTableEntry](strings, element); 5145 return this[_addHashTableEntry](strings, element);
5146 } else if (_HashSet$()._isNumericElement(element)) { 5146 } else if (dart.notNull(_HashSet$()._isNumericElement(element))) {
5147 let nums = this[_nums]; 5147 let nums = this[_nums];
5148 if (nums == null) 5148 if (nums == null)
5149 this[_nums] = nums = _HashSet$()._newHashTable(); 5149 this[_nums] = nums = _HashSet$()._newHashTable();
5150 return this[_addHashTableEntry](nums, element); 5150 return this[_addHashTableEntry](nums, element);
5151 } else { 5151 } else {
5152 return this[_add](element); 5152 return this[_add](element);
5153 } 5153 }
5154 } 5154 }
5155 [_add](element) { 5155 [_add](element) {
5156 dart.as(element, E); 5156 dart.as(element, E);
(...skipping 14 matching lines...) Expand all
5171 this[_elements] = null; 5171 this[_elements] = null;
5172 return true; 5172 return true;
5173 } 5173 }
5174 addAll(objects) { 5174 addAll(objects) {
5175 dart.as(objects, core.Iterable$(E)); 5175 dart.as(objects, core.Iterable$(E));
5176 for (let each of objects) { 5176 for (let each of objects) {
5177 this.add(each); 5177 this.add(each);
5178 } 5178 }
5179 } 5179 }
5180 remove(object) { 5180 remove(object) {
5181 if (_HashSet$()._isStringElement(object)) { 5181 if (dart.notNull(_HashSet$()._isStringElement(object))) {
5182 return this[_removeHashTableEntry](this[_strings], object); 5182 return this[_removeHashTableEntry](this[_strings], object);
5183 } else if (_HashSet$()._isNumericElement(object)) { 5183 } else if (dart.notNull(_HashSet$()._isNumericElement(object))) {
5184 return this[_removeHashTableEntry](this[_nums], object); 5184 return this[_removeHashTableEntry](this[_nums], object);
5185 } else { 5185 } else {
5186 return this[_remove](object); 5186 return this[_remove](object);
5187 } 5187 }
5188 } 5188 }
5189 [_remove](object) { 5189 [_remove](object) {
5190 let rest = this[_rest]; 5190 let rest = this[_rest];
5191 if (rest == null) 5191 if (rest == null)
5192 return false; 5192 return false;
5193 let bucket = this[_getBucket](rest, object); 5193 let bucket = this[_getBucket](rest, object);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
5242 result[index] = bucket[i]; 5242 result[index] = bucket[i];
5243 index = dart.notNull(index) + 1; 5243 index = dart.notNull(index) + 1;
5244 } 5244 }
5245 } 5245 }
5246 } 5246 }
5247 dart.assert(index == this[_length]); 5247 dart.assert(index == this[_length]);
5248 return this[_elements] = result; 5248 return this[_elements] = result;
5249 } 5249 }
5250 [_addHashTableEntry](table, element) { 5250 [_addHashTableEntry](table, element) {
5251 dart.as(element, E); 5251 dart.as(element, E);
5252 if (_HashSet$()._hasTableEntry(table, element)) 5252 if (dart.notNull(_HashSet$()._hasTableEntry(table, element)))
5253 return false; 5253 return false;
5254 _HashSet$()._setTableEntry(table, element, 0); 5254 _HashSet$()._setTableEntry(table, element, 0);
5255 this[_length] = dart.notNull(this[_length]) + 1; 5255 this[_length] = dart.notNull(this[_length]) + 1;
5256 this[_elements] = null; 5256 this[_elements] = null;
5257 return true; 5257 return true;
5258 } 5258 }
5259 [_removeHashTableEntry](table, element) { 5259 [_removeHashTableEntry](table, element) {
5260 if (dart.notNull(table != null) && dart.notNull(_HashSet$()._hasTableEnt ry(table, element))) { 5260 if (table != null && dart.notNull(_HashSet$()._hasTableEntry(table, elem ent))) {
5261 _HashSet$()._deleteTableEntry(table, element); 5261 _HashSet$()._deleteTableEntry(table, element);
5262 this[_length] = dart.notNull(this[_length]) - 1; 5262 this[_length] = dart.notNull(this[_length]) - 1;
5263 this[_elements] = null; 5263 this[_elements] = null;
5264 return true; 5264 return true;
5265 } else { 5265 } else {
5266 return false; 5266 return false;
5267 } 5267 }
5268 } 5268 }
5269 static _isStringElement(element) { 5269 static _isStringElement(element) {
5270 return typeof element == 'string' && dart.notNull(!dart.equals(element, '__proto__')); 5270 return typeof element == 'string' && !dart.equals(element, '__proto__');
5271 } 5271 }
5272 static _isNumericElement(element) { 5272 static _isNumericElement(element) {
5273 return dart.is(element, core.num) && (element & 0x3ffffff) === element; 5273 return dart.is(element, core.num) && (element & 0x3ffffff) === element;
5274 } 5274 }
5275 [_computeHashCode](element) { 5275 [_computeHashCode](element) {
5276 return dart.hashCode(element) & 0x3ffffff; 5276 return dart.hashCode(element) & 0x3ffffff;
5277 } 5277 }
5278 static _hasTableEntry(table, key) { 5278 static _hasTableEntry(table, key) {
5279 let entry = table[key]; 5279 let entry = table[key];
5280 return entry != null; 5280 return entry != null;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
5358 return new (_IdentityHashSet$(E))(); 5358 return new (_IdentityHashSet$(E))();
5359 } 5359 }
5360 [_computeHashCode](key) { 5360 [_computeHashCode](key) {
5361 return core.identityHashCode(key) & 0x3ffffff; 5361 return core.identityHashCode(key) & 0x3ffffff;
5362 } 5362 }
5363 [_findBucketIndex](bucket, element) { 5363 [_findBucketIndex](bucket, element) {
5364 if (bucket == null) 5364 if (bucket == null)
5365 return -1; 5365 return -1;
5366 let length = bucket.length; 5366 let length = bucket.length;
5367 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 5367 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
5368 if (core.identical(bucket[i], element)) 5368 if (dart.notNull(core.identical(bucket[i], element)))
5369 return i; 5369 return i;
5370 } 5370 }
5371 return -1; 5371 return -1;
5372 } 5372 }
5373 } 5373 }
5374 dart.setSignature(_IdentityHashSet, { 5374 dart.setSignature(_IdentityHashSet, {
5375 methods: () => ({[_newSet]: [core.Set$(E), []]}) 5375 methods: () => ({[_newSet]: [core.Set$(E), []]})
5376 }); 5376 });
5377 return _IdentityHashSet; 5377 return _IdentityHashSet;
5378 }); 5378 });
5379 let _IdentityHashSet = _IdentityHashSet$(); 5379 let _IdentityHashSet = _IdentityHashSet$();
5380 let _equality = Symbol('_equality'); 5380 let _equality = Symbol('_equality');
5381 let _hasher = Symbol('_hasher'); 5381 let _hasher = Symbol('_hasher');
5382 let _CustomHashSet$ = dart.generic(function(E) { 5382 let _CustomHashSet$ = dart.generic(function(E) {
5383 class _CustomHashSet extends _HashSet$(E) { 5383 class _CustomHashSet extends _HashSet$(E) {
5384 _CustomHashSet(equality, hasher, validKey) { 5384 _CustomHashSet(equality, hasher, validKey) {
5385 this[_equality] = equality; 5385 this[_equality] = equality;
5386 this[_hasher] = hasher; 5386 this[_hasher] = hasher;
5387 this[_validKey] = validKey != null ? validKey : dart.fn(x => dart.is(x, E), core.bool, [core.Object]); 5387 this[_validKey] = validKey != null ? validKey : dart.fn(x => dart.is(x, E), core.bool, [core.Object]);
5388 super._HashSet(); 5388 super._HashSet();
5389 } 5389 }
5390 [_newSet]() { 5390 [_newSet]() {
5391 return new (_CustomHashSet$(E))(this[_equality], this[_hasher], this[_va lidKey]); 5391 return new (_CustomHashSet$(E))(this[_equality], this[_hasher], this[_va lidKey]);
5392 } 5392 }
5393 [_findBucketIndex](bucket, element) { 5393 [_findBucketIndex](bucket, element) {
5394 if (bucket == null) 5394 if (bucket == null)
5395 return -1; 5395 return -1;
5396 let length = bucket.length; 5396 let length = bucket.length;
5397 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 5397 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
5398 if (this[_equality](dart.as(bucket[i], E), dart.as(element, E))) 5398 if (dart.notNull(this[_equality](dart.as(bucket[i], E), dart.as(elemen t, E))))
5399 return i; 5399 return i;
5400 } 5400 }
5401 return -1; 5401 return -1;
5402 } 5402 }
5403 [_computeHashCode](element) { 5403 [_computeHashCode](element) {
5404 return this[_hasher](dart.as(element, E)) & 0x3ffffff; 5404 return this[_hasher](dart.as(element, E)) & 0x3ffffff;
5405 } 5405 }
5406 add(object) { 5406 add(object) {
5407 dart.as(object, E); 5407 dart.as(object, E);
5408 return super[_add](object); 5408 return super[_add](object);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
5492 get length() { 5492 get length() {
5493 return this[_length]; 5493 return this[_length];
5494 } 5494 }
5495 get isEmpty() { 5495 get isEmpty() {
5496 return this[_length] == 0; 5496 return this[_length] == 0;
5497 } 5497 }
5498 get isNotEmpty() { 5498 get isNotEmpty() {
5499 return !dart.notNull(this.isEmpty); 5499 return !dart.notNull(this.isEmpty);
5500 } 5500 }
5501 contains(object) { 5501 contains(object) {
5502 if (_LinkedHashSet$()._isStringElement(object)) { 5502 if (dart.notNull(_LinkedHashSet$()._isStringElement(object))) {
5503 let strings = this[_strings]; 5503 let strings = this[_strings];
5504 if (strings == null) 5504 if (strings == null)
5505 return false; 5505 return false;
5506 let cell = dart.as(_LinkedHashSet$()._getTableEntry(strings, object), LinkedHashSetCell); 5506 let cell = dart.as(_LinkedHashSet$()._getTableEntry(strings, object), LinkedHashSetCell);
5507 return cell != null; 5507 return cell != null;
5508 } else if (_LinkedHashSet$()._isNumericElement(object)) { 5508 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(object))) {
5509 let nums = this[_nums]; 5509 let nums = this[_nums];
5510 if (nums == null) 5510 if (nums == null)
5511 return false; 5511 return false;
5512 let cell = dart.as(_LinkedHashSet$()._getTableEntry(nums, object), Lin kedHashSetCell); 5512 let cell = dart.as(_LinkedHashSet$()._getTableEntry(nums, object), Lin kedHashSetCell);
5513 return cell != null; 5513 return cell != null;
5514 } else { 5514 } else {
5515 return this[_contains](object); 5515 return this[_contains](object);
5516 } 5516 }
5517 } 5517 }
5518 [_contains](object) { 5518 [_contains](object) {
5519 let rest = this[_rest]; 5519 let rest = this[_rest];
5520 if (rest == null) 5520 if (rest == null)
5521 return false; 5521 return false;
5522 let bucket = this[_getBucket](rest, object); 5522 let bucket = this[_getBucket](rest, object);
5523 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; 5523 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0;
5524 } 5524 }
5525 lookup(object) { 5525 lookup(object) {
5526 if (dart.notNull(_LinkedHashSet$()._isStringElement(object)) || dart.not Null(_LinkedHashSet$()._isNumericElement(object))) { 5526 if (dart.notNull(_LinkedHashSet$()._isStringElement(object)) || dart.not Null(_LinkedHashSet$()._isNumericElement(object))) {
5527 return dart.as(this.contains(object) ? object : null, E); 5527 return dart.as(dart.notNull(this.contains(object)) ? object : null, E) ;
5528 } else { 5528 } else {
5529 return this[_lookup](object); 5529 return this[_lookup](object);
5530 } 5530 }
5531 } 5531 }
5532 [_lookup](object) { 5532 [_lookup](object) {
5533 let rest = this[_rest]; 5533 let rest = this[_rest];
5534 if (rest == null) 5534 if (rest == null)
5535 return null; 5535 return null;
5536 let bucket = this[_getBucket](rest, object); 5536 let bucket = this[_getBucket](rest, object);
5537 let index = this[_findBucketIndex](bucket, object); 5537 let index = this[_findBucketIndex](bucket, object);
(...skipping 18 matching lines...) Expand all
5556 throw new core.StateError("No elements"); 5556 throw new core.StateError("No elements");
5557 return dart.as(this[_first][_element], E); 5557 return dart.as(this[_first][_element], E);
5558 } 5558 }
5559 get last() { 5559 get last() {
5560 if (this[_last] == null) 5560 if (this[_last] == null)
5561 throw new core.StateError("No elements"); 5561 throw new core.StateError("No elements");
5562 return dart.as(this[_last][_element], E); 5562 return dart.as(this[_last][_element], E);
5563 } 5563 }
5564 add(element) { 5564 add(element) {
5565 dart.as(element, E); 5565 dart.as(element, E);
5566 if (_LinkedHashSet$()._isStringElement(element)) { 5566 if (dart.notNull(_LinkedHashSet$()._isStringElement(element))) {
5567 let strings = this[_strings]; 5567 let strings = this[_strings];
5568 if (strings == null) 5568 if (strings == null)
5569 this[_strings] = strings = _LinkedHashSet$()._newHashTable(); 5569 this[_strings] = strings = _LinkedHashSet$()._newHashTable();
5570 return this[_addHashTableEntry](strings, element); 5570 return this[_addHashTableEntry](strings, element);
5571 } else if (_LinkedHashSet$()._isNumericElement(element)) { 5571 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(element))) {
5572 let nums = this[_nums]; 5572 let nums = this[_nums];
5573 if (nums == null) 5573 if (nums == null)
5574 this[_nums] = nums = _LinkedHashSet$()._newHashTable(); 5574 this[_nums] = nums = _LinkedHashSet$()._newHashTable();
5575 return this[_addHashTableEntry](nums, element); 5575 return this[_addHashTableEntry](nums, element);
5576 } else { 5576 } else {
5577 return this[_add](element); 5577 return this[_add](element);
5578 } 5578 }
5579 } 5579 }
5580 [_add](element) { 5580 [_add](element) {
5581 dart.as(element, E); 5581 dart.as(element, E);
5582 let rest = this[_rest]; 5582 let rest = this[_rest];
5583 if (rest == null) 5583 if (rest == null)
5584 this[_rest] = rest = _LinkedHashSet$()._newHashTable(); 5584 this[_rest] = rest = _LinkedHashSet$()._newHashTable();
5585 let hash = this[_computeHashCode](element); 5585 let hash = this[_computeHashCode](element);
5586 let bucket = rest[hash]; 5586 let bucket = rest[hash];
5587 if (bucket == null) { 5587 if (bucket == null) {
5588 let cell = this[_newLinkedCell](element); 5588 let cell = this[_newLinkedCell](element);
5589 _LinkedHashSet$()._setTableEntry(rest, hash, [cell]); 5589 _LinkedHashSet$()._setTableEntry(rest, hash, [cell]);
5590 } else { 5590 } else {
5591 let index = this[_findBucketIndex](bucket, element); 5591 let index = this[_findBucketIndex](bucket, element);
5592 if (dart.notNull(index) >= 0) 5592 if (dart.notNull(index) >= 0)
5593 return false; 5593 return false;
5594 let cell = this[_newLinkedCell](element); 5594 let cell = this[_newLinkedCell](element);
5595 bucket.push(cell); 5595 bucket.push(cell);
5596 } 5596 }
5597 return true; 5597 return true;
5598 } 5598 }
5599 remove(object) { 5599 remove(object) {
5600 if (_LinkedHashSet$()._isStringElement(object)) { 5600 if (dart.notNull(_LinkedHashSet$()._isStringElement(object))) {
5601 return this[_removeHashTableEntry](this[_strings], object); 5601 return this[_removeHashTableEntry](this[_strings], object);
5602 } else if (_LinkedHashSet$()._isNumericElement(object)) { 5602 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(object))) {
5603 return this[_removeHashTableEntry](this[_nums], object); 5603 return this[_removeHashTableEntry](this[_nums], object);
5604 } else { 5604 } else {
5605 return this[_remove](object); 5605 return this[_remove](object);
5606 } 5606 }
5607 } 5607 }
5608 [_remove](object) { 5608 [_remove](object) {
5609 let rest = this[_rest]; 5609 let rest = this[_rest];
5610 if (rest == null) 5610 if (rest == null)
5611 return false; 5611 return false;
5612 let bucket = this[_getBucket](rest, object); 5612 let bucket = this[_getBucket](rest, object);
(...skipping 16 matching lines...) Expand all
5629 dart.as(test, dart.functionType(core.bool, [E])); 5629 dart.as(test, dart.functionType(core.bool, [E]));
5630 let cell = this[_first]; 5630 let cell = this[_first];
5631 while (cell != null) { 5631 while (cell != null) {
5632 let element = dart.as(cell[_element], E); 5632 let element = dart.as(cell[_element], E);
5633 let next = cell[_next]; 5633 let next = cell[_next];
5634 let modifications = this[_modifications]; 5634 let modifications = this[_modifications];
5635 let shouldRemove = removeMatching == test(element); 5635 let shouldRemove = removeMatching == test(element);
5636 if (modifications != this[_modifications]) { 5636 if (modifications != this[_modifications]) {
5637 throw new core.ConcurrentModificationError(this); 5637 throw new core.ConcurrentModificationError(this);
5638 } 5638 }
5639 if (shouldRemove) 5639 if (dart.notNull(shouldRemove))
5640 this.remove(element); 5640 this.remove(element);
5641 cell = next; 5641 cell = next;
5642 } 5642 }
5643 } 5643 }
5644 clear() { 5644 clear() {
5645 if (dart.notNull(this[_length]) > 0) { 5645 if (dart.notNull(this[_length]) > 0) {
5646 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last ] = null; 5646 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last ] = null;
5647 this[_length] = 0; 5647 this[_length] = 0;
5648 this[_modified](); 5648 this[_modified]();
5649 } 5649 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
5695 if (next == null) { 5695 if (next == null) {
5696 dart.assert(dart.equals(cell, this[_last])); 5696 dart.assert(dart.equals(cell, this[_last]));
5697 this[_last] = previous; 5697 this[_last] = previous;
5698 } else { 5698 } else {
5699 next[_previous] = previous; 5699 next[_previous] = previous;
5700 } 5700 }
5701 this[_length] = dart.notNull(this[_length]) - 1; 5701 this[_length] = dart.notNull(this[_length]) - 1;
5702 this[_modified](); 5702 this[_modified]();
5703 } 5703 }
5704 static _isStringElement(element) { 5704 static _isStringElement(element) {
5705 return typeof element == 'string' && dart.notNull(!dart.equals(element, '__proto__')); 5705 return typeof element == 'string' && !dart.equals(element, '__proto__');
5706 } 5706 }
5707 static _isNumericElement(element) { 5707 static _isNumericElement(element) {
5708 return dart.is(element, core.num) && (element & 0x3ffffff) === element; 5708 return dart.is(element, core.num) && (element & 0x3ffffff) === element;
5709 } 5709 }
5710 [_computeHashCode](element) { 5710 [_computeHashCode](element) {
5711 return dart.hashCode(element) & 0x3ffffff; 5711 return dart.hashCode(element) & 0x3ffffff;
5712 } 5712 }
5713 static _getTableEntry(table, key) { 5713 static _getTableEntry(table, key) {
5714 return table[key]; 5714 return table[key];
5715 } 5715 }
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
5803 } 5803 }
5804 [_computeHashCode](key) { 5804 [_computeHashCode](key) {
5805 return core.identityHashCode(key) & 0x3ffffff; 5805 return core.identityHashCode(key) & 0x3ffffff;
5806 } 5806 }
5807 [_findBucketIndex](bucket, element) { 5807 [_findBucketIndex](bucket, element) {
5808 if (bucket == null) 5808 if (bucket == null)
5809 return -1; 5809 return -1;
5810 let length = bucket.length; 5810 let length = bucket.length;
5811 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 5811 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
5812 let cell = dart.as(bucket[i], LinkedHashSetCell); 5812 let cell = dart.as(bucket[i], LinkedHashSetCell);
5813 if (core.identical(cell[_element], element)) 5813 if (dart.notNull(core.identical(cell[_element], element)))
5814 return i; 5814 return i;
5815 } 5815 }
5816 return -1; 5816 return -1;
5817 } 5817 }
5818 } 5818 }
5819 dart.setSignature(_LinkedIdentityHashSet, { 5819 dart.setSignature(_LinkedIdentityHashSet, {
5820 methods: () => ({[_newSet]: [core.Set$(E), []]}) 5820 methods: () => ({[_newSet]: [core.Set$(E), []]})
5821 }); 5821 });
5822 return _LinkedIdentityHashSet; 5822 return _LinkedIdentityHashSet;
5823 }); 5823 });
5824 let _LinkedIdentityHashSet = _LinkedIdentityHashSet$(); 5824 let _LinkedIdentityHashSet = _LinkedIdentityHashSet$();
5825 let _LinkedCustomHashSet$ = dart.generic(function(E) { 5825 let _LinkedCustomHashSet$ = dart.generic(function(E) {
5826 class _LinkedCustomHashSet extends _LinkedHashSet$(E) { 5826 class _LinkedCustomHashSet extends _LinkedHashSet$(E) {
5827 _LinkedCustomHashSet(equality, hasher, validKey) { 5827 _LinkedCustomHashSet(equality, hasher, validKey) {
5828 this[_equality] = equality; 5828 this[_equality] = equality;
5829 this[_hasher] = hasher; 5829 this[_hasher] = hasher;
5830 this[_validKey] = validKey != null ? validKey : dart.fn(x => dart.is(x, E), core.bool, [core.Object]); 5830 this[_validKey] = validKey != null ? validKey : dart.fn(x => dart.is(x, E), core.bool, [core.Object]);
5831 super._LinkedHashSet(); 5831 super._LinkedHashSet();
5832 } 5832 }
5833 [_newSet]() { 5833 [_newSet]() {
5834 return new (_LinkedCustomHashSet$(E))(this[_equality], this[_hasher], th is[_validKey]); 5834 return new (_LinkedCustomHashSet$(E))(this[_equality], this[_hasher], th is[_validKey]);
5835 } 5835 }
5836 [_findBucketIndex](bucket, element) { 5836 [_findBucketIndex](bucket, element) {
5837 if (bucket == null) 5837 if (bucket == null)
5838 return -1; 5838 return -1;
5839 let length = bucket.length; 5839 let length = bucket.length;
5840 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 5840 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
5841 let cell = dart.as(bucket[i], LinkedHashSetCell); 5841 let cell = dart.as(bucket[i], LinkedHashSetCell);
5842 if (this[_equality](dart.as(cell[_element], E), dart.as(element, E))) 5842 if (dart.notNull(this[_equality](dart.as(cell[_element], E), dart.as(e lement, E))))
5843 return i; 5843 return i;
5844 } 5844 }
5845 return -1; 5845 return -1;
5846 } 5846 }
5847 [_computeHashCode](element) { 5847 [_computeHashCode](element) {
5848 return this[_hasher](dart.as(element, E)) & 0x3ffffff; 5848 return this[_hasher](dart.as(element, E)) & 0x3ffffff;
5849 } 5849 }
5850 add(element) { 5850 add(element) {
5851 dart.as(element, E); 5851 dart.as(element, E);
5852 return super[_add](element); 5852 return super[_add](element);
(...skipping 15 matching lines...) Expand all
5868 } 5868 }
5869 containsAll(elements) { 5869 containsAll(elements) {
5870 for (let element of elements) { 5870 for (let element of elements) {
5871 if (!dart.notNull(this[_validKey](element)) || !dart.notNull(this.cont ains(element))) 5871 if (!dart.notNull(this[_validKey](element)) || !dart.notNull(this.cont ains(element)))
5872 return false; 5872 return false;
5873 } 5873 }
5874 return true; 5874 return true;
5875 } 5875 }
5876 removeAll(elements) { 5876 removeAll(elements) {
5877 for (let element of elements) { 5877 for (let element of elements) {
5878 if (this[_validKey](element)) { 5878 if (dart.notNull(this[_validKey](element))) {
5879 super[_remove](element); 5879 super[_remove](element);
5880 } 5880 }
5881 } 5881 }
5882 } 5882 }
5883 } 5883 }
5884 dart.setSignature(_LinkedCustomHashSet, { 5884 dart.setSignature(_LinkedCustomHashSet, {
5885 constructors: () => ({_LinkedCustomHashSet: [_LinkedCustomHashSet$(E), [_E quality$(E), _Hasher$(E), dart.functionType(core.bool, [core.Object])]]}), 5885 constructors: () => ({_LinkedCustomHashSet: [_LinkedCustomHashSet$(E), [_E quality$(E), _Hasher$(E), dart.functionType(core.bool, [core.Object])]]}),
5886 methods: () => ({ 5886 methods: () => ({
5887 [_newSet]: [core.Set$(E), []], 5887 [_newSet]: [core.Set$(E), []],
5888 add: [core.bool, [E]], 5888 add: [core.bool, [E]],
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
5994 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; 5994 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$;
5995 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; 5995 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable;
5996 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; 5996 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$;
5997 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; 5997 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator;
5998 exports.HashSetIterator$ = HashSetIterator$; 5998 exports.HashSetIterator$ = HashSetIterator$;
5999 exports.HashSetIterator = HashSetIterator; 5999 exports.HashSetIterator = HashSetIterator;
6000 exports.LinkedHashSetCell = LinkedHashSetCell; 6000 exports.LinkedHashSetCell = LinkedHashSetCell;
6001 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; 6001 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$;
6002 exports.LinkedHashSetIterator = LinkedHashSetIterator; 6002 exports.LinkedHashSetIterator = LinkedHashSetIterator;
6003 })(collection, _internal, core, _js_helper, math); 6003 })(collection, _internal, core, _js_helper, math);
OLDNEW
« no previous file with comments | « lib/runtime/dart/async.js ('k') | lib/runtime/dart/convert.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698