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

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

Issue 1233553005: Fixes #254 - Better stacktrace support (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: format fix Created 5 years, 5 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 dart_library.library('dart/collection', null, /* Imports */[ 1 dart_library.library('dart/collection', null, /* Imports */[
2 "dart_runtime/dart", 2 "dart_runtime/dart",
3 'dart/core' 3 'dart/core'
4 ], /* Lazy imports */[ 4 ], /* Lazy imports */[
5 'dart/_internal', 5 'dart/_internal',
6 'dart/_js_helper', 6 'dart/_js_helper',
7 'dart/math' 7 'dart/math'
8 ], function(exports, dart, core, _internal, _js_helper, math) { 8 ], function(exports, dart, core, _internal, _js_helper, math) {
9 'use strict'; 9 'use strict';
10 let dartx = dart.dartx; 10 let dartx = dart.dartx;
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 return x; 205 return x;
206 })(), element); 206 })(), element);
207 return result; 207 return result;
208 } 208 }
209 map(f) { 209 map(f) {
210 dart.as(f, dart.functionType(dart.dynamic, [E])); 210 dart.as(f, dart.functionType(dart.dynamic, [E]));
211 return new (_internal.EfficientLengthMappedIterable$(E, dart.dynamic))(t his, f); 211 return new (_internal.EfficientLengthMappedIterable$(E, dart.dynamic))(t his, f);
212 } 212 }
213 get single() { 213 get single() {
214 if (dart.notNull(this.length) > 1) 214 if (dart.notNull(this.length) > 1)
215 throw _internal.IterableElementError.tooMany(); 215 dart.throw(_internal.IterableElementError.tooMany());
216 let it = this.iterator; 216 let it = this.iterator;
217 if (!dart.notNull(it.moveNext())) 217 if (!dart.notNull(it.moveNext()))
218 throw _internal.IterableElementError.noElement(); 218 dart.throw(_internal.IterableElementError.noElement());
219 let result = it.current; 219 let result = it.current;
220 return result; 220 return result;
221 } 221 }
222 toString() { 222 toString() {
223 return IterableBase.iterableToFullString(this, '{', '}'); 223 return IterableBase.iterableToFullString(this, '{', '}');
224 } 224 }
225 where(f) { 225 where(f) {
226 dart.as(f, dart.functionType(core.bool, [E])); 226 dart.as(f, dart.functionType(core.bool, [E]));
227 return new (_internal.WhereIterable$(E))(this, f); 227 return new (_internal.WhereIterable$(E))(this, f);
228 } 228 }
229 expand(f) { 229 expand(f) {
230 dart.as(f, dart.functionType(core.Iterable, [E])); 230 dart.as(f, dart.functionType(core.Iterable, [E]));
231 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f); 231 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f);
232 } 232 }
233 forEach(f) { 233 forEach(f) {
234 dart.as(f, dart.functionType(dart.void, [E])); 234 dart.as(f, dart.functionType(dart.void, [E]));
235 for (let element of this) 235 for (let element of this)
236 f(element); 236 f(element);
237 } 237 }
238 reduce(combine) { 238 reduce(combine) {
239 dart.as(combine, dart.functionType(E, [E, E])); 239 dart.as(combine, dart.functionType(E, [E, E]));
240 let iterator = this.iterator; 240 let iterator = this.iterator;
241 if (!dart.notNull(iterator.moveNext())) { 241 if (!dart.notNull(iterator.moveNext())) {
242 throw _internal.IterableElementError.noElement(); 242 dart.throw(_internal.IterableElementError.noElement());
243 } 243 }
244 let value = iterator.current; 244 let value = iterator.current;
245 while (dart.notNull(iterator.moveNext())) { 245 while (dart.notNull(iterator.moveNext())) {
246 value = combine(value, iterator.current); 246 value = combine(value, iterator.current);
247 } 247 }
248 return value; 248 return value;
249 } 249 }
250 fold(initialValue, combine) { 250 fold(initialValue, combine) {
251 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); 251 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E]));
252 let value = initialValue; 252 let value = initialValue;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 skip(n) { 300 skip(n) {
301 return _internal.SkipIterable$(E).new(this, n); 301 return _internal.SkipIterable$(E).new(this, n);
302 } 302 }
303 skipWhile(test) { 303 skipWhile(test) {
304 dart.as(test, dart.functionType(core.bool, [E])); 304 dart.as(test, dart.functionType(core.bool, [E]));
305 return new (_internal.SkipWhileIterable$(E))(this, test); 305 return new (_internal.SkipWhileIterable$(E))(this, test);
306 } 306 }
307 get first() { 307 get first() {
308 let it = this.iterator; 308 let it = this.iterator;
309 if (!dart.notNull(it.moveNext())) { 309 if (!dart.notNull(it.moveNext())) {
310 throw _internal.IterableElementError.noElement(); 310 dart.throw(_internal.IterableElementError.noElement());
311 } 311 }
312 return it.current; 312 return it.current;
313 } 313 }
314 get last() { 314 get last() {
315 let it = this.iterator; 315 let it = this.iterator;
316 if (!dart.notNull(it.moveNext())) { 316 if (!dart.notNull(it.moveNext())) {
317 throw _internal.IterableElementError.noElement(); 317 dart.throw(_internal.IterableElementError.noElement());
318 } 318 }
319 let result = null; 319 let result = null;
320 do { 320 do {
321 result = it.current; 321 result = it.current;
322 } while (dart.notNull(it.moveNext())); 322 } while (dart.notNull(it.moveNext()));
323 return result; 323 return result;
324 } 324 }
325 firstWhere(test, opts) { 325 firstWhere(test, opts) {
326 dart.as(test, dart.functionType(core.bool, [E])); 326 dart.as(test, dart.functionType(core.bool, [E]));
327 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 327 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
328 dart.as(orElse, dart.functionType(E, [])); 328 dart.as(orElse, dart.functionType(E, []));
329 for (let element of this) { 329 for (let element of this) {
330 if (dart.notNull(test(element))) 330 if (dart.notNull(test(element)))
331 return element; 331 return element;
332 } 332 }
333 if (orElse != null) 333 if (orElse != null)
334 return orElse(); 334 return orElse();
335 throw _internal.IterableElementError.noElement(); 335 dart.throw(_internal.IterableElementError.noElement());
336 } 336 }
337 lastWhere(test, opts) { 337 lastWhere(test, opts) {
338 dart.as(test, dart.functionType(core.bool, [E])); 338 dart.as(test, dart.functionType(core.bool, [E]));
339 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 339 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
340 dart.as(orElse, dart.functionType(E, [])); 340 dart.as(orElse, dart.functionType(E, []));
341 let result = null; 341 let result = null;
342 let foundMatching = false; 342 let foundMatching = false;
343 for (let element of this) { 343 for (let element of this) {
344 if (dart.notNull(test(element))) { 344 if (dart.notNull(test(element))) {
345 result = element; 345 result = element;
346 foundMatching = true; 346 foundMatching = true;
347 } 347 }
348 } 348 }
349 if (dart.notNull(foundMatching)) 349 if (dart.notNull(foundMatching))
350 return result; 350 return result;
351 if (orElse != null) 351 if (orElse != null)
352 return orElse(); 352 return orElse();
353 throw _internal.IterableElementError.noElement(); 353 dart.throw(_internal.IterableElementError.noElement());
354 } 354 }
355 singleWhere(test) { 355 singleWhere(test) {
356 dart.as(test, dart.functionType(core.bool, [E])); 356 dart.as(test, dart.functionType(core.bool, [E]));
357 let result = null; 357 let result = null;
358 let foundMatching = false; 358 let foundMatching = false;
359 for (let element of this) { 359 for (let element of this) {
360 if (dart.notNull(test(element))) { 360 if (dart.notNull(test(element))) {
361 if (dart.notNull(foundMatching)) { 361 if (dart.notNull(foundMatching)) {
362 throw _internal.IterableElementError.tooMany(); 362 dart.throw(_internal.IterableElementError.tooMany());
363 } 363 }
364 result = element; 364 result = element;
365 foundMatching = true; 365 foundMatching = true;
366 } 366 }
367 } 367 }
368 if (dart.notNull(foundMatching)) 368 if (dart.notNull(foundMatching))
369 return result; 369 return result;
370 throw _internal.IterableElementError.noElement(); 370 dart.throw(_internal.IterableElementError.noElement());
371 } 371 }
372 elementAt(index) { 372 elementAt(index) {
373 if (!(typeof index == 'number')) 373 if (!(typeof index == 'number'))
374 throw new core.ArgumentError.notNull("index"); 374 dart.throw(new core.ArgumentError.notNull("index"));
375 core.RangeError.checkNotNegative(index, "index"); 375 core.RangeError.checkNotNegative(index, "index");
376 let elementIndex = 0; 376 let elementIndex = 0;
377 for (let element of this) { 377 for (let element of this) {
378 if (index == elementIndex) 378 if (index == elementIndex)
379 return element; 379 return element;
380 elementIndex = dart.notNull(elementIndex) + 1; 380 elementIndex = dart.notNull(elementIndex) + 1;
381 } 381 }
382 throw core.RangeError.index(index, this, "index", null, elementIndex); 382 dart.throw(core.RangeError.index(index, this, "index", null, elementInde x));
383 } 383 }
384 } 384 }
385 SetMixin[dart.implements] = () => [core.Set$(E)]; 385 SetMixin[dart.implements] = () => [core.Set$(E)];
386 dart.setSignature(SetMixin, { 386 dart.setSignature(SetMixin, {
387 methods: () => ({ 387 methods: () => ({
388 clear: [dart.void, []], 388 clear: [dart.void, []],
389 addAll: [dart.void, [core.Iterable$(E)]], 389 addAll: [dart.void, [core.Iterable$(E)]],
390 removeAll: [dart.void, [core.Iterable$(core.Object)]], 390 removeAll: [dart.void, [core.Iterable$(core.Object)]],
391 retainAll: [dart.void, [core.Iterable$(core.Object)]], 391 retainAll: [dart.void, [core.Iterable$(core.Object)]],
392 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], 392 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]],
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 } 571 }
572 forEach(f) { 572 forEach(f) {
573 dart.as(f, dart.functionType(dart.void, [E])); 573 dart.as(f, dart.functionType(dart.void, [E]));
574 for (let element of this) 574 for (let element of this)
575 f(element); 575 f(element);
576 } 576 }
577 reduce(combine) { 577 reduce(combine) {
578 dart.as(combine, dart.functionType(E, [E, E])); 578 dart.as(combine, dart.functionType(E, [E, E]));
579 let iterator = this.iterator; 579 let iterator = this.iterator;
580 if (!dart.notNull(iterator.moveNext())) { 580 if (!dart.notNull(iterator.moveNext())) {
581 throw _internal.IterableElementError.noElement(); 581 dart.throw(_internal.IterableElementError.noElement());
582 } 582 }
583 let value = iterator.current; 583 let value = iterator.current;
584 while (dart.notNull(iterator.moveNext())) { 584 while (dart.notNull(iterator.moveNext())) {
585 value = combine(value, iterator.current); 585 value = combine(value, iterator.current);
586 } 586 }
587 return value; 587 return value;
588 } 588 }
589 fold(initialValue, combine) { 589 fold(initialValue, combine) {
590 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); 590 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E]));
591 let value = initialValue; 591 let value = initialValue;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 skip(n) { 661 skip(n) {
662 return _internal.SkipIterable$(E).new(this, n); 662 return _internal.SkipIterable$(E).new(this, n);
663 } 663 }
664 skipWhile(test) { 664 skipWhile(test) {
665 dart.as(test, dart.functionType(core.bool, [E])); 665 dart.as(test, dart.functionType(core.bool, [E]));
666 return new (_internal.SkipWhileIterable$(E))(this, test); 666 return new (_internal.SkipWhileIterable$(E))(this, test);
667 } 667 }
668 get first() { 668 get first() {
669 let it = this[dartx.iterator]; 669 let it = this[dartx.iterator];
670 if (!dart.notNull(it.moveNext())) { 670 if (!dart.notNull(it.moveNext())) {
671 throw _internal.IterableElementError.noElement(); 671 dart.throw(_internal.IterableElementError.noElement());
672 } 672 }
673 return it.current; 673 return it.current;
674 } 674 }
675 get last() { 675 get last() {
676 let it = this[dartx.iterator]; 676 let it = this[dartx.iterator];
677 if (!dart.notNull(it.moveNext())) { 677 if (!dart.notNull(it.moveNext())) {
678 throw _internal.IterableElementError.noElement(); 678 dart.throw(_internal.IterableElementError.noElement());
679 } 679 }
680 let result = null; 680 let result = null;
681 do { 681 do {
682 result = it.current; 682 result = it.current;
683 } while (dart.notNull(it.moveNext())); 683 } while (dart.notNull(it.moveNext()));
684 return result; 684 return result;
685 } 685 }
686 get single() { 686 get single() {
687 let it = this[dartx.iterator]; 687 let it = this[dartx.iterator];
688 if (!dart.notNull(it.moveNext())) 688 if (!dart.notNull(it.moveNext()))
689 throw _internal.IterableElementError.noElement(); 689 dart.throw(_internal.IterableElementError.noElement());
690 let result = it.current; 690 let result = it.current;
691 if (dart.notNull(it.moveNext())) 691 if (dart.notNull(it.moveNext()))
692 throw _internal.IterableElementError.tooMany(); 692 dart.throw(_internal.IterableElementError.tooMany());
693 return result; 693 return result;
694 } 694 }
695 firstWhere(test, opts) { 695 firstWhere(test, opts) {
696 dart.as(test, dart.functionType(core.bool, [E])); 696 dart.as(test, dart.functionType(core.bool, [E]));
697 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 697 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
698 dart.as(orElse, dart.functionType(E, [])); 698 dart.as(orElse, dart.functionType(E, []));
699 for (let element of this) { 699 for (let element of this) {
700 if (dart.notNull(test(element))) 700 if (dart.notNull(test(element)))
701 return element; 701 return element;
702 } 702 }
703 if (orElse != null) 703 if (orElse != null)
704 return orElse(); 704 return orElse();
705 throw _internal.IterableElementError.noElement(); 705 dart.throw(_internal.IterableElementError.noElement());
706 } 706 }
707 lastWhere(test, opts) { 707 lastWhere(test, opts) {
708 dart.as(test, dart.functionType(core.bool, [E])); 708 dart.as(test, dart.functionType(core.bool, [E]));
709 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 709 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
710 dart.as(orElse, dart.functionType(E, [])); 710 dart.as(orElse, dart.functionType(E, []));
711 let result = null; 711 let result = null;
712 let foundMatching = false; 712 let foundMatching = false;
713 for (let element of this) { 713 for (let element of this) {
714 if (dart.notNull(test(element))) { 714 if (dart.notNull(test(element))) {
715 result = element; 715 result = element;
716 foundMatching = true; 716 foundMatching = true;
717 } 717 }
718 } 718 }
719 if (dart.notNull(foundMatching)) 719 if (dart.notNull(foundMatching))
720 return result; 720 return result;
721 if (orElse != null) 721 if (orElse != null)
722 return orElse(); 722 return orElse();
723 throw _internal.IterableElementError.noElement(); 723 dart.throw(_internal.IterableElementError.noElement());
724 } 724 }
725 singleWhere(test) { 725 singleWhere(test) {
726 dart.as(test, dart.functionType(core.bool, [E])); 726 dart.as(test, dart.functionType(core.bool, [E]));
727 let result = null; 727 let result = null;
728 let foundMatching = false; 728 let foundMatching = false;
729 for (let element of this) { 729 for (let element of this) {
730 if (dart.notNull(test(element))) { 730 if (dart.notNull(test(element))) {
731 if (dart.notNull(foundMatching)) { 731 if (dart.notNull(foundMatching)) {
732 throw _internal.IterableElementError.tooMany(); 732 dart.throw(_internal.IterableElementError.tooMany());
733 } 733 }
734 result = element; 734 result = element;
735 foundMatching = true; 735 foundMatching = true;
736 } 736 }
737 } 737 }
738 if (dart.notNull(foundMatching)) 738 if (dart.notNull(foundMatching))
739 return result; 739 return result;
740 throw _internal.IterableElementError.noElement(); 740 dart.throw(_internal.IterableElementError.noElement());
741 } 741 }
742 elementAt(index) { 742 elementAt(index) {
743 if (!(typeof index == 'number')) 743 if (!(typeof index == 'number'))
744 throw new core.ArgumentError.notNull("index"); 744 dart.throw(new core.ArgumentError.notNull("index"));
745 core.RangeError.checkNotNegative(index, "index"); 745 core.RangeError.checkNotNegative(index, "index");
746 let elementIndex = 0; 746 let elementIndex = 0;
747 for (let element of this) { 747 for (let element of this) {
748 if (index == elementIndex) 748 if (index == elementIndex)
749 return element; 749 return element;
750 elementIndex = dart.notNull(elementIndex) + 1; 750 elementIndex = dart.notNull(elementIndex) + 1;
751 } 751 }
752 throw core.RangeError.index(index, this, "index", null, elementIndex); 752 dart.throw(core.RangeError.index(index, this, "index", null, elementInde x));
753 } 753 }
754 toString() { 754 toString() {
755 return IterableBase.iterableToShortString(this, '(', ')'); 755 return IterableBase.iterableToShortString(this, '(', ')');
756 } 756 }
757 [Symbol.iterator]() { 757 [Symbol.iterator]() {
758 return new dart.JsIterator(this.iterator); 758 return new dart.JsIterator(this.iterator);
759 } 759 }
760 } 760 }
761 IterableMixin[dart.implements] = () => [core.Iterable$(E)]; 761 IterableMixin[dart.implements] = () => [core.Iterable$(E)];
762 dart.setSignature(IterableMixin, { 762 dart.setSignature(IterableMixin, {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 } 839 }
840 forEach(f) { 840 forEach(f) {
841 dart.as(f, dart.functionType(dart.void, [E])); 841 dart.as(f, dart.functionType(dart.void, [E]));
842 for (let element of this) 842 for (let element of this)
843 f(element); 843 f(element);
844 } 844 }
845 reduce(combine) { 845 reduce(combine) {
846 dart.as(combine, dart.functionType(E, [E, E])); 846 dart.as(combine, dart.functionType(E, [E, E]));
847 let iterator = this.iterator; 847 let iterator = this.iterator;
848 if (!dart.notNull(iterator.moveNext())) { 848 if (!dart.notNull(iterator.moveNext())) {
849 throw _internal.IterableElementError.noElement(); 849 dart.throw(_internal.IterableElementError.noElement());
850 } 850 }
851 let value = iterator.current; 851 let value = iterator.current;
852 while (dart.notNull(iterator.moveNext())) { 852 while (dart.notNull(iterator.moveNext())) {
853 value = combine(value, iterator.current); 853 value = combine(value, iterator.current);
854 } 854 }
855 return value; 855 return value;
856 } 856 }
857 fold(initialValue, combine) { 857 fold(initialValue, combine) {
858 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); 858 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E]));
859 let value = initialValue; 859 let value = initialValue;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 skip(n) { 929 skip(n) {
930 return _internal.SkipIterable$(E).new(this, n); 930 return _internal.SkipIterable$(E).new(this, n);
931 } 931 }
932 skipWhile(test) { 932 skipWhile(test) {
933 dart.as(test, dart.functionType(core.bool, [E])); 933 dart.as(test, dart.functionType(core.bool, [E]));
934 return new (_internal.SkipWhileIterable$(E))(this, test); 934 return new (_internal.SkipWhileIterable$(E))(this, test);
935 } 935 }
936 get first() { 936 get first() {
937 let it = this[dartx.iterator]; 937 let it = this[dartx.iterator];
938 if (!dart.notNull(it.moveNext())) { 938 if (!dart.notNull(it.moveNext())) {
939 throw _internal.IterableElementError.noElement(); 939 dart.throw(_internal.IterableElementError.noElement());
940 } 940 }
941 return it.current; 941 return it.current;
942 } 942 }
943 get last() { 943 get last() {
944 let it = this[dartx.iterator]; 944 let it = this[dartx.iterator];
945 if (!dart.notNull(it.moveNext())) { 945 if (!dart.notNull(it.moveNext())) {
946 throw _internal.IterableElementError.noElement(); 946 dart.throw(_internal.IterableElementError.noElement());
947 } 947 }
948 let result = null; 948 let result = null;
949 do { 949 do {
950 result = it.current; 950 result = it.current;
951 } while (dart.notNull(it.moveNext())); 951 } while (dart.notNull(it.moveNext()));
952 return result; 952 return result;
953 } 953 }
954 get single() { 954 get single() {
955 let it = this[dartx.iterator]; 955 let it = this[dartx.iterator];
956 if (!dart.notNull(it.moveNext())) 956 if (!dart.notNull(it.moveNext()))
957 throw _internal.IterableElementError.noElement(); 957 dart.throw(_internal.IterableElementError.noElement());
958 let result = it.current; 958 let result = it.current;
959 if (dart.notNull(it.moveNext())) 959 if (dart.notNull(it.moveNext()))
960 throw _internal.IterableElementError.tooMany(); 960 dart.throw(_internal.IterableElementError.tooMany());
961 return result; 961 return result;
962 } 962 }
963 firstWhere(test, opts) { 963 firstWhere(test, opts) {
964 dart.as(test, dart.functionType(core.bool, [E])); 964 dart.as(test, dart.functionType(core.bool, [E]));
965 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 965 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
966 dart.as(orElse, dart.functionType(E, [])); 966 dart.as(orElse, dart.functionType(E, []));
967 for (let element of this) { 967 for (let element of this) {
968 if (dart.notNull(test(element))) 968 if (dart.notNull(test(element)))
969 return element; 969 return element;
970 } 970 }
971 if (orElse != null) 971 if (orElse != null)
972 return orElse(); 972 return orElse();
973 throw _internal.IterableElementError.noElement(); 973 dart.throw(_internal.IterableElementError.noElement());
974 } 974 }
975 lastWhere(test, opts) { 975 lastWhere(test, opts) {
976 dart.as(test, dart.functionType(core.bool, [E])); 976 dart.as(test, dart.functionType(core.bool, [E]));
977 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 977 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
978 dart.as(orElse, dart.functionType(E, [])); 978 dart.as(orElse, dart.functionType(E, []));
979 let result = null; 979 let result = null;
980 let foundMatching = false; 980 let foundMatching = false;
981 for (let element of this) { 981 for (let element of this) {
982 if (dart.notNull(test(element))) { 982 if (dart.notNull(test(element))) {
983 result = element; 983 result = element;
984 foundMatching = true; 984 foundMatching = true;
985 } 985 }
986 } 986 }
987 if (dart.notNull(foundMatching)) 987 if (dart.notNull(foundMatching))
988 return result; 988 return result;
989 if (orElse != null) 989 if (orElse != null)
990 return orElse(); 990 return orElse();
991 throw _internal.IterableElementError.noElement(); 991 dart.throw(_internal.IterableElementError.noElement());
992 } 992 }
993 singleWhere(test) { 993 singleWhere(test) {
994 dart.as(test, dart.functionType(core.bool, [E])); 994 dart.as(test, dart.functionType(core.bool, [E]));
995 let result = null; 995 let result = null;
996 let foundMatching = false; 996 let foundMatching = false;
997 for (let element of this) { 997 for (let element of this) {
998 if (dart.notNull(test(element))) { 998 if (dart.notNull(test(element))) {
999 if (dart.notNull(foundMatching)) { 999 if (dart.notNull(foundMatching)) {
1000 throw _internal.IterableElementError.tooMany(); 1000 dart.throw(_internal.IterableElementError.tooMany());
1001 } 1001 }
1002 result = element; 1002 result = element;
1003 foundMatching = true; 1003 foundMatching = true;
1004 } 1004 }
1005 } 1005 }
1006 if (dart.notNull(foundMatching)) 1006 if (dart.notNull(foundMatching))
1007 return result; 1007 return result;
1008 throw _internal.IterableElementError.noElement(); 1008 dart.throw(_internal.IterableElementError.noElement());
1009 } 1009 }
1010 elementAt(index) { 1010 elementAt(index) {
1011 if (!(typeof index == 'number')) 1011 if (!(typeof index == 'number'))
1012 throw new core.ArgumentError.notNull("index"); 1012 dart.throw(new core.ArgumentError.notNull("index"));
1013 core.RangeError.checkNotNegative(index, "index"); 1013 core.RangeError.checkNotNegative(index, "index");
1014 let elementIndex = 0; 1014 let elementIndex = 0;
1015 for (let element of this) { 1015 for (let element of this) {
1016 if (index == elementIndex) 1016 if (index == elementIndex)
1017 return element; 1017 return element;
1018 elementIndex = dart.notNull(elementIndex) + 1; 1018 elementIndex = dart.notNull(elementIndex) + 1;
1019 } 1019 }
1020 throw core.RangeError.index(index, this, "index", null, elementIndex); 1020 dart.throw(core.RangeError.index(index, this, "index", null, elementInde x));
1021 } 1021 }
1022 toString() { 1022 toString() {
1023 return IterableBase$().iterableToShortString(this, '(', ')'); 1023 return IterableBase$().iterableToShortString(this, '(', ')');
1024 } 1024 }
1025 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { 1025 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) {
1026 if (leftDelimiter === void 0) 1026 if (leftDelimiter === void 0)
1027 leftDelimiter = '('; 1027 leftDelimiter = '(';
1028 if (rightDelimiter === void 0) 1028 if (rightDelimiter === void 0)
1029 rightDelimiter = ')'; 1029 rightDelimiter = ')';
1030 if (dart.notNull(IterableBase$()._isToStringVisiting(iterable))) { 1030 if (dart.notNull(IterableBase$()._isToStringVisiting(iterable))) {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 this[_iterator] = iterator; 1234 this[_iterator] = iterator;
1235 this[_state] = HasNextIterator$()._NOT_MOVED_YET; 1235 this[_state] = HasNextIterator$()._NOT_MOVED_YET;
1236 } 1236 }
1237 get hasNext() { 1237 get hasNext() {
1238 if (this[_state] == HasNextIterator$()._NOT_MOVED_YET) 1238 if (this[_state] == HasNextIterator$()._NOT_MOVED_YET)
1239 this[_move](); 1239 this[_move]();
1240 return this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT; 1240 return this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT;
1241 } 1241 }
1242 next() { 1242 next() {
1243 if (!dart.notNull(this.hasNext)) 1243 if (!dart.notNull(this.hasNext))
1244 throw new core.StateError("No more elements"); 1244 dart.throw(new core.StateError("No more elements"));
1245 dart.assert(this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CUR RENT); 1245 dart.assert(this[_state] == HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CUR RENT);
1246 let result = dart.as(this[_iterator].current, E); 1246 let result = dart.as(this[_iterator].current, E);
1247 this[_move](); 1247 this[_move]();
1248 return result; 1248 return result;
1249 } 1249 }
1250 [_move]() { 1250 [_move]() {
1251 if (dart.notNull(this[_iterator].moveNext())) { 1251 if (dart.notNull(this[_iterator].moveNext())) {
1252 this[_state] = HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT; 1252 this[_state] = HasNextIterator$()._HAS_NEXT_AND_NEXT_IN_CURRENT;
1253 } else { 1253 } else {
1254 this[_state] = HasNextIterator$()._NO_NEXT; 1254 this[_state] = HasNextIterator$()._NO_NEXT;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1445 while (!dart.notNull(core.identical(next, this))) { 1445 while (!dart.notNull(core.identical(next, this))) {
1446 let entry = dart.as(next, E); 1446 let entry = dart.as(next, E);
1447 next = entry[_next]; 1447 next = entry[_next];
1448 entry[_next] = entry[_previous] = entry[_list] = null; 1448 entry[_next] = entry[_previous] = entry[_list] = null;
1449 } 1449 }
1450 this[_next] = this[_previous] = this; 1450 this[_next] = this[_previous] = this;
1451 this[_length] = 0; 1451 this[_length] = 0;
1452 } 1452 }
1453 get first() { 1453 get first() {
1454 if (dart.notNull(core.identical(this[_next], this))) { 1454 if (dart.notNull(core.identical(this[_next], this))) {
1455 throw new core.StateError('No such element'); 1455 dart.throw(new core.StateError('No such element'));
1456 } 1456 }
1457 return dart.as(this[_next], E); 1457 return dart.as(this[_next], E);
1458 } 1458 }
1459 get last() { 1459 get last() {
1460 if (dart.notNull(core.identical(this[_previous], this))) { 1460 if (dart.notNull(core.identical(this[_previous], this))) {
1461 throw new core.StateError('No such element'); 1461 dart.throw(new core.StateError('No such element'));
1462 } 1462 }
1463 return dart.as(this[_previous], E); 1463 return dart.as(this[_previous], E);
1464 } 1464 }
1465 get single() { 1465 get single() {
1466 if (dart.notNull(core.identical(this[_previous], this))) { 1466 if (dart.notNull(core.identical(this[_previous], this))) {
1467 throw new core.StateError('No such element'); 1467 dart.throw(new core.StateError('No such element'));
1468 } 1468 }
1469 if (!dart.notNull(core.identical(this[_previous], this[_next]))) { 1469 if (!dart.notNull(core.identical(this[_previous], this[_next]))) {
1470 throw new core.StateError('Too many elements'); 1470 dart.throw(new core.StateError('Too many elements'));
1471 } 1471 }
1472 return dart.as(this[_next], E); 1472 return dart.as(this[_next], E);
1473 } 1473 }
1474 forEach(action) { 1474 forEach(action) {
1475 dart.as(action, dart.functionType(dart.void, [E])); 1475 dart.as(action, dart.functionType(dart.void, [E]));
1476 let modificationCount = this[_modificationCount]; 1476 let modificationCount = this[_modificationCount];
1477 let current = this[_next]; 1477 let current = this[_next];
1478 while (!dart.notNull(core.identical(current, this))) { 1478 while (!dart.notNull(core.identical(current, this))) {
1479 action(dart.as(current, E)); 1479 action(dart.as(current, E));
1480 if (modificationCount != this[_modificationCount]) { 1480 if (modificationCount != this[_modificationCount]) {
1481 throw new core.ConcurrentModificationError(this); 1481 dart.throw(new core.ConcurrentModificationError(this));
1482 } 1482 }
1483 current = current[_next]; 1483 current = current[_next];
1484 } 1484 }
1485 } 1485 }
1486 get isEmpty() { 1486 get isEmpty() {
1487 return this[_length] == 0; 1487 return this[_length] == 0;
1488 } 1488 }
1489 [_insertAfter](entry, newEntry) { 1489 [_insertAfter](entry, newEntry) {
1490 dart.as(newEntry, E); 1490 dart.as(newEntry, E);
1491 if (newEntry.list != null) { 1491 if (newEntry.list != null) {
1492 throw new core.StateError('LinkedListEntry is already in a LinkedList' ); 1492 dart.throw(new core.StateError('LinkedListEntry is already in a Linked List'));
1493 } 1493 }
1494 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 1494 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
1495 newEntry[_list] = this; 1495 newEntry[_list] = this;
1496 let predecessor = entry; 1496 let predecessor = entry;
1497 let successor = entry[_next]; 1497 let successor = entry[_next];
1498 successor[_previous] = newEntry; 1498 successor[_previous] = newEntry;
1499 newEntry[_previous] = predecessor; 1499 newEntry[_previous] = predecessor;
1500 newEntry[_next] = successor; 1500 newEntry[_next] = successor;
1501 predecessor[_next] = newEntry; 1501 predecessor[_next] = newEntry;
1502 this[_length] = dart.notNull(this[_length]) + 1; 1502 this[_length] = dart.notNull(this[_length]) + 1;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
1547 } 1547 }
1548 get current() { 1548 get current() {
1549 return this[_current]; 1549 return this[_current];
1550 } 1550 }
1551 moveNext() { 1551 moveNext() {
1552 if (dart.notNull(core.identical(this[_next], this[_list]))) { 1552 if (dart.notNull(core.identical(this[_next], this[_list]))) {
1553 this[_current] = null; 1553 this[_current] = null;
1554 return false; 1554 return false;
1555 } 1555 }
1556 if (this[_modificationCount] != this[_list][_modificationCount]) { 1556 if (this[_modificationCount] != this[_list][_modificationCount]) {
1557 throw new core.ConcurrentModificationError(this); 1557 dart.throw(new core.ConcurrentModificationError(this));
1558 } 1558 }
1559 this[_current] = dart.as(this[_next], E); 1559 this[_current] = dart.as(this[_next], E);
1560 this[_next] = this[_next][_next]; 1560 this[_next] = this[_next][_next];
1561 return true; 1561 return true;
1562 } 1562 }
1563 } 1563 }
1564 _LinkedListIterator[dart.implements] = () => [core.Iterator$(E)]; 1564 _LinkedListIterator[dart.implements] = () => [core.Iterator$(E)];
1565 dart.setSignature(_LinkedListIterator, { 1565 dart.setSignature(_LinkedListIterator, {
1566 constructors: () => ({_LinkedListIterator: [_LinkedListIterator$(E), [Link edList$(E)]]}), 1566 constructors: () => ({_LinkedListIterator: [_LinkedListIterator$(E), [Link edList$(E)]]}),
1567 methods: () => ({moveNext: [core.bool, []]}) 1567 methods: () => ({moveNext: [core.bool, []]})
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 } 1629 }
1630 elementAt(index) { 1630 elementAt(index) {
1631 return this.get(index); 1631 return this.get(index);
1632 } 1632 }
1633 forEach(action) { 1633 forEach(action) {
1634 dart.as(action, dart.functionType(dart.void, [E])); 1634 dart.as(action, dart.functionType(dart.void, [E]));
1635 let length = this.length; 1635 let length = this.length;
1636 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1636 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1637 action(this.get(i)); 1637 action(this.get(i));
1638 if (length != this.length) { 1638 if (length != this.length) {
1639 throw new core.ConcurrentModificationError(this); 1639 dart.throw(new core.ConcurrentModificationError(this));
1640 } 1640 }
1641 } 1641 }
1642 } 1642 }
1643 get isEmpty() { 1643 get isEmpty() {
1644 return this[dartx.length] == 0; 1644 return this[dartx.length] == 0;
1645 } 1645 }
1646 get isNotEmpty() { 1646 get isNotEmpty() {
1647 return !dart.notNull(this.isEmpty); 1647 return !dart.notNull(this.isEmpty);
1648 } 1648 }
1649 get first() { 1649 get first() {
1650 if (this[dartx.length] == 0) 1650 if (this[dartx.length] == 0)
1651 throw _internal.IterableElementError.noElement(); 1651 dart.throw(_internal.IterableElementError.noElement());
1652 return this.get(0); 1652 return this.get(0);
1653 } 1653 }
1654 get last() { 1654 get last() {
1655 if (this[dartx.length] == 0) 1655 if (this[dartx.length] == 0)
1656 throw _internal.IterableElementError.noElement(); 1656 dart.throw(_internal.IterableElementError.noElement());
1657 return this.get(dart.notNull(this[dartx.length]) - 1); 1657 return this.get(dart.notNull(this[dartx.length]) - 1);
1658 } 1658 }
1659 get single() { 1659 get single() {
1660 if (this[dartx.length] == 0) 1660 if (this[dartx.length] == 0)
1661 throw _internal.IterableElementError.noElement(); 1661 dart.throw(_internal.IterableElementError.noElement());
1662 if (dart.notNull(this[dartx.length]) > 1) 1662 if (dart.notNull(this[dartx.length]) > 1)
1663 throw _internal.IterableElementError.tooMany(); 1663 dart.throw(_internal.IterableElementError.tooMany());
1664 return this.get(0); 1664 return this.get(0);
1665 } 1665 }
1666 contains(element) { 1666 contains(element) {
1667 let length = this.length; 1667 let length = this.length;
1668 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) { 1668 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) {
1669 if (dart.equals(this.get(i), element)) 1669 if (dart.equals(this.get(i), element))
1670 return true; 1670 return true;
1671 if (length != this.length) { 1671 if (length != this.length) {
1672 throw new core.ConcurrentModificationError(this); 1672 dart.throw(new core.ConcurrentModificationError(this));
1673 } 1673 }
1674 } 1674 }
1675 return false; 1675 return false;
1676 } 1676 }
1677 every(test) { 1677 every(test) {
1678 dart.as(test, dart.functionType(core.bool, [E])); 1678 dart.as(test, dart.functionType(core.bool, [E]));
1679 let length = this.length; 1679 let length = this.length;
1680 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1680 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1681 if (!dart.notNull(test(this.get(i)))) 1681 if (!dart.notNull(test(this.get(i))))
1682 return false; 1682 return false;
1683 if (length != this.length) { 1683 if (length != this.length) {
1684 throw new core.ConcurrentModificationError(this); 1684 dart.throw(new core.ConcurrentModificationError(this));
1685 } 1685 }
1686 } 1686 }
1687 return true; 1687 return true;
1688 } 1688 }
1689 any(test) { 1689 any(test) {
1690 dart.as(test, dart.functionType(core.bool, [E])); 1690 dart.as(test, dart.functionType(core.bool, [E]));
1691 let length = this.length; 1691 let length = this.length;
1692 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1692 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1693 if (dart.notNull(test(this.get(i)))) 1693 if (dart.notNull(test(this.get(i))))
1694 return true; 1694 return true;
1695 if (length != this.length) { 1695 if (length != this.length) {
1696 throw new core.ConcurrentModificationError(this); 1696 dart.throw(new core.ConcurrentModificationError(this));
1697 } 1697 }
1698 } 1698 }
1699 return false; 1699 return false;
1700 } 1700 }
1701 firstWhere(test, opts) { 1701 firstWhere(test, opts) {
1702 dart.as(test, dart.functionType(core.bool, [E])); 1702 dart.as(test, dart.functionType(core.bool, [E]));
1703 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 1703 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
1704 dart.as(orElse, dart.functionType(E, [])); 1704 dart.as(orElse, dart.functionType(E, []));
1705 let length = this.length; 1705 let length = this.length;
1706 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1706 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1707 let element = this.get(i); 1707 let element = this.get(i);
1708 if (dart.notNull(test(element))) 1708 if (dart.notNull(test(element)))
1709 return element; 1709 return element;
1710 if (length != this.length) { 1710 if (length != this.length) {
1711 throw new core.ConcurrentModificationError(this); 1711 dart.throw(new core.ConcurrentModificationError(this));
1712 } 1712 }
1713 } 1713 }
1714 if (orElse != null) 1714 if (orElse != null)
1715 return orElse(); 1715 return orElse();
1716 throw _internal.IterableElementError.noElement(); 1716 dart.throw(_internal.IterableElementError.noElement());
1717 } 1717 }
1718 lastWhere(test, opts) { 1718 lastWhere(test, opts) {
1719 dart.as(test, dart.functionType(core.bool, [E])); 1719 dart.as(test, dart.functionType(core.bool, [E]));
1720 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 1720 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
1721 dart.as(orElse, dart.functionType(E, [])); 1721 dart.as(orElse, dart.functionType(E, []));
1722 let length = this.length; 1722 let length = this.length;
1723 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no tNull(i) - 1) { 1723 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no tNull(i) - 1) {
1724 let element = this.get(i); 1724 let element = this.get(i);
1725 if (dart.notNull(test(element))) 1725 if (dart.notNull(test(element)))
1726 return element; 1726 return element;
1727 if (length != this.length) { 1727 if (length != this.length) {
1728 throw new core.ConcurrentModificationError(this); 1728 dart.throw(new core.ConcurrentModificationError(this));
1729 } 1729 }
1730 } 1730 }
1731 if (orElse != null) 1731 if (orElse != null)
1732 return orElse(); 1732 return orElse();
1733 throw _internal.IterableElementError.noElement(); 1733 dart.throw(_internal.IterableElementError.noElement());
1734 } 1734 }
1735 singleWhere(test) { 1735 singleWhere(test) {
1736 dart.as(test, dart.functionType(core.bool, [E])); 1736 dart.as(test, dart.functionType(core.bool, [E]));
1737 let length = this.length; 1737 let length = this.length;
1738 let match = null; 1738 let match = null;
1739 let matchFound = false; 1739 let matchFound = false;
1740 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1740 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1741 let element = this.get(i); 1741 let element = this.get(i);
1742 if (dart.notNull(test(element))) { 1742 if (dart.notNull(test(element))) {
1743 if (dart.notNull(matchFound)) { 1743 if (dart.notNull(matchFound)) {
1744 throw _internal.IterableElementError.tooMany(); 1744 dart.throw(_internal.IterableElementError.tooMany());
1745 } 1745 }
1746 matchFound = true; 1746 matchFound = true;
1747 match = element; 1747 match = element;
1748 } 1748 }
1749 if (length != this.length) { 1749 if (length != this.length) {
1750 throw new core.ConcurrentModificationError(this); 1750 dart.throw(new core.ConcurrentModificationError(this));
1751 } 1751 }
1752 } 1752 }
1753 if (dart.notNull(matchFound)) 1753 if (dart.notNull(matchFound))
1754 return match; 1754 return match;
1755 throw _internal.IterableElementError.noElement(); 1755 dart.throw(_internal.IterableElementError.noElement());
1756 } 1756 }
1757 join(separator) { 1757 join(separator) {
1758 if (separator === void 0) 1758 if (separator === void 0)
1759 separator = ""; 1759 separator = "";
1760 if (this[dartx.length] == 0) 1760 if (this[dartx.length] == 0)
1761 return ""; 1761 return "";
1762 let buffer = new core.StringBuffer(); 1762 let buffer = new core.StringBuffer();
1763 buffer.writeAll(this, separator); 1763 buffer.writeAll(this, separator);
1764 return dart.toString(buffer); 1764 return dart.toString(buffer);
1765 } 1765 }
1766 where(test) { 1766 where(test) {
1767 dart.as(test, dart.functionType(core.bool, [E])); 1767 dart.as(test, dart.functionType(core.bool, [E]));
1768 return new (_internal.WhereIterable$(E))(this, test); 1768 return new (_internal.WhereIterable$(E))(this, test);
1769 } 1769 }
1770 map(f) { 1770 map(f) {
1771 dart.as(f, dart.functionType(dart.dynamic, [E])); 1771 dart.as(f, dart.functionType(dart.dynamic, [E]));
1772 return new _internal.MappedListIterable(this, f); 1772 return new _internal.MappedListIterable(this, f);
1773 } 1773 }
1774 expand(f) { 1774 expand(f) {
1775 dart.as(f, dart.functionType(core.Iterable, [E])); 1775 dart.as(f, dart.functionType(core.Iterable, [E]));
1776 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f); 1776 return new (_internal.ExpandIterable$(E, dart.dynamic))(this, f);
1777 } 1777 }
1778 reduce(combine) { 1778 reduce(combine) {
1779 dart.as(combine, dart.functionType(E, [E, E])); 1779 dart.as(combine, dart.functionType(E, [E, E]));
1780 let length = this.length; 1780 let length = this.length;
1781 if (length == 0) 1781 if (length == 0)
1782 throw _internal.IterableElementError.noElement(); 1782 dart.throw(_internal.IterableElementError.noElement());
1783 let value = this.get(0); 1783 let value = this.get(0);
1784 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1784 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1785 value = combine(value, this.get(i)); 1785 value = combine(value, this.get(i));
1786 if (length != this.length) { 1786 if (length != this.length) {
1787 throw new core.ConcurrentModificationError(this); 1787 dart.throw(new core.ConcurrentModificationError(this));
1788 } 1788 }
1789 } 1789 }
1790 return value; 1790 return value;
1791 } 1791 }
1792 fold(initialValue, combine) { 1792 fold(initialValue, combine) {
1793 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E])); 1793 dart.as(combine, dart.functionType(dart.dynamic, [dart.dynamic, E]));
1794 let value = initialValue; 1794 let value = initialValue;
1795 let length = this.length; 1795 let length = this.length;
1796 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1796 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1797 value = dart.dcall(combine, value, this.get(i)); 1797 value = dart.dcall(combine, value, this.get(i));
1798 if (length != this.length) { 1798 if (length != this.length) {
1799 throw new core.ConcurrentModificationError(this); 1799 dart.throw(new core.ConcurrentModificationError(this));
1800 } 1800 }
1801 } 1801 }
1802 return value; 1802 return value;
1803 } 1803 }
1804 skip(count) { 1804 skip(count) {
1805 return new (_internal.SubListIterable$(E))(this, count, null); 1805 return new (_internal.SubListIterable$(E))(this, count, null);
1806 } 1806 }
1807 skipWhile(test) { 1807 skipWhile(test) {
1808 dart.as(test, dart.functionType(core.bool, [E])); 1808 dart.as(test, dart.functionType(core.bool, [E]));
1809 return new (_internal.SkipWhileIterable$(E))(this, test); 1809 return new (_internal.SkipWhileIterable$(E))(this, test);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 static _filter(source, test, retainMatching) { 1875 static _filter(source, test, retainMatching) {
1876 dart.as(test, dart.functionType(core.bool, [dart.dynamic])); 1876 dart.as(test, dart.functionType(core.bool, [dart.dynamic]));
1877 let retained = []; 1877 let retained = [];
1878 let length = source[dartx.length]; 1878 let length = source[dartx.length];
1879 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1879 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1880 let element = source[dartx.get](i); 1880 let element = source[dartx.get](i);
1881 if (dart.dcall(test, element) == retainMatching) { 1881 if (dart.dcall(test, element) == retainMatching) {
1882 retained[dartx.add](element); 1882 retained[dartx.add](element);
1883 } 1883 }
1884 if (length != source[dartx.length]) { 1884 if (length != source[dartx.length]) {
1885 throw new core.ConcurrentModificationError(source); 1885 dart.throw(new core.ConcurrentModificationError(source));
1886 } 1886 }
1887 } 1887 }
1888 if (retained[dartx.length] != source[dartx.length]) { 1888 if (retained[dartx.length] != source[dartx.length]) {
1889 source[dartx.setRange](0, retained[dartx.length], retained); 1889 source[dartx.setRange](0, retained[dartx.length], retained);
1890 source[dartx.length] = retained[dartx.length]; 1890 source[dartx.length] = retained[dartx.length];
1891 } 1891 }
1892 } 1892 }
1893 clear() { 1893 clear() {
1894 this.length = 0; 1894 this.length = 0;
1895 } 1895 }
1896 removeLast() { 1896 removeLast() {
1897 if (this[dartx.length] == 0) { 1897 if (this[dartx.length] == 0) {
1898 throw _internal.IterableElementError.noElement(); 1898 dart.throw(_internal.IterableElementError.noElement());
1899 } 1899 }
1900 let result = this.get(dart.notNull(this[dartx.length]) - 1); 1900 let result = this.get(dart.notNull(this[dartx.length]) - 1);
1901 this[dartx.length] = dart.notNull(this[dartx.length]) - 1; 1901 this[dartx.length] = dart.notNull(this[dartx.length]) - 1;
1902 return result; 1902 return result;
1903 } 1903 }
1904 sort(compare) { 1904 sort(compare) {
1905 if (compare === void 0) 1905 if (compare === void 0)
1906 compare = null; 1906 compare = null;
1907 dart.as(compare, dart.functionType(core.int, [E, E])); 1907 dart.as(compare, dart.functionType(core.int, [E, E]));
1908 _internal.Sort.sort(this, compare == null ? core.Comparable.compare : co mpare); 1908 _internal.Sort.sort(this, compare == null ? core.Comparable.compare : co mpare);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1970 let otherList = null; 1970 let otherList = null;
1971 let otherStart = null; 1971 let otherStart = null;
1972 if (dart.is(iterable, core.List)) { 1972 if (dart.is(iterable, core.List)) {
1973 otherList = dart.as(iterable, core.List); 1973 otherList = dart.as(iterable, core.List);
1974 otherStart = skipCount; 1974 otherStart = skipCount;
1975 } else { 1975 } else {
1976 otherList = iterable[dartx.skip](skipCount)[dartx.toList]({growable: f alse}); 1976 otherList = iterable[dartx.skip](skipCount)[dartx.toList]({growable: f alse});
1977 otherStart = 0; 1977 otherStart = 0;
1978 } 1978 }
1979 if (dart.notNull(otherStart) + dart.notNull(length) > dart.notNull(other List[dartx.length])) { 1979 if (dart.notNull(otherStart) + dart.notNull(length) > dart.notNull(other List[dartx.length])) {
1980 throw _internal.IterableElementError.tooFew(); 1980 dart.throw(_internal.IterableElementError.tooFew());
1981 } 1981 }
1982 if (dart.notNull(otherStart) < dart.notNull(start)) { 1982 if (dart.notNull(otherStart) < dart.notNull(start)) {
1983 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart. notNull(i) - 1) { 1983 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart. notNull(i) - 1) {
1984 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList[da rtx.get](dart.notNull(otherStart) + dart.notNull(i)), E)); 1984 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList[da rtx.get](dart.notNull(otherStart) + dart.notNull(i)), E));
1985 } 1985 }
1986 } else { 1986 } else {
1987 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNu ll(i) + 1) { 1987 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNu ll(i) + 1) {
1988 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList[da rtx.get](dart.notNull(otherStart) + dart.notNull(i)), E)); 1988 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList[da rtx.get](dart.notNull(otherStart) + dart.notNull(i)), E));
1989 } 1989 }
1990 } 1990 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
2052 return -1; 2052 return -1;
2053 } 2053 }
2054 insert(index, element) { 2054 insert(index, element) {
2055 dart.as(element, E); 2055 dart.as(element, E);
2056 core.RangeError.checkValueInInterval(index, 0, this[dartx.length], "inde x"); 2056 core.RangeError.checkValueInInterval(index, 0, this[dartx.length], "inde x");
2057 if (index == this.length) { 2057 if (index == this.length) {
2058 this.add(element); 2058 this.add(element);
2059 return; 2059 return;
2060 } 2060 }
2061 if (!(typeof index == 'number')) 2061 if (!(typeof index == 'number'))
2062 throw new core.ArgumentError(index); 2062 dart.throw(new core.ArgumentError(index));
2063 this.length = dart.notNull(this.length) + 1; 2063 this.length = dart.notNull(this.length) + 1;
2064 this.setRange(dart.notNull(index) + 1, this.length, this, index); 2064 this.setRange(dart.notNull(index) + 1, this.length, this, index);
2065 this.set(index, element); 2065 this.set(index, element);
2066 } 2066 }
2067 removeAt(index) { 2067 removeAt(index) {
2068 let result = this.get(index); 2068 let result = this.get(index);
2069 this.setRange(index, dart.notNull(this.length) - 1, this, dart.notNull(i ndex) + 1); 2069 this.setRange(index, dart.notNull(this.length) - 1, this, dart.notNull(i ndex) + 1);
2070 this[dartx.length] = dart.notNull(this[dartx.length]) - 1; 2070 this[dartx.length] = dart.notNull(this[dartx.length]) - 1;
2071 return result; 2071 return result;
2072 } 2072 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
2282 let MapBase$ = dart.generic(function(K, V) { 2282 let MapBase$ = dart.generic(function(K, V) {
2283 class MapBase extends dart.mixin(core.Object, MapMixin$(K, V)) {} 2283 class MapBase extends dart.mixin(core.Object, MapMixin$(K, V)) {}
2284 return MapBase; 2284 return MapBase;
2285 }); 2285 });
2286 let MapBase = MapBase$(); 2286 let MapBase = MapBase$();
2287 let _UnmodifiableMapMixin$ = dart.generic(function(K, V) { 2287 let _UnmodifiableMapMixin$ = dart.generic(function(K, V) {
2288 class _UnmodifiableMapMixin extends core.Object { 2288 class _UnmodifiableMapMixin extends core.Object {
2289 set(key, value) { 2289 set(key, value) {
2290 dart.as(key, K); 2290 dart.as(key, K);
2291 dart.as(value, V); 2291 dart.as(value, V);
2292 throw new core.UnsupportedError("Cannot modify unmodifiable map"); 2292 dart.throw(new core.UnsupportedError("Cannot modify unmodifiable map"));
2293 } 2293 }
2294 addAll(other) { 2294 addAll(other) {
2295 dart.as(other, core.Map$(K, V)); 2295 dart.as(other, core.Map$(K, V));
2296 throw new core.UnsupportedError("Cannot modify unmodifiable map"); 2296 dart.throw(new core.UnsupportedError("Cannot modify unmodifiable map"));
2297 } 2297 }
2298 clear() { 2298 clear() {
2299 throw new core.UnsupportedError("Cannot modify unmodifiable map"); 2299 dart.throw(new core.UnsupportedError("Cannot modify unmodifiable map"));
2300 } 2300 }
2301 remove(key) { 2301 remove(key) {
2302 throw new core.UnsupportedError("Cannot modify unmodifiable map"); 2302 dart.throw(new core.UnsupportedError("Cannot modify unmodifiable map"));
2303 } 2303 }
2304 putIfAbsent(key, ifAbsent) { 2304 putIfAbsent(key, ifAbsent) {
2305 dart.as(key, K); 2305 dart.as(key, K);
2306 dart.as(ifAbsent, dart.functionType(V, [])); 2306 dart.as(ifAbsent, dart.functionType(V, []));
2307 throw new core.UnsupportedError("Cannot modify unmodifiable map"); 2307 dart.throw(new core.UnsupportedError("Cannot modify unmodifiable map"));
2308 } 2308 }
2309 } 2309 }
2310 _UnmodifiableMapMixin[dart.implements] = () => [core.Map$(K, V)]; 2310 _UnmodifiableMapMixin[dart.implements] = () => [core.Map$(K, V)];
2311 dart.setSignature(_UnmodifiableMapMixin, { 2311 dart.setSignature(_UnmodifiableMapMixin, {
2312 methods: () => ({ 2312 methods: () => ({
2313 set: [dart.void, [K, V]], 2313 set: [dart.void, [K, V]],
2314 addAll: [dart.void, [core.Map$(K, V)]], 2314 addAll: [dart.void, [core.Map$(K, V)]],
2315 clear: [dart.void, []], 2315 clear: [dart.void, []],
2316 remove: [V, [core.Object]], 2316 remove: [V, [core.Object]],
2317 putIfAbsent: [V, [K, dart.functionType(V, [])]] 2317 putIfAbsent: [V, [K, dart.functionType(V, [])]]
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
2574 let keyIterator = keys[dartx.iterator]; 2574 let keyIterator = keys[dartx.iterator];
2575 let valueIterator = values[dartx.iterator]; 2575 let valueIterator = values[dartx.iterator];
2576 let hasNextKey = keyIterator.moveNext(); 2576 let hasNextKey = keyIterator.moveNext();
2577 let hasNextValue = valueIterator.moveNext(); 2577 let hasNextValue = valueIterator.moveNext();
2578 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { 2578 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) {
2579 map.set(keyIterator.current, valueIterator.current); 2579 map.set(keyIterator.current, valueIterator.current);
2580 hasNextKey = keyIterator.moveNext(); 2580 hasNextKey = keyIterator.moveNext();
2581 hasNextValue = valueIterator.moveNext(); 2581 hasNextValue = valueIterator.moveNext();
2582 } 2582 }
2583 if (dart.notNull(hasNextKey) || dart.notNull(hasNextValue)) { 2583 if (dart.notNull(hasNextKey) || dart.notNull(hasNextValue)) {
2584 throw new core.ArgumentError("Iterables do not have same length."); 2584 dart.throw(new core.ArgumentError("Iterables do not have same length.")) ;
2585 } 2585 }
2586 } 2586 }
2587 } 2587 }
2588 dart.setSignature(Maps, { 2588 dart.setSignature(Maps, {
2589 statics: () => ({ 2589 statics: () => ({
2590 containsValue: [core.bool, [core.Map, dart.dynamic]], 2590 containsValue: [core.bool, [core.Map, dart.dynamic]],
2591 containsKey: [core.bool, [core.Map, dart.dynamic]], 2591 containsKey: [core.bool, [core.Map, dart.dynamic]],
2592 putIfAbsent: [dart.dynamic, [core.Map, dart.dynamic, dart.functionType(dar t.dynamic, [])]], 2592 putIfAbsent: [dart.dynamic, [core.Map, dart.dynamic, dart.functionType(dar t.dynamic, [])]],
2593 clear: [dart.dynamic, [core.Map]], 2593 clear: [dart.dynamic, [core.Map]],
2594 forEach: [dart.dynamic, [core.Map, dart.functionType(dart.void, [dart.dyna mic, dart.dynamic])]], 2594 forEach: [dart.dynamic, [core.Map, dart.functionType(dart.void, [dart.dyna mic, dart.dynamic])]],
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
2690 return DoubleLinkedQueueEntry; 2690 return DoubleLinkedQueueEntry;
2691 }); 2691 });
2692 let DoubleLinkedQueueEntry = DoubleLinkedQueueEntry$(); 2692 let DoubleLinkedQueueEntry = DoubleLinkedQueueEntry$();
2693 let _DoubleLinkedQueueEntrySentinel$ = dart.generic(function(E) { 2693 let _DoubleLinkedQueueEntrySentinel$ = dart.generic(function(E) {
2694 class _DoubleLinkedQueueEntrySentinel extends DoubleLinkedQueueEntry$(E) { 2694 class _DoubleLinkedQueueEntrySentinel extends DoubleLinkedQueueEntry$(E) {
2695 _DoubleLinkedQueueEntrySentinel() { 2695 _DoubleLinkedQueueEntrySentinel() {
2696 super.DoubleLinkedQueueEntry(null); 2696 super.DoubleLinkedQueueEntry(null);
2697 this[_link](this, this); 2697 this[_link](this, this);
2698 } 2698 }
2699 remove() { 2699 remove() {
2700 throw _internal.IterableElementError.noElement(); 2700 dart.throw(_internal.IterableElementError.noElement());
2701 } 2701 }
2702 [_asNonSentinelEntry]() { 2702 [_asNonSentinelEntry]() {
2703 return null; 2703 return null;
2704 } 2704 }
2705 set element(e) { 2705 set element(e) {
2706 dart.as(e, E); 2706 dart.as(e, E);
2707 dart.assert(false); 2707 dart.assert(false);
2708 } 2708 }
2709 get element() { 2709 get element() {
2710 throw _internal.IterableElementError.noElement(); 2710 dart.throw(_internal.IterableElementError.noElement());
2711 } 2711 }
2712 } 2712 }
2713 dart.setSignature(_DoubleLinkedQueueEntrySentinel, { 2713 dart.setSignature(_DoubleLinkedQueueEntrySentinel, {
2714 constructors: () => ({_DoubleLinkedQueueEntrySentinel: [_DoubleLinkedQueue EntrySentinel$(E), []]}), 2714 constructors: () => ({_DoubleLinkedQueueEntrySentinel: [_DoubleLinkedQueue EntrySentinel$(E), []]}),
2715 methods: () => ({ 2715 methods: () => ({
2716 remove: [E, []], 2716 remove: [E, []],
2717 [_asNonSentinelEntry]: [DoubleLinkedQueueEntry$(E), []] 2717 [_asNonSentinelEntry]: [DoubleLinkedQueueEntry$(E), []]
2718 }) 2718 })
2719 }); 2719 });
2720 return _DoubleLinkedQueueEntrySentinel; 2720 return _DoubleLinkedQueueEntrySentinel;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
2808 get first() { 2808 get first() {
2809 return this[_sentinel][_next].element; 2809 return this[_sentinel][_next].element;
2810 } 2810 }
2811 get last() { 2811 get last() {
2812 return this[_sentinel][_previous].element; 2812 return this[_sentinel][_previous].element;
2813 } 2813 }
2814 get single() { 2814 get single() {
2815 if (dart.notNull(core.identical(this[_sentinel][_next], this[_sentinel][ _previous]))) { 2815 if (dart.notNull(core.identical(this[_sentinel][_next], this[_sentinel][ _previous]))) {
2816 return this[_sentinel][_next].element; 2816 return this[_sentinel][_next].element;
2817 } 2817 }
2818 throw _internal.IterableElementError.tooMany(); 2818 dart.throw(_internal.IterableElementError.tooMany());
2819 } 2819 }
2820 lastEntry() { 2820 lastEntry() {
2821 return this[_sentinel].previousEntry(); 2821 return this[_sentinel].previousEntry();
2822 } 2822 }
2823 firstEntry() { 2823 firstEntry() {
2824 return this[_sentinel].nextEntry(); 2824 return this[_sentinel].nextEntry();
2825 } 2825 }
2826 get isEmpty() { 2826 get isEmpty() {
2827 return core.identical(this[_sentinel][_next], this[_sentinel]); 2827 return core.identical(this[_sentinel][_next], this[_sentinel]);
2828 } 2828 }
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
2972 } 2972 }
2973 } 2973 }
2974 get isEmpty() { 2974 get isEmpty() {
2975 return this[_head] == this[_tail]; 2975 return this[_head] == this[_tail];
2976 } 2976 }
2977 get length() { 2977 get length() {
2978 return dart.notNull(this[_tail]) - dart.notNull(this[_head]) & dart.notN ull(this[_table][dartx.length]) - 1; 2978 return dart.notNull(this[_tail]) - dart.notNull(this[_head]) & dart.notN ull(this[_table][dartx.length]) - 1;
2979 } 2979 }
2980 get first() { 2980 get first() {
2981 if (this[_head] == this[_tail]) 2981 if (this[_head] == this[_tail])
2982 throw _internal.IterableElementError.noElement(); 2982 dart.throw(_internal.IterableElementError.noElement());
2983 return this[_table][dartx.get](this[_head]); 2983 return this[_table][dartx.get](this[_head]);
2984 } 2984 }
2985 get last() { 2985 get last() {
2986 if (this[_head] == this[_tail]) 2986 if (this[_head] == this[_tail])
2987 throw _internal.IterableElementError.noElement(); 2987 dart.throw(_internal.IterableElementError.noElement());
2988 return this[_table][dartx.get](dart.notNull(this[_tail]) - 1 & dart.notN ull(this[_table][dartx.length]) - 1); 2988 return this[_table][dartx.get](dart.notNull(this[_tail]) - 1 & dart.notN ull(this[_table][dartx.length]) - 1);
2989 } 2989 }
2990 get single() { 2990 get single() {
2991 if (this[_head] == this[_tail]) 2991 if (this[_head] == this[_tail])
2992 throw _internal.IterableElementError.noElement(); 2992 dart.throw(_internal.IterableElementError.noElement());
2993 if (dart.notNull(this.length) > 1) 2993 if (dart.notNull(this.length) > 1)
2994 throw _internal.IterableElementError.tooMany(); 2994 dart.throw(_internal.IterableElementError.tooMany());
2995 return this[_table][dartx.get](this[_head]); 2995 return this[_table][dartx.get](this[_head]);
2996 } 2996 }
2997 elementAt(index) { 2997 elementAt(index) {
2998 core.RangeError.checkValidIndex(index, this); 2998 core.RangeError.checkValidIndex(index, this);
2999 return this[_table][dartx.get](dart.notNull(this[_head]) + dart.notNull( index) & dart.notNull(this[_table][dartx.length]) - 1); 2999 return this[_table][dartx.get](dart.notNull(this[_head]) + dart.notNull( index) & dart.notNull(this[_table][dartx.length]) - 1);
3000 } 3000 }
3001 toList(opts) { 3001 toList(opts) {
3002 let growable = opts && 'growable' in opts ? opts.growable : true; 3002 let growable = opts && 'growable' in opts ? opts.growable : true;
3003 let list = null; 3003 let list = null;
3004 if (dart.notNull(growable)) { 3004 if (dart.notNull(growable)) {
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
3097 addFirst(element) { 3097 addFirst(element) {
3098 dart.as(element, E); 3098 dart.as(element, E);
3099 this[_head] = dart.notNull(this[_head]) - 1 & dart.notNull(this[_table][ dartx.length]) - 1; 3099 this[_head] = dart.notNull(this[_head]) - 1 & dart.notNull(this[_table][ dartx.length]) - 1;
3100 this[_table][dartx.set](this[_head], element); 3100 this[_table][dartx.set](this[_head], element);
3101 if (this[_head] == this[_tail]) 3101 if (this[_head] == this[_tail])
3102 this[_grow](); 3102 this[_grow]();
3103 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3103 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3104 } 3104 }
3105 removeFirst() { 3105 removeFirst() {
3106 if (this[_head] == this[_tail]) 3106 if (this[_head] == this[_tail])
3107 throw _internal.IterableElementError.noElement(); 3107 dart.throw(_internal.IterableElementError.noElement());
3108 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3108 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3109 let result = this[_table][dartx.get](this[_head]); 3109 let result = this[_table][dartx.get](this[_head]);
3110 this[_table][dartx.set](this[_head], null); 3110 this[_table][dartx.set](this[_head], null);
3111 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(this[_table][ dartx.length]) - 1; 3111 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(this[_table][ dartx.length]) - 1;
3112 return result; 3112 return result;
3113 } 3113 }
3114 removeLast() { 3114 removeLast() {
3115 if (this[_head] == this[_tail]) 3115 if (this[_head] == this[_tail])
3116 throw _internal.IterableElementError.noElement(); 3116 dart.throw(_internal.IterableElementError.noElement());
3117 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3117 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3118 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table][ dartx.length]) - 1; 3118 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table][ dartx.length]) - 1;
3119 let result = this[_table][dartx.get](this[_tail]); 3119 let result = this[_table][dartx.get](this[_tail]);
3120 this[_table][dartx.set](this[_tail], null); 3120 this[_table][dartx.set](this[_tail], null);
3121 return result; 3121 return result;
3122 } 3122 }
3123 static _isPowerOf2(number) { 3123 static _isPowerOf2(number) {
3124 return (dart.notNull(number) & dart.notNull(number) - 1) == 0; 3124 return (dart.notNull(number) & dart.notNull(number) - 1) == 0;
3125 } 3125 }
3126 static _nextPowerOf2(number) { 3126 static _nextPowerOf2(number) {
3127 dart.assert(dart.notNull(number) > 0); 3127 dart.assert(dart.notNull(number) > 0);
3128 number = (dart.notNull(number) << 1) - 1; 3128 number = (dart.notNull(number) << 1) - 1;
3129 for (;;) { 3129 for (;;) {
3130 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1; 3130 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1;
3131 if (nextNumber == 0) 3131 if (nextNumber == 0)
3132 return number; 3132 return number;
3133 number = nextNumber; 3133 number = nextNumber;
3134 } 3134 }
3135 } 3135 }
3136 [_checkModification](expectedModificationCount) { 3136 [_checkModification](expectedModificationCount) {
3137 if (expectedModificationCount != this[_modificationCount]) { 3137 if (expectedModificationCount != this[_modificationCount]) {
3138 throw new core.ConcurrentModificationError(this); 3138 dart.throw(new core.ConcurrentModificationError(this));
3139 } 3139 }
3140 } 3140 }
3141 [_add](element) { 3141 [_add](element) {
3142 dart.as(element, E); 3142 dart.as(element, E);
3143 this[_table][dartx.set](this[_tail], element); 3143 this[_table][dartx.set](this[_tail], element);
3144 this[_tail] = dart.notNull(this[_tail]) + 1 & dart.notNull(this[_table][ dartx.length]) - 1; 3144 this[_tail] = dart.notNull(this[_tail]) + 1 & dart.notNull(this[_table][ dartx.length]) - 1;
3145 if (this[_head] == this[_tail]) 3145 if (this[_head] == this[_tail])
3146 this[_grow](); 3146 this[_grow]();
3147 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3147 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3148 } 3148 }
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
3533 dart.as(key2, K); 3533 dart.as(key2, K);
3534 return this[_comparator](key1, key2); 3534 return this[_comparator](key1, key2);
3535 } 3535 }
3536 _internal() { 3536 _internal() {
3537 this[_comparator] = null; 3537 this[_comparator] = null;
3538 this[_validKey] = null; 3538 this[_validKey] = null;
3539 super._SplayTree(); 3539 super._SplayTree();
3540 } 3540 }
3541 get(key) { 3541 get(key) {
3542 if (key == null) 3542 if (key == null)
3543 throw new core.ArgumentError(key); 3543 dart.throw(new core.ArgumentError(key));
3544 if (!dart.notNull(this[_validKey](key))) 3544 if (!dart.notNull(this[_validKey](key)))
3545 return null; 3545 return null;
3546 if (this[_root] != null) { 3546 if (this[_root] != null) {
3547 let comp = this[_splay](dart.as(key, K)); 3547 let comp = this[_splay](dart.as(key, K));
3548 if (comp == 0) { 3548 if (comp == 0) {
3549 let mapRoot = dart.as(this[_root], _SplayTreeMapNode); 3549 let mapRoot = dart.as(this[_root], _SplayTreeMapNode);
3550 return dart.as(mapRoot.value, V); 3550 return dart.as(mapRoot.value, V);
3551 } 3551 }
3552 } 3552 }
3553 return null; 3553 return null;
3554 } 3554 }
3555 remove(key) { 3555 remove(key) {
3556 if (!dart.notNull(this[_validKey](key))) 3556 if (!dart.notNull(this[_validKey](key)))
3557 return null; 3557 return null;
3558 let mapRoot = dart.as(this[_remove](dart.as(key, K)), _SplayTreeMapNode) ; 3558 let mapRoot = dart.as(this[_remove](dart.as(key, K)), _SplayTreeMapNode) ;
3559 if (mapRoot != null) 3559 if (mapRoot != null)
3560 return dart.as(mapRoot.value, V); 3560 return dart.as(mapRoot.value, V);
3561 return null; 3561 return null;
3562 } 3562 }
3563 set(key, value) { 3563 set(key, value) {
3564 dart.as(key, K); 3564 dart.as(key, K);
3565 dart.as(value, V); 3565 dart.as(value, V);
3566 if (key == null) 3566 if (key == null)
3567 throw new core.ArgumentError(key); 3567 dart.throw(new core.ArgumentError(key));
3568 let comp = this[_splay](key); 3568 let comp = this[_splay](key);
3569 if (comp == 0) { 3569 if (comp == 0) {
3570 let mapRoot = dart.as(this[_root], _SplayTreeMapNode); 3570 let mapRoot = dart.as(this[_root], _SplayTreeMapNode);
3571 mapRoot.value = value; 3571 mapRoot.value = value;
3572 return; 3572 return;
3573 } 3573 }
3574 this[_addNewRoot](new (_SplayTreeMapNode$(K, dart.dynamic))(key, value), comp); 3574 this[_addNewRoot](new (_SplayTreeMapNode$(K, dart.dynamic))(key, value), comp);
3575 } 3575 }
3576 putIfAbsent(key, ifAbsent) { 3576 putIfAbsent(key, ifAbsent) {
3577 dart.as(key, K); 3577 dart.as(key, K);
3578 dart.as(ifAbsent, dart.functionType(V, [])); 3578 dart.as(ifAbsent, dart.functionType(V, []));
3579 if (key == null) 3579 if (key == null)
3580 throw new core.ArgumentError(key); 3580 dart.throw(new core.ArgumentError(key));
3581 let comp = this[_splay](key); 3581 let comp = this[_splay](key);
3582 if (comp == 0) { 3582 if (comp == 0) {
3583 let mapRoot = dart.as(this[_root], _SplayTreeMapNode); 3583 let mapRoot = dart.as(this[_root], _SplayTreeMapNode);
3584 return dart.as(mapRoot.value, V); 3584 return dart.as(mapRoot.value, V);
3585 } 3585 }
3586 let modificationCount = this[_modificationCount]; 3586 let modificationCount = this[_modificationCount];
3587 let splayCount = this[_splayCount]; 3587 let splayCount = this[_splayCount];
3588 let value = ifAbsent(); 3588 let value = ifAbsent();
3589 if (modificationCount != this[_modificationCount]) { 3589 if (modificationCount != this[_modificationCount]) {
3590 throw new core.ConcurrentModificationError(this); 3590 dart.throw(new core.ConcurrentModificationError(this));
3591 } 3591 }
3592 if (splayCount != this[_splayCount]) { 3592 if (splayCount != this[_splayCount]) {
3593 comp = this[_splay](key); 3593 comp = this[_splay](key);
3594 dart.assert(comp != 0); 3594 dart.assert(comp != 0);
3595 } 3595 }
3596 this[_addNewRoot](new (_SplayTreeMapNode$(K, dart.dynamic))(key, value), comp); 3596 this[_addNewRoot](new (_SplayTreeMapNode$(K, dart.dynamic))(key, value), comp);
3597 return value; 3597 return value;
3598 } 3598 }
3599 addAll(other) { 3599 addAll(other) {
3600 dart.as(other, core.Map$(K, V)); 3600 dart.as(other, core.Map$(K, V));
(...skipping 27 matching lines...) Expand all
3628 return dart.notNull(this[_validKey](key)) && this[_splay](dart.as(key, K )) == 0; 3628 return dart.notNull(this[_validKey](key)) && this[_splay](dart.as(key, K )) == 0;
3629 } 3629 }
3630 containsValue(value) { 3630 containsValue(value) {
3631 let found = false; 3631 let found = false;
3632 let initialSplayCount = this[_splayCount]; 3632 let initialSplayCount = this[_splayCount];
3633 let visit = (function(node) { 3633 let visit = (function(node) {
3634 while (node != null) { 3634 while (node != null) {
3635 if (dart.equals(node.value, value)) 3635 if (dart.equals(node.value, value))
3636 return true; 3636 return true;
3637 if (initialSplayCount != this[_splayCount]) { 3637 if (initialSplayCount != this[_splayCount]) {
3638 throw new core.ConcurrentModificationError(this); 3638 dart.throw(new core.ConcurrentModificationError(this));
3639 } 3639 }
3640 if (node.right != null && dart.notNull(visit(dart.as(node.right, _Sp layTreeMapNode)))) 3640 if (node.right != null && dart.notNull(visit(dart.as(node.right, _Sp layTreeMapNode))))
3641 return true; 3641 return true;
3642 node = dart.as(node.left, _SplayTreeMapNode); 3642 node = dart.as(node.left, _SplayTreeMapNode);
3643 } 3643 }
3644 return false; 3644 return false;
3645 }).bind(this); 3645 }).bind(this);
3646 dart.fn(visit, core.bool, [_SplayTreeMapNode]); 3646 dart.fn(visit, core.bool, [_SplayTreeMapNode]);
3647 return visit(dart.as(this[_root], _SplayTreeMapNode)); 3647 return visit(dart.as(this[_root], _SplayTreeMapNode));
3648 } 3648 }
(...skipping 12 matching lines...) Expand all
3661 return dart.as(this[_first].key, K); 3661 return dart.as(this[_first].key, K);
3662 } 3662 }
3663 lastKey() { 3663 lastKey() {
3664 if (this[_root] == null) 3664 if (this[_root] == null)
3665 return null; 3665 return null;
3666 return dart.as(this[_last].key, K); 3666 return dart.as(this[_last].key, K);
3667 } 3667 }
3668 lastKeyBefore(key) { 3668 lastKeyBefore(key) {
3669 dart.as(key, K); 3669 dart.as(key, K);
3670 if (key == null) 3670 if (key == null)
3671 throw new core.ArgumentError(key); 3671 dart.throw(new core.ArgumentError(key));
3672 if (this[_root] == null) 3672 if (this[_root] == null)
3673 return null; 3673 return null;
3674 let comp = this[_splay](key); 3674 let comp = this[_splay](key);
3675 if (dart.notNull(comp) < 0) 3675 if (dart.notNull(comp) < 0)
3676 return this[_root].key; 3676 return this[_root].key;
3677 let node = this[_root].left; 3677 let node = this[_root].left;
3678 if (node == null) 3678 if (node == null)
3679 return null; 3679 return null;
3680 while (node.right != null) { 3680 while (node.right != null) {
3681 node = node.right; 3681 node = node.right;
3682 } 3682 }
3683 return node.key; 3683 return node.key;
3684 } 3684 }
3685 firstKeyAfter(key) { 3685 firstKeyAfter(key) {
3686 dart.as(key, K); 3686 dart.as(key, K);
3687 if (key == null) 3687 if (key == null)
3688 throw new core.ArgumentError(key); 3688 dart.throw(new core.ArgumentError(key));
3689 if (this[_root] == null) 3689 if (this[_root] == null)
3690 return null; 3690 return null;
3691 let comp = this[_splay](key); 3691 let comp = this[_splay](key);
3692 if (dart.notNull(comp) > 0) 3692 if (dart.notNull(comp) > 0)
3693 return this[_root].key; 3693 return this[_root].key;
3694 let node = this[_root].right; 3694 let node = this[_root].right;
3695 if (node == null) 3695 if (node == null)
3696 return null; 3696 return null;
3697 while (node.left != null) { 3697 while (node.left != null) {
3698 node = node.left; 3698 node = node.left;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
3779 if (currentNode == null) { 3779 if (currentNode == null) {
3780 this[_findLeftMostDescendent](this[_tree][_root]); 3780 this[_findLeftMostDescendent](this[_tree][_root]);
3781 } else { 3781 } else {
3782 this[_tree][_splay](currentNode.key); 3782 this[_tree][_splay](currentNode.key);
3783 this[_findLeftMostDescendent](this[_tree][_root].right); 3783 this[_findLeftMostDescendent](this[_tree][_root].right);
3784 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty])); 3784 dart.assert(!dart.notNull(this[_workList][dartx.isEmpty]));
3785 } 3785 }
3786 } 3786 }
3787 moveNext() { 3787 moveNext() {
3788 if (this[_modificationCount] != this[_tree][_modificationCount]) { 3788 if (this[_modificationCount] != this[_tree][_modificationCount]) {
3789 throw new core.ConcurrentModificationError(this[_tree]); 3789 dart.throw(new core.ConcurrentModificationError(this[_tree]));
3790 } 3790 }
3791 if (dart.notNull(this[_workList][dartx.isEmpty])) { 3791 if (dart.notNull(this[_workList][dartx.isEmpty])) {
3792 this[_currentNode] = null; 3792 this[_currentNode] = null;
3793 return false; 3793 return false;
3794 } 3794 }
3795 if (this[_tree][_splayCount] != this[_splayCount] && this[_currentNode] != null) { 3795 if (this[_tree][_splayCount] != this[_splayCount] && this[_currentNode] != null) {
3796 this[_rebuildWorkList](this[_currentNode]); 3796 this[_rebuildWorkList](this[_currentNode]);
3797 } 3797 }
3798 this[_currentNode] = this[_workList][dartx.removeLast](); 3798 this[_currentNode] = this[_workList][dartx.removeLast]();
3799 this[_findLeftMostDescendent](this[_currentNode].right); 3799 this[_findLeftMostDescendent](this[_currentNode].right);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
3963 return this[_count]; 3963 return this[_count];
3964 } 3964 }
3965 get isEmpty() { 3965 get isEmpty() {
3966 return this[_root] == null; 3966 return this[_root] == null;
3967 } 3967 }
3968 get isNotEmpty() { 3968 get isNotEmpty() {
3969 return this[_root] != null; 3969 return this[_root] != null;
3970 } 3970 }
3971 get first() { 3971 get first() {
3972 if (this[_count] == 0) 3972 if (this[_count] == 0)
3973 throw _internal.IterableElementError.noElement(); 3973 dart.throw(_internal.IterableElementError.noElement());
3974 return dart.as(this[_first].key, E); 3974 return dart.as(this[_first].key, E);
3975 } 3975 }
3976 get last() { 3976 get last() {
3977 if (this[_count] == 0) 3977 if (this[_count] == 0)
3978 throw _internal.IterableElementError.noElement(); 3978 dart.throw(_internal.IterableElementError.noElement());
3979 return dart.as(this[_last].key, E); 3979 return dart.as(this[_last].key, E);
3980 } 3980 }
3981 get single() { 3981 get single() {
3982 if (this[_count] == 0) 3982 if (this[_count] == 0)
3983 throw _internal.IterableElementError.noElement(); 3983 dart.throw(_internal.IterableElementError.noElement());
3984 if (dart.notNull(this[_count]) > 1) 3984 if (dart.notNull(this[_count]) > 1)
3985 throw _internal.IterableElementError.tooMany(); 3985 dart.throw(_internal.IterableElementError.tooMany());
3986 return this[_root].key; 3986 return this[_root].key;
3987 } 3987 }
3988 contains(object) { 3988 contains(object) {
3989 return dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obj ect, E)) == 0; 3989 return dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obj ect, E)) == 0;
3990 } 3990 }
3991 add(element) { 3991 add(element) {
3992 dart.as(element, E); 3992 dart.as(element, E);
3993 let compare = this[_splay](element); 3993 let compare = this[_splay](element);
3994 if (compare == 0) 3994 if (compare == 0)
3995 return false; 3995 return false;
(...skipping 18 matching lines...) Expand all
4014 for (let element of elements) { 4014 for (let element of elements) {
4015 if (dart.notNull(this[_validKey](element))) 4015 if (dart.notNull(this[_validKey](element)))
4016 this[_remove](dart.as(element, E)); 4016 this[_remove](dart.as(element, E));
4017 } 4017 }
4018 } 4018 }
4019 retainAll(elements) { 4019 retainAll(elements) {
4020 let retainSet = new (SplayTreeSet$(E))(this[_comparator], this[_validKey ]); 4020 let retainSet = new (SplayTreeSet$(E))(this[_comparator], this[_validKey ]);
4021 let modificationCount = this[_modificationCount]; 4021 let modificationCount = this[_modificationCount];
4022 for (let object of elements) { 4022 for (let object of elements) {
4023 if (modificationCount != this[_modificationCount]) { 4023 if (modificationCount != this[_modificationCount]) {
4024 throw new core.ConcurrentModificationError(this); 4024 dart.throw(new core.ConcurrentModificationError(this));
4025 } 4025 }
4026 if (dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obje ct, E)) == 0) 4026 if (dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obje ct, E)) == 0)
4027 retainSet.add(this[_root].key); 4027 retainSet.add(this[_root].key);
4028 } 4028 }
4029 if (retainSet[_count] != this[_count]) { 4029 if (retainSet[_count] != this[_count]) {
4030 this[_root] = retainSet[_root]; 4030 this[_root] = retainSet[_root];
4031 this[_count] = retainSet[_count]; 4031 this[_count] = retainSet[_count];
4032 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 4032 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
4033 } 4033 }
4034 } 4034 }
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
4287 this[_length] = 0; 4287 this[_length] = 0;
4288 } 4288 }
4289 } 4289 }
4290 forEach(action) { 4290 forEach(action) {
4291 dart.as(action, dart.functionType(dart.void, [K, V])); 4291 dart.as(action, dart.functionType(dart.void, [K, V]));
4292 let keys = this[_computeKeys](); 4292 let keys = this[_computeKeys]();
4293 for (let i = 0, length = keys[dartx.length]; dart.notNull(i) < dart.notN ull(length); i = dart.notNull(i) + 1) { 4293 for (let i = 0, length = keys[dartx.length]; dart.notNull(i) < dart.notN ull(length); i = dart.notNull(i) + 1) {
4294 let key = keys[i]; 4294 let key = keys[i];
4295 action(dart.as(key, K), this.get(key)); 4295 action(dart.as(key, K), this.get(key));
4296 if (keys !== this[_keys]) { 4296 if (keys !== this[_keys]) {
4297 throw new core.ConcurrentModificationError(this); 4297 dart.throw(new core.ConcurrentModificationError(this));
4298 } 4298 }
4299 } 4299 }
4300 } 4300 }
4301 [_computeKeys]() { 4301 [_computeKeys]() {
4302 if (this[_keys] != null) 4302 if (this[_keys] != null)
4303 return this[_keys]; 4303 return this[_keys];
4304 let result = core.List.new(this[_length]); 4304 let result = core.List.new(this[_length]);
4305 let index = 0; 4305 let index = 0;
4306 let strings = this[_strings]; 4306 let strings = this[_strings];
4307 if (strings != null) { 4307 if (strings != null) {
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
4545 } 4545 }
4546 contains(element) { 4546 contains(element) {
4547 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool ); 4547 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool );
4548 } 4548 }
4549 forEach(f) { 4549 forEach(f) {
4550 dart.as(f, dart.functionType(dart.void, [E])); 4550 dart.as(f, dart.functionType(dart.void, [E]));
4551 let keys = dart.as(dart.dsend(this[_map], _computeKeys), core.List); 4551 let keys = dart.as(dart.dsend(this[_map], _computeKeys), core.List);
4552 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len gth); i = dart.notNull(i) + 1) { 4552 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len gth); i = dart.notNull(i) + 1) {
4553 f(dart.as(keys[i], E)); 4553 f(dart.as(keys[i], E));
4554 if (keys !== dart.dload(this[_map], _keys)) { 4554 if (keys !== dart.dload(this[_map], _keys)) {
4555 throw new core.ConcurrentModificationError(this[_map]); 4555 dart.throw(new core.ConcurrentModificationError(this[_map]));
4556 } 4556 }
4557 } 4557 }
4558 } 4558 }
4559 } 4559 }
4560 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength]; 4560 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength];
4561 dart.setSignature(HashMapKeyIterable, { 4561 dart.setSignature(HashMapKeyIterable, {
4562 constructors: () => ({HashMapKeyIterable: [HashMapKeyIterable$(E), [dart.d ynamic]]}), 4562 constructors: () => ({HashMapKeyIterable: [HashMapKeyIterable$(E), [dart.d ynamic]]}),
4563 methods: () => ({forEach: [dart.void, [dart.functionType(dart.void, [E])]] }) 4563 methods: () => ({forEach: [dart.void, [dart.functionType(dart.void, [E])]] })
4564 }); 4564 });
4565 dart.defineExtensionMembers(HashMapKeyIterable, [ 4565 dart.defineExtensionMembers(HashMapKeyIterable, [
(...skipping 15 matching lines...) Expand all
4581 this[_offset] = 0; 4581 this[_offset] = 0;
4582 this[_current] = null; 4582 this[_current] = null;
4583 } 4583 }
4584 get current() { 4584 get current() {
4585 return this[_current]; 4585 return this[_current];
4586 } 4586 }
4587 moveNext() { 4587 moveNext() {
4588 let keys = this[_keys]; 4588 let keys = this[_keys];
4589 let offset = this[_offset]; 4589 let offset = this[_offset];
4590 if (keys !== dart.dload(this[_map], _keys)) { 4590 if (keys !== dart.dload(this[_map], _keys)) {
4591 throw new core.ConcurrentModificationError(this[_map]); 4591 dart.throw(new core.ConcurrentModificationError(this[_map]));
4592 } else if (dart.notNull(offset) >= keys.length) { 4592 } else if (dart.notNull(offset) >= keys.length) {
4593 this[_current] = null; 4593 this[_current] = null;
4594 return false; 4594 return false;
4595 } else { 4595 } else {
4596 this[_current] = dart.as(keys[offset], E); 4596 this[_current] = dart.as(keys[offset], E);
4597 this[_offset] = dart.notNull(offset) + 1; 4597 this[_offset] = dart.notNull(offset) + 1;
4598 return true; 4598 return true;
4599 } 4599 }
4600 } 4600 }
4601 } 4601 }
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
4778 this[_modified](); 4778 this[_modified]();
4779 } 4779 }
4780 } 4780 }
4781 forEach(action) { 4781 forEach(action) {
4782 dart.as(action, dart.functionType(dart.void, [K, V])); 4782 dart.as(action, dart.functionType(dart.void, [K, V]));
4783 let cell = this[_first]; 4783 let cell = this[_first];
4784 let modifications = this[_modifications]; 4784 let modifications = this[_modifications];
4785 while (cell != null) { 4785 while (cell != null) {
4786 action(dart.as(cell[_key], K), dart.as(cell[_value], V)); 4786 action(dart.as(cell[_key], K), dart.as(cell[_value], V));
4787 if (modifications != this[_modifications]) { 4787 if (modifications != this[_modifications]) {
4788 throw new core.ConcurrentModificationError(this); 4788 dart.throw(new core.ConcurrentModificationError(this));
4789 } 4789 }
4790 cell = cell[_next]; 4790 cell = cell[_next];
4791 } 4791 }
4792 } 4792 }
4793 [_addHashTableEntry](table, key, value) { 4793 [_addHashTableEntry](table, key, value) {
4794 dart.as(key, K); 4794 dart.as(key, K);
4795 dart.as(value, V); 4795 dart.as(value, V);
4796 let cell = dart.as(_LinkedHashMap$()._getTableEntry(table, key), LinkedH ashMapCell); 4796 let cell = dart.as(_LinkedHashMap$()._getTableEntry(table, key), LinkedH ashMapCell);
4797 if (cell == null) { 4797 if (cell == null) {
4798 _LinkedHashMap$()._setTableEntry(table, key, this[_newLinkedCell](key, value)); 4798 _LinkedHashMap$()._setTableEntry(table, key, this[_newLinkedCell](key, value));
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
5036 contains(element) { 5036 contains(element) {
5037 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool ); 5037 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool );
5038 } 5038 }
5039 forEach(f) { 5039 forEach(f) {
5040 dart.as(f, dart.functionType(dart.void, [E])); 5040 dart.as(f, dart.functionType(dart.void, [E]));
5041 let cell = dart.as(dart.dload(this[_map], _first), LinkedHashMapCell); 5041 let cell = dart.as(dart.dload(this[_map], _first), LinkedHashMapCell);
5042 let modifications = dart.as(dart.dload(this[_map], _modifications), core .int); 5042 let modifications = dart.as(dart.dload(this[_map], _modifications), core .int);
5043 while (cell != null) { 5043 while (cell != null) {
5044 f(dart.as(cell[_key], E)); 5044 f(dart.as(cell[_key], E));
5045 if (!dart.equals(modifications, dart.dload(this[_map], _modifications) )) { 5045 if (!dart.equals(modifications, dart.dload(this[_map], _modifications) )) {
5046 throw new core.ConcurrentModificationError(this[_map]); 5046 dart.throw(new core.ConcurrentModificationError(this[_map]));
5047 } 5047 }
5048 cell = cell[_next]; 5048 cell = cell[_next];
5049 } 5049 }
5050 } 5050 }
5051 } 5051 }
5052 LinkedHashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength ]; 5052 LinkedHashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength ];
5053 dart.setSignature(LinkedHashMapKeyIterable, { 5053 dart.setSignature(LinkedHashMapKeyIterable, {
5054 constructors: () => ({LinkedHashMapKeyIterable: [LinkedHashMapKeyIterable$ (E), [dart.dynamic]]}), 5054 constructors: () => ({LinkedHashMapKeyIterable: [LinkedHashMapKeyIterable$ (E), [dart.dynamic]]}),
5055 methods: () => ({forEach: [dart.void, [dart.functionType(dart.void, [E])]] }) 5055 methods: () => ({forEach: [dart.void, [dart.functionType(dart.void, [E])]] })
5056 }); 5056 });
(...skipping 15 matching lines...) Expand all
5072 this[_modifications] = modifications; 5072 this[_modifications] = modifications;
5073 this[_cell] = null; 5073 this[_cell] = null;
5074 this[_current] = null; 5074 this[_current] = null;
5075 this[_cell] = dart.as(dart.dload(this[_map], _first), LinkedHashMapCell) ; 5075 this[_cell] = dart.as(dart.dload(this[_map], _first), LinkedHashMapCell) ;
5076 } 5076 }
5077 get current() { 5077 get current() {
5078 return this[_current]; 5078 return this[_current];
5079 } 5079 }
5080 moveNext() { 5080 moveNext() {
5081 if (!dart.equals(this[_modifications], dart.dload(this[_map], _modificat ions))) { 5081 if (!dart.equals(this[_modifications], dart.dload(this[_map], _modificat ions))) {
5082 throw new core.ConcurrentModificationError(this[_map]); 5082 dart.throw(new core.ConcurrentModificationError(this[_map]));
5083 } else if (this[_cell] == null) { 5083 } else if (this[_cell] == null) {
5084 this[_current] = null; 5084 this[_current] = null;
5085 return false; 5085 return false;
5086 } else { 5086 } else {
5087 this[_current] = dart.as(this[_cell][_key], E); 5087 this[_current] = dart.as(this[_cell][_key], E);
5088 this[_cell] = this[_cell][_next]; 5088 this[_cell] = this[_cell][_next];
5089 return true; 5089 return true;
5090 } 5090 }
5091 } 5091 }
5092 } 5092 }
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
5467 this[_offset] = 0; 5467 this[_offset] = 0;
5468 this[_current] = null; 5468 this[_current] = null;
5469 } 5469 }
5470 get current() { 5470 get current() {
5471 return this[_current]; 5471 return this[_current];
5472 } 5472 }
5473 moveNext() { 5473 moveNext() {
5474 let elements = this[_elements]; 5474 let elements = this[_elements];
5475 let offset = this[_offset]; 5475 let offset = this[_offset];
5476 if (elements !== dart.dload(this[_set], _elements)) { 5476 if (elements !== dart.dload(this[_set], _elements)) {
5477 throw new core.ConcurrentModificationError(this[_set]); 5477 dart.throw(new core.ConcurrentModificationError(this[_set]));
5478 } else if (dart.notNull(offset) >= elements.length) { 5478 } else if (dart.notNull(offset) >= elements.length) {
5479 this[_current] = null; 5479 this[_current] = null;
5480 return false; 5480 return false;
5481 } else { 5481 } else {
5482 this[_current] = dart.as(elements[offset], E); 5482 this[_current] = dart.as(elements[offset], E);
5483 this[_offset] = dart.notNull(offset) + 1; 5483 this[_offset] = dart.notNull(offset) + 1;
5484 return true; 5484 return true;
5485 } 5485 }
5486 } 5486 }
5487 } 5487 }
(...skipping 14 matching lines...) Expand all
5502 this[_nums] = null; 5502 this[_nums] = null;
5503 this[_rest] = null; 5503 this[_rest] = null;
5504 this[_first] = null; 5504 this[_first] = null;
5505 this[_last] = null; 5505 this[_last] = null;
5506 this[_modifications] = 0; 5506 this[_modifications] = 0;
5507 } 5507 }
5508 [_newSet]() { 5508 [_newSet]() {
5509 return new (_LinkedHashSet$(E))(); 5509 return new (_LinkedHashSet$(E))();
5510 } 5510 }
5511 [_unsupported](operation) { 5511 [_unsupported](operation) {
5512 throw `LinkedHashSet: unsupported ${operation}`; 5512 dart.throw(`LinkedHashSet: unsupported ${operation}`);
5513 } 5513 }
5514 get iterator() { 5514 get iterator() {
5515 return new (LinkedHashSetIterator$(E))(this, this[_modifications]); 5515 return new (LinkedHashSetIterator$(E))(this, this[_modifications]);
5516 } 5516 }
5517 get length() { 5517 get length() {
5518 return this[_length]; 5518 return this[_length];
5519 } 5519 }
5520 get isEmpty() { 5520 get isEmpty() {
5521 return this[_length] == 0; 5521 return this[_length] == 0;
5522 } 5522 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
5564 return null; 5564 return null;
5565 return dart.as(dart.dload(bucket[dartx.get](index), _element), E); 5565 return dart.as(dart.dload(bucket[dartx.get](index), _element), E);
5566 } 5566 }
5567 forEach(action) { 5567 forEach(action) {
5568 dart.as(action, dart.functionType(dart.void, [E])); 5568 dart.as(action, dart.functionType(dart.void, [E]));
5569 let cell = this[_first]; 5569 let cell = this[_first];
5570 let modifications = this[_modifications]; 5570 let modifications = this[_modifications];
5571 while (cell != null) { 5571 while (cell != null) {
5572 action(dart.as(cell[_element], E)); 5572 action(dart.as(cell[_element], E));
5573 if (modifications != this[_modifications]) { 5573 if (modifications != this[_modifications]) {
5574 throw new core.ConcurrentModificationError(this); 5574 dart.throw(new core.ConcurrentModificationError(this));
5575 } 5575 }
5576 cell = cell[_next]; 5576 cell = cell[_next];
5577 } 5577 }
5578 } 5578 }
5579 get first() { 5579 get first() {
5580 if (this[_first] == null) 5580 if (this[_first] == null)
5581 throw new core.StateError("No elements"); 5581 dart.throw(new core.StateError("No elements"));
5582 return dart.as(this[_first][_element], E); 5582 return dart.as(this[_first][_element], E);
5583 } 5583 }
5584 get last() { 5584 get last() {
5585 if (this[_last] == null) 5585 if (this[_last] == null)
5586 throw new core.StateError("No elements"); 5586 dart.throw(new core.StateError("No elements"));
5587 return dart.as(this[_last][_element], E); 5587 return dart.as(this[_last][_element], E);
5588 } 5588 }
5589 add(element) { 5589 add(element) {
5590 dart.as(element, E); 5590 dart.as(element, E);
5591 if (dart.notNull(_LinkedHashSet$()._isStringElement(element))) { 5591 if (dart.notNull(_LinkedHashSet$()._isStringElement(element))) {
5592 let strings = this[_strings]; 5592 let strings = this[_strings];
5593 if (strings == null) 5593 if (strings == null)
5594 this[_strings] = strings = _LinkedHashSet$()._newHashTable(); 5594 this[_strings] = strings = _LinkedHashSet$()._newHashTable();
5595 return this[_addHashTableEntry](strings, element); 5595 return this[_addHashTableEntry](strings, element);
5596 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(element))) { 5596 } else if (dart.notNull(_LinkedHashSet$()._isNumericElement(element))) {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
5652 } 5652 }
5653 [_filterWhere](test, removeMatching) { 5653 [_filterWhere](test, removeMatching) {
5654 dart.as(test, dart.functionType(core.bool, [E])); 5654 dart.as(test, dart.functionType(core.bool, [E]));
5655 let cell = this[_first]; 5655 let cell = this[_first];
5656 while (cell != null) { 5656 while (cell != null) {
5657 let element = dart.as(cell[_element], E); 5657 let element = dart.as(cell[_element], E);
5658 let next = cell[_next]; 5658 let next = cell[_next];
5659 let modifications = this[_modifications]; 5659 let modifications = this[_modifications];
5660 let shouldRemove = removeMatching == test(element); 5660 let shouldRemove = removeMatching == test(element);
5661 if (modifications != this[_modifications]) { 5661 if (modifications != this[_modifications]) {
5662 throw new core.ConcurrentModificationError(this); 5662 dart.throw(new core.ConcurrentModificationError(this));
5663 } 5663 }
5664 if (dart.notNull(shouldRemove)) 5664 if (dart.notNull(shouldRemove))
5665 this.remove(element); 5665 this.remove(element);
5666 cell = next; 5666 cell = next;
5667 } 5667 }
5668 } 5668 }
5669 clear() { 5669 clear() {
5670 if (dart.notNull(this[_length]) > 0) { 5670 if (dart.notNull(this[_length]) > 0) {
5671 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last ] = null; 5671 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last ] = null;
5672 this[_length] = 0; 5672 this[_length] = 0;
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
5935 this[_modifications] = modifications; 5935 this[_modifications] = modifications;
5936 this[_cell] = null; 5936 this[_cell] = null;
5937 this[_current] = null; 5937 this[_current] = null;
5938 this[_cell] = dart.as(dart.dload(this[_set], _first), LinkedHashSetCell) ; 5938 this[_cell] = dart.as(dart.dload(this[_set], _first), LinkedHashSetCell) ;
5939 } 5939 }
5940 get current() { 5940 get current() {
5941 return this[_current]; 5941 return this[_current];
5942 } 5942 }
5943 moveNext() { 5943 moveNext() {
5944 if (!dart.equals(this[_modifications], dart.dload(this[_set], _modificat ions))) { 5944 if (!dart.equals(this[_modifications], dart.dload(this[_set], _modificat ions))) {
5945 throw new core.ConcurrentModificationError(this[_set]); 5945 dart.throw(new core.ConcurrentModificationError(this[_set]));
5946 } else if (this[_cell] == null) { 5946 } else if (this[_cell] == null) {
5947 this[_current] = null; 5947 this[_current] = null;
5948 return false; 5948 return false;
5949 } else { 5949 } else {
5950 this[_current] = dart.as(this[_cell][_element], E); 5950 this[_current] = dart.as(this[_cell][_element], E);
5951 this[_cell] = this[_cell][_next]; 5951 this[_cell] = this[_cell][_next];
5952 return true; 5952 return true;
5953 } 5953 }
5954 } 5954 }
5955 } 5955 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
6020 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; 6020 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$;
6021 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; 6021 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable;
6022 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; 6022 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$;
6023 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; 6023 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator;
6024 exports.HashSetIterator$ = HashSetIterator$; 6024 exports.HashSetIterator$ = HashSetIterator$;
6025 exports.HashSetIterator = HashSetIterator; 6025 exports.HashSetIterator = HashSetIterator;
6026 exports.LinkedHashSetCell = LinkedHashSetCell; 6026 exports.LinkedHashSetCell = LinkedHashSetCell;
6027 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; 6027 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$;
6028 exports.LinkedHashSetIterator = LinkedHashSetIterator; 6028 exports.LinkedHashSetIterator = LinkedHashSetIterator;
6029 }); 6029 });
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