| OLD | NEW |
| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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.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 return ((_) => { | 153 let _ = this.toSet(); |
| 154 _.addAll(other); | 154 _.addAll(other); |
| 155 return _; | 155 return _; |
| 156 })(this.toSet()); | |
| 157 } | 156 } |
| 158 intersection(other) { | 157 intersection(other) { |
| 159 let result = this.toSet(); | 158 let result = this.toSet(); |
| 160 for (let element of this) { | 159 for (let element of this) { |
| 161 if (!dart.notNull(other[core.$contains](element))) | 160 if (!dart.notNull(other[core.$contains](element))) |
| 162 result.remove(element); | 161 result.remove(element); |
| 163 } | 162 } |
| 164 return result; | 163 return result; |
| 165 } | 164 } |
| 166 difference(other) { | 165 difference(other) { |
| 167 let result = this.toSet(); | 166 let result = this.toSet(); |
| 168 for (let element of this) { | 167 for (let element of this) { |
| 169 if (other[core.$contains](element)) | 168 if (other[core.$contains](element)) |
| 170 result.remove(element); | 169 result.remove(element); |
| 171 } | 170 } |
| 172 return result; | 171 return result; |
| 173 } | 172 } |
| 174 [core.$toList](opts) { | 173 [core.$toList](opts) { |
| 175 let growable = opts && 'growable' in opts ? opts.growable : true; | 174 let growable = opts && 'growable' in opts ? opts.growable : true; |
| 176 let result = growable ? ((_) => { | 175 let result = growable ? (() => { |
| 176 let _ = new (core.List$(E))(); |
| 177 _[core.$length] = this.length; | 177 _[core.$length] = this.length; |
| 178 return _; | 178 return _; |
| 179 }).bind(this)(new (core.List$(E))()) : new (core.List$(E))(this.length); | 179 }).bind(this)() : new (core.List$(E))(this.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](((x$) => i = dart.notNull(x$) + 1, x$)(i), element); | 182 result[core.$set]((() => { |
| 183 let x$ = i; |
| 184 i = dart.notNull(x$) + 1; |
| 185 return x$; |
| 186 })(), element); |
| 183 return result; | 187 return result; |
| 184 } | 188 } |
| 185 [core.$map](f) { | 189 [core.$map](f) { |
| 186 return new (_internal.EfficientLengthMappedIterable$(E, dynamic))(this,
f); | 190 return new (_internal.EfficientLengthMappedIterable$(E, dynamic))(this,
f); |
| 187 } | 191 } |
| 188 get [core.$single]() { | 192 get [core.$single]() { |
| 189 if (dart.notNull(this.length) > 1) | 193 if (dart.notNull(this.length) > 1) |
| 190 throw _internal.IterableElementError.tooMany(); | 194 throw _internal.IterableElementError.tooMany(); |
| 191 let it = this.iterator; | 195 let it = this.iterator; |
| 192 if (!dart.notNull(it.moveNext())) | 196 if (!dart.notNull(it.moveNext())) |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 } | 372 } |
| 369 intersection(other) { | 373 intersection(other) { |
| 370 let result = this[_newSet](); | 374 let result = this[_newSet](); |
| 371 for (let element of this) { | 375 for (let element of this) { |
| 372 if (other[core.$contains](element)) | 376 if (other[core.$contains](element)) |
| 373 result.add(element); | 377 result.add(element); |
| 374 } | 378 } |
| 375 return result; | 379 return result; |
| 376 } | 380 } |
| 377 [core.$toSet]() { | 381 [core.$toSet]() { |
| 378 return ((_) => { | 382 return (() => { |
| 383 let _ = this[_newSet](); |
| 379 _.addAll(this); | 384 _.addAll(this); |
| 380 return _; | 385 return _; |
| 381 }).bind(this)(this[_newSet]()); | 386 }).bind(this)(); |
| 382 } | 387 } |
| 383 } | 388 } |
| 384 return _HashSetBase; | 389 return _HashSetBase; |
| 385 }); | 390 }); |
| 386 let _HashSetBase = _HashSetBase$(); | 391 let _HashSetBase = _HashSetBase$(); |
| 387 let HashSet$ = dart.generic(function(E) { | 392 let HashSet$ = dart.generic(function(E) { |
| 388 class HashSet extends core.Object { | 393 class HashSet extends core.Object { |
| 389 HashSet(opts) { | 394 HashSet(opts) { |
| 390 let equals = opts && 'equals' in opts ? opts.equals : null; | 395 let equals = opts && 'equals' in opts ? opts.equals : null; |
| 391 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; | 396 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 return `${leftDelimiter}...${rightDelimiter}`; | 839 return `${leftDelimiter}...${rightDelimiter}`; |
| 835 } | 840 } |
| 836 let parts = new core.List.from([]); | 841 let parts = new core.List.from([]); |
| 837 IterableBase[_toStringVisiting][core.$add](iterable); | 842 IterableBase[_toStringVisiting][core.$add](iterable); |
| 838 try { | 843 try { |
| 839 IterableBase[_iterablePartsToStrings](iterable, parts); | 844 IterableBase[_iterablePartsToStrings](iterable, parts); |
| 840 } finally { | 845 } finally { |
| 841 dart.assert(core.identical(IterableBase[_toStringVisiting][core.$last]
, iterable)); | 846 dart.assert(core.identical(IterableBase[_toStringVisiting][core.$last]
, iterable)); |
| 842 IterableBase[_toStringVisiting][core.$removeLast](); | 847 IterableBase[_toStringVisiting][core.$removeLast](); |
| 843 } | 848 } |
| 844 return ((_) => { | 849 return (() => { |
| 850 let _ = new core.StringBuffer(leftDelimiter); |
| 845 _.writeAll(parts, ", "); | 851 _.writeAll(parts, ", "); |
| 846 _.write(rightDelimiter); | 852 _.write(rightDelimiter); |
| 847 return _; | 853 return _; |
| 848 })(new core.StringBuffer(leftDelimiter)).toString(); | 854 })().toString(); |
| 849 } | 855 } |
| 850 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { | 856 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { |
| 851 if (leftDelimiter === void 0) | 857 if (leftDelimiter === void 0) |
| 852 leftDelimiter = '('; | 858 leftDelimiter = '('; |
| 853 if (rightDelimiter === void 0) | 859 if (rightDelimiter === void 0) |
| 854 rightDelimiter = ')'; | 860 rightDelimiter = ')'; |
| 855 if (IterableBase[_isToStringVisiting](iterable)) { | 861 if (IterableBase[_isToStringVisiting](iterable)) { |
| 856 return `${leftDelimiter}...${rightDelimiter}`; | 862 return `${leftDelimiter}...${rightDelimiter}`; |
| 857 } | 863 } |
| 858 let buffer = new core.StringBuffer(leftDelimiter); | 864 let buffer = new core.StringBuffer(leftDelimiter); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 881 let OVERHEAD = 2; | 887 let OVERHEAD = 2; |
| 882 let ELLIPSIS_SIZE = 3; | 888 let ELLIPSIS_SIZE = 3; |
| 883 let length = 0; | 889 let length = 0; |
| 884 let count = 0; | 890 let count = 0; |
| 885 let it = iterable[core.$iterator]; | 891 let it = iterable[core.$iterator]; |
| 886 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull
(count) < dart.notNull(HEAD_COUNT)) { | 892 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull
(count) < dart.notNull(HEAD_COUNT)) { |
| 887 if (!dart.notNull(it.moveNext())) | 893 if (!dart.notNull(it.moveNext())) |
| 888 return; | 894 return; |
| 889 let next = `${it.current}`; | 895 let next = `${it.current}`; |
| 890 parts[core.$add](next); | 896 parts[core.$add](next); |
| 891 length = dart.notNull(next.length) + dart.notNull(OVERHEAD); | 897 length = dart.notNull(length) + (dart.notNull(next.length) + dart.notN
ull(OVERHEAD)); |
| 892 count = dart.notNull(count) + 1; | 898 count = dart.notNull(count) + 1; |
| 893 } | 899 } |
| 894 let penultimateString = null; | 900 let penultimateString = null; |
| 895 let ultimateString = null; | 901 let ultimateString = null; |
| 896 let penultimate = null; | 902 let penultimate = null; |
| 897 let ultimate = null; | 903 let ultimate = null; |
| 898 if (!dart.notNull(it.moveNext())) { | 904 if (!dart.notNull(it.moveNext())) { |
| 899 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + dart.notNull(TAI
L_COUNT)) | 905 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + dart.notNull(TAI
L_COUNT)) |
| 900 return; | 906 return; |
| 901 ultimateString = dart.as(parts[core.$removeLast](), core.String); | 907 ultimateString = dart.as(parts[core.$removeLast](), core.String); |
| 902 penultimateString = dart.as(parts[core.$removeLast](), core.String); | 908 penultimateString = dart.as(parts[core.$removeLast](), core.String); |
| 903 } else { | 909 } else { |
| 904 penultimate = it.current; | 910 penultimate = it.current; |
| 905 count = dart.notNull(count) + 1; | 911 count = dart.notNull(count) + 1; |
| 906 if (!dart.notNull(it.moveNext())) { | 912 if (!dart.notNull(it.moveNext())) { |
| 907 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + 1) { | 913 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + 1) { |
| 908 parts[core.$add](`${penultimate}`); | 914 parts[core.$add](`${penultimate}`); |
| 909 return; | 915 return; |
| 910 } | 916 } |
| 911 ultimateString = `${penultimate}`; | 917 ultimateString = `${penultimate}`; |
| 912 penultimateString = dart.as(parts[core.$removeLast](), core.String); | 918 penultimateString = dart.as(parts[core.$removeLast](), core.String); |
| 913 length = dart.notNull(ultimateString.length) + dart.notNull(OVERHEAD
); | 919 length = dart.notNull(length) + (dart.notNull(ultimateString.length)
+ dart.notNull(OVERHEAD)); |
| 914 } else { | 920 } else { |
| 915 ultimate = it.current; | 921 ultimate = it.current; |
| 916 count = dart.notNull(count) + 1; | 922 count = dart.notNull(count) + 1; |
| 917 dart.assert(dart.notNull(count) < dart.notNull(MAX_COUNT)); | 923 dart.assert(dart.notNull(count) < dart.notNull(MAX_COUNT)); |
| 918 while (it.moveNext()) { | 924 while (it.moveNext()) { |
| 919 penultimate = ultimate; | 925 penultimate = ultimate; |
| 920 ultimate = it.current; | 926 ultimate = it.current; |
| 921 count = dart.notNull(count) + 1; | 927 count = dart.notNull(count) + 1; |
| 922 if (dart.notNull(count) > dart.notNull(MAX_COUNT)) { | 928 if (dart.notNull(count) > dart.notNull(MAX_COUNT)) { |
| 923 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) - dart.
notNull(ELLIPSIS_SIZE) - dart.notNull(OVERHEAD) && dart.notNull(count) > dart.no
tNull(HEAD_COUNT)) { | 929 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) - dart.
notNull(ELLIPSIS_SIZE) - dart.notNull(OVERHEAD) && dart.notNull(count) > dart.no
tNull(HEAD_COUNT)) { |
| 924 length = dart.as(dart.dbinary(dart.dload(parts[core.$removeLas
t](), 'length'), '+', OVERHEAD), core.int); | 930 length = dart.notNull(length) - dart.notNull(dart.as(dart.dbin
ary(dart.dload(parts[core.$removeLast](), 'length'), '+', OVERHEAD), core.int)); |
| 925 count = dart.notNull(count) - 1; | 931 count = dart.notNull(count) - 1; |
| 926 } | 932 } |
| 927 parts[core.$add]("..."); | 933 parts[core.$add]("..."); |
| 928 return; | 934 return; |
| 929 } | 935 } |
| 930 } | 936 } |
| 931 penultimateString = `${penultimate}`; | 937 penultimateString = `${penultimate}`; |
| 932 ultimateString = `${ultimate}`; | 938 ultimateString = `${ultimate}`; |
| 933 length = dart.notNull(ultimateString.length) + dart.notNull(penultim
ateString.length) + 2 * dart.notNull(OVERHEAD); | 939 length = dart.notNull(length) + (dart.notNull(ultimateString.length)
+ dart.notNull(penultimateString.length) + 2 * dart.notNull(OVERHEAD)); |
| 934 } | 940 } |
| 935 } | 941 } |
| 936 let elision = null; | 942 let elision = null; |
| 937 if (dart.notNull(count) > dart.notNull(parts[core.$length]) + dart.notNu
ll(TAIL_COUNT)) { | 943 if (dart.notNull(count) > dart.notNull(parts[core.$length]) + dart.notNu
ll(TAIL_COUNT)) { |
| 938 elision = "..."; | 944 elision = "..."; |
| 939 length = dart.notNull(ELLIPSIS_SIZE) + dart.notNull(OVERHEAD); | 945 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart.no
tNull(OVERHEAD)); |
| 940 } | 946 } |
| 941 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) && dart.notNull
(parts[core.$length]) > dart.notNull(HEAD_COUNT)) { | 947 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) && dart.notNull
(parts[core.$length]) > dart.notNull(HEAD_COUNT)) { |
| 942 length = dart.as(dart.dbinary(dart.dload(parts[core.$removeLast](), 'l
ength'), '+', OVERHEAD), core.int); | 948 length = dart.notNull(length) - dart.notNull(dart.as(dart.dbinary(dart
.dload(parts[core.$removeLast](), 'length'), '+', OVERHEAD), core.int)); |
| 943 if (elision == null) { | 949 if (elision == null) { |
| 944 elision = "..."; | 950 elision = "..."; |
| 945 length = dart.notNull(ELLIPSIS_SIZE) + dart.notNull(OVERHEAD); | 951 length = dart.notNull(length) + (dart.notNull(ELLIPSIS_SIZE) + dart.
notNull(OVERHEAD)); |
| 946 } | 952 } |
| 947 } | 953 } |
| 948 if (elision != null) { | 954 if (elision != null) { |
| 949 parts[core.$add](elision); | 955 parts[core.$add](elision); |
| 950 } | 956 } |
| 951 parts[core.$add](penultimateString); | 957 parts[core.$add](penultimateString); |
| 952 parts[core.$add](ultimateString); | 958 parts[core.$add](ultimateString); |
| 953 } | 959 } |
| 954 } | 960 } |
| 955 IterableBase[dart.implements] = () => [core.Iterable$(E)]; | 961 IterableBase[dart.implements] = () => [core.Iterable$(E)]; |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 super.IterableBase(); | 1141 super.IterableBase(); |
| 1136 this[_next] = this[_previous] = this; | 1142 this[_next] = this[_previous] = this; |
| 1137 } | 1143 } |
| 1138 addFirst(entry) { | 1144 addFirst(entry) { |
| 1139 this[_insertAfter](this, entry); | 1145 this[_insertAfter](this, entry); |
| 1140 } | 1146 } |
| 1141 add(entry) { | 1147 add(entry) { |
| 1142 this[_insertAfter](this[_previous], entry); | 1148 this[_insertAfter](this[_previous], entry); |
| 1143 } | 1149 } |
| 1144 addAll(entries) { | 1150 addAll(entries) { |
| 1145 entries[core.$forEach](dart.as(((entry) => this[_insertAfter](this[_prev
ious], dart.as(entry, E))).bind(this), dart.throw_("Unimplemented type (E) → voi
d"))); | 1151 entries[core.$forEach](dart.as((entry => this[_insertAfter](this[_previo
us], dart.as(entry, E))).bind(this), dart.throw_("Unimplemented type (E) → void"
))); |
| 1146 } | 1152 } |
| 1147 remove(entry) { | 1153 remove(entry) { |
| 1148 if (!dart.equals(entry[_list], this)) | 1154 if (!dart.equals(entry[_list], this)) |
| 1149 return false; | 1155 return false; |
| 1150 this[_unlink](entry); | 1156 this[_unlink](entry); |
| 1151 return true; | 1157 return true; |
| 1152 } | 1158 } |
| 1153 get [core.$iterator]() { | 1159 get [core.$iterator]() { |
| 1154 return new (_LinkedListIterator$(E))(this); | 1160 return new (_LinkedListIterator$(E))(this); |
| 1155 } | 1161 } |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1492 return result; | 1498 return result; |
| 1493 } | 1499 } |
| 1494 [core.$toSet]() { | 1500 [core.$toSet]() { |
| 1495 let result = new (core.Set$(E))(); | 1501 let result = new (core.Set$(E))(); |
| 1496 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.length); i = dart.no
tNull(i) + 1) { |
| 1497 result.add(this[core.$get](i)); | 1503 result.add(this[core.$get](i)); |
| 1498 } | 1504 } |
| 1499 return result; | 1505 return result; |
| 1500 } | 1506 } |
| 1501 [core.$add](element) { | 1507 [core.$add](element) { |
| 1502 this[core.$set](((x$) => this[core.$length] = dart.notNull(x$) + 1, x$).
bind(this)(this[core.$length]), element); | 1508 this[core.$set]((() => { |
| 1509 let o$ = this, x$ = o$[core.$length]; |
| 1510 o$[core.$length] = dart.notNull(x$) + 1; |
| 1511 return x$; |
| 1512 }).bind(this)(), element); |
| 1503 } | 1513 } |
| 1504 [core.$addAll](iterable) { | 1514 [core.$addAll](iterable) { |
| 1505 for (let element of iterable) { | 1515 for (let element of iterable) { |
| 1506 this[core.$set](((x$) => this[core.$length] = dart.notNull(x$) + 1, x$
).bind(this)(this[core.$length]), element); | 1516 this[core.$set]((() => { |
| 1517 let o$ = this, x$ = o$[core.$length]; |
| 1518 o$[core.$length] = dart.notNull(x$) + 1; |
| 1519 return x$; |
| 1520 }).bind(this)(), element); |
| 1507 } | 1521 } |
| 1508 } | 1522 } |
| 1509 [core.$remove](element) { | 1523 [core.$remove](element) { |
| 1510 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { | 1524 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { |
| 1511 if (dart.equals(this[core.$get](i), element)) { | 1525 if (dart.equals(this[core.$get](i), element)) { |
| 1512 this[core.$setRange](i, dart.notNull(this[core.$length]) - 1, this,
dart.notNull(i) + 1); | 1526 this[core.$setRange](i, dart.notNull(this[core.$length]) - 1, this,
dart.notNull(i) + 1); |
| 1513 this[core.$length] = 1; | 1527 let o$ = this; |
| 1528 o$[core.$length] = dart.notNull(o$[core.$length]) - 1; |
| 1514 return true; | 1529 return true; |
| 1515 } | 1530 } |
| 1516 } | 1531 } |
| 1517 return false; | 1532 return false; |
| 1518 } | 1533 } |
| 1519 [core.$removeWhere](test) { | 1534 [core.$removeWhere](test) { |
| 1520 ListMixin[_filter](this, test, false); | 1535 ListMixin[_filter](this, test, false); |
| 1521 } | 1536 } |
| 1522 [core.$retainWhere](test) { | 1537 [core.$retainWhere](test) { |
| 1523 ListMixin[_filter](this, test, true); | 1538 ListMixin[_filter](this, test, true); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1560 _internal.Sort.sort(this, compare); | 1575 _internal.Sort.sort(this, compare); |
| 1561 } | 1576 } |
| 1562 [core.$shuffle](random) { | 1577 [core.$shuffle](random) { |
| 1563 if (random === void 0) | 1578 if (random === void 0) |
| 1564 random = null; | 1579 random = null; |
| 1565 if (random == null) | 1580 if (random == null) |
| 1566 random = new math.Random(); | 1581 random = new math.Random(); |
| 1567 let length = this[core.$length]; | 1582 let length = this[core.$length]; |
| 1568 while (dart.notNull(length) > 1) { | 1583 while (dart.notNull(length) > 1) { |
| 1569 let pos = random.nextInt(length); | 1584 let pos = random.nextInt(length); |
| 1570 length = 1; | 1585 length = dart.notNull(length) - 1; |
| 1571 let tmp = this[core.$get](length); | 1586 let tmp = this[core.$get](length); |
| 1572 this[core.$set](length, this[core.$get](pos)); | 1587 this[core.$set](length, this[core.$get](pos)); |
| 1573 this[core.$set](pos, tmp); | 1588 this[core.$set](pos, tmp); |
| 1574 } | 1589 } |
| 1575 } | 1590 } |
| 1576 [core.$asMap]() { | 1591 [core.$asMap]() { |
| 1577 return new (_internal.ListMapView$(E))(this); | 1592 return new (_internal.ListMapView$(E))(this); |
| 1578 } | 1593 } |
| 1579 [core.$sublist](start, end) { | 1594 [core.$sublist](start, end) { |
| 1580 if (end === void 0) | 1595 if (end === void 0) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1592 return result; | 1607 return result; |
| 1593 } | 1608 } |
| 1594 [core.$getRange](start, end) { | 1609 [core.$getRange](start, end) { |
| 1595 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1610 core.RangeError.checkValidRange(start, end, this[core.$length]); |
| 1596 return new (_internal.SubListIterable$(E))(this, start, end); | 1611 return new (_internal.SubListIterable$(E))(this, start, end); |
| 1597 } | 1612 } |
| 1598 [core.$removeRange](start, end) { | 1613 [core.$removeRange](start, end) { |
| 1599 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1614 core.RangeError.checkValidRange(start, end, this[core.$length]); |
| 1600 let length = dart.notNull(end) - dart.notNull(start); | 1615 let length = dart.notNull(end) - dart.notNull(start); |
| 1601 this.setRange(start, dart.notNull(this[core.$length]) - dart.notNull(len
gth), this, end); | 1616 this.setRange(start, dart.notNull(this[core.$length]) - dart.notNull(len
gth), this, end); |
| 1602 this[core.$length] = length; | 1617 let o$ = this; |
| 1618 o$[core.$length] = dart.notNull(o$[core.$length]) - dart.notNull(length)
; |
| 1603 } | 1619 } |
| 1604 [core.$fillRange](start, end, fill) { | 1620 [core.$fillRange](start, end, fill) { |
| 1605 if (fill === void 0) | 1621 if (fill === void 0) |
| 1606 fill = null; | 1622 fill = null; |
| 1607 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1623 core.RangeError.checkValidRange(start, end, this[core.$length]); |
| 1608 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) { |
| 1609 this[core.$set](i, fill); | 1625 this[core.$set](i, fill); |
| 1610 } | 1626 } |
| 1611 } | 1627 } |
| 1612 [core.$setRange](start, end, iterable, skipCount) { | 1628 [core.$setRange](start, end, iterable, skipCount) { |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1701 return -1; | 1717 return -1; |
| 1702 } | 1718 } |
| 1703 [core.$insert](index, element) { | 1719 [core.$insert](index, element) { |
| 1704 core.RangeError.checkValueInInterval(index, 0, this.length, "index"); | 1720 core.RangeError.checkValueInInterval(index, 0, this.length, "index"); |
| 1705 if (index == this[core.$length]) { | 1721 if (index == this[core.$length]) { |
| 1706 this.add(element); | 1722 this.add(element); |
| 1707 return; | 1723 return; |
| 1708 } | 1724 } |
| 1709 if (!(typeof index == 'number')) | 1725 if (!(typeof index == 'number')) |
| 1710 throw new core.ArgumentError(index); | 1726 throw new core.ArgumentError(index); |
| 1711 this[core.$length] = dart.notNull(this[core.$length]) + 1; | 1727 let o$ = this; |
| 1728 o$[core.$length] = dart.notNull(o$[core.$length]) + 1; |
| 1712 this.setRange(dart.notNull(index) + 1, this[core.$length], this, index); | 1729 this.setRange(dart.notNull(index) + 1, this[core.$length], this, index); |
| 1713 this[core.$set](index, element); | 1730 this[core.$set](index, element); |
| 1714 } | 1731 } |
| 1715 [core.$removeAt](index) { | 1732 [core.$removeAt](index) { |
| 1716 let result = this[core.$get](index); | 1733 let result = this[core.$get](index); |
| 1717 this.setRange(index, dart.notNull(this[core.$length]) - 1, this, dart.no
tNull(index) + 1); | 1734 this.setRange(index, dart.notNull(this[core.$length]) - 1, this, dart.no
tNull(index) + 1); |
| 1718 this.length = dart.notNull(this.length) - 1; | 1735 this.length = dart.notNull(this.length) - 1; |
| 1719 return result; | 1736 return result; |
| 1720 } | 1737 } |
| 1721 [core.$insertAll](index, iterable) { | 1738 [core.$insertAll](index, iterable) { |
| 1722 core.RangeError.checkValueInInterval(index, 0, this.length, "index"); | 1739 core.RangeError.checkValueInInterval(index, 0, this.length, "index"); |
| 1723 if (dart.is(iterable, _internal.EfficientLength)) { | 1740 if (dart.is(iterable, _internal.EfficientLength)) { |
| 1724 iterable = iterable[core.$toList](); | 1741 iterable = iterable[core.$toList](); |
| 1725 } | 1742 } |
| 1726 let insertionLength = iterable[core.$length]; | 1743 let insertionLength = iterable[core.$length]; |
| 1727 this[core.$length] = insertionLength; | 1744 let o$ = this; |
| 1745 o$[core.$length] = dart.notNull(o$[core.$length]) + dart.notNull(inserti
onLength); |
| 1728 this.setRange(dart.notNull(index) + dart.notNull(insertionLength), this[
core.$length], this, index); | 1746 this.setRange(dart.notNull(index) + dart.notNull(insertionLength), this[
core.$length], this, index); |
| 1729 this.setAll(index, iterable); | 1747 this.setAll(index, iterable); |
| 1730 } | 1748 } |
| 1731 [core.$setAll](index, iterable) { | 1749 [core.$setAll](index, iterable) { |
| 1732 if (dart.is(iterable, core.List)) { | 1750 if (dart.is(iterable, core.List)) { |
| 1733 this.setRange(index, dart.notNull(index) + dart.notNull(iterable[core.
$length]), iterable); | 1751 this.setRange(index, dart.notNull(index) + dart.notNull(iterable[core.
$length]), iterable); |
| 1734 } else { | 1752 } else { |
| 1735 for (let element of iterable) { | 1753 for (let element of iterable) { |
| 1736 this[core.$set](((x$) => index = dart.notNull(x$) + 1, x$)(index), e
lement); | 1754 this[core.$set]((() => { |
| 1755 let x$ = index; |
| 1756 index = dart.notNull(x$) + 1; |
| 1757 return x$; |
| 1758 })(), element); |
| 1737 } | 1759 } |
| 1738 } | 1760 } |
| 1739 } | 1761 } |
| 1740 get [core.$reversed]() { | 1762 get [core.$reversed]() { |
| 1741 return new (_internal.ReversedListIterable$(E))(this); | 1763 return new (_internal.ReversedListIterable$(E))(this); |
| 1742 } | 1764 } |
| 1743 toString() { | 1765 toString() { |
| 1744 return IterableBase.iterableToFullString(this, '[', ']'); | 1766 return IterableBase.iterableToFullString(this, '[', ']'); |
| 1745 } | 1767 } |
| 1746 } | 1768 } |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1984 for (let k of map.keys[core.$toList]()) { | 2006 for (let k of map.keys[core.$toList]()) { |
| 1985 map.remove(k); | 2007 map.remove(k); |
| 1986 } | 2008 } |
| 1987 } | 2009 } |
| 1988 static forEach(map, f) { | 2010 static forEach(map, f) { |
| 1989 for (let k of map.keys) { | 2011 for (let k of map.keys) { |
| 1990 dart.dinvokef(f, k, map.get(k)); | 2012 dart.dinvokef(f, k, map.get(k)); |
| 1991 } | 2013 } |
| 1992 } | 2014 } |
| 1993 static getValues(map) { | 2015 static getValues(map) { |
| 1994 return map.keys[core.$map]((key) => map.get(key)); | 2016 return map.keys[core.$map](key => map.get(key)); |
| 1995 } | 2017 } |
| 1996 static length(map) { | 2018 static length(map) { |
| 1997 return map.keys[core.$length]; | 2019 return map.keys[core.$length]; |
| 1998 } | 2020 } |
| 1999 static isEmpty(map) { | 2021 static isEmpty(map) { |
| 2000 return map.keys[core.$isEmpty]; | 2022 return map.keys[core.$isEmpty]; |
| 2001 } | 2023 } |
| 2002 static isNotEmpty(map) { | 2024 static isNotEmpty(map) { |
| 2003 return map.keys[core.$isNotEmpty]; | 2025 return map.keys[core.$isNotEmpty]; |
| 2004 } | 2026 } |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2392 this[_add](element); | 2414 this[_add](element); |
| 2393 } | 2415 } |
| 2394 addAll(elements) { | 2416 addAll(elements) { |
| 2395 if (dart.is(elements, core.List)) { | 2417 if (dart.is(elements, core.List)) { |
| 2396 let list = dart.as(elements, core.List); | 2418 let list = dart.as(elements, core.List); |
| 2397 let addCount = list[core.$length]; | 2419 let addCount = list[core.$length]; |
| 2398 let length = this[core.$length]; | 2420 let length = this[core.$length]; |
| 2399 if (dart.notNull(length) + dart.notNull(addCount) >= dart.notNull(this
[_table][core.$length])) { | 2421 if (dart.notNull(length) + dart.notNull(addCount) >= dart.notNull(this
[_table][core.$length])) { |
| 2400 this[_preGrow](dart.notNull(length) + dart.notNull(addCount)); | 2422 this[_preGrow](dart.notNull(length) + dart.notNull(addCount)); |
| 2401 this[_table][core.$setRange](length, dart.notNull(length) + dart.not
Null(addCount), dart.as(list, core.Iterable$(E)), 0); | 2423 this[_table][core.$setRange](length, dart.notNull(length) + dart.not
Null(addCount), dart.as(list, core.Iterable$(E)), 0); |
| 2402 this[_tail] = addCount; | 2424 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount); |
| 2403 } else { | 2425 } else { |
| 2404 let endSpace = dart.notNull(this[_table][core.$length]) - dart.notNu
ll(this[_tail]); | 2426 let endSpace = dart.notNull(this[_table][core.$length]) - dart.notNu
ll(this[_tail]); |
| 2405 if (dart.notNull(addCount) < dart.notNull(endSpace)) { | 2427 if (dart.notNull(addCount) < dart.notNull(endSpace)) { |
| 2406 this[_table][core.$setRange](this[_tail], dart.notNull(this[_tail]
) + dart.notNull(addCount), dart.as(list, core.Iterable$(E)), 0); | 2428 this[_table][core.$setRange](this[_tail], dart.notNull(this[_tail]
) + dart.notNull(addCount), dart.as(list, core.Iterable$(E)), 0); |
| 2407 this[_tail] = addCount; | 2429 this[_tail] = dart.notNull(this[_tail]) + dart.notNull(addCount); |
| 2408 } else { | 2430 } else { |
| 2409 let preSpace = dart.notNull(addCount) - dart.notNull(endSpace); | 2431 let preSpace = dart.notNull(addCount) - dart.notNull(endSpace); |
| 2410 this[_table][core.$setRange](this[_tail], dart.notNull(this[_tail]
) + dart.notNull(endSpace), dart.as(list, core.Iterable$(E)), 0); | 2432 this[_table][core.$setRange](this[_tail], dart.notNull(this[_tail]
) + dart.notNull(endSpace), dart.as(list, core.Iterable$(E)), 0); |
| 2411 this[_table][core.$setRange](0, preSpace, dart.as(list, core.Itera
ble$(E)), endSpace); | 2433 this[_table][core.$setRange](0, preSpace, dart.as(list, core.Itera
ble$(E)), endSpace); |
| 2412 this[_tail] = preSpace; | 2434 this[_tail] = preSpace; |
| 2413 } | 2435 } |
| 2414 } | 2436 } |
| 2415 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 2437 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
| 2416 } else { | 2438 } else { |
| 2417 for (let element of elements) | 2439 for (let element of elements) |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2559 return length; | 2581 return length; |
| 2560 } else { | 2582 } else { |
| 2561 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]); |
| 2562 target[core.$setRange](0, firstPartSize, this[_table], this[_head]); | 2584 target[core.$setRange](0, firstPartSize, this[_table], this[_head]); |
| 2563 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); |
| 2564 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); | 2586 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); |
| 2565 } | 2587 } |
| 2566 } | 2588 } |
| 2567 [_preGrow](newElementCount) { | 2589 [_preGrow](newElementCount) { |
| 2568 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this.length)); | 2590 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this.length)); |
| 2569 newElementCount = dart.notNull(newElementCount) >> 1; | 2591 newElementCount = dart.notNull(newElementCount) + (dart.notNull(newEleme
ntCount) >> 1); |
| 2570 let newCapacity = ListQueue[_nextPowerOf2](newElementCount); | 2592 let newCapacity = ListQueue[_nextPowerOf2](newElementCount); |
| 2571 let newTable = new (core.List$(E))(newCapacity); | 2593 let newTable = new (core.List$(E))(newCapacity); |
| 2572 this[_tail] = this[_writeToList](newTable); | 2594 this[_tail] = this[_writeToList](newTable); |
| 2573 this[_table] = newTable; | 2595 this[_table] = newTable; |
| 2574 this[_head] = 0; | 2596 this[_head] = 0; |
| 2575 } | 2597 } |
| 2576 } | 2598 } |
| 2577 ListQueue[dart.implements] = () => [Queue$(E)]; | 2599 ListQueue[dart.implements] = () => [Queue$(E)]; |
| 2578 dart.defineNamedConstructor(ListQueue, 'from'); | 2600 dart.defineNamedConstructor(ListQueue, 'from'); |
| 2579 ListQueue._INITIAL_CAPACITY = 8; | 2601 ListQueue._INITIAL_CAPACITY = 8; |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2800 let _validKey = Symbol('_validKey'); | 2822 let _validKey = Symbol('_validKey'); |
| 2801 let _internal$ = Symbol('_internal'); | 2823 let _internal$ = Symbol('_internal'); |
| 2802 let SplayTreeMap$ = dart.generic(function(K, V) { | 2824 let SplayTreeMap$ = dart.generic(function(K, V) { |
| 2803 class SplayTreeMap extends _SplayTree$(K) { | 2825 class SplayTreeMap extends _SplayTree$(K) { |
| 2804 SplayTreeMap(compare, isValidKey) { | 2826 SplayTreeMap(compare, isValidKey) { |
| 2805 if (compare === void 0) | 2827 if (compare === void 0) |
| 2806 compare = null; | 2828 compare = null; |
| 2807 if (isValidKey === void 0) | 2829 if (isValidKey === void 0) |
| 2808 isValidKey = null; | 2830 isValidKey = null; |
| 2809 this[_comparator] = dart.as(compare == null ? core.Comparable.compare :
compare, core.Comparator); | 2831 this[_comparator] = dart.as(compare == null ? core.Comparable.compare :
compare, core.Comparator); |
| 2810 this[_validKey] = dart.as(isValidKey != null ? isValidKey : (v) => dart.
is(v, K), _Predicate); | 2832 this[_validKey] = dart.as(isValidKey != null ? isValidKey : v => dart.is
(v, K), _Predicate); |
| 2811 super._SplayTree(); | 2833 super._SplayTree(); |
| 2812 } | 2834 } |
| 2813 from(other, compare, isValidKey) { | 2835 from(other, compare, isValidKey) { |
| 2814 if (compare === void 0) | 2836 if (compare === void 0) |
| 2815 compare = null; | 2837 compare = null; |
| 2816 if (isValidKey === void 0) | 2838 if (isValidKey === void 0) |
| 2817 isValidKey = null; | 2839 isValidKey = null; |
| 2818 let result = new (SplayTreeMap$(K, V))(); | 2840 let result = new (SplayTreeMap$(K, V))(); |
| 2819 other.forEach((k, v) => { | 2841 other.forEach((k, v) => { |
| 2820 result.set(k, dart.as(v, V)); | 2842 result.set(k, dart.as(v, V)); |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3172 let _SplayTreeNodeIterator = _SplayTreeNodeIterator$(); | 3194 let _SplayTreeNodeIterator = _SplayTreeNodeIterator$(); |
| 3173 let _clone = Symbol('_clone'); | 3195 let _clone = Symbol('_clone'); |
| 3174 let SplayTreeSet$ = dart.generic(function(E) { | 3196 let SplayTreeSet$ = dart.generic(function(E) { |
| 3175 class SplayTreeSet extends dart.mixin(_SplayTree$(E), IterableMixin$(E), Set
Mixin$(E)) { | 3197 class SplayTreeSet extends dart.mixin(_SplayTree$(E), IterableMixin$(E), Set
Mixin$(E)) { |
| 3176 SplayTreeSet(compare, isValidKey) { | 3198 SplayTreeSet(compare, isValidKey) { |
| 3177 if (compare === void 0) | 3199 if (compare === void 0) |
| 3178 compare = null; | 3200 compare = null; |
| 3179 if (isValidKey === void 0) | 3201 if (isValidKey === void 0) |
| 3180 isValidKey = null; | 3202 isValidKey = null; |
| 3181 this[_comparator] = dart.as(compare == null ? core.Comparable.compare :
compare, core.Comparator); | 3203 this[_comparator] = dart.as(compare == null ? core.Comparable.compare :
compare, core.Comparator); |
| 3182 this[_validKey] = dart.as(isValidKey != null ? isValidKey : (v) => dart.
is(v, E), _Predicate); | 3204 this[_validKey] = dart.as(isValidKey != null ? isValidKey : v => dart.is
(v, E), _Predicate); |
| 3183 super._SplayTree(); | 3205 super._SplayTree(); |
| 3184 } | 3206 } |
| 3185 from(elements, compare, isValidKey) { | 3207 from(elements, compare, isValidKey) { |
| 3186 if (compare === void 0) | 3208 if (compare === void 0) |
| 3187 compare = null; | 3209 compare = null; |
| 3188 if (isValidKey === void 0) | 3210 if (isValidKey === void 0) |
| 3189 isValidKey = null; | 3211 isValidKey = null; |
| 3190 let result = new (SplayTreeSet$(E))(compare, isValidKey); | 3212 let result = new (SplayTreeSet$(E))(compare, isValidKey); |
| 3191 for (let element of dart.as(elements, core.Iterable$(E))) { | 3213 for (let element of dart.as(elements, core.Iterable$(E))) { |
| 3192 result.add(element); | 3214 result.add(element); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3288 } | 3310 } |
| 3289 difference(other) { | 3311 difference(other) { |
| 3290 let result = new (SplayTreeSet$(E))(dart.as(this[_comparator], dart.thro
w_("Unimplemented type (E, E) → int")), this[_validKey]); | 3312 let result = new (SplayTreeSet$(E))(dart.as(this[_comparator], dart.thro
w_("Unimplemented type (E, E) → int")), this[_validKey]); |
| 3291 for (let element of this) { | 3313 for (let element of this) { |
| 3292 if (!dart.notNull(other[core.$contains](element))) | 3314 if (!dart.notNull(other[core.$contains](element))) |
| 3293 result.add(element); | 3315 result.add(element); |
| 3294 } | 3316 } |
| 3295 return result; | 3317 return result; |
| 3296 } | 3318 } |
| 3297 union(other) { | 3319 union(other) { |
| 3298 return ((_) => { | 3320 let _ = this[_clone](); |
| 3299 _.addAll(other); | 3321 _.addAll(other); |
| 3300 return _; | 3322 return _; |
| 3301 })(this[_clone]()); | |
| 3302 } | 3323 } |
| 3303 [_clone]() { | 3324 [_clone]() { |
| 3304 let set = new (SplayTreeSet$(E))(dart.as(this[_comparator], dart.throw_(
"Unimplemented type (E, E) → int")), this[_validKey]); | 3325 let set = new (SplayTreeSet$(E))(dart.as(this[_comparator], dart.throw_(
"Unimplemented type (E, E) → int")), this[_validKey]); |
| 3305 set[_count] = this[_count]; | 3326 set[_count] = this[_count]; |
| 3306 set[_root] = this[_copyNode](this[_root]); | 3327 set[_root] = this[_copyNode](this[_root]); |
| 3307 return set; | 3328 return set; |
| 3308 } | 3329 } |
| 3309 [_copyNode](node) { | 3330 [_copyNode](node) { |
| 3310 if (node == null) | 3331 if (node == null) |
| 3311 return null; | 3332 return null; |
| 3312 return ((_) => { | 3333 let _ = new (_SplayTreeNode$(E))(node.key); |
| 3313 _.left = this[_copyNode](node.left); | 3334 _.left = this[_copyNode](node.left); |
| 3314 _.right = this[_copyNode](node.right); | 3335 _.right = this[_copyNode](node.right); |
| 3315 return _; | 3336 return _; |
| 3316 }).bind(this)(new (_SplayTreeNode$(E))(node.key)); | |
| 3317 } | 3337 } |
| 3318 clear() { | 3338 clear() { |
| 3319 this[_clear](); | 3339 this[_clear](); |
| 3320 } | 3340 } |
| 3321 [core.$toSet]() { | 3341 [core.$toSet]() { |
| 3322 return this[_clone](); | 3342 return this[_clone](); |
| 3323 } | 3343 } |
| 3324 toString() { | 3344 toString() { |
| 3325 return IterableBase.iterableToFullString(this, '{', '}'); | 3345 return IterableBase.iterableToFullString(this, '{', '}'); |
| 3326 } | 3346 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3363 get isEmpty() { | 3383 get isEmpty() { |
| 3364 return this[_length] == 0; | 3384 return this[_length] == 0; |
| 3365 } | 3385 } |
| 3366 get isNotEmpty() { | 3386 get isNotEmpty() { |
| 3367 return !dart.notNull(this.isEmpty); | 3387 return !dart.notNull(this.isEmpty); |
| 3368 } | 3388 } |
| 3369 get keys() { | 3389 get keys() { |
| 3370 return new (HashMapKeyIterable$(K))(this); | 3390 return new (HashMapKeyIterable$(K))(this); |
| 3371 } | 3391 } |
| 3372 get values() { | 3392 get values() { |
| 3373 return new (_internal.MappedIterable$(K, V))(this.keys, dart.as(((each)
=> this.get(each)).bind(this), dart.throw_("Unimplemented type (K) → V"))); | 3393 return new (_internal.MappedIterable$(K, V))(this.keys, dart.as((each =>
this.get(each)).bind(this), dart.throw_("Unimplemented type (K) → V"))); |
| 3374 } | 3394 } |
| 3375 containsKey(key) { | 3395 containsKey(key) { |
| 3376 if (_HashMap[_isStringKey](key)) { | 3396 if (_HashMap[_isStringKey](key)) { |
| 3377 let strings = this[_strings]; | 3397 let strings = this[_strings]; |
| 3378 return strings == null ? false : _HashMap[_hasTableEntry](strings, key
); | 3398 return strings == null ? false : _HashMap[_hasTableEntry](strings, key
); |
| 3379 } else if (_HashMap[_isNumericKey](key)) { | 3399 } else if (_HashMap[_isNumericKey](key)) { |
| 3380 let nums = this[_nums]; | 3400 let nums = this[_nums]; |
| 3381 return nums == null ? false : _HashMap[_hasTableEntry](nums, key); | 3401 return nums == null ? false : _HashMap[_hasTableEntry](nums, key); |
| 3382 } else { | 3402 } else { |
| 3383 return this[_containsKey](key); | 3403 return this[_containsKey](key); |
| 3384 } | 3404 } |
| 3385 } | 3405 } |
| 3386 [_containsKey](key) { | 3406 [_containsKey](key) { |
| 3387 let rest = this[_rest]; | 3407 let rest = this[_rest]; |
| 3388 if (rest == null) | 3408 if (rest == null) |
| 3389 return false; | 3409 return false; |
| 3390 let bucket = this[_getBucket](rest, key); | 3410 let bucket = this[_getBucket](rest, key); |
| 3391 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; | 3411 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; |
| 3392 } | 3412 } |
| 3393 containsValue(value) { | 3413 containsValue(value) { |
| 3394 return this[_computeKeys]()[core.$any](((each) => dart.equals(this.get(e
ach), value)).bind(this)); | 3414 return this[_computeKeys]()[core.$any]((each => dart.equals(this.get(eac
h), value)).bind(this)); |
| 3395 } | 3415 } |
| 3396 addAll(other) { | 3416 addAll(other) { |
| 3397 other.forEach(((key, value) => { | 3417 other.forEach(((key, value) => { |
| 3398 this.set(key, value); | 3418 this.set(key, value); |
| 3399 }).bind(this)); | 3419 }).bind(this)); |
| 3400 } | 3420 } |
| 3401 get(key) { | 3421 get(key) { |
| 3402 if (_HashMap[_isStringKey](key)) { | 3422 if (_HashMap[_isStringKey](key)) { |
| 3403 let strings = this[_strings]; | 3423 let strings = this[_strings]; |
| 3404 return dart.as(strings == null ? null : _HashMap[_getTableEntry](strin
gs, key), V); | 3424 return dart.as(strings == null ? null : _HashMap[_getTableEntry](strin
gs, key), V); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3523 } | 3543 } |
| 3524 } | 3544 } |
| 3525 let rest = this[_rest]; | 3545 let rest = this[_rest]; |
| 3526 if (rest != null) { | 3546 if (rest != null) { |
| 3527 let names = Object.getOwnPropertyNames(rest); | 3547 let names = Object.getOwnPropertyNames(rest); |
| 3528 let entries = names.length; | 3548 let entries = names.length; |
| 3529 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN
ull(i) + 1) { | 3549 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN
ull(i) + 1) { |
| 3530 let key = names[i]; | 3550 let key = names[i]; |
| 3531 let bucket = rest[key]; | 3551 let bucket = rest[key]; |
| 3532 let length = bucket.length; | 3552 let length = bucket.length; |
| 3533 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = 2) { | 3553 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.not
Null(i) + 2) { |
| 3534 let key = bucket[i]; | 3554 let key = bucket[i]; |
| 3535 result[index] = key; | 3555 result[index] = key; |
| 3536 index = dart.notNull(index) + 1; | 3556 index = dart.notNull(index) + 1; |
| 3537 } | 3557 } |
| 3538 } | 3558 } |
| 3539 } | 3559 } |
| 3540 dart.assert(index == this[_length]); | 3560 dart.assert(index == this[_length]); |
| 3541 return this[_keys] = result; | 3561 return this[_keys] = result; |
| 3542 } | 3562 } |
| 3543 [_addHashTableEntry](table, key, value) { | 3563 [_addHashTableEntry](table, key, value) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3586 delete table[key]; | 3606 delete table[key]; |
| 3587 } | 3607 } |
| 3588 [_getBucket](table, key) { | 3608 [_getBucket](table, key) { |
| 3589 let hash = this[_computeHashCode](key); | 3609 let hash = this[_computeHashCode](key); |
| 3590 return dart.as(table[hash], core.List); | 3610 return dart.as(table[hash], core.List); |
| 3591 } | 3611 } |
| 3592 [_findBucketIndex](bucket, key) { | 3612 [_findBucketIndex](bucket, key) { |
| 3593 if (bucket == null) | 3613 if (bucket == null) |
| 3594 return -1; | 3614 return -1; |
| 3595 let length = bucket.length; | 3615 let length = bucket.length; |
| 3596 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = 2) { | 3616 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { |
| 3597 if (dart.equals(bucket[i], key)) | 3617 if (dart.equals(bucket[i], key)) |
| 3598 return i; | 3618 return i; |
| 3599 } | 3619 } |
| 3600 return -1; | 3620 return -1; |
| 3601 } | 3621 } |
| 3602 static [_newHashTable]() { | 3622 static [_newHashTable]() { |
| 3603 let table = Object.create(null); | 3623 let table = Object.create(null); |
| 3604 let temporaryKey = '<non-identifier-key>'; | 3624 let temporaryKey = '<non-identifier-key>'; |
| 3605 _HashMap[_setTableEntry](table, temporaryKey, table); | 3625 _HashMap[_setTableEntry](table, temporaryKey, table); |
| 3606 _HashMap[_deleteTableEntry](table, temporaryKey); | 3626 _HashMap[_deleteTableEntry](table, temporaryKey); |
| 3607 return table; | 3627 return table; |
| 3608 } | 3628 } |
| 3609 } | 3629 } |
| 3610 _HashMap[dart.implements] = () => [HashMap$(K, V)]; | 3630 _HashMap[dart.implements] = () => [HashMap$(K, V)]; |
| 3611 return _HashMap; | 3631 return _HashMap; |
| 3612 }); | 3632 }); |
| 3613 let _HashMap = _HashMap$(); | 3633 let _HashMap = _HashMap$(); |
| 3614 let _IdentityHashMap$ = dart.generic(function(K, V) { | 3634 let _IdentityHashMap$ = dart.generic(function(K, V) { |
| 3615 class _IdentityHashMap extends _HashMap$(K, V) { | 3635 class _IdentityHashMap extends _HashMap$(K, V) { |
| 3616 [_computeHashCode](key) { | 3636 [_computeHashCode](key) { |
| 3617 return core.identityHashCode(key) & 0x3ffffff; | 3637 return core.identityHashCode(key) & 0x3ffffff; |
| 3618 } | 3638 } |
| 3619 [_findBucketIndex](bucket, key) { | 3639 [_findBucketIndex](bucket, key) { |
| 3620 if (bucket == null) | 3640 if (bucket == null) |
| 3621 return -1; | 3641 return -1; |
| 3622 let length = bucket.length; | 3642 let length = bucket.length; |
| 3623 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = 2) { | 3643 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { |
| 3624 if (core.identical(bucket[i], key)) | 3644 if (core.identical(bucket[i], key)) |
| 3625 return i; | 3645 return i; |
| 3626 } | 3646 } |
| 3627 return -1; | 3647 return -1; |
| 3628 } | 3648 } |
| 3629 } | 3649 } |
| 3630 return _IdentityHashMap; | 3650 return _IdentityHashMap; |
| 3631 }); | 3651 }); |
| 3632 let _IdentityHashMap = _IdentityHashMap$(); | 3652 let _IdentityHashMap = _IdentityHashMap$(); |
| 3633 let _equals = Symbol('_equals'); | 3653 let _equals = Symbol('_equals'); |
| 3634 let _hashCode = Symbol('_hashCode'); | 3654 let _hashCode = Symbol('_hashCode'); |
| 3635 let _CustomHashMap$ = dart.generic(function(K, V) { | 3655 let _CustomHashMap$ = dart.generic(function(K, V) { |
| 3636 class _CustomHashMap extends _HashMap$(K, V) { | 3656 class _CustomHashMap extends _HashMap$(K, V) { |
| 3637 _CustomHashMap(equals$, hashCode$, validKey) { | 3657 _CustomHashMap(equals$, hashCode$, validKey) { |
| 3638 this[_equals] = equals$; | 3658 this[_equals] = equals$; |
| 3639 this[_hashCode] = hashCode$; | 3659 this[_hashCode] = hashCode$; |
| 3640 this[_validKey] = dart.as(validKey != null ? validKey : (v) => dart.is(v
, K), _Predicate); | 3660 this[_validKey] = dart.as(validKey != null ? validKey : v => dart.is(v,
K), _Predicate); |
| 3641 super._HashMap(); | 3661 super._HashMap(); |
| 3642 } | 3662 } |
| 3643 get(key) { | 3663 get(key) { |
| 3644 if (!dart.notNull(dart.dinvokef(this[_validKey], key))) | 3664 if (!dart.notNull(dart.dinvokef(this[_validKey], key))) |
| 3645 return null; | 3665 return null; |
| 3646 return super[_get](key); | 3666 return super[_get](key); |
| 3647 } | 3667 } |
| 3648 set(key, value) { | 3668 set(key, value) { |
| 3649 super[_set](key, value); | 3669 super[_set](key, value); |
| 3650 } | 3670 } |
| 3651 containsKey(key) { | 3671 containsKey(key) { |
| 3652 if (!dart.notNull(dart.dinvokef(this[_validKey], key))) | 3672 if (!dart.notNull(dart.dinvokef(this[_validKey], key))) |
| 3653 return false; | 3673 return false; |
| 3654 return super[_containsKey](key); | 3674 return super[_containsKey](key); |
| 3655 } | 3675 } |
| 3656 remove(key) { | 3676 remove(key) { |
| 3657 if (!dart.notNull(dart.dinvokef(this[_validKey], key))) | 3677 if (!dart.notNull(dart.dinvokef(this[_validKey], key))) |
| 3658 return null; | 3678 return null; |
| 3659 return super[_remove](key); | 3679 return super[_remove](key); |
| 3660 } | 3680 } |
| 3661 [_computeHashCode](key) { | 3681 [_computeHashCode](key) { |
| 3662 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; | 3682 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; |
| 3663 } | 3683 } |
| 3664 [_findBucketIndex](bucket, key) { | 3684 [_findBucketIndex](bucket, key) { |
| 3665 if (bucket == null) | 3685 if (bucket == null) |
| 3666 return -1; | 3686 return -1; |
| 3667 let length = bucket.length; | 3687 let length = bucket.length; |
| 3668 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = 2) { | 3688 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { |
| 3669 if (this[_equals](dart.as(bucket[i], K), dart.as(key, K))) | 3689 if (this[_equals](dart.as(bucket[i], K), dart.as(key, K))) |
| 3670 return i; | 3690 return i; |
| 3671 } | 3691 } |
| 3672 return -1; | 3692 return -1; |
| 3673 } | 3693 } |
| 3674 toString() { | 3694 toString() { |
| 3675 return Maps.mapToString(this); | 3695 return Maps.mapToString(this); |
| 3676 } | 3696 } |
| 3677 } | 3697 } |
| 3678 return _CustomHashMap; | 3698 return _CustomHashMap; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3764 get isEmpty() { | 3784 get isEmpty() { |
| 3765 return this[_length] == 0; | 3785 return this[_length] == 0; |
| 3766 } | 3786 } |
| 3767 get isNotEmpty() { | 3787 get isNotEmpty() { |
| 3768 return !dart.notNull(this.isEmpty); | 3788 return !dart.notNull(this.isEmpty); |
| 3769 } | 3789 } |
| 3770 get keys() { | 3790 get keys() { |
| 3771 return new (LinkedHashMapKeyIterable$(K))(this); | 3791 return new (LinkedHashMapKeyIterable$(K))(this); |
| 3772 } | 3792 } |
| 3773 get values() { | 3793 get values() { |
| 3774 return new (_internal.MappedIterable$(K, V))(this.keys, dart.as(((each)
=> this.get(each)).bind(this), dart.throw_("Unimplemented type (K) → V"))); | 3794 return new (_internal.MappedIterable$(K, V))(this.keys, dart.as((each =>
this.get(each)).bind(this), dart.throw_("Unimplemented type (K) → V"))); |
| 3775 } | 3795 } |
| 3776 containsKey(key) { | 3796 containsKey(key) { |
| 3777 if (_LinkedHashMap[_isStringKey](key)) { | 3797 if (_LinkedHashMap[_isStringKey](key)) { |
| 3778 let strings = this[_strings]; | 3798 let strings = this[_strings]; |
| 3779 if (strings == null) | 3799 if (strings == null) |
| 3780 return false; | 3800 return false; |
| 3781 let cell = dart.as(_LinkedHashMap[_getTableEntry](strings, key), Linke
dHashMapCell); | 3801 let cell = dart.as(_LinkedHashMap[_getTableEntry](strings, key), Linke
dHashMapCell); |
| 3782 return cell != null; | 3802 return cell != null; |
| 3783 } else if (_LinkedHashMap[_isNumericKey](key)) { | 3803 } else if (_LinkedHashMap[_isNumericKey](key)) { |
| 3784 let nums = this[_nums]; | 3804 let nums = this[_nums]; |
| 3785 if (nums == null) | 3805 if (nums == null) |
| 3786 return false; | 3806 return false; |
| 3787 let cell = dart.as(_LinkedHashMap[_getTableEntry](nums, key), LinkedHa
shMapCell); | 3807 let cell = dart.as(_LinkedHashMap[_getTableEntry](nums, key), LinkedHa
shMapCell); |
| 3788 return cell != null; | 3808 return cell != null; |
| 3789 } else { | 3809 } else { |
| 3790 return this[_containsKey](key); | 3810 return this[_containsKey](key); |
| 3791 } | 3811 } |
| 3792 } | 3812 } |
| 3793 [_containsKey](key) { | 3813 [_containsKey](key) { |
| 3794 let rest = this[_rest]; | 3814 let rest = this[_rest]; |
| 3795 if (rest == null) | 3815 if (rest == null) |
| 3796 return false; | 3816 return false; |
| 3797 let bucket = this[_getBucket](rest, key); | 3817 let bucket = this[_getBucket](rest, key); |
| 3798 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; | 3818 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; |
| 3799 } | 3819 } |
| 3800 containsValue(value) { | 3820 containsValue(value) { |
| 3801 return this.keys[core.$any](dart.as(((each) => dart.equals(this.get(each
), value)).bind(this), dart.throw_("Unimplemented type (K) → bool"))); | 3821 return this.keys[core.$any](dart.as((each => dart.equals(this.get(each),
value)).bind(this), dart.throw_("Unimplemented type (K) → bool"))); |
| 3802 } | 3822 } |
| 3803 addAll(other) { | 3823 addAll(other) { |
| 3804 other.forEach(((key, value) => { | 3824 other.forEach(((key, value) => { |
| 3805 this.set(key, value); | 3825 this.set(key, value); |
| 3806 }).bind(this)); | 3826 }).bind(this)); |
| 3807 } | 3827 } |
| 3808 get(key) { | 3828 get(key) { |
| 3809 if (_LinkedHashMap[_isStringKey](key)) { | 3829 if (_LinkedHashMap[_isStringKey](key)) { |
| 3810 let strings = this[_strings]; | 3830 let strings = this[_strings]; |
| 3811 if (strings == null) | 3831 if (strings == null) |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4033 } | 4053 } |
| 4034 } | 4054 } |
| 4035 return _LinkedIdentityHashMap; | 4055 return _LinkedIdentityHashMap; |
| 4036 }); | 4056 }); |
| 4037 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(); | 4057 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(); |
| 4038 let _LinkedCustomHashMap$ = dart.generic(function(K, V) { | 4058 let _LinkedCustomHashMap$ = dart.generic(function(K, V) { |
| 4039 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) { | 4059 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) { |
| 4040 _LinkedCustomHashMap(equals$, hashCode$, validKey) { | 4060 _LinkedCustomHashMap(equals$, hashCode$, validKey) { |
| 4041 this[_equals] = equals$; | 4061 this[_equals] = equals$; |
| 4042 this[_hashCode] = hashCode$; | 4062 this[_hashCode] = hashCode$; |
| 4043 this[_validKey] = dart.as(validKey != null ? validKey : (v) => dart.is(v
, K), _Predicate); | 4063 this[_validKey] = dart.as(validKey != null ? validKey : v => dart.is(v,
K), _Predicate); |
| 4044 super._LinkedHashMap(); | 4064 super._LinkedHashMap(); |
| 4045 } | 4065 } |
| 4046 get(key) { | 4066 get(key) { |
| 4047 if (!dart.notNull(dart.dinvokef(this[_validKey], key))) | 4067 if (!dart.notNull(dart.dinvokef(this[_validKey], key))) |
| 4048 return null; | 4068 return null; |
| 4049 return super[_get](key); | 4069 return super[_get](key); |
| 4050 } | 4070 } |
| 4051 set(key, value) { | 4071 set(key, value) { |
| 4052 super[_set](key, value); | 4072 super[_set](key, value); |
| 4053 } | 4073 } |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4410 return _IdentityHashSet; | 4430 return _IdentityHashSet; |
| 4411 }); | 4431 }); |
| 4412 let _IdentityHashSet = _IdentityHashSet$(); | 4432 let _IdentityHashSet = _IdentityHashSet$(); |
| 4413 let _equality = Symbol('_equality'); | 4433 let _equality = Symbol('_equality'); |
| 4414 let _hasher = Symbol('_hasher'); | 4434 let _hasher = Symbol('_hasher'); |
| 4415 let _CustomHashSet$ = dart.generic(function(E) { | 4435 let _CustomHashSet$ = dart.generic(function(E) { |
| 4416 class _CustomHashSet extends _HashSet$(E) { | 4436 class _CustomHashSet extends _HashSet$(E) { |
| 4417 _CustomHashSet(equality, hasher, validKey) { | 4437 _CustomHashSet(equality, hasher, validKey) { |
| 4418 this[_equality] = equality; | 4438 this[_equality] = equality; |
| 4419 this[_hasher] = hasher; | 4439 this[_hasher] = hasher; |
| 4420 this[_validKey] = dart.as(validKey != null ? validKey : (x) => dart.is(x
, E), _Predicate); | 4440 this[_validKey] = dart.as(validKey != null ? validKey : x => dart.is(x,
E), _Predicate); |
| 4421 super._HashSet(); | 4441 super._HashSet(); |
| 4422 } | 4442 } |
| 4423 [_newSet]() { | 4443 [_newSet]() { |
| 4424 return new (_CustomHashSet$(E))(this[_equality], this[_hasher], this[_va
lidKey]); | 4444 return new (_CustomHashSet$(E))(this[_equality], this[_hasher], this[_va
lidKey]); |
| 4425 } | 4445 } |
| 4426 [_findBucketIndex](bucket, element) { | 4446 [_findBucketIndex](bucket, element) { |
| 4427 if (bucket == null) | 4447 if (bucket == null) |
| 4428 return -1; | 4448 return -1; |
| 4429 let length = bucket.length; | 4449 let length = bucket.length; |
| 4430 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 4450 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4781 } | 4801 } |
| 4782 } | 4802 } |
| 4783 return _LinkedIdentityHashSet; | 4803 return _LinkedIdentityHashSet; |
| 4784 }); | 4804 }); |
| 4785 let _LinkedIdentityHashSet = _LinkedIdentityHashSet$(); | 4805 let _LinkedIdentityHashSet = _LinkedIdentityHashSet$(); |
| 4786 let _LinkedCustomHashSet$ = dart.generic(function(E) { | 4806 let _LinkedCustomHashSet$ = dart.generic(function(E) { |
| 4787 class _LinkedCustomHashSet extends _LinkedHashSet$(E) { | 4807 class _LinkedCustomHashSet extends _LinkedHashSet$(E) { |
| 4788 _LinkedCustomHashSet(equality, hasher, validKey) { | 4808 _LinkedCustomHashSet(equality, hasher, validKey) { |
| 4789 this[_equality] = equality; | 4809 this[_equality] = equality; |
| 4790 this[_hasher] = hasher; | 4810 this[_hasher] = hasher; |
| 4791 this[_validKey] = dart.as(validKey != null ? validKey : (x) => dart.is(x
, E), _Predicate); | 4811 this[_validKey] = dart.as(validKey != null ? validKey : x => dart.is(x,
E), _Predicate); |
| 4792 super._LinkedHashSet(); | 4812 super._LinkedHashSet(); |
| 4793 } | 4813 } |
| 4794 [_newSet]() { | 4814 [_newSet]() { |
| 4795 return new (_LinkedCustomHashSet$(E))(this[_equality], this[_hasher], th
is[_validKey]); | 4815 return new (_LinkedCustomHashSet$(E))(this[_equality], this[_hasher], th
is[_validKey]); |
| 4796 } | 4816 } |
| 4797 [_findBucketIndex](bucket, element) { | 4817 [_findBucketIndex](bucket, element) { |
| 4798 if (bucket == null) | 4818 if (bucket == null) |
| 4799 return -1; | 4819 return -1; |
| 4800 let length = bucket.length; | 4820 let length = bucket.length; |
| 4801 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 4821 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4939 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; | 4959 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; |
| 4940 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; | 4960 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; |
| 4941 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; | 4961 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; |
| 4942 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; | 4962 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; |
| 4943 exports.HashSetIterator$ = HashSetIterator$; | 4963 exports.HashSetIterator$ = HashSetIterator$; |
| 4944 exports.HashSetIterator = HashSetIterator; | 4964 exports.HashSetIterator = HashSetIterator; |
| 4945 exports.LinkedHashSetCell = LinkedHashSetCell; | 4965 exports.LinkedHashSetCell = LinkedHashSetCell; |
| 4946 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; | 4966 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; |
| 4947 exports.LinkedHashSetIterator = LinkedHashSetIterator; | 4967 exports.LinkedHashSetIterator = LinkedHashSetIterator; |
| 4948 })(collection || (collection = {})); | 4968 })(collection || (collection = {})); |
| OLD | NEW |