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

Side by Side Diff: test/codegen/expect/dart/collection.js

Issue 1010893004: Allow S->T <: dynamic->T (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase and address comments Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/codegen/expect/dart/async.js ('k') | test/codegen/expect/dart/convert.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var collection; 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 19 matching lines...) Expand all
30 class HashMap extends core.Object { 30 class HashMap extends core.Object {
31 HashMap(opt$) { 31 HashMap(opt$) {
32 let equals = opt$.equals === void 0 ? null : opt$.equals; 32 let equals = opt$.equals === void 0 ? null : opt$.equals;
33 let hashCode = opt$.hashCode === void 0 ? null : opt$.hashCode; 33 let hashCode = opt$.hashCode === void 0 ? null : opt$.hashCode;
34 let isValidKey = opt$.isValidKey === void 0 ? null : opt$.isValidKey; 34 let isValidKey = opt$.isValidKey === void 0 ? null : opt$.isValidKey;
35 if (isValidKey === null) { 35 if (isValidKey === null) {
36 if (hashCode === null) { 36 if (hashCode === null) {
37 if (equals === null) { 37 if (equals === null) {
38 return new _HashMap(); 38 return new _HashMap();
39 } 39 }
40 hashCode = _defaultHashCode; 40 hashCode = dart.closureWrap(_defaultHashCode, "(K) → int");
41 } else { 41 } else {
42 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) { 42 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) {
43 return new _IdentityHashMap(); 43 return new _IdentityHashMap();
44 } 44 }
45 if (equals === null) { 45 if (equals === null) {
46 equals = _defaultEquals; 46 equals = dart.closureWrap(_defaultEquals, "(K, K) → bool");
47 } 47 }
48 } 48 }
49 } else { 49 } else {
50 if (hashCode === null) { 50 if (hashCode === null) {
51 hashCode = _defaultHashCode; 51 hashCode = dart.closureWrap(_defaultHashCode, "(K) → int");
52 } 52 }
53 if (equals === null) { 53 if (equals === null) {
54 equals = _defaultEquals; 54 equals = dart.closureWrap(_defaultEquals, "(K, K) → bool");
55 } 55 }
56 } 56 }
57 return new _CustomHashMap(equals, hashCode, isValidKey); 57 return new _CustomHashMap(equals, hashCode, isValidKey);
58 } 58 }
59 HashMap$identity() { 59 HashMap$identity() {
60 return new _IdentityHashMap(); 60 return new _IdentityHashMap();
61 } 61 }
62 HashMap$from(other) { 62 HashMap$from(other) {
63 let result = new HashMap(); 63 let result = new HashMap();
64 other.forEach((k, v) => { 64 other.forEach((k, v) => {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 class HashSet extends core.Object { 119 class HashSet extends core.Object {
120 HashSet(opt$) { 120 HashSet(opt$) {
121 let equals = opt$.equals === void 0 ? null : opt$.equals; 121 let equals = opt$.equals === void 0 ? null : opt$.equals;
122 let hashCode = opt$.hashCode === void 0 ? null : opt$.hashCode; 122 let hashCode = opt$.hashCode === void 0 ? null : opt$.hashCode;
123 let isValidKey = opt$.isValidKey === void 0 ? null : opt$.isValidKey; 123 let isValidKey = opt$.isValidKey === void 0 ? null : opt$.isValidKey;
124 if (isValidKey === null) { 124 if (isValidKey === null) {
125 if (hashCode === null) { 125 if (hashCode === null) {
126 if (equals === null) { 126 if (equals === null) {
127 return new _HashSet(); 127 return new _HashSet();
128 } 128 }
129 hashCode = _defaultHashCode; 129 hashCode = dart.closureWrap(_defaultHashCode, "(E) → int");
130 } else { 130 } else {
131 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) { 131 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) {
132 return new _IdentityHashSet(); 132 return new _IdentityHashSet();
133 } 133 }
134 if (equals === null) { 134 if (equals === null) {
135 equals = _defaultEquals; 135 equals = dart.closureWrap(_defaultEquals, "(E, E) → bool");
136 } 136 }
137 } 137 }
138 } else { 138 } else {
139 if (hashCode === null) { 139 if (hashCode === null) {
140 hashCode = _defaultHashCode; 140 hashCode = dart.closureWrap(_defaultHashCode, "(E) → int");
141 } 141 }
142 if (equals === null) { 142 if (equals === null) {
143 equals = _defaultEquals; 143 equals = dart.closureWrap(_defaultEquals, "(E, E) → bool");
144 } 144 }
145 } 145 }
146 return new _CustomHashSet(equals, hashCode, isValidKey); 146 return new _CustomHashSet(equals, hashCode, isValidKey);
147 } 147 }
148 HashSet$identity() { 148 HashSet$identity() {
149 return new _IdentityHashSet(); 149 return new _IdentityHashSet();
150 } 150 }
151 HashSet$from(elements) { 151 HashSet$from(elements) {
152 let result = new HashSet(); 152 let result = new HashSet();
153 for (let e of elements) 153 for (let e of elements)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 let value = iterator.current; 190 let value = iterator.current;
191 while (iterator.moveNext()) { 191 while (iterator.moveNext()) {
192 value = combine(value, iterator.current); 192 value = combine(value, iterator.current);
193 } 193 }
194 return value; 194 return value;
195 } 195 }
196 fold(initialValue, combine) { 196 fold(initialValue, combine) {
197 let value = initialValue; 197 let value = initialValue;
198 for (let element of this) 198 for (let element of this)
199 value = combine(value, element); 199 value = dart.dinvokef(combine, value, element);
200 return value; 200 return value;
201 } 201 }
202 every(f) { 202 every(f) {
203 for (let element of this) { 203 for (let element of this) {
204 if (!dart.notNull(f(element))) 204 if (!dart.notNull(f(element)))
205 return false; 205 return false;
206 } 206 }
207 return true; 207 return true;
208 } 208 }
209 join(separator) { 209 join(separator) {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 } 388 }
389 let value = iterator.current; 389 let value = iterator.current;
390 while (iterator.moveNext()) { 390 while (iterator.moveNext()) {
391 value = combine(value, iterator.current); 391 value = combine(value, iterator.current);
392 } 392 }
393 return value; 393 return value;
394 } 394 }
395 fold(initialValue, combine) { 395 fold(initialValue, combine) {
396 let value = initialValue; 396 let value = initialValue;
397 for (let element of this) 397 for (let element of this)
398 value = combine(value, element); 398 value = dart.dinvokef(combine, value, element);
399 return value; 399 return value;
400 } 400 }
401 every(f) { 401 every(f) {
402 for (let element of this) { 402 for (let element of this) {
403 if (!dart.notNull(f(element))) 403 if (!dart.notNull(f(element)))
404 return false; 404 return false;
405 } 405 }
406 return true; 406 return true;
407 } 407 }
408 join(separator) { 408 join(separator) {
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 class LinkedHashMap extends core.Object { 728 class LinkedHashMap extends core.Object {
729 LinkedHashMap(opt$) { 729 LinkedHashMap(opt$) {
730 let equals = opt$.equals === void 0 ? null : opt$.equals; 730 let equals = opt$.equals === void 0 ? null : opt$.equals;
731 let hashCode = opt$.hashCode === void 0 ? null : opt$.hashCode; 731 let hashCode = opt$.hashCode === void 0 ? null : opt$.hashCode;
732 let isValidKey = opt$.isValidKey === void 0 ? null : opt$.isValidKey; 732 let isValidKey = opt$.isValidKey === void 0 ? null : opt$.isValidKey;
733 if (isValidKey === null) { 733 if (isValidKey === null) {
734 if (hashCode === null) { 734 if (hashCode === null) {
735 if (equals === null) { 735 if (equals === null) {
736 return new _LinkedHashMap(); 736 return new _LinkedHashMap();
737 } 737 }
738 hashCode = _defaultHashCode; 738 hashCode = dart.closureWrap(_defaultHashCode, "(K) → int");
739 } else { 739 } else {
740 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) { 740 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) {
741 return new _LinkedIdentityHashMap(); 741 return new _LinkedIdentityHashMap();
742 } 742 }
743 if (equals === null) { 743 if (equals === null) {
744 equals = _defaultEquals; 744 equals = dart.closureWrap(_defaultEquals, "(K, K) → bool");
745 } 745 }
746 } 746 }
747 } else { 747 } else {
748 if (hashCode === null) { 748 if (hashCode === null) {
749 hashCode = _defaultHashCode; 749 hashCode = dart.closureWrap(_defaultHashCode, "(K) → int");
750 } 750 }
751 if (equals === null) { 751 if (equals === null) {
752 equals = _defaultEquals; 752 equals = dart.closureWrap(_defaultEquals, "(K, K) → bool");
753 } 753 }
754 } 754 }
755 return new _LinkedCustomHashMap(equals, hashCode, isValidKey); 755 return new _LinkedCustomHashMap(equals, hashCode, isValidKey);
756 } 756 }
757 LinkedHashMap$identity() { 757 LinkedHashMap$identity() {
758 return new _LinkedIdentityHashMap(); 758 return new _LinkedIdentityHashMap();
759 } 759 }
760 LinkedHashMap$from(other) { 760 LinkedHashMap$from(other) {
761 let result = new LinkedHashMap(); 761 let result = new LinkedHashMap();
762 other.forEach((k, v) => { 762 other.forEach((k, v) => {
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 class LinkedHashSet extends core.Object { 796 class LinkedHashSet extends core.Object {
797 LinkedHashSet(opt$) { 797 LinkedHashSet(opt$) {
798 let equals = opt$.equals === void 0 ? null : opt$.equals; 798 let equals = opt$.equals === void 0 ? null : opt$.equals;
799 let hashCode = opt$.hashCode === void 0 ? null : opt$.hashCode; 799 let hashCode = opt$.hashCode === void 0 ? null : opt$.hashCode;
800 let isValidKey = opt$.isValidKey === void 0 ? null : opt$.isValidKey; 800 let isValidKey = opt$.isValidKey === void 0 ? null : opt$.isValidKey;
801 if (isValidKey === null) { 801 if (isValidKey === null) {
802 if (hashCode === null) { 802 if (hashCode === null) {
803 if (equals === null) { 803 if (equals === null) {
804 return new _LinkedHashSet(); 804 return new _LinkedHashSet();
805 } 805 }
806 hashCode = _defaultHashCode; 806 hashCode = dart.closureWrap(_defaultHashCode, "(E) → int");
807 } else { 807 } else {
808 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) { 808 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) && dart.notNull(core.identical(core.identical, equals))) {
809 return new _LinkedIdentityHashSet(); 809 return new _LinkedIdentityHashSet();
810 } 810 }
811 if (equals === null) { 811 if (equals === null) {
812 equals = _defaultEquals; 812 equals = dart.closureWrap(_defaultEquals, "(E, E) → bool");
813 } 813 }
814 } 814 }
815 } else { 815 } else {
816 if (hashCode === null) { 816 if (hashCode === null) {
817 hashCode = _defaultHashCode; 817 hashCode = dart.closureWrap(_defaultHashCode, "(E) → int");
818 } 818 }
819 if (equals === null) { 819 if (equals === null) {
820 equals = _defaultEquals; 820 equals = dart.closureWrap(_defaultEquals, "(E, E) → bool");
821 } 821 }
822 } 822 }
823 return new _LinkedCustomHashSet(equals, hashCode, isValidKey); 823 return new _LinkedCustomHashSet(equals, hashCode, isValidKey);
824 } 824 }
825 LinkedHashSet$identity() { 825 LinkedHashSet$identity() {
826 return new _LinkedIdentityHashSet(); 826 return new _LinkedIdentityHashSet();
827 } 827 }
828 LinkedHashSet$from(elements) { 828 LinkedHashSet$from(elements) {
829 let result = new LinkedHashSet(); 829 let result = new LinkedHashSet();
830 for (let element of elements) { 830 for (let element of elements) {
(...skipping 24 matching lines...) Expand all
855 super.IterableBase(); 855 super.IterableBase();
856 this[_next] = this[_previous] = this; 856 this[_next] = this[_previous] = this;
857 } 857 }
858 addFirst(entry) { 858 addFirst(entry) {
859 this[_insertAfter](this, entry); 859 this[_insertAfter](this, entry);
860 } 860 }
861 add(entry) { 861 add(entry) {
862 this[_insertAfter](this[_previous], entry); 862 this[_insertAfter](this[_previous], entry);
863 } 863 }
864 addAll(entries) { 864 addAll(entries) {
865 entries.forEach(((entry) => this[_insertAfter](this[_previous], dart.as( entry, E))).bind(this)); 865 entries.forEach(dart.closureWrap(((entry) => this[_insertAfter](this[_pr evious], dart.as(entry, E))).bind(this), "(E) → void"));
866 } 866 }
867 remove(entry) { 867 remove(entry) {
868 if (!dart.equals(entry[_list], this)) 868 if (!dart.equals(entry[_list], this))
869 return false; 869 return false;
870 this[_unlink](entry); 870 this[_unlink](entry);
871 return true; 871 return true;
872 } 872 }
873 get iterator() { 873 get iterator() {
874 return new _LinkedListIterator(this); 874 return new _LinkedListIterator(this);
875 } 875 }
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 if (this.length === 0) 1155 if (this.length === 0)
1156 return ""; 1156 return "";
1157 let buffer = new core.StringBuffer(); 1157 let buffer = new core.StringBuffer();
1158 buffer.writeAll(this, separator); 1158 buffer.writeAll(this, separator);
1159 return buffer.toString(); 1159 return buffer.toString();
1160 } 1160 }
1161 where(test) { 1161 where(test) {
1162 return new _internal.WhereIterable(this, test); 1162 return new _internal.WhereIterable(this, test);
1163 } 1163 }
1164 map(f) { 1164 map(f) {
1165 return new _internal.MappedListIterable(this, dart.as(f, dart.throw_("Un implemented type (dynamic) → dynamic"))); 1165 return new _internal.MappedListIterable(this, f);
1166 } 1166 }
1167 expand(f) { 1167 expand(f) {
1168 return new _internal.ExpandIterable(this, f); 1168 return new _internal.ExpandIterable(this, f);
1169 } 1169 }
1170 reduce(combine) { 1170 reduce(combine) {
1171 let length = this.length; 1171 let length = this.length;
1172 if (length === 0) 1172 if (length === 0)
1173 throw _internal.IterableElementError.noElement(); 1173 throw _internal.IterableElementError.noElement();
1174 let value = this.get(0); 1174 let value = this.get(0);
1175 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1175 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1176 value = combine(value, this.get(i)); 1176 value = combine(value, this.get(i));
1177 if (length !== this.length) { 1177 if (length !== this.length) {
1178 throw new core.ConcurrentModificationError(this); 1178 throw new core.ConcurrentModificationError(this);
1179 } 1179 }
1180 } 1180 }
1181 return value; 1181 return value;
1182 } 1182 }
1183 fold(initialValue, combine) { 1183 fold(initialValue, combine) {
1184 let value = initialValue; 1184 let value = initialValue;
1185 let length = this.length; 1185 let length = this.length;
1186 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1186 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1187 value = combine(value, this.get(i)); 1187 value = dart.dinvokef(combine, value, this.get(i));
1188 if (length !== this.length) { 1188 if (length !== this.length) {
1189 throw new core.ConcurrentModificationError(this); 1189 throw new core.ConcurrentModificationError(this);
1190 } 1190 }
1191 } 1191 }
1192 return value; 1192 return value;
1193 } 1193 }
1194 skip(count) { 1194 skip(count) {
1195 return new _internal.SubListIterable(this, count, null); 1195 return new _internal.SubListIterable(this, count, null);
1196 } 1196 }
1197 skipWhile(test) { 1197 skipWhile(test) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
1238 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) { 1238 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) {
1239 if (dart.equals(this.get(i), element)) { 1239 if (dart.equals(this.get(i), element)) {
1240 this.setRange(i, dart.notNull(this.length) - 1, this, dart.notNull(i ) + 1); 1240 this.setRange(i, dart.notNull(this.length) - 1, this, dart.notNull(i ) + 1);
1241 this.length = 1; 1241 this.length = 1;
1242 return true; 1242 return true;
1243 } 1243 }
1244 } 1244 }
1245 return false; 1245 return false;
1246 } 1246 }
1247 removeWhere(test) { 1247 removeWhere(test) {
1248 _filter(this, dart.as(test, dart.throw_("Unimplemented type (dynamic) → bool")), false); 1248 _filter(this, test, false);
1249 } 1249 }
1250 retainWhere(test) { 1250 retainWhere(test) {
1251 _filter(this, dart.as(test, dart.throw_("Unimplemented type (dynamic) → bool")), true); 1251 _filter(this, test, true);
1252 } 1252 }
1253 static [_filter](source, test, retainMatching) { 1253 static [_filter](source, test, retainMatching) {
1254 let retained = new List.from([]); 1254 let retained = new List.from([]);
1255 let length = source.length; 1255 let length = source.length;
1256 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1256 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1257 let element = source.get(i); 1257 let element = source.get(i);
1258 if (test(element) === retainMatching) { 1258 if (dart.dinvokef(test, element) === retainMatching) {
1259 retained.add(element); 1259 retained.add(element);
1260 } 1260 }
1261 if (length !== source.length) { 1261 if (length !== source.length) {
1262 throw new core.ConcurrentModificationError(source); 1262 throw new core.ConcurrentModificationError(source);
1263 } 1263 }
1264 } 1264 }
1265 if (retained.length !== source.length) { 1265 if (retained.length !== source.length) {
1266 source.setRange(0, retained.length, retained); 1266 source.setRange(0, retained.length, retained);
1267 source.length = retained.length; 1267 source.length = retained.length;
1268 } 1268 }
1269 } 1269 }
1270 clear() { 1270 clear() {
1271 this.length = 0; 1271 this.length = 0;
1272 } 1272 }
1273 removeLast() { 1273 removeLast() {
1274 if (this.length === 0) { 1274 if (this.length === 0) {
1275 throw _internal.IterableElementError.noElement(); 1275 throw _internal.IterableElementError.noElement();
1276 } 1276 }
1277 let result = this.get(dart.notNull(this.length) - 1); 1277 let result = this.get(dart.notNull(this.length) - 1);
1278 this.length = dart.notNull(this.length) - 1; 1278 this.length = dart.notNull(this.length) - 1;
1279 return result; 1279 return result;
1280 } 1280 }
1281 sort(compare) { 1281 sort(compare) {
1282 if (compare === void 0) 1282 if (compare === void 0)
1283 compare = null; 1283 compare = null;
1284 if (compare === null) { 1284 if (compare === null) {
1285 let defaultCompare = core.Comparable.compare; 1285 let defaultCompare = core.Comparable.compare;
1286 compare = defaultCompare; 1286 compare = defaultCompare;
1287 } 1287 }
1288 _internal.Sort.sort(this, dart.as(compare, dart.throw_("Unimplemented ty pe (dynamic, dynamic) → int"))); 1288 _internal.Sort.sort(this, compare);
1289 } 1289 }
1290 shuffle(random) { 1290 shuffle(random) {
1291 if (random === void 0) 1291 if (random === void 0)
1292 random = null; 1292 random = null;
1293 if (random === null) 1293 if (random === null)
1294 random = new math.Random(); 1294 random = new math.Random();
1295 let length = this.length; 1295 let length = this.length;
1296 while (dart.notNull(length) > 1) { 1296 while (dart.notNull(length) > 1) {
1297 let pos = random.nextInt(length); 1297 let pos = random.nextInt(length);
1298 length = 1; 1298 length = 1;
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 map.set(key, v); 1699 map.set(key, v);
1700 return v; 1700 return v;
1701 } 1701 }
1702 static clear(map) { 1702 static clear(map) {
1703 for (let k of map.keys.toList()) { 1703 for (let k of map.keys.toList()) {
1704 map.remove(k); 1704 map.remove(k);
1705 } 1705 }
1706 } 1706 }
1707 static forEach(map, f) { 1707 static forEach(map, f) {
1708 for (let k of map.keys) { 1708 for (let k of map.keys) {
1709 f(k, map.get(k)); 1709 dart.dinvokef(f, k, map.get(k));
1710 } 1710 }
1711 } 1711 }
1712 static getValues(map) { 1712 static getValues(map) {
1713 return map.keys.map((key) => map.get(key)); 1713 return map.keys.map((key) => map.get(key));
1714 } 1714 }
1715 static length(map) { 1715 static length(map) {
1716 return map.keys.length; 1716 return map.keys.length;
1717 } 1717 }
1718 static isEmpty(map) { 1718 static isEmpty(map) {
1719 return map.keys.isEmpty; 1719 return map.keys.isEmpty;
(...skipping 28 matching lines...) Expand all
1748 } 1748 }
1749 static [_id](x) { 1749 static [_id](x) {
1750 return x; 1750 return x;
1751 } 1751 }
1752 static [_fillMapWithMappedIterable](map, iterable, key, value) { 1752 static [_fillMapWithMappedIterable](map, iterable, key, value) {
1753 if (key === null) 1753 if (key === null)
1754 key = _id; 1754 key = _id;
1755 if (value === null) 1755 if (value === null)
1756 value = _id; 1756 value = _id;
1757 for (let element of iterable) { 1757 for (let element of iterable) {
1758 map.set(key(element), value(element)); 1758 map.set(dart.dinvokef(key, element), dart.dinvokef(value, element));
1759 } 1759 }
1760 } 1760 }
1761 static [_fillMapWithIterables](map, keys, values) { 1761 static [_fillMapWithIterables](map, keys, values) {
1762 let keyIterator = keys.iterator; 1762 let keyIterator = keys.iterator;
1763 let valueIterator = values.iterator; 1763 let valueIterator = values.iterator;
1764 let hasNextKey = keyIterator.moveNext(); 1764 let hasNextKey = keyIterator.moveNext();
1765 let hasNextValue = valueIterator.moveNext(); 1765 let hasNextValue = valueIterator.moveNext();
1766 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { 1766 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) {
1767 map.set(keyIterator.current, valueIterator.current); 1767 map.set(keyIterator.current, valueIterator.current);
1768 hasNextKey = keyIterator.moveNext(); 1768 hasNextKey = keyIterator.moveNext();
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after
2439 } 2439 }
2440 let value = iterator.current; 2440 let value = iterator.current;
2441 while (iterator.moveNext()) { 2441 while (iterator.moveNext()) {
2442 value = combine(value, iterator.current); 2442 value = combine(value, iterator.current);
2443 } 2443 }
2444 return value; 2444 return value;
2445 } 2445 }
2446 fold(initialValue, combine) { 2446 fold(initialValue, combine) {
2447 let value = initialValue; 2447 let value = initialValue;
2448 for (let element of this) 2448 for (let element of this)
2449 value = combine(value, element); 2449 value = dart.dinvokef(combine, value, element);
2450 return value; 2450 return value;
2451 } 2451 }
2452 every(f) { 2452 every(f) {
2453 for (let element of this) { 2453 for (let element of this) {
2454 if (!dart.notNull(f(element))) 2454 if (!dart.notNull(f(element)))
2455 return false; 2455 return false;
2456 } 2456 }
2457 return true; 2457 return true;
2458 } 2458 }
2459 join(separator) { 2459 join(separator) {
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
2807 return this[_comparator](key1, key2); 2807 return this[_comparator](key1, key2);
2808 } 2808 }
2809 SplayTreeMap$_internal() { 2809 SplayTreeMap$_internal() {
2810 this[_comparator] = null; 2810 this[_comparator] = null;
2811 this[_validKey] = null; 2811 this[_validKey] = null;
2812 super._SplayTree(); 2812 super._SplayTree();
2813 } 2813 }
2814 get(key) { 2814 get(key) {
2815 if (key === null) 2815 if (key === null)
2816 throw new core.ArgumentError(key); 2816 throw new core.ArgumentError(key);
2817 if (!dart.notNull(this[_validKey](key))) 2817 if (!dart.notNull(dart.dinvokef(this[_validKey], key)))
2818 return null; 2818 return null;
2819 if (this[_root] !== null) { 2819 if (this[_root] !== null) {
2820 let comp = this[_splay](dart.as(key, K)); 2820 let comp = this[_splay](dart.as(key, K));
2821 if (comp === 0) { 2821 if (comp === 0) {
2822 let mapRoot = dart.as(this[_root], _SplayTreeMapNode); 2822 let mapRoot = dart.as(this[_root], _SplayTreeMapNode);
2823 return dart.as(mapRoot.value, V); 2823 return dart.as(mapRoot.value, V);
2824 } 2824 }
2825 } 2825 }
2826 return null; 2826 return null;
2827 } 2827 }
2828 remove(key) { 2828 remove(key) {
2829 if (!dart.notNull(this[_validKey](key))) 2829 if (!dart.notNull(dart.dinvokef(this[_validKey], key)))
2830 return null; 2830 return null;
2831 let mapRoot = dart.as(this[_remove](dart.as(key, K)), _SplayTreeMapNode) ; 2831 let mapRoot = dart.as(this[_remove](dart.as(key, K)), _SplayTreeMapNode) ;
2832 if (mapRoot !== null) 2832 if (mapRoot !== null)
2833 return dart.as(mapRoot.value, V); 2833 return dart.as(mapRoot.value, V);
2834 return null; 2834 return null;
2835 } 2835 }
2836 set(key, value) { 2836 set(key, value) {
2837 if (key === null) 2837 if (key === null)
2838 throw new core.ArgumentError(key); 2838 throw new core.ArgumentError(key);
2839 let comp = this[_splay](key); 2839 let comp = this[_splay](key);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
2883 f(node.key, node.value); 2883 f(node.key, node.value);
2884 } 2884 }
2885 } 2885 }
2886 get length() { 2886 get length() {
2887 return this[_count]; 2887 return this[_count];
2888 } 2888 }
2889 clear() { 2889 clear() {
2890 this[_clear](); 2890 this[_clear]();
2891 } 2891 }
2892 containsKey(key) { 2892 containsKey(key) {
2893 return dart.notNull(this[_validKey](key)) && this[_splay](dart.as(key, K )) === 0; 2893 return dart.notNull(dart.dinvokef(this[_validKey], key)) && this[_splay] (dart.as(key, K)) === 0;
2894 } 2894 }
2895 containsValue(value) { 2895 containsValue(value) {
2896 let found = false; 2896 let found = false;
2897 let initialSplayCount = this[_splayCount]; 2897 let initialSplayCount = this[_splayCount];
2898 // Function visit: (_SplayTreeMapNode<dynamic, dynamic>) → bool 2898 // Function visit: (_SplayTreeMapNode<dynamic, dynamic>) → bool
2899 function visit(node) { 2899 function visit(node) {
2900 while (node !== null) { 2900 while (node !== null) {
2901 if (dart.equals(node.value, value)) 2901 if (dart.equals(node.value, value))
2902 return true; 2902 return true;
2903 if (initialSplayCount !== this[_splayCount]) { 2903 if (initialSplayCount !== this[_splayCount]) {
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
3147 compare = null; 3147 compare = null;
3148 if (isValidKey === void 0) 3148 if (isValidKey === void 0)
3149 isValidKey = null; 3149 isValidKey = null;
3150 let result = new SplayTreeSet(compare, isValidKey); 3150 let result = new SplayTreeSet(compare, isValidKey);
3151 for (let element of elements) { 3151 for (let element of elements) {
3152 result.add(element); 3152 result.add(element);
3153 } 3153 }
3154 return result; 3154 return result;
3155 } 3155 }
3156 [_compare](e1, e2) { 3156 [_compare](e1, e2) {
3157 return this[_comparator](e1, e2); 3157 return dart.dinvokef(this[_comparator], e1, e2);
3158 } 3158 }
3159 get iterator() { 3159 get iterator() {
3160 return new _SplayTreeKeyIterator(this); 3160 return new _SplayTreeKeyIterator(this);
3161 } 3161 }
3162 get length() { 3162 get length() {
3163 return this[_count]; 3163 return this[_count];
3164 } 3164 }
3165 get isEmpty() { 3165 get isEmpty() {
3166 return this[_root] === null; 3166 return this[_root] === null;
3167 } 3167 }
(...skipping 11 matching lines...) Expand all
3179 return dart.as(this[_last].key, E); 3179 return dart.as(this[_last].key, E);
3180 } 3180 }
3181 get single() { 3181 get single() {
3182 if (this[_count] === 0) 3182 if (this[_count] === 0)
3183 throw _internal.IterableElementError.noElement(); 3183 throw _internal.IterableElementError.noElement();
3184 if (dart.notNull(this[_count]) > 1) 3184 if (dart.notNull(this[_count]) > 1)
3185 throw _internal.IterableElementError.tooMany(); 3185 throw _internal.IterableElementError.tooMany();
3186 return this[_root].key; 3186 return this[_root].key;
3187 } 3187 }
3188 contains(object) { 3188 contains(object) {
3189 return dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obj ect, E)) === 0; 3189 return dart.notNull(dart.dinvokef(this[_validKey], object)) && this[_spl ay](dart.as(object, E)) === 0;
3190 } 3190 }
3191 add(element) { 3191 add(element) {
3192 let compare = this[_splay](element); 3192 let compare = this[_splay](element);
3193 if (compare === 0) 3193 if (compare === 0)
3194 return false; 3194 return false;
3195 this[_addNewRoot](dart.as(new _SplayTreeNode(element), _SplayTreeNode$(E )), compare); 3195 this[_addNewRoot](dart.as(new _SplayTreeNode(element), _SplayTreeNode$(E )), compare);
3196 return true; 3196 return true;
3197 } 3197 }
3198 remove(object) { 3198 remove(object) {
3199 if (!dart.notNull(this[_validKey](object))) 3199 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
3200 return false; 3200 return false;
3201 return this[_remove](dart.as(object, E)) !== null; 3201 return this[_remove](dart.as(object, E)) !== null;
3202 } 3202 }
3203 addAll(elements) { 3203 addAll(elements) {
3204 for (let element of elements) { 3204 for (let element of elements) {
3205 let compare = this[_splay](element); 3205 let compare = this[_splay](element);
3206 if (compare !== 0) { 3206 if (compare !== 0) {
3207 this[_addNewRoot](dart.as(new _SplayTreeNode(element), _SplayTreeNod e$(E)), compare); 3207 this[_addNewRoot](dart.as(new _SplayTreeNode(element), _SplayTreeNod e$(E)), compare);
3208 } 3208 }
3209 } 3209 }
3210 } 3210 }
3211 removeAll(elements) { 3211 removeAll(elements) {
3212 for (let element of elements) { 3212 for (let element of elements) {
3213 if (this[_validKey](element)) 3213 if (dart.dinvokef(this[_validKey], element))
3214 this[_remove](dart.as(element, E)); 3214 this[_remove](dart.as(element, E));
3215 } 3215 }
3216 } 3216 }
3217 retainAll(elements) { 3217 retainAll(elements) {
3218 let retainSet = new SplayTreeSet(this[_comparator], this[_validKey]); 3218 let retainSet = new SplayTreeSet(dart.closureWrap(this[_comparator], "(E , E) → int"), this[_validKey]);
3219 let modificationCount = this[_modificationCount]; 3219 let modificationCount = this[_modificationCount];
3220 for (let object of elements) { 3220 for (let object of elements) {
3221 if (modificationCount !== this[_modificationCount]) { 3221 if (modificationCount !== this[_modificationCount]) {
3222 throw new core.ConcurrentModificationError(this); 3222 throw new core.ConcurrentModificationError(this);
3223 } 3223 }
3224 if (dart.notNull(this[_validKey](object)) && this[_splay](dart.as(obje ct, E)) === 0) 3224 if (dart.notNull(dart.dinvokef(this[_validKey], object)) && this[_spla y](dart.as(object, E)) === 0)
3225 retainSet.add(this[_root].key); 3225 retainSet.add(this[_root].key);
3226 } 3226 }
3227 if (retainSet[_count] !== this[_count]) { 3227 if (retainSet[_count] !== this[_count]) {
3228 this[_root] = retainSet[_root]; 3228 this[_root] = retainSet[_root];
3229 this[_count] = retainSet[_count]; 3229 this[_count] = retainSet[_count];
3230 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 3230 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
3231 } 3231 }
3232 } 3232 }
3233 lookup(object) { 3233 lookup(object) {
3234 if (!dart.notNull(this[_validKey](object))) 3234 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
3235 return null; 3235 return null;
3236 let comp = this[_splay](dart.as(object, E)); 3236 let comp = this[_splay](dart.as(object, E));
3237 if (comp !== 0) 3237 if (comp !== 0)
3238 return null; 3238 return null;
3239 return this[_root].key; 3239 return this[_root].key;
3240 } 3240 }
3241 intersection(other) { 3241 intersection(other) {
3242 let result = new SplayTreeSet(this[_comparator], this[_validKey]); 3242 let result = new SplayTreeSet(dart.closureWrap(this[_comparator], "(E, E ) → int"), this[_validKey]);
3243 for (let element of this) { 3243 for (let element of this) {
3244 if (other.contains(element)) 3244 if (other.contains(element))
3245 result.add(element); 3245 result.add(element);
3246 } 3246 }
3247 return result; 3247 return result;
3248 } 3248 }
3249 difference(other) { 3249 difference(other) {
3250 let result = new SplayTreeSet(this[_comparator], this[_validKey]); 3250 let result = new SplayTreeSet(dart.closureWrap(this[_comparator], "(E, E ) → int"), this[_validKey]);
3251 for (let element of this) { 3251 for (let element of this) {
3252 if (!dart.notNull(other.contains(element))) 3252 if (!dart.notNull(other.contains(element)))
3253 result.add(element); 3253 result.add(element);
3254 } 3254 }
3255 return result; 3255 return result;
3256 } 3256 }
3257 union(other) { 3257 union(other) {
3258 return ((_) => { 3258 return ((_) => {
3259 _.addAll(other); 3259 _.addAll(other);
3260 return _; 3260 return _;
3261 }).bind(this)(this[_clone]()); 3261 }).bind(this)(this[_clone]());
3262 } 3262 }
3263 [_clone]() { 3263 [_clone]() {
3264 let set = new SplayTreeSet(this[_comparator], this[_validKey]); 3264 let set = new SplayTreeSet(dart.closureWrap(this[_comparator], "(E, E) → int"), this[_validKey]);
3265 set[_count] = this[_count]; 3265 set[_count] = this[_count];
3266 set[_root] = this[_copyNode](this[_root]); 3266 set[_root] = this[_copyNode](this[_root]);
3267 return set; 3267 return set;
3268 } 3268 }
3269 [_copyNode](node) { 3269 [_copyNode](node) {
3270 if (node === null) 3270 if (node === null)
3271 return null; 3271 return null;
3272 return ((_) => { 3272 return ((_) => {
3273 _.left = this[_copyNode](node.left); 3273 _.left = this[_copyNode](node.left);
3274 _.right = this[_copyNode](node.right); 3274 _.right = this[_copyNode](node.right);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
3323 get isEmpty() { 3323 get isEmpty() {
3324 return this[_length] === 0; 3324 return this[_length] === 0;
3325 } 3325 }
3326 get isNotEmpty() { 3326 get isNotEmpty() {
3327 return !dart.notNull(this.isEmpty); 3327 return !dart.notNull(this.isEmpty);
3328 } 3328 }
3329 get keys() { 3329 get keys() {
3330 return new HashMapKeyIterable(this); 3330 return new HashMapKeyIterable(this);
3331 } 3331 }
3332 get values() { 3332 get values() {
3333 return new _internal.MappedIterable(this.keys, ((each) => this.get(each) ).bind(this)); 3333 return new _internal.MappedIterable(this.keys, dart.closureWrap(((each) => this.get(each)).bind(this), "(K) → V"));
3334 } 3334 }
3335 containsKey(key) { 3335 containsKey(key) {
3336 if (_isStringKey(key)) { 3336 if (_isStringKey(key)) {
3337 let strings = this[_strings]; 3337 let strings = this[_strings];
3338 return strings === null ? false : _hasTableEntry(strings, key); 3338 return strings === null ? false : _hasTableEntry(strings, key);
3339 } else if (_isNumericKey(key)) { 3339 } else if (_isNumericKey(key)) {
3340 let nums = this[_nums]; 3340 let nums = this[_nums];
3341 return nums === null ? false : _hasTableEntry(nums, key); 3341 return nums === null ? false : _hasTableEntry(nums, key);
3342 } else { 3342 } else {
3343 return this[_containsKey](key); 3343 return this[_containsKey](key);
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
3593 let _hashCode = Symbol('_hashCode'); 3593 let _hashCode = Symbol('_hashCode');
3594 let _CustomHashMap$ = dart.generic(function(K, V) { 3594 let _CustomHashMap$ = dart.generic(function(K, V) {
3595 class _CustomHashMap extends _HashMap$(K, V) { 3595 class _CustomHashMap extends _HashMap$(K, V) {
3596 _CustomHashMap($_equals, $_hashCode, validKey) { 3596 _CustomHashMap($_equals, $_hashCode, validKey) {
3597 this[_equals] = $_equals; 3597 this[_equals] = $_equals;
3598 this[_hashCode] = $_hashCode; 3598 this[_hashCode] = $_hashCode;
3599 this[_validKey] = dart.as(validKey !== null ? validKey : (v) => dart.is( v, K), _Predicate); 3599 this[_validKey] = dart.as(validKey !== null ? validKey : (v) => dart.is( v, K), _Predicate);
3600 super._HashMap(); 3600 super._HashMap();
3601 } 3601 }
3602 get(key) { 3602 get(key) {
3603 if (!dart.notNull(this[_validKey](key))) 3603 if (!dart.notNull(dart.dinvokef(this[_validKey], key)))
3604 return null; 3604 return null;
3605 return super._get(key); 3605 return super._get(key);
3606 } 3606 }
3607 set(key, value) { 3607 set(key, value) {
3608 super._set(key, value); 3608 super._set(key, value);
3609 } 3609 }
3610 containsKey(key) { 3610 containsKey(key) {
3611 if (!dart.notNull(this[_validKey](key))) 3611 if (!dart.notNull(dart.dinvokef(this[_validKey], key)))
3612 return false; 3612 return false;
3613 return super._containsKey(key); 3613 return super._containsKey(key);
3614 } 3614 }
3615 remove(key) { 3615 remove(key) {
3616 if (!dart.notNull(this[_validKey](key))) 3616 if (!dart.notNull(dart.dinvokef(this[_validKey], key)))
3617 return null; 3617 return null;
3618 return super._remove(key); 3618 return super._remove(key);
3619 } 3619 }
3620 [_computeHashCode](key) { 3620 [_computeHashCode](key) {
3621 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; 3621 return this[_hashCode](dart.as(key, K)) & 0x3ffffff;
3622 } 3622 }
3623 [_findBucketIndex](bucket, key) { 3623 [_findBucketIndex](bucket, key) {
3624 if (bucket === null) 3624 if (bucket === null)
3625 return -1; 3625 return -1;
3626 let length = bucket.length; 3626 let length = bucket.length;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
3721 get isEmpty() { 3721 get isEmpty() {
3722 return this[_length] === 0; 3722 return this[_length] === 0;
3723 } 3723 }
3724 get isNotEmpty() { 3724 get isNotEmpty() {
3725 return !dart.notNull(this.isEmpty); 3725 return !dart.notNull(this.isEmpty);
3726 } 3726 }
3727 get keys() { 3727 get keys() {
3728 return new LinkedHashMapKeyIterable(this); 3728 return new LinkedHashMapKeyIterable(this);
3729 } 3729 }
3730 get values() { 3730 get values() {
3731 return new _internal.MappedIterable(this.keys, ((each) => this.get(each) ).bind(this)); 3731 return new _internal.MappedIterable(this.keys, dart.closureWrap(((each) => this.get(each)).bind(this), "(K) → V"));
3732 } 3732 }
3733 containsKey(key) { 3733 containsKey(key) {
3734 if (_isStringKey(key)) { 3734 if (_isStringKey(key)) {
3735 let strings = this[_strings]; 3735 let strings = this[_strings];
3736 if (strings === null) 3736 if (strings === null)
3737 return false; 3737 return false;
3738 let cell = dart.as(_getTableEntry(strings, key), LinkedHashMapCell); 3738 let cell = dart.as(_getTableEntry(strings, key), LinkedHashMapCell);
3739 return cell !== null; 3739 return cell !== null;
3740 } else if (_isNumericKey(key)) { 3740 } else if (_isNumericKey(key)) {
3741 let nums = this[_nums]; 3741 let nums = this[_nums];
3742 if (nums === null) 3742 if (nums === null)
3743 return false; 3743 return false;
3744 let cell = dart.as(_getTableEntry(nums, key), LinkedHashMapCell); 3744 let cell = dart.as(_getTableEntry(nums, key), LinkedHashMapCell);
3745 return cell !== null; 3745 return cell !== null;
3746 } else { 3746 } else {
3747 return this[_containsKey](key); 3747 return this[_containsKey](key);
3748 } 3748 }
3749 } 3749 }
3750 [_containsKey](key) { 3750 [_containsKey](key) {
3751 let rest = this[_rest]; 3751 let rest = this[_rest];
3752 if (rest === null) 3752 if (rest === null)
3753 return false; 3753 return false;
3754 let bucket = this[_getBucket](rest, key); 3754 let bucket = this[_getBucket](rest, key);
3755 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; 3755 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0;
3756 } 3756 }
3757 containsValue(value) { 3757 containsValue(value) {
3758 return this.keys.any(((each) => dart.equals(this.get(each), value)).bind (this)); 3758 return this.keys.any(dart.closureWrap(((each) => dart.equals(this.get(ea ch), value)).bind(this), "(K) → bool"));
3759 } 3759 }
3760 addAll(other) { 3760 addAll(other) {
3761 other.forEach(((key, value) => { 3761 other.forEach(((key, value) => {
3762 this.set(key, value); 3762 this.set(key, value);
3763 }).bind(this)); 3763 }).bind(this));
3764 } 3764 }
3765 get(key) { 3765 get(key) {
3766 if (_isStringKey(key)) { 3766 if (_isStringKey(key)) {
3767 let strings = this[_strings]; 3767 let strings = this[_strings];
3768 if (strings === null) 3768 if (strings === null)
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
3993 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(dart.dynamic, dart.dynami c); 3993 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(dart.dynamic, dart.dynami c);
3994 let _LinkedCustomHashMap$ = dart.generic(function(K, V) { 3994 let _LinkedCustomHashMap$ = dart.generic(function(K, V) {
3995 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) { 3995 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) {
3996 _LinkedCustomHashMap($_equals, $_hashCode, validKey) { 3996 _LinkedCustomHashMap($_equals, $_hashCode, validKey) {
3997 this[_equals] = $_equals; 3997 this[_equals] = $_equals;
3998 this[_hashCode] = $_hashCode; 3998 this[_hashCode] = $_hashCode;
3999 this[_validKey] = dart.as(validKey !== null ? validKey : (v) => dart.is( v, K), _Predicate); 3999 this[_validKey] = dart.as(validKey !== null ? validKey : (v) => dart.is( v, K), _Predicate);
4000 super._LinkedHashMap(); 4000 super._LinkedHashMap();
4001 } 4001 }
4002 get(key) { 4002 get(key) {
4003 if (!dart.notNull(this[_validKey](key))) 4003 if (!dart.notNull(dart.dinvokef(this[_validKey], key)))
4004 return null; 4004 return null;
4005 return super._get(key); 4005 return super._get(key);
4006 } 4006 }
4007 set(key, value) { 4007 set(key, value) {
4008 super._set(key, value); 4008 super._set(key, value);
4009 } 4009 }
4010 containsKey(key) { 4010 containsKey(key) {
4011 if (!dart.notNull(this[_validKey](key))) 4011 if (!dart.notNull(dart.dinvokef(this[_validKey], key)))
4012 return false; 4012 return false;
4013 return super._containsKey(key); 4013 return super._containsKey(key);
4014 } 4014 }
4015 remove(key) { 4015 remove(key) {
4016 if (!dart.notNull(this[_validKey](key))) 4016 if (!dart.notNull(dart.dinvokef(this[_validKey], key)))
4017 return null; 4017 return null;
4018 return super._remove(key); 4018 return super._remove(key);
4019 } 4019 }
4020 [_computeHashCode](key) { 4020 [_computeHashCode](key) {
4021 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; 4021 return this[_hashCode](dart.as(key, K)) & 0x3ffffff;
4022 } 4022 }
4023 [_findBucketIndex](bucket, key) { 4023 [_findBucketIndex](bucket, key) {
4024 if (bucket === null) 4024 if (bucket === null)
4025 return -1; 4025 return -1;
4026 let length = bucket.length; 4026 let length = bucket.length;
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
4386 } 4386 }
4387 return -1; 4387 return -1;
4388 } 4388 }
4389 [_computeHashCode](element) { 4389 [_computeHashCode](element) {
4390 return this[_hasher](dart.as(element, E)) & 0x3ffffff; 4390 return this[_hasher](dart.as(element, E)) & 0x3ffffff;
4391 } 4391 }
4392 add(object) { 4392 add(object) {
4393 return super._add(object); 4393 return super._add(object);
4394 } 4394 }
4395 contains(object) { 4395 contains(object) {
4396 if (!dart.notNull(this[_validKey](object))) 4396 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
4397 return false; 4397 return false;
4398 return super._contains(object); 4398 return super._contains(object);
4399 } 4399 }
4400 lookup(object) { 4400 lookup(object) {
4401 if (!dart.notNull(this[_validKey](object))) 4401 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
4402 return null; 4402 return null;
4403 return super._lookup(object); 4403 return super._lookup(object);
4404 } 4404 }
4405 remove(object) { 4405 remove(object) {
4406 if (!dart.notNull(this[_validKey](object))) 4406 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
4407 return false; 4407 return false;
4408 return super._remove(object); 4408 return super._remove(object);
4409 } 4409 }
4410 } 4410 }
4411 return _CustomHashSet; 4411 return _CustomHashSet;
4412 }); 4412 });
4413 let _CustomHashSet = _CustomHashSet$(dart.dynamic); 4413 let _CustomHashSet = _CustomHashSet$(dart.dynamic);
4414 let HashSetIterator$ = dart.generic(function(E) { 4414 let HashSetIterator$ = dart.generic(function(E) {
4415 class HashSetIterator extends core.Object { 4415 class HashSetIterator extends core.Object {
4416 HashSetIterator($_set, $_elements) { 4416 HashSetIterator($_set, $_elements) {
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
4756 } 4756 }
4757 return -1; 4757 return -1;
4758 } 4758 }
4759 [_computeHashCode](element) { 4759 [_computeHashCode](element) {
4760 return this[_hasher](dart.as(element, E)) & 0x3ffffff; 4760 return this[_hasher](dart.as(element, E)) & 0x3ffffff;
4761 } 4761 }
4762 add(element) { 4762 add(element) {
4763 return super._add(element); 4763 return super._add(element);
4764 } 4764 }
4765 contains(object) { 4765 contains(object) {
4766 if (!dart.notNull(this[_validKey](object))) 4766 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
4767 return false; 4767 return false;
4768 return super._contains(object); 4768 return super._contains(object);
4769 } 4769 }
4770 lookup(object) { 4770 lookup(object) {
4771 if (!dart.notNull(this[_validKey](object))) 4771 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
4772 return null; 4772 return null;
4773 return super._lookup(object); 4773 return super._lookup(object);
4774 } 4774 }
4775 remove(object) { 4775 remove(object) {
4776 if (!dart.notNull(this[_validKey](object))) 4776 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
4777 return false; 4777 return false;
4778 return super._remove(object); 4778 return super._remove(object);
4779 } 4779 }
4780 containsAll(elements) { 4780 containsAll(elements) {
4781 for (let element of elements) { 4781 for (let element of elements) {
4782 if (!dart.notNull(this[_validKey](element)) || !dart.notNull(this.cont ains(element))) 4782 if (!dart.notNull(dart.dinvokef(this[_validKey], element)) || !dart.no tNull(this.contains(element)))
4783 return false; 4783 return false;
4784 } 4784 }
4785 return true; 4785 return true;
4786 } 4786 }
4787 removeAll(elements) { 4787 removeAll(elements) {
4788 for (let element of elements) { 4788 for (let element of elements) {
4789 if (this[_validKey](element)) { 4789 if (dart.dinvokef(this[_validKey], element)) {
4790 super._remove(element); 4790 super._remove(element);
4791 } 4791 }
4792 } 4792 }
4793 } 4793 }
4794 } 4794 }
4795 return _LinkedCustomHashSet; 4795 return _LinkedCustomHashSet;
4796 }); 4796 });
4797 let _LinkedCustomHashSet = _LinkedCustomHashSet$(dart.dynamic); 4797 let _LinkedCustomHashSet = _LinkedCustomHashSet$(dart.dynamic);
4798 class LinkedHashSetCell extends core.Object { 4798 class LinkedHashSetCell extends core.Object {
4799 LinkedHashSetCell($_element) { 4799 LinkedHashSetCell($_element) {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
4890 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; 4890 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable;
4891 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; 4891 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$;
4892 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; 4892 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator;
4893 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; 4893 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$;
4894 exports.HashSetIterator = HashSetIterator; 4894 exports.HashSetIterator = HashSetIterator;
4895 exports.HashSetIterator$ = HashSetIterator$; 4895 exports.HashSetIterator$ = HashSetIterator$;
4896 exports.LinkedHashSetCell = LinkedHashSetCell; 4896 exports.LinkedHashSetCell = LinkedHashSetCell;
4897 exports.LinkedHashSetIterator = LinkedHashSetIterator; 4897 exports.LinkedHashSetIterator = LinkedHashSetIterator;
4898 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; 4898 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$;
4899 })(collection || (collection = {})); 4899 })(collection || (collection = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/dart/async.js ('k') | test/codegen/expect/dart/convert.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698