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

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

Issue 1083763003: refactor emitMemberName to be used more consistently (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 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
OLDNEW
1 var collection; 1 var collection;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 let _source = Symbol('_source'); 4 let _source = Symbol('_source');
5 let UnmodifiableListView$ = dart.generic(function(E) { 5 let UnmodifiableListView$ = dart.generic(function(E) {
6 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { 6 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) {
7 UnmodifiableListView(source) { 7 UnmodifiableListView(source) {
8 this[_source] = source; 8 this[_source] = source;
9 super.UnmodifiableListBase(); 9 super.UnmodifiableListBase();
10 } 10 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 dart.defineNamedConstructor(HashMap, 'from'); 96 dart.defineNamedConstructor(HashMap, 'from');
97 dart.defineNamedConstructor(HashMap, 'fromIterable'); 97 dart.defineNamedConstructor(HashMap, 'fromIterable');
98 dart.defineNamedConstructor(HashMap, 'fromIterables'); 98 dart.defineNamedConstructor(HashMap, 'fromIterables');
99 return HashMap; 99 return HashMap;
100 }); 100 });
101 let HashMap = HashMap$(); 101 let HashMap = HashMap$();
102 let _newSet = Symbol('_newSet'); 102 let _newSet = Symbol('_newSet');
103 let SetMixin$ = dart.generic(function(E) { 103 let SetMixin$ = dart.generic(function(E) {
104 class SetMixin extends core.Object { 104 class SetMixin extends core.Object {
105 get [core.$isEmpty]() { 105 get [core.$isEmpty]() {
106 return this.length == 0; 106 return this[core.$length] == 0;
107 } 107 }
108 get [core.$isNotEmpty]() { 108 get [core.$isNotEmpty]() {
109 return this.length != 0; 109 return this[core.$length] != 0;
110 } 110 }
111 clear() { 111 clear() {
112 this.removeAll(this.toList()); 112 this.removeAll(this[core.$toList]());
113 } 113 }
114 addAll(elements) { 114 addAll(elements) {
115 for (let element of elements) 115 for (let element of elements)
116 this.add(element); 116 this.add(element);
117 } 117 }
118 removeAll(elements) { 118 removeAll(elements) {
119 for (let element of elements) 119 for (let element of elements)
120 this.remove(element); 120 this.remove(element);
121 } 121 }
122 retainAll(elements) { 122 retainAll(elements) {
123 let toRemove = this.toSet(); 123 let toRemove = this[core.$toSet]();
124 for (let o of elements) { 124 for (let o of elements) {
125 toRemove.remove(o); 125 toRemove.remove(o);
126 } 126 }
127 this.removeAll(toRemove); 127 this.removeAll(toRemove);
128 } 128 }
129 removeWhere(test) { 129 removeWhere(test) {
130 let toRemove = new core.List.from([]); 130 let toRemove = new core.List.from([]);
131 for (let element of this) { 131 for (let element of this) {
132 if (test(element)) 132 if (test(element))
133 toRemove[core.$add](element); 133 toRemove[core.$add](element);
134 } 134 }
135 this.removeAll(toRemove); 135 this.removeAll(toRemove);
136 } 136 }
137 retainWhere(test) { 137 retainWhere(test) {
138 let toRemove = new core.List.from([]); 138 let toRemove = new core.List.from([]);
139 for (let element of this) { 139 for (let element of this) {
140 if (!dart.notNull(test(element))) 140 if (!dart.notNull(test(element)))
141 toRemove[core.$add](element); 141 toRemove[core.$add](element);
142 } 142 }
143 this.removeAll(toRemove); 143 this.removeAll(toRemove);
144 } 144 }
145 containsAll(other) { 145 containsAll(other) {
146 for (let o of other) { 146 for (let o of other) {
147 if (!dart.notNull(this.contains(o))) 147 if (!dart.notNull(this[core.$contains](o)))
148 return false; 148 return false;
149 } 149 }
150 return true; 150 return true;
151 } 151 }
152 union(other) { 152 union(other) {
153 let _ = this.toSet(); 153 let _ = this[core.$toSet]();
154 _.addAll(other); 154 _.addAll(other);
155 return _; 155 return _;
156 } 156 }
157 intersection(other) { 157 intersection(other) {
158 let result = this.toSet(); 158 let result = this[core.$toSet]();
159 for (let element of this) { 159 for (let element of this) {
160 if (!dart.notNull(other[core.$contains](element))) 160 if (!dart.notNull(other[core.$contains](element)))
161 result.remove(element); 161 result.remove(element);
162 } 162 }
163 return result; 163 return result;
164 } 164 }
165 difference(other) { 165 difference(other) {
166 let result = this.toSet(); 166 let result = this[core.$toSet]();
167 for (let element of this) { 167 for (let element of this) {
168 if (other[core.$contains](element)) 168 if (other[core.$contains](element))
169 result.remove(element); 169 result.remove(element);
170 } 170 }
171 return result; 171 return result;
172 } 172 }
173 [core.$toList](opts) { 173 [core.$toList](opts) {
174 let growable = opts && 'growable' in opts ? opts.growable : true; 174 let growable = opts && 'growable' in opts ? opts.growable : true;
175 let result = growable ? (() => { 175 let result = growable ? (() => {
176 let _ = new (core.List$(E))(); 176 let _ = new (core.List$(E))();
177 _[core.$length] = this.length; 177 _[core.$length] = this[core.$length];
178 return _; 178 return _;
179 }).bind(this)() : new (core.List$(E))(this.length); 179 }).bind(this)() : new (core.List$(E))(this[core.$length]);
180 let i = 0; 180 let i = 0;
181 for (let element of this) 181 for (let element of this)
182 result[core.$set]((() => { 182 result[core.$set]((() => {
183 let x$ = i; 183 let x$ = i;
184 i = dart.notNull(x$) + 1; 184 i = dart.notNull(x$) + 1;
185 return x$; 185 return x$;
186 })(), element); 186 })(), element);
187 return result; 187 return result;
188 } 188 }
189 [core.$map](f) { 189 [core.$map](f) {
190 return new (_internal.EfficientLengthMappedIterable$(E, dart.dynamic))(t his, f); 190 return new (_internal.EfficientLengthMappedIterable$(E, dart.dynamic))(t his, f);
191 } 191 }
192 get [core.$single]() { 192 get [core.$single]() {
193 if (dart.notNull(this.length) > 1) 193 if (dart.notNull(this[core.$length]) > 1)
194 throw _internal.IterableElementError.tooMany(); 194 throw _internal.IterableElementError.tooMany();
195 let it = this.iterator; 195 let it = this[core.$iterator];
196 if (!dart.notNull(it.moveNext())) 196 if (!dart.notNull(it.moveNext()))
197 throw _internal.IterableElementError.noElement(); 197 throw _internal.IterableElementError.noElement();
198 let result = dart.as(it.current, E); 198 let result = dart.as(it.current, E);
199 return result; 199 return result;
200 } 200 }
201 toString() { 201 toString() {
202 return IterableBase.iterableToFullString(this, '{', '}'); 202 return IterableBase.iterableToFullString(this, '{', '}');
203 } 203 }
204 [core.$where](f) { 204 [core.$where](f) {
205 return new (_internal.WhereIterable$(E))(this, f); 205 return new (_internal.WhereIterable$(E))(this, f);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 [core.$takeWhile](test) { 268 [core.$takeWhile](test) {
269 return new (_internal.TakeWhileIterable$(E))(this, test); 269 return new (_internal.TakeWhileIterable$(E))(this, test);
270 } 270 }
271 [core.$skip](n) { 271 [core.$skip](n) {
272 return new (_internal.SkipIterable$(E))(this, n); 272 return new (_internal.SkipIterable$(E))(this, n);
273 } 273 }
274 [core.$skipWhile](test) { 274 [core.$skipWhile](test) {
275 return new (_internal.SkipWhileIterable$(E))(this, test); 275 return new (_internal.SkipWhileIterable$(E))(this, test);
276 } 276 }
277 get [core.$first]() { 277 get [core.$first]() {
278 let it = this.iterator; 278 let it = this[core.$iterator];
279 if (!dart.notNull(it.moveNext())) { 279 if (!dart.notNull(it.moveNext())) {
280 throw _internal.IterableElementError.noElement(); 280 throw _internal.IterableElementError.noElement();
281 } 281 }
282 return dart.as(it.current, E); 282 return dart.as(it.current, E);
283 } 283 }
284 get [core.$last]() { 284 get [core.$last]() {
285 let it = this.iterator; 285 let it = this[core.$iterator];
286 if (!dart.notNull(it.moveNext())) { 286 if (!dart.notNull(it.moveNext())) {
287 throw _internal.IterableElementError.noElement(); 287 throw _internal.IterableElementError.noElement();
288 } 288 }
289 let result = null; 289 let result = null;
290 do { 290 do {
291 result = dart.as(it.current, E); 291 result = dart.as(it.current, E);
292 } while (it.moveNext()); 292 } while (it.moveNext());
293 return result; 293 return result;
294 } 294 }
295 [core.$firstWhere](test, opts) { 295 [core.$firstWhere](test, opts) {
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 [core.$toList](opts) { 511 [core.$toList](opts) {
512 let growable = opts && 'growable' in opts ? opts.growable : true; 512 let growable = opts && 'growable' in opts ? opts.growable : true;
513 return new core.List$(E).from(this, {growable: growable}); 513 return new core.List$(E).from(this, {growable: growable});
514 } 514 }
515 [core.$toSet]() { 515 [core.$toSet]() {
516 return new core.Set$(E).from(this); 516 return new core.Set$(E).from(this);
517 } 517 }
518 get [core.$length]() { 518 get [core.$length]() {
519 dart.assert(!dart.is(this, _internal.EfficientLength)); 519 dart.assert(!dart.is(this, _internal.EfficientLength));
520 let count = 0; 520 let count = 0;
521 let it = this.iterator; 521 let it = this[core.$iterator];
522 while (it.moveNext()) { 522 while (it.moveNext()) {
523 count = dart.notNull(count) + 1; 523 count = dart.notNull(count) + 1;
524 } 524 }
525 return count; 525 return count;
526 } 526 }
527 get [core.$isEmpty]() { 527 get [core.$isEmpty]() {
528 return !dart.notNull(this.iterator.moveNext()); 528 return !dart.notNull(this[core.$iterator].moveNext());
529 } 529 }
530 get [core.$isNotEmpty]() { 530 get [core.$isNotEmpty]() {
531 return !dart.notNull(this.isEmpty); 531 return !dart.notNull(this[core.$isEmpty]);
532 } 532 }
533 [core.$take](n) { 533 [core.$take](n) {
534 return new (_internal.TakeIterable$(E))(this, n); 534 return new (_internal.TakeIterable$(E))(this, n);
535 } 535 }
536 [core.$takeWhile](test) { 536 [core.$takeWhile](test) {
537 return new (_internal.TakeWhileIterable$(E))(this, test); 537 return new (_internal.TakeWhileIterable$(E))(this, test);
538 } 538 }
539 [core.$skip](n) { 539 [core.$skip](n) {
540 return new (_internal.SkipIterable$(E))(this, n); 540 return new (_internal.SkipIterable$(E))(this, n);
541 } 541 }
542 [core.$skipWhile](test) { 542 [core.$skipWhile](test) {
543 return new (_internal.SkipWhileIterable$(E))(this, test); 543 return new (_internal.SkipWhileIterable$(E))(this, test);
544 } 544 }
545 get [core.$first]() { 545 get [core.$first]() {
546 let it = this.iterator; 546 let it = this[core.$iterator];
547 if (!dart.notNull(it.moveNext())) { 547 if (!dart.notNull(it.moveNext())) {
548 throw _internal.IterableElementError.noElement(); 548 throw _internal.IterableElementError.noElement();
549 } 549 }
550 return dart.as(it.current, E); 550 return dart.as(it.current, E);
551 } 551 }
552 get [core.$last]() { 552 get [core.$last]() {
553 let it = this.iterator; 553 let it = this[core.$iterator];
554 if (!dart.notNull(it.moveNext())) { 554 if (!dart.notNull(it.moveNext())) {
555 throw _internal.IterableElementError.noElement(); 555 throw _internal.IterableElementError.noElement();
556 } 556 }
557 let result = null; 557 let result = null;
558 do { 558 do {
559 result = dart.as(it.current, E); 559 result = dart.as(it.current, E);
560 } while (it.moveNext()); 560 } while (it.moveNext());
561 return result; 561 return result;
562 } 562 }
563 get [core.$single]() { 563 get [core.$single]() {
564 let it = this.iterator; 564 let it = this[core.$iterator];
565 if (!dart.notNull(it.moveNext())) 565 if (!dart.notNull(it.moveNext()))
566 throw _internal.IterableElementError.noElement(); 566 throw _internal.IterableElementError.noElement();
567 let result = dart.as(it.current, E); 567 let result = dart.as(it.current, E);
568 if (it.moveNext()) 568 if (it.moveNext())
569 throw _internal.IterableElementError.tooMany(); 569 throw _internal.IterableElementError.tooMany();
570 return result; 570 return result;
571 } 571 }
572 [core.$firstWhere](test, opts) { 572 [core.$firstWhere](test, opts) {
573 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 573 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
574 for (let element of this) { 574 for (let element of this) {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
712 [core.$toList](opts) { 712 [core.$toList](opts) {
713 let growable = opts && 'growable' in opts ? opts.growable : true; 713 let growable = opts && 'growable' in opts ? opts.growable : true;
714 return new core.List$(E).from(this, {growable: growable}); 714 return new core.List$(E).from(this, {growable: growable});
715 } 715 }
716 [core.$toSet]() { 716 [core.$toSet]() {
717 return new core.Set$(E).from(this); 717 return new core.Set$(E).from(this);
718 } 718 }
719 get [core.$length]() { 719 get [core.$length]() {
720 dart.assert(!dart.is(this, _internal.EfficientLength)); 720 dart.assert(!dart.is(this, _internal.EfficientLength));
721 let count = 0; 721 let count = 0;
722 let it = this.iterator; 722 let it = this[core.$iterator];
723 while (it.moveNext()) { 723 while (it.moveNext()) {
724 count = dart.notNull(count) + 1; 724 count = dart.notNull(count) + 1;
725 } 725 }
726 return count; 726 return count;
727 } 727 }
728 get [core.$isEmpty]() { 728 get [core.$isEmpty]() {
729 return !dart.notNull(this.iterator.moveNext()); 729 return !dart.notNull(this[core.$iterator].moveNext());
730 } 730 }
731 get [core.$isNotEmpty]() { 731 get [core.$isNotEmpty]() {
732 return !dart.notNull(this.isEmpty); 732 return !dart.notNull(this[core.$isEmpty]);
733 } 733 }
734 [core.$take](n) { 734 [core.$take](n) {
735 return new (_internal.TakeIterable$(E))(this, n); 735 return new (_internal.TakeIterable$(E))(this, n);
736 } 736 }
737 [core.$takeWhile](test) { 737 [core.$takeWhile](test) {
738 return new (_internal.TakeWhileIterable$(E))(this, test); 738 return new (_internal.TakeWhileIterable$(E))(this, test);
739 } 739 }
740 [core.$skip](n) { 740 [core.$skip](n) {
741 return new (_internal.SkipIterable$(E))(this, n); 741 return new (_internal.SkipIterable$(E))(this, n);
742 } 742 }
743 [core.$skipWhile](test) { 743 [core.$skipWhile](test) {
744 return new (_internal.SkipWhileIterable$(E))(this, test); 744 return new (_internal.SkipWhileIterable$(E))(this, test);
745 } 745 }
746 get [core.$first]() { 746 get [core.$first]() {
747 let it = this.iterator; 747 let it = this[core.$iterator];
748 if (!dart.notNull(it.moveNext())) { 748 if (!dart.notNull(it.moveNext())) {
749 throw _internal.IterableElementError.noElement(); 749 throw _internal.IterableElementError.noElement();
750 } 750 }
751 return dart.as(it.current, E); 751 return dart.as(it.current, E);
752 } 752 }
753 get [core.$last]() { 753 get [core.$last]() {
754 let it = this.iterator; 754 let it = this[core.$iterator];
755 if (!dart.notNull(it.moveNext())) { 755 if (!dart.notNull(it.moveNext())) {
756 throw _internal.IterableElementError.noElement(); 756 throw _internal.IterableElementError.noElement();
757 } 757 }
758 let result = null; 758 let result = null;
759 do { 759 do {
760 result = dart.as(it.current, E); 760 result = dart.as(it.current, E);
761 } while (it.moveNext()); 761 } while (it.moveNext());
762 return result; 762 return result;
763 } 763 }
764 get [core.$single]() { 764 get [core.$single]() {
765 let it = this.iterator; 765 let it = this[core.$iterator];
766 if (!dart.notNull(it.moveNext())) 766 if (!dart.notNull(it.moveNext()))
767 throw _internal.IterableElementError.noElement(); 767 throw _internal.IterableElementError.noElement();
768 let result = dart.as(it.current, E); 768 let result = dart.as(it.current, E);
769 if (it.moveNext()) 769 if (it.moveNext())
770 throw _internal.IterableElementError.tooMany(); 770 throw _internal.IterableElementError.tooMany();
771 return result; 771 return result;
772 } 772 }
773 [core.$firstWhere](test, opts) { 773 [core.$firstWhere](test, opts) {
774 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 774 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
775 for (let element of this) { 775 for (let element of this) {
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 [core.$forEach](action) { 1316 [core.$forEach](action) {
1317 let length = this[core.$length]; 1317 let length = this[core.$length];
1318 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1318 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1319 action(this[core.$get](i)); 1319 action(this[core.$get](i));
1320 if (length != this[core.$length]) { 1320 if (length != this[core.$length]) {
1321 throw new core.ConcurrentModificationError(this); 1321 throw new core.ConcurrentModificationError(this);
1322 } 1322 }
1323 } 1323 }
1324 } 1324 }
1325 get [core.$isEmpty]() { 1325 get [core.$isEmpty]() {
1326 return this.length == 0; 1326 return this[core.$length] == 0;
1327 } 1327 }
1328 get [core.$isNotEmpty]() { 1328 get [core.$isNotEmpty]() {
1329 return !dart.notNull(this.isEmpty); 1329 return !dart.notNull(this[core.$isEmpty]);
1330 } 1330 }
1331 get [core.$first]() { 1331 get [core.$first]() {
1332 if (this.length == 0) 1332 if (this[core.$length] == 0)
1333 throw _internal.IterableElementError.noElement(); 1333 throw _internal.IterableElementError.noElement();
1334 return this[core.$get](0); 1334 return this[core.$get](0);
1335 } 1335 }
1336 get [core.$last]() { 1336 get [core.$last]() {
1337 if (this.length == 0) 1337 if (this[core.$length] == 0)
1338 throw _internal.IterableElementError.noElement(); 1338 throw _internal.IterableElementError.noElement();
1339 return this[core.$get](dart.notNull(this.length) - 1); 1339 return this[core.$get](dart.notNull(this[core.$length]) - 1);
1340 } 1340 }
1341 get [core.$single]() { 1341 get [core.$single]() {
1342 if (this.length == 0) 1342 if (this[core.$length] == 0)
1343 throw _internal.IterableElementError.noElement(); 1343 throw _internal.IterableElementError.noElement();
1344 if (dart.notNull(this.length) > 1) 1344 if (dart.notNull(this[core.$length]) > 1)
1345 throw _internal.IterableElementError.tooMany(); 1345 throw _internal.IterableElementError.tooMany();
1346 return this[core.$get](0); 1346 return this[core.$get](0);
1347 } 1347 }
1348 [core.$contains](element) { 1348 [core.$contains](element) {
1349 let length = this[core.$length]; 1349 let length = this[core.$length];
1350 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i = dart.notNull(i) + 1) { 1350 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i = dart.notNull(i) + 1) {
1351 if (dart.equals(this[core.$get](i), element)) 1351 if (dart.equals(this[core.$get](i), element))
1352 return true; 1352 return true;
1353 if (length != this[core.$length]) { 1353 if (length != this[core.$length]) {
1354 throw new core.ConcurrentModificationError(this); 1354 throw new core.ConcurrentModificationError(this);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 throw new core.ConcurrentModificationError(this); 1425 throw new core.ConcurrentModificationError(this);
1426 } 1426 }
1427 } 1427 }
1428 if (matchFound) 1428 if (matchFound)
1429 return match; 1429 return match;
1430 throw _internal.IterableElementError.noElement(); 1430 throw _internal.IterableElementError.noElement();
1431 } 1431 }
1432 [core.$join](separator) { 1432 [core.$join](separator) {
1433 if (separator === void 0) 1433 if (separator === void 0)
1434 separator = ""; 1434 separator = "";
1435 if (this.length == 0) 1435 if (this[core.$length] == 0)
1436 return ""; 1436 return "";
1437 let buffer = new core.StringBuffer(); 1437 let buffer = new core.StringBuffer();
1438 buffer.writeAll(this, separator); 1438 buffer.writeAll(this, separator);
1439 return buffer.toString(); 1439 return buffer.toString();
1440 } 1440 }
1441 [core.$where](test) { 1441 [core.$where](test) {
1442 return new (_internal.WhereIterable$(E))(this, test); 1442 return new (_internal.WhereIterable$(E))(this, test);
1443 } 1443 }
1444 [core.$map](f) { 1444 [core.$map](f) {
1445 return new _internal.MappedListIterable(this, f); 1445 return new _internal.MappedListIterable(this, f);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 return new (_internal.SubListIterable$(E))(this, 0, count); 1481 return new (_internal.SubListIterable$(E))(this, 0, count);
1482 } 1482 }
1483 [core.$takeWhile](test) { 1483 [core.$takeWhile](test) {
1484 return new (_internal.TakeWhileIterable$(E))(this, test); 1484 return new (_internal.TakeWhileIterable$(E))(this, test);
1485 } 1485 }
1486 [core.$toList](opts) { 1486 [core.$toList](opts) {
1487 let growable = opts && 'growable' in opts ? opts.growable : true; 1487 let growable = opts && 'growable' in opts ? opts.growable : true;
1488 let result = null; 1488 let result = null;
1489 if (growable) { 1489 if (growable) {
1490 result = new (core.List$(E))(); 1490 result = new (core.List$(E))();
1491 result[core.$length] = this.length; 1491 result[core.$length] = this[core.$length];
1492 } else { 1492 } else {
1493 result = new (core.List$(E))(this.length); 1493 result = new (core.List$(E))(this[core.$length]);
1494 } 1494 }
1495 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) { 1495 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i = dart.notNull(i) + 1) {
1496 result[core.$set](i, this[core.$get](i)); 1496 result[core.$set](i, this[core.$get](i));
1497 } 1497 }
1498 return result; 1498 return result;
1499 } 1499 }
1500 [core.$toSet]() { 1500 [core.$toSet]() {
1501 let result = new (core.Set$(E))(); 1501 let result = new (core.Set$(E))();
1502 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) { 1502 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i = dart.notNull(i) + 1) {
1503 result.add(this[core.$get](i)); 1503 result.add(this[core.$get](i));
1504 } 1504 }
1505 return result; 1505 return result;
1506 } 1506 }
1507 [core.$add](element) { 1507 [core.$add](element) {
1508 this[core.$set]((() => { 1508 this[core.$set]((() => {
1509 let o$ = this, x$ = o$[core.$length]; 1509 let o$ = this, x$ = o$[core.$length];
1510 o$[core.$length] = dart.notNull(x$) + 1; 1510 o$[core.$length] = dart.notNull(x$) + 1;
1511 return x$; 1511 return x$;
1512 }).bind(this)(), element); 1512 }).bind(this)(), element);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 } 1551 }
1552 if (retained[core.$length] != source[core.$length]) { 1552 if (retained[core.$length] != source[core.$length]) {
1553 source[core.$setRange](0, retained[core.$length], retained); 1553 source[core.$setRange](0, retained[core.$length], retained);
1554 source[core.$length] = retained[core.$length]; 1554 source[core.$length] = retained[core.$length];
1555 } 1555 }
1556 } 1556 }
1557 [core.$clear]() { 1557 [core.$clear]() {
1558 this[core.$length] = 0; 1558 this[core.$length] = 0;
1559 } 1559 }
1560 [core.$removeLast]() { 1560 [core.$removeLast]() {
1561 if (this.length == 0) { 1561 if (this[core.$length] == 0) {
1562 throw _internal.IterableElementError.noElement(); 1562 throw _internal.IterableElementError.noElement();
1563 } 1563 }
1564 let result = this[core.$get](dart.notNull(this.length) - 1); 1564 let result = this[core.$get](dart.notNull(this[core.$length]) - 1);
1565 this.length = dart.notNull(this.length) - 1; 1565 this[core.$length] = dart.notNull(this[core.$length]) - 1;
1566 return result; 1566 return result;
1567 } 1567 }
1568 [core.$sort](compare) { 1568 [core.$sort](compare) {
1569 if (compare === void 0) 1569 if (compare === void 0)
1570 compare = null; 1570 compare = null;
1571 if (compare == null) { 1571 if (compare == null) {
1572 let defaultCompare = core.Comparable.compare; 1572 let defaultCompare = core.Comparable.compare;
1573 compare = defaultCompare; 1573 compare = defaultCompare;
1574 } 1574 }
1575 _internal.Sort.sort(this, compare); 1575 _internal.Sort.sort(this, compare);
(...skipping 30 matching lines...) Expand all
1606 } 1606 }
1607 return result; 1607 return result;
1608 } 1608 }
1609 [core.$getRange](start, end) { 1609 [core.$getRange](start, end) {
1610 core.RangeError.checkValidRange(start, end, this[core.$length]); 1610 core.RangeError.checkValidRange(start, end, this[core.$length]);
1611 return new (_internal.SubListIterable$(E))(this, start, end); 1611 return new (_internal.SubListIterable$(E))(this, start, end);
1612 } 1612 }
1613 [core.$removeRange](start, end) { 1613 [core.$removeRange](start, end) {
1614 core.RangeError.checkValidRange(start, end, this[core.$length]); 1614 core.RangeError.checkValidRange(start, end, this[core.$length]);
1615 let length = dart.notNull(end) - dart.notNull(start); 1615 let length = dart.notNull(end) - dart.notNull(start);
1616 this.setRange(start, dart.notNull(this[core.$length]) - dart.notNull(len gth), this, end); 1616 this[core.$setRange](start, dart.notNull(this[core.$length]) - dart.notN ull(length), this, end);
1617 let o$ = this; 1617 let o$ = this;
1618 o$[core.$length] = dart.notNull(o$[core.$length]) - dart.notNull(length) ; 1618 o$[core.$length] = dart.notNull(o$[core.$length]) - dart.notNull(length) ;
1619 } 1619 }
1620 [core.$fillRange](start, end, fill) { 1620 [core.$fillRange](start, end, fill) {
1621 if (fill === void 0) 1621 if (fill === void 0)
1622 fill = null; 1622 fill = null;
1623 core.RangeError.checkValidRange(start, end, this[core.$length]); 1623 core.RangeError.checkValidRange(start, end, this[core.$length]);
1624 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) { 1624 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) {
1625 this[core.$set](i, fill); 1625 this[core.$set](i, fill);
1626 } 1626 }
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 } 1710 }
1711 } 1711 }
1712 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) { 1712 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) {
1713 if (dart.equals(this[core.$get](i), element)) { 1713 if (dart.equals(this[core.$get](i), element)) {
1714 return i; 1714 return i;
1715 } 1715 }
1716 } 1716 }
1717 return -1; 1717 return -1;
1718 } 1718 }
1719 [core.$insert](index, element) { 1719 [core.$insert](index, element) {
1720 core.RangeError.checkValueInInterval(index, 0, this.length, "index"); 1720 core.RangeError.checkValueInInterval(index, 0, this[core.$length], "inde x");
1721 if (index == this[core.$length]) { 1721 if (index == this[core.$length]) {
1722 this.add(element); 1722 this[core.$add](element);
1723 return; 1723 return;
1724 } 1724 }
1725 if (!(typeof index == 'number')) 1725 if (!(typeof index == 'number'))
1726 throw new core.ArgumentError(index); 1726 throw new core.ArgumentError(index);
1727 let o$ = this; 1727 let o$ = this;
1728 o$[core.$length] = dart.notNull(o$[core.$length]) + 1; 1728 o$[core.$length] = dart.notNull(o$[core.$length]) + 1;
1729 this.setRange(dart.notNull(index) + 1, this[core.$length], this, index); 1729 this[core.$setRange](dart.notNull(index) + 1, this[core.$length], this, index);
1730 this[core.$set](index, element); 1730 this[core.$set](index, element);
1731 } 1731 }
1732 [core.$removeAt](index) { 1732 [core.$removeAt](index) {
1733 let result = this[core.$get](index); 1733 let result = this[core.$get](index);
1734 this.setRange(index, dart.notNull(this[core.$length]) - 1, this, dart.no tNull(index) + 1); 1734 this[core.$setRange](index, dart.notNull(this[core.$length]) - 1, this, dart.notNull(index) + 1);
1735 this.length = dart.notNull(this.length) - 1; 1735 this[core.$length] = dart.notNull(this[core.$length]) - 1;
1736 return result; 1736 return result;
1737 } 1737 }
1738 [core.$insertAll](index, iterable) { 1738 [core.$insertAll](index, iterable) {
1739 core.RangeError.checkValueInInterval(index, 0, this.length, "index"); 1739 core.RangeError.checkValueInInterval(index, 0, this[core.$length], "inde x");
1740 if (dart.is(iterable, _internal.EfficientLength)) { 1740 if (dart.is(iterable, _internal.EfficientLength)) {
1741 iterable = iterable[core.$toList](); 1741 iterable = iterable[core.$toList]();
1742 } 1742 }
1743 let insertionLength = iterable[core.$length]; 1743 let insertionLength = iterable[core.$length];
1744 let o$ = this; 1744 let o$ = this;
1745 o$[core.$length] = dart.notNull(o$[core.$length]) + dart.notNull(inserti onLength); 1745 o$[core.$length] = dart.notNull(o$[core.$length]) + dart.notNull(inserti onLength);
1746 this.setRange(dart.notNull(index) + dart.notNull(insertionLength), this[ core.$length], this, index); 1746 this[core.$setRange](dart.notNull(index) + dart.notNull(insertionLength) , this[core.$length], this, index);
1747 this.setAll(index, iterable); 1747 this[core.$setAll](index, iterable);
1748 } 1748 }
1749 [core.$setAll](index, iterable) { 1749 [core.$setAll](index, iterable) {
1750 if (dart.is(iterable, core.List)) { 1750 if (dart.is(iterable, core.List)) {
1751 this.setRange(index, dart.notNull(index) + dart.notNull(iterable[core. $length]), iterable); 1751 this[core.$setRange](index, dart.notNull(index) + dart.notNull(iterabl e[core.$length]), iterable);
1752 } else { 1752 } else {
1753 for (let element of iterable) { 1753 for (let element of iterable) {
1754 this[core.$set]((() => { 1754 this[core.$set]((() => {
1755 let x$ = index; 1755 let x$ = index;
1756 index = dart.notNull(x$) + 1; 1756 index = dart.notNull(x$) + 1;
1757 return x$; 1757 return x$;
1758 })(), element); 1758 })(), element);
1759 } 1759 }
1760 } 1760 }
1761 } 1761 }
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
2383 return this[_table][core.$get](this[_head]); 2383 return this[_table][core.$get](this[_head]);
2384 } 2384 }
2385 get [core.$last]() { 2385 get [core.$last]() {
2386 if (this[_head] == this[_tail]) 2386 if (this[_head] == this[_tail])
2387 throw _internal.IterableElementError.noElement(); 2387 throw _internal.IterableElementError.noElement();
2388 return this[_table][core.$get](dart.notNull(this[_tail]) - 1 & dart.notN ull(this[_table][core.$length]) - 1); 2388 return this[_table][core.$get](dart.notNull(this[_tail]) - 1 & dart.notN ull(this[_table][core.$length]) - 1);
2389 } 2389 }
2390 get [core.$single]() { 2390 get [core.$single]() {
2391 if (this[_head] == this[_tail]) 2391 if (this[_head] == this[_tail])
2392 throw _internal.IterableElementError.noElement(); 2392 throw _internal.IterableElementError.noElement();
2393 if (dart.notNull(this.length) > 1) 2393 if (dart.notNull(this[core.$length]) > 1)
2394 throw _internal.IterableElementError.tooMany(); 2394 throw _internal.IterableElementError.tooMany();
2395 return this[_table][core.$get](this[_head]); 2395 return this[_table][core.$get](this[_head]);
2396 } 2396 }
2397 [core.$elementAt](index) { 2397 [core.$elementAt](index) {
2398 core.RangeError.checkValidIndex(index, this); 2398 core.RangeError.checkValidIndex(index, this);
2399 return this[_table][core.$get](dart.notNull(this[_head]) + dart.notNull( index) & dart.notNull(this[_table][core.$length]) - 1); 2399 return this[_table][core.$get](dart.notNull(this[_head]) + dart.notNull( index) & dart.notNull(this[_table][core.$length]) - 1);
2400 } 2400 }
2401 [core.$toList](opts) { 2401 [core.$toList](opts) {
2402 let growable = opts && 'growable' in opts ? opts.growable : true; 2402 let growable = opts && 'growable' in opts ? opts.growable : true;
2403 let list = null; 2403 let list = null;
2404 if (growable) { 2404 if (growable) {
2405 list = new (core.List$(E))(); 2405 list = new (core.List$(E))();
2406 list[core.$length] = this.length; 2406 list[core.$length] = this[core.$length];
2407 } else { 2407 } else {
2408 list = new (core.List$(E))(this.length); 2408 list = new (core.List$(E))(this[core.$length]);
2409 } 2409 }
2410 this[_writeToList](list); 2410 this[_writeToList](list);
2411 return list; 2411 return list;
2412 } 2412 }
2413 add(element) { 2413 add(element) {
2414 this[_add](element); 2414 this[_add](element);
2415 } 2415 }
2416 addAll(elements) { 2416 addAll(elements) {
2417 if (dart.is(elements, core.List)) { 2417 if (dart.is(elements, core.List)) {
2418 let list = dart.as(elements, core.List); 2418 let list = dart.as(elements, core.List);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2567 [_grow]() { 2567 [_grow]() {
2568 let newTable = new (core.List$(E))(dart.notNull(this[_table][core.$lengt h]) * 2); 2568 let newTable = new (core.List$(E))(dart.notNull(this[_table][core.$lengt h]) * 2);
2569 let split = dart.notNull(this[_table][core.$length]) - dart.notNull(this [_head]); 2569 let split = dart.notNull(this[_table][core.$length]) - dart.notNull(this [_head]);
2570 newTable[core.$setRange](0, split, this[_table], this[_head]); 2570 newTable[core.$setRange](0, split, this[_table], this[_head]);
2571 newTable[core.$setRange](split, dart.notNull(split) + dart.notNull(this[ _head]), this[_table], 0); 2571 newTable[core.$setRange](split, dart.notNull(split) + dart.notNull(this[ _head]), this[_table], 0);
2572 this[_head] = 0; 2572 this[_head] = 0;
2573 this[_tail] = this[_table][core.$length]; 2573 this[_tail] = this[_table][core.$length];
2574 this[_table] = newTable; 2574 this[_table] = newTable;
2575 } 2575 }
2576 [_writeToList](target) { 2576 [_writeToList](target) {
2577 dart.assert(dart.notNull(target[core.$length]) >= dart.notNull(this.leng th)); 2577 dart.assert(dart.notNull(target[core.$length]) >= dart.notNull(this[core .$length]));
2578 if (dart.notNull(this[_head]) <= dart.notNull(this[_tail])) { 2578 if (dart.notNull(this[_head]) <= dart.notNull(this[_tail])) {
2579 let length = dart.notNull(this[_tail]) - dart.notNull(this[_head]); 2579 let length = dart.notNull(this[_tail]) - dart.notNull(this[_head]);
2580 target[core.$setRange](0, length, this[_table], this[_head]); 2580 target[core.$setRange](0, length, this[_table], this[_head]);
2581 return length; 2581 return length;
2582 } else { 2582 } else {
2583 let firstPartSize = dart.notNull(this[_table][core.$length]) - dart.no tNull(this[_head]); 2583 let firstPartSize = dart.notNull(this[_table][core.$length]) - dart.no tNull(this[_head]);
2584 target[core.$setRange](0, firstPartSize, this[_table], this[_head]); 2584 target[core.$setRange](0, firstPartSize, this[_table], this[_head]);
2585 target[core.$setRange](firstPartSize, dart.notNull(firstPartSize) + da rt.notNull(this[_tail]), this[_table], 0); 2585 target[core.$setRange](firstPartSize, dart.notNull(firstPartSize) + da rt.notNull(this[_tail]), this[_table], 0);
2586 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); 2586 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize);
2587 } 2587 }
2588 } 2588 }
2589 [_preGrow](newElementCount) { 2589 [_preGrow](newElementCount) {
2590 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this.length)); 2590 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this[core.$len gth]));
2591 newElementCount = dart.notNull(newElementCount) + (dart.notNull(newEleme ntCount) >> 1); 2591 newElementCount = dart.notNull(newElementCount) + (dart.notNull(newEleme ntCount) >> 1);
2592 let newCapacity = ListQueue[_nextPowerOf2](newElementCount); 2592 let newCapacity = ListQueue[_nextPowerOf2](newElementCount);
2593 let newTable = new (core.List$(E))(newCapacity); 2593 let newTable = new (core.List$(E))(newCapacity);
2594 this[_tail] = this[_writeToList](newTable); 2594 this[_tail] = this[_writeToList](newTable);
2595 this[_table] = newTable; 2595 this[_table] = newTable;
2596 this[_head] = 0; 2596 this[_head] = 0;
2597 } 2597 }
2598 } 2598 }
2599 ListQueue[dart.implements] = () => [Queue$(E)]; 2599 ListQueue[dart.implements] = () => [Queue$(E)];
2600 dart.defineNamedConstructor(ListQueue, 'from'); 2600 dart.defineNamedConstructor(ListQueue, 'from');
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
3572 let value = dart.as(_HashMap[_getTableEntry](table, key), V); 3572 let value = dart.as(_HashMap[_getTableEntry](table, key), V);
3573 _HashMap[_deleteTableEntry](table, key); 3573 _HashMap[_deleteTableEntry](table, key);
3574 this[_length] = dart.notNull(this[_length]) - 1; 3574 this[_length] = dart.notNull(this[_length]) - 1;
3575 this[_keys] = null; 3575 this[_keys] = null;
3576 return value; 3576 return value;
3577 } else { 3577 } else {
3578 return null; 3578 return null;
3579 } 3579 }
3580 } 3580 }
3581 static [_isStringKey](key) { 3581 static [_isStringKey](key) {
3582 return dart.notNull(typeof key == 'string') && dart.notNull(!dart.equals (key, '__proto__')); 3582 return typeof key == 'string' && dart.notNull(!dart.equals(key, '__proto __'));
3583 } 3583 }
3584 static [_isNumericKey](key) { 3584 static [_isNumericKey](key) {
3585 return dart.notNull(dart.is(key, core.num)) && (key & 0x3ffffff) === key ; 3585 return dart.is(key, core.num) && (key & 0x3ffffff) === key;
3586 } 3586 }
3587 [_computeHashCode](key) { 3587 [_computeHashCode](key) {
3588 return key.hashCode & 0x3ffffff; 3588 return key.hashCode & 0x3ffffff;
3589 } 3589 }
3590 static [_hasTableEntry](table, key) { 3590 static [_hasTableEntry](table, key) {
3591 let entry = table[key]; 3591 let entry = table[key];
3592 return entry != null; 3592 return entry != null;
3593 } 3593 }
3594 static [_getTableEntry](table, key) { 3594 static [_getTableEntry](table, key) {
3595 let entry = table[key]; 3595 let entry = table[key];
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
3698 return _CustomHashMap; 3698 return _CustomHashMap;
3699 }); 3699 });
3700 let _CustomHashMap = _CustomHashMap$(); 3700 let _CustomHashMap = _CustomHashMap$();
3701 let HashMapKeyIterable$ = dart.generic(function(E) { 3701 let HashMapKeyIterable$ = dart.generic(function(E) {
3702 class HashMapKeyIterable extends IterableBase$(E) { 3702 class HashMapKeyIterable extends IterableBase$(E) {
3703 HashMapKeyIterable(map$) { 3703 HashMapKeyIterable(map$) {
3704 this[_map] = map$; 3704 this[_map] = map$;
3705 super.IterableBase(); 3705 super.IterableBase();
3706 } 3706 }
3707 get [core.$length]() { 3707 get [core.$length]() {
3708 return dart.as(dart.dload(this[_map], '_length'), core.int); 3708 return dart.as(dart.dload(this[_map], _length), core.int);
3709 } 3709 }
3710 get [core.$isEmpty]() { 3710 get [core.$isEmpty]() {
3711 return dart.equals(dart.dload(this[_map], '_length'), 0); 3711 return dart.equals(dart.dload(this[_map], _length), 0);
3712 } 3712 }
3713 get [core.$iterator]() { 3713 get [core.$iterator]() {
3714 return new (HashMapKeyIterator$(E))(this[_map], dart.as(dart.dsend(this[ _map], '_computeKeys'), core.List)); 3714 return new (HashMapKeyIterator$(E))(this[_map], dart.as(dart.dsend(this[ _map], _computeKeys), core.List));
3715 } 3715 }
3716 [core.$contains](element) { 3716 [core.$contains](element) {
3717 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool ); 3717 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool );
3718 } 3718 }
3719 [core.$forEach](f) { 3719 [core.$forEach](f) {
3720 let keys = dart.as(dart.dsend(this[_map], '_computeKeys'), core.List); 3720 let keys = dart.as(dart.dsend(this[_map], _computeKeys), core.List);
3721 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len gth); i = dart.notNull(i) + 1) { 3721 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len gth); i = dart.notNull(i) + 1) {
3722 f(dart.as(keys[i], E)); 3722 f(dart.as(keys[i], E));
3723 if (keys !== dart.dload(this[_map], '_keys')) { 3723 if (keys !== dart.dload(this[_map], _keys)) {
3724 throw new core.ConcurrentModificationError(this[_map]); 3724 throw new core.ConcurrentModificationError(this[_map]);
3725 } 3725 }
3726 } 3726 }
3727 } 3727 }
3728 } 3728 }
3729 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength]; 3729 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength];
3730 return HashMapKeyIterable; 3730 return HashMapKeyIterable;
3731 }); 3731 });
3732 let HashMapKeyIterable = HashMapKeyIterable$(); 3732 let HashMapKeyIterable = HashMapKeyIterable$();
3733 let _offset = Symbol('_offset'); 3733 let _offset = Symbol('_offset');
3734 let HashMapKeyIterator$ = dart.generic(function(E) { 3734 let HashMapKeyIterator$ = dart.generic(function(E) {
3735 class HashMapKeyIterator extends core.Object { 3735 class HashMapKeyIterator extends core.Object {
3736 HashMapKeyIterator(map$, keys$) { 3736 HashMapKeyIterator(map$, keys$) {
3737 this[_map] = map$; 3737 this[_map] = map$;
3738 this[_keys] = keys$; 3738 this[_keys] = keys$;
3739 this[_offset] = 0; 3739 this[_offset] = 0;
3740 this[_current] = null; 3740 this[_current] = null;
3741 } 3741 }
3742 get current() { 3742 get current() {
3743 return this[_current]; 3743 return this[_current];
3744 } 3744 }
3745 moveNext() { 3745 moveNext() {
3746 let keys = this[_keys]; 3746 let keys = this[_keys];
3747 let offset = this[_offset]; 3747 let offset = this[_offset];
3748 if (keys !== dart.dload(this[_map], '_keys')) { 3748 if (keys !== dart.dload(this[_map], _keys)) {
3749 throw new core.ConcurrentModificationError(this[_map]); 3749 throw new core.ConcurrentModificationError(this[_map]);
3750 } else if (dart.notNull(offset) >= keys.length) { 3750 } else if (dart.notNull(offset) >= keys.length) {
3751 this[_current] = null; 3751 this[_current] = null;
3752 return false; 3752 return false;
3753 } else { 3753 } else {
3754 this[_current] = dart.as(keys[offset], E); 3754 this[_current] = dart.as(keys[offset], E);
3755 this[_offset] = dart.notNull(offset) + 1; 3755 this[_offset] = dart.notNull(offset) + 1;
3756 return true; 3756 return true;
3757 } 3757 }
3758 } 3758 }
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
3980 if (next == null) { 3980 if (next == null) {
3981 dart.assert(dart.equals(cell, this[_last])); 3981 dart.assert(dart.equals(cell, this[_last]));
3982 this[_last] = previous; 3982 this[_last] = previous;
3983 } else { 3983 } else {
3984 next[_previous] = previous; 3984 next[_previous] = previous;
3985 } 3985 }
3986 this[_length] = dart.notNull(this[_length]) - 1; 3986 this[_length] = dart.notNull(this[_length]) - 1;
3987 this[_modified](); 3987 this[_modified]();
3988 } 3988 }
3989 static [_isStringKey](key) { 3989 static [_isStringKey](key) {
3990 return dart.notNull(typeof key == 'string') && dart.notNull(!dart.equals (key, '__proto__')); 3990 return typeof key == 'string' && dart.notNull(!dart.equals(key, '__proto __'));
3991 } 3991 }
3992 static [_isNumericKey](key) { 3992 static [_isNumericKey](key) {
3993 return dart.notNull(dart.is(key, core.num)) && (key & 0x3ffffff) === key ; 3993 return dart.is(key, core.num) && (key & 0x3ffffff) === key;
3994 } 3994 }
3995 [_computeHashCode](key) { 3995 [_computeHashCode](key) {
3996 return key.hashCode & 0x3ffffff; 3996 return key.hashCode & 0x3ffffff;
3997 } 3997 }
3998 static [_getTableEntry](table, key) { 3998 static [_getTableEntry](table, key) {
3999 return table[key]; 3999 return table[key];
4000 } 4000 }
4001 static [_setTableEntry](table, key, value) { 4001 static [_setTableEntry](table, key, value) {
4002 dart.assert(value != null); 4002 dart.assert(value != null);
4003 table[key] = value; 4003 table[key] = value;
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
4107 this[_previous] = null; 4107 this[_previous] = null;
4108 } 4108 }
4109 } 4109 }
4110 let LinkedHashMapKeyIterable$ = dart.generic(function(E) { 4110 let LinkedHashMapKeyIterable$ = dart.generic(function(E) {
4111 class LinkedHashMapKeyIterable extends IterableBase$(E) { 4111 class LinkedHashMapKeyIterable extends IterableBase$(E) {
4112 LinkedHashMapKeyIterable(map$) { 4112 LinkedHashMapKeyIterable(map$) {
4113 this[_map] = map$; 4113 this[_map] = map$;
4114 super.IterableBase(); 4114 super.IterableBase();
4115 } 4115 }
4116 get [core.$length]() { 4116 get [core.$length]() {
4117 return dart.as(dart.dload(this[_map], '_length'), core.int); 4117 return dart.as(dart.dload(this[_map], _length), core.int);
4118 } 4118 }
4119 get [core.$isEmpty]() { 4119 get [core.$isEmpty]() {
4120 return dart.equals(dart.dload(this[_map], '_length'), 0); 4120 return dart.equals(dart.dload(this[_map], _length), 0);
4121 } 4121 }
4122 get [core.$iterator]() { 4122 get [core.$iterator]() {
4123 return new (LinkedHashMapKeyIterator$(E))(this[_map], dart.as(dart.dload (this[_map], '_modifications'), core.int)); 4123 return new (LinkedHashMapKeyIterator$(E))(this[_map], dart.as(dart.dload (this[_map], _modifications), core.int));
4124 } 4124 }
4125 [core.$contains](element) { 4125 [core.$contains](element) {
4126 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool ); 4126 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool );
4127 } 4127 }
4128 [core.$forEach](f) { 4128 [core.$forEach](f) {
4129 let cell = dart.as(dart.dload(this[_map], '_first'), LinkedHashMapCell); 4129 let cell = dart.as(dart.dload(this[_map], _first), LinkedHashMapCell);
4130 let modifications = dart.as(dart.dload(this[_map], '_modifications'), co re.int); 4130 let modifications = dart.as(dart.dload(this[_map], _modifications), core .int);
4131 while (cell != null) { 4131 while (cell != null) {
4132 f(dart.as(cell[_key], E)); 4132 f(dart.as(cell[_key], E));
4133 if (!dart.equals(modifications, dart.dload(this[_map], '_modifications '))) { 4133 if (!dart.equals(modifications, dart.dload(this[_map], _modifications) )) {
4134 throw new core.ConcurrentModificationError(this[_map]); 4134 throw new core.ConcurrentModificationError(this[_map]);
4135 } 4135 }
4136 cell = cell[_next]; 4136 cell = cell[_next];
4137 } 4137 }
4138 } 4138 }
4139 } 4139 }
4140 LinkedHashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength ]; 4140 LinkedHashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength ];
4141 return LinkedHashMapKeyIterable; 4141 return LinkedHashMapKeyIterable;
4142 }); 4142 });
4143 let LinkedHashMapKeyIterable = LinkedHashMapKeyIterable$(); 4143 let LinkedHashMapKeyIterable = LinkedHashMapKeyIterable$();
4144 let _cell = Symbol('_cell'); 4144 let _cell = Symbol('_cell');
4145 let LinkedHashMapKeyIterator$ = dart.generic(function(E) { 4145 let LinkedHashMapKeyIterator$ = dart.generic(function(E) {
4146 class LinkedHashMapKeyIterator extends core.Object { 4146 class LinkedHashMapKeyIterator extends core.Object {
4147 LinkedHashMapKeyIterator(map$, modifications$) { 4147 LinkedHashMapKeyIterator(map$, modifications$) {
4148 this[_map] = map$; 4148 this[_map] = map$;
4149 this[_modifications] = modifications$; 4149 this[_modifications] = modifications$;
4150 this[_cell] = null; 4150 this[_cell] = null;
4151 this[_current] = null; 4151 this[_current] = null;
4152 this[_cell] = dart.as(dart.dload(this[_map], '_first'), LinkedHashMapCel l); 4152 this[_cell] = dart.as(dart.dload(this[_map], _first), LinkedHashMapCell) ;
4153 } 4153 }
4154 get current() { 4154 get current() {
4155 return this[_current]; 4155 return this[_current];
4156 } 4156 }
4157 moveNext() { 4157 moveNext() {
4158 if (!dart.equals(this[_modifications], dart.dload(this[_map], '_modifica tions'))) { 4158 if (!dart.equals(this[_modifications], dart.dload(this[_map], _modificat ions))) {
4159 throw new core.ConcurrentModificationError(this[_map]); 4159 throw new core.ConcurrentModificationError(this[_map]);
4160 } else if (this[_cell] == null) { 4160 } else if (this[_cell] == null) {
4161 this[_current] = null; 4161 this[_current] = null;
4162 return false; 4162 return false;
4163 } else { 4163 } else {
4164 this[_current] = dart.as(this[_cell][_key], E); 4164 this[_current] = dart.as(this[_cell][_key], E);
4165 this[_cell] = this[_cell][_next]; 4165 this[_cell] = this[_cell][_next];
4166 return true; 4166 return true;
4167 } 4167 }
4168 } 4168 }
(...skipping 24 matching lines...) Expand all
4193 get [core.$iterator]() { 4193 get [core.$iterator]() {
4194 return new (HashSetIterator$(E))(this, this[_computeElements]()); 4194 return new (HashSetIterator$(E))(this, this[_computeElements]());
4195 } 4195 }
4196 get [core.$length]() { 4196 get [core.$length]() {
4197 return this[_length]; 4197 return this[_length];
4198 } 4198 }
4199 get [core.$isEmpty]() { 4199 get [core.$isEmpty]() {
4200 return this[_length] == 0; 4200 return this[_length] == 0;
4201 } 4201 }
4202 get [core.$isNotEmpty]() { 4202 get [core.$isNotEmpty]() {
4203 return !dart.notNull(this.isEmpty); 4203 return !dart.notNull(this[core.$isEmpty]);
4204 } 4204 }
4205 [core.$contains](object) { 4205 [core.$contains](object) {
4206 if (_HashSet[_isStringElement](object)) { 4206 if (_HashSet[_isStringElement](object)) {
4207 let strings = this[_strings]; 4207 let strings = this[_strings];
4208 return strings == null ? false : _HashSet[_hasTableEntry](strings, obj ect); 4208 return strings == null ? false : _HashSet[_hasTableEntry](strings, obj ect);
4209 } else if (_HashSet[_isNumericElement](object)) { 4209 } else if (_HashSet[_isNumericElement](object)) {
4210 let nums = this[_nums]; 4210 let nums = this[_nums];
4211 return nums == null ? false : _HashSet[_hasTableEntry](nums, object); 4211 return nums == null ? false : _HashSet[_hasTableEntry](nums, object);
4212 } else { 4212 } else {
4213 return this[_contains](object); 4213 return this[_contains](object);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
4356 if (dart.notNull(table != null) && dart.notNull(_HashSet[_hasTableEntry] (table, element))) { 4356 if (dart.notNull(table != null) && dart.notNull(_HashSet[_hasTableEntry] (table, element))) {
4357 _HashSet[_deleteTableEntry](table, element); 4357 _HashSet[_deleteTableEntry](table, element);
4358 this[_length] = dart.notNull(this[_length]) - 1; 4358 this[_length] = dart.notNull(this[_length]) - 1;
4359 this[_elements] = null; 4359 this[_elements] = null;
4360 return true; 4360 return true;
4361 } else { 4361 } else {
4362 return false; 4362 return false;
4363 } 4363 }
4364 } 4364 }
4365 static [_isStringElement](element) { 4365 static [_isStringElement](element) {
4366 return dart.notNull(typeof element == 'string') && dart.notNull(!dart.eq uals(element, '__proto__')); 4366 return typeof element == 'string' && dart.notNull(!dart.equals(element, '__proto__'));
4367 } 4367 }
4368 static [_isNumericElement](element) { 4368 static [_isNumericElement](element) {
4369 return dart.notNull(dart.is(element, core.num)) && (element & 0x3ffffff) === element; 4369 return dart.is(element, core.num) && (element & 0x3ffffff) === element;
4370 } 4370 }
4371 [_computeHashCode](element) { 4371 [_computeHashCode](element) {
4372 return element.hashCode & 0x3ffffff; 4372 return element.hashCode & 0x3ffffff;
4373 } 4373 }
4374 static [_hasTableEntry](table, key) { 4374 static [_hasTableEntry](table, key) {
4375 let entry = table[key]; 4375 let entry = table[key];
4376 return entry != null; 4376 return entry != null;
4377 } 4377 }
4378 static [_setTableEntry](table, key, value) { 4378 static [_setTableEntry](table, key, value) {
4379 dart.assert(value != null); 4379 dart.assert(value != null);
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
4485 this[_elements] = elements$; 4485 this[_elements] = elements$;
4486 this[_offset] = 0; 4486 this[_offset] = 0;
4487 this[_current] = null; 4487 this[_current] = null;
4488 } 4488 }
4489 get current() { 4489 get current() {
4490 return this[_current]; 4490 return this[_current];
4491 } 4491 }
4492 moveNext() { 4492 moveNext() {
4493 let elements = this[_elements]; 4493 let elements = this[_elements];
4494 let offset = this[_offset]; 4494 let offset = this[_offset];
4495 if (elements !== dart.dload(this[_set], '_elements')) { 4495 if (elements !== dart.dload(this[_set], _elements)) {
4496 throw new core.ConcurrentModificationError(this[_set]); 4496 throw new core.ConcurrentModificationError(this[_set]);
4497 } else if (dart.notNull(offset) >= elements.length) { 4497 } else if (dart.notNull(offset) >= elements.length) {
4498 this[_current] = null; 4498 this[_current] = null;
4499 return false; 4499 return false;
4500 } else { 4500 } else {
4501 this[_current] = dart.as(elements[offset], E); 4501 this[_current] = dart.as(elements[offset], E);
4502 this[_offset] = dart.notNull(offset) + 1; 4502 this[_offset] = dart.notNull(offset) + 1;
4503 return true; 4503 return true;
4504 } 4504 }
4505 } 4505 }
(...skipping 24 matching lines...) Expand all
4530 get [core.$iterator]() { 4530 get [core.$iterator]() {
4531 return dart.as(new LinkedHashSetIterator(this, this[_modifications]), co re.Iterator$(E)); 4531 return dart.as(new LinkedHashSetIterator(this, this[_modifications]), co re.Iterator$(E));
4532 } 4532 }
4533 get [core.$length]() { 4533 get [core.$length]() {
4534 return this[_length]; 4534 return this[_length];
4535 } 4535 }
4536 get [core.$isEmpty]() { 4536 get [core.$isEmpty]() {
4537 return this[_length] == 0; 4537 return this[_length] == 0;
4538 } 4538 }
4539 get [core.$isNotEmpty]() { 4539 get [core.$isNotEmpty]() {
4540 return !dart.notNull(this.isEmpty); 4540 return !dart.notNull(this[core.$isEmpty]);
4541 } 4541 }
4542 [core.$contains](object) { 4542 [core.$contains](object) {
4543 if (_LinkedHashSet[_isStringElement](object)) { 4543 if (_LinkedHashSet[_isStringElement](object)) {
4544 let strings = this[_strings]; 4544 let strings = this[_strings];
4545 if (strings == null) 4545 if (strings == null)
4546 return false; 4546 return false;
4547 let cell = dart.as(_LinkedHashSet[_getTableEntry](strings, object), Li nkedHashSetCell); 4547 let cell = dart.as(_LinkedHashSet[_getTableEntry](strings, object), Li nkedHashSetCell);
4548 return cell != null; 4548 return cell != null;
4549 } else if (_LinkedHashSet[_isNumericElement](object)) { 4549 } else if (_LinkedHashSet[_isNumericElement](object)) {
4550 let nums = this[_nums]; 4550 let nums = this[_nums];
(...skipping 20 matching lines...) Expand all
4571 } 4571 }
4572 } 4572 }
4573 [_lookup](object) { 4573 [_lookup](object) {
4574 let rest = this[_rest]; 4574 let rest = this[_rest];
4575 if (rest == null) 4575 if (rest == null)
4576 return null; 4576 return null;
4577 let bucket = this[_getBucket](rest, object); 4577 let bucket = this[_getBucket](rest, object);
4578 let index = this[_findBucketIndex](bucket, object); 4578 let index = this[_findBucketIndex](bucket, object);
4579 if (dart.notNull(index) < 0) 4579 if (dart.notNull(index) < 0)
4580 return null; 4580 return null;
4581 return dart.as(dart.dload(bucket[core.$get](index), '_element'), E); 4581 return dart.as(dart.dload(bucket[core.$get](index), _element), E);
4582 } 4582 }
4583 [core.$forEach](action) { 4583 [core.$forEach](action) {
4584 let cell = this[_first]; 4584 let cell = this[_first];
4585 let modifications = this[_modifications]; 4585 let modifications = this[_modifications];
4586 while (cell != null) { 4586 while (cell != null) {
4587 action(dart.as(cell[_element], E)); 4587 action(dart.as(cell[_element], E));
4588 if (modifications != this[_modifications]) { 4588 if (modifications != this[_modifications]) {
4589 throw new core.ConcurrentModificationError(this); 4589 throw new core.ConcurrentModificationError(this);
4590 } 4590 }
4591 cell = cell[_next]; 4591 cell = cell[_next];
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
4728 if (next == null) { 4728 if (next == null) {
4729 dart.assert(dart.equals(cell, this[_last])); 4729 dart.assert(dart.equals(cell, this[_last]));
4730 this[_last] = previous; 4730 this[_last] = previous;
4731 } else { 4731 } else {
4732 next[_previous] = previous; 4732 next[_previous] = previous;
4733 } 4733 }
4734 this[_length] = dart.notNull(this[_length]) - 1; 4734 this[_length] = dart.notNull(this[_length]) - 1;
4735 this[_modified](); 4735 this[_modified]();
4736 } 4736 }
4737 static [_isStringElement](element) { 4737 static [_isStringElement](element) {
4738 return dart.notNull(typeof element == 'string') && dart.notNull(!dart.eq uals(element, '__proto__')); 4738 return typeof element == 'string' && dart.notNull(!dart.equals(element, '__proto__'));
4739 } 4739 }
4740 static [_isNumericElement](element) { 4740 static [_isNumericElement](element) {
4741 return dart.notNull(dart.is(element, core.num)) && (element & 0x3ffffff) === element; 4741 return dart.is(element, core.num) && (element & 0x3ffffff) === element;
4742 } 4742 }
4743 [_computeHashCode](element) { 4743 [_computeHashCode](element) {
4744 return element.hashCode & 0x3ffffff; 4744 return element.hashCode & 0x3ffffff;
4745 } 4745 }
4746 static [_getTableEntry](table, key) { 4746 static [_getTableEntry](table, key) {
4747 return table[key]; 4747 return table[key];
4748 } 4748 }
4749 static [_setTableEntry](table, key, value) { 4749 static [_setTableEntry](table, key, value) {
4750 dart.assert(value != null); 4750 dart.assert(value != null);
4751 table[key] = value; 4751 table[key] = value;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
4871 this[_previous] = null; 4871 this[_previous] = null;
4872 } 4872 }
4873 } 4873 }
4874 let LinkedHashSetIterator$ = dart.generic(function(E) { 4874 let LinkedHashSetIterator$ = dart.generic(function(E) {
4875 class LinkedHashSetIterator extends core.Object { 4875 class LinkedHashSetIterator extends core.Object {
4876 LinkedHashSetIterator(set$, modifications$) { 4876 LinkedHashSetIterator(set$, modifications$) {
4877 this[_set] = set$; 4877 this[_set] = set$;
4878 this[_modifications] = modifications$; 4878 this[_modifications] = modifications$;
4879 this[_cell] = null; 4879 this[_cell] = null;
4880 this[_current] = null; 4880 this[_current] = null;
4881 this[_cell] = dart.as(dart.dload(this[_set], '_first'), LinkedHashSetCel l); 4881 this[_cell] = dart.as(dart.dload(this[_set], _first), LinkedHashSetCell) ;
4882 } 4882 }
4883 get current() { 4883 get current() {
4884 return this[_current]; 4884 return this[_current];
4885 } 4885 }
4886 moveNext() { 4886 moveNext() {
4887 if (!dart.equals(this[_modifications], dart.dload(this[_set], '_modifica tions'))) { 4887 if (!dart.equals(this[_modifications], dart.dload(this[_set], _modificat ions))) {
4888 throw new core.ConcurrentModificationError(this[_set]); 4888 throw new core.ConcurrentModificationError(this[_set]);
4889 } else if (this[_cell] == null) { 4889 } else if (this[_cell] == null) {
4890 this[_current] = null; 4890 this[_current] = null;
4891 return false; 4891 return false;
4892 } else { 4892 } else {
4893 this[_current] = dart.as(this[_cell][_element], E); 4893 this[_current] = dart.as(this[_cell][_element], E);
4894 this[_cell] = this[_cell][_next]; 4894 this[_cell] = this[_cell][_next];
4895 return true; 4895 return true;
4896 } 4896 }
4897 } 4897 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
4959 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; 4959 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$;
4960 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; 4960 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable;
4961 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; 4961 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$;
4962 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; 4962 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator;
4963 exports.HashSetIterator$ = HashSetIterator$; 4963 exports.HashSetIterator$ = HashSetIterator$;
4964 exports.HashSetIterator = HashSetIterator; 4964 exports.HashSetIterator = HashSetIterator;
4965 exports.LinkedHashSetCell = LinkedHashSetCell; 4965 exports.LinkedHashSetCell = LinkedHashSetCell;
4966 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; 4966 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$;
4967 exports.LinkedHashSetIterator = LinkedHashSetIterator; 4967 exports.LinkedHashSetIterator = LinkedHashSetIterator;
4968 })(collection || (collection = {})); 4968 })(collection || (collection = {}));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698