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

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

Issue 1059583002: Extension method support to move us closer to a valid List implementation. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 var collection; 1 var collection;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 let _source = Symbol('_source'); 4 let _source = Symbol('_source');
5 let UnmodifiableListView$ = dart.generic(function(E) { 5 let UnmodifiableListView$ = dart.generic(function(E) {
6 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { 6 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) {
7 UnmodifiableListView(source) { 7 UnmodifiableListView(source) {
8 this[_source] = source; 8 this[_source] = source;
9 super.UnmodifiableListBase(); 9 super.UnmodifiableListBase();
10 } 10 }
11 get length() { 11 get [core.$length]() {
12 return this[_source].length; 12 return this[_source][core.$length];
13 } 13 }
14 get(index) { 14 [core.$get](index) {
15 return this[_source].elementAt(index); 15 return this[_source][core.$elementAt](index);
16 } 16 }
17 } 17 }
18 return UnmodifiableListView; 18 return UnmodifiableListView;
19 }); 19 });
20 dart.defineLazyClassGeneric(exports, 'UnmodifiableListView', {get: Unmodifiabl eListView$}); 20 dart.defineLazyClassGeneric(exports, 'UnmodifiableListView', {get: Unmodifiabl eListView$});
21 // Function _defaultEquals: (dynamic, dynamic) → bool 21 // Function _defaultEquals: (dynamic, dynamic) → bool
22 function _defaultEquals(a, b) { 22 function _defaultEquals(a, b) {
23 return dart.equals(a, b); 23 return dart.equals(a, b);
24 } 24 }
25 // Function _defaultHashCode: (dynamic) → int 25 // Function _defaultHashCode: (dynamic) → int
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 dart.defineNamedConstructor(HashMap, 'identity'); 83 dart.defineNamedConstructor(HashMap, 'identity');
84 dart.defineNamedConstructor(HashMap, 'from'); 84 dart.defineNamedConstructor(HashMap, 'from');
85 dart.defineNamedConstructor(HashMap, 'fromIterable'); 85 dart.defineNamedConstructor(HashMap, 'fromIterable');
86 dart.defineNamedConstructor(HashMap, 'fromIterables'); 86 dart.defineNamedConstructor(HashMap, 'fromIterables');
87 return HashMap; 87 return HashMap;
88 }); 88 });
89 let HashMap = HashMap$(dart.dynamic, dart.dynamic); 89 let HashMap = HashMap$(dart.dynamic, dart.dynamic);
90 let _newSet = Symbol('_newSet'); 90 let _newSet = Symbol('_newSet');
91 let SetMixin$ = dart.generic(function(E) { 91 let SetMixin$ = dart.generic(function(E) {
92 class SetMixin extends core.Object { 92 class SetMixin extends core.Object {
93 get isEmpty() { 93 get [core.$isEmpty]() {
94 return this.length == 0; 94 return this.length == 0;
95 } 95 }
96 get isNotEmpty() { 96 get [core.$isNotEmpty]() {
97 return this.length != 0; 97 return this.length != 0;
98 } 98 }
99 clear() { 99 clear() {
100 this.removeAll(this.toList()); 100 this.removeAll(this.toList());
101 } 101 }
102 addAll(elements) { 102 addAll(elements) {
103 for (let element of elements) 103 for (let element of elements)
104 this.add(element); 104 this.add(element);
105 } 105 }
106 removeAll(elements) { 106 removeAll(elements) {
107 for (let element of elements) 107 for (let element of elements)
108 this.remove(element); 108 this.remove(element);
109 } 109 }
110 retainAll(elements) { 110 retainAll(elements) {
111 let toRemove = this.toSet(); 111 let toRemove = this.toSet();
112 for (let o of elements) { 112 for (let o of elements) {
113 toRemove.remove(o); 113 toRemove.remove(o);
114 } 114 }
115 this.removeAll(toRemove); 115 this.removeAll(toRemove);
116 } 116 }
117 removeWhere(test) { 117 removeWhere(test) {
118 let toRemove = new core.List.from([]); 118 let toRemove = new core.List.from([]);
119 for (let element of this) { 119 for (let element of this) {
120 if (test(element)) 120 if (test(element))
121 toRemove.add(element); 121 toRemove[core.$add](element);
122 } 122 }
123 this.removeAll(toRemove); 123 this.removeAll(toRemove);
124 } 124 }
125 retainWhere(test) { 125 retainWhere(test) {
126 let toRemove = new core.List.from([]); 126 let toRemove = new core.List.from([]);
127 for (let element of this) { 127 for (let element of this) {
128 if (!dart.notNull(test(element))) 128 if (!dart.notNull(test(element)))
129 toRemove.add(element); 129 toRemove[core.$add](element);
130 } 130 }
131 this.removeAll(toRemove); 131 this.removeAll(toRemove);
132 } 132 }
133 containsAll(other) { 133 containsAll(other) {
134 for (let o of other) { 134 for (let o of other) {
135 if (!dart.notNull(this.contains(o))) 135 if (!dart.notNull(this.contains(o)))
136 return false; 136 return false;
137 } 137 }
138 return true; 138 return true;
139 } 139 }
140 union(other) { 140 union(other) {
141 return ((_) => { 141 return ((_) => {
142 _.addAll(other); 142 _.addAll(other);
143 return _; 143 return _;
144 }).bind(this)(this.toSet()); 144 }).bind(this)(this.toSet());
145 } 145 }
146 intersection(other) { 146 intersection(other) {
147 let result = this.toSet(); 147 let result = this.toSet();
148 for (let element of this) { 148 for (let element of this) {
149 if (!dart.notNull(other.contains(element))) 149 if (!dart.notNull(other[core.$contains](element)))
150 result.remove(element); 150 result.remove(element);
151 } 151 }
152 return result; 152 return result;
153 } 153 }
154 difference(other) { 154 difference(other) {
155 let result = this.toSet(); 155 let result = this.toSet();
156 for (let element of this) { 156 for (let element of this) {
157 if (other.contains(element)) 157 if (other[core.$contains](element))
158 result.remove(element); 158 result.remove(element);
159 } 159 }
160 return result; 160 return result;
161 } 161 }
162 toList(opts) { 162 [core.$toList](opts) {
163 let growable = opts && 'growable' in opts ? opts.growable : true; 163 let growable = opts && 'growable' in opts ? opts.growable : true;
164 let result = growable ? ((_) => { 164 let result = growable ? ((_) => {
165 _.length = this.length; 165 _[core.$length] = this.length;
166 return _; 166 return _;
167 }).bind(this)(new (core.List$(E))()) : new (core.List$(E))(this.length); 167 }).bind(this)(new (core.List$(E))()) : new (core.List$(E))(this.length);
168 let i = 0; 168 let i = 0;
169 for (let element of this) 169 for (let element of this)
170 result.set(((x$) => i = dart.notNull(x$) + 1, x$)(i), element); 170 result[core.$set](((x$) => i = dart.notNull(x$) + 1, x$)(i), element);
171 return result; 171 return result;
172 } 172 }
173 map(f) { 173 [core.$map](f) {
174 return new (_internal.EfficientLengthMappedIterable$(E, dynamic))(this, f); 174 return new (_internal.EfficientLengthMappedIterable$(E, dynamic))(this, f);
175 } 175 }
176 get single() { 176 get [core.$single]() {
177 if (dart.notNull(this.length) > 1) 177 if (dart.notNull(this.length) > 1)
178 throw _internal.IterableElementError.tooMany(); 178 throw _internal.IterableElementError.tooMany();
179 let it = this.iterator; 179 let it = this.iterator;
180 if (!dart.notNull(it.moveNext())) 180 if (!dart.notNull(it.moveNext()))
181 throw _internal.IterableElementError.noElement(); 181 throw _internal.IterableElementError.noElement();
182 let result = dart.as(it.current, E); 182 let result = dart.as(it.current, E);
183 return result; 183 return result;
184 } 184 }
185 toString() { 185 toString() {
186 return IterableBase.iterableToFullString(this, '{', '}'); 186 return IterableBase.iterableToFullString(this, '{', '}');
187 } 187 }
188 where(f) { 188 [core.$where](f) {
189 return new (_internal.WhereIterable$(E))(this, f); 189 return new (_internal.WhereIterable$(E))(this, f);
190 } 190 }
191 expand(f) { 191 [core.$expand](f) {
192 return new (_internal.ExpandIterable$(E, dynamic))(this, f); 192 return new (_internal.ExpandIterable$(E, dynamic))(this, f);
193 } 193 }
194 forEach(f) { 194 [core.$forEach](f) {
195 for (let element of this) 195 for (let element of this)
196 f(element); 196 f(element);
197 } 197 }
198 reduce(combine) { 198 [core.$reduce](combine) {
199 let iterator = this.iterator; 199 let iterator = this[core.$iterator];
200 if (!dart.notNull(iterator.moveNext())) { 200 if (!dart.notNull(iterator.moveNext())) {
201 throw _internal.IterableElementError.noElement(); 201 throw _internal.IterableElementError.noElement();
202 } 202 }
203 let value = iterator.current; 203 let value = iterator.current;
204 while (iterator.moveNext()) { 204 while (iterator.moveNext()) {
205 value = combine(value, iterator.current); 205 value = combine(value, iterator.current);
206 } 206 }
207 return value; 207 return value;
208 } 208 }
209 fold(initialValue, combine) { 209 [core.$fold](initialValue, combine) {
210 let value = initialValue; 210 let value = initialValue;
211 for (let element of this) 211 for (let element of this)
212 value = dart.dinvokef(combine, value, element); 212 value = dart.dinvokef(combine, value, element);
213 return value; 213 return value;
214 } 214 }
215 every(f) { 215 [core.$every](f) {
216 for (let element of this) { 216 for (let element of this) {
217 if (!dart.notNull(f(element))) 217 if (!dart.notNull(f(element)))
218 return false; 218 return false;
219 } 219 }
220 return true; 220 return true;
221 } 221 }
222 join(separator) { 222 [core.$join](separator) {
223 if (separator === void 0) 223 if (separator === void 0)
224 separator = ""; 224 separator = "";
225 let iterator = this.iterator; 225 let iterator = this[core.$iterator];
226 if (!dart.notNull(iterator.moveNext())) 226 if (!dart.notNull(iterator.moveNext()))
227 return ""; 227 return "";
228 let buffer = new core.StringBuffer(); 228 let buffer = new core.StringBuffer();
229 if (dart.notNull(separator == null) || dart.notNull(separator == "")) { 229 if (dart.notNull(separator == null) || dart.notNull(separator == "")) {
230 do { 230 do {
231 buffer.write(`${iterator.current}`); 231 buffer.write(`${iterator.current}`);
232 } while (iterator.moveNext()); 232 } while (iterator.moveNext());
233 } else { 233 } else {
234 buffer.write(`${iterator.current}`); 234 buffer.write(`${iterator.current}`);
235 while (iterator.moveNext()) { 235 while (iterator.moveNext()) {
236 buffer.write(separator); 236 buffer.write(separator);
237 buffer.write(`${iterator.current}`); 237 buffer.write(`${iterator.current}`);
238 } 238 }
239 } 239 }
240 return buffer.toString(); 240 return buffer.toString();
241 } 241 }
242 any(test) { 242 [core.$any](test) {
243 for (let element of this) { 243 for (let element of this) {
244 if (test(element)) 244 if (test(element))
245 return true; 245 return true;
246 } 246 }
247 return false; 247 return false;
248 } 248 }
249 take(n) { 249 [core.$take](n) {
250 return new (_internal.TakeIterable$(E))(this, n); 250 return new (_internal.TakeIterable$(E))(this, n);
251 } 251 }
252 takeWhile(test) { 252 [core.$takeWhile](test) {
253 return new (_internal.TakeWhileIterable$(E))(this, test); 253 return new (_internal.TakeWhileIterable$(E))(this, test);
254 } 254 }
255 skip(n) { 255 [core.$skip](n) {
256 return new (_internal.SkipIterable$(E))(this, n); 256 return new (_internal.SkipIterable$(E))(this, n);
257 } 257 }
258 skipWhile(test) { 258 [core.$skipWhile](test) {
259 return new (_internal.SkipWhileIterable$(E))(this, test); 259 return new (_internal.SkipWhileIterable$(E))(this, test);
260 } 260 }
261 get first() { 261 get [core.$first]() {
262 let it = this.iterator; 262 let it = this.iterator;
263 if (!dart.notNull(it.moveNext())) { 263 if (!dart.notNull(it.moveNext())) {
264 throw _internal.IterableElementError.noElement(); 264 throw _internal.IterableElementError.noElement();
265 } 265 }
266 return dart.as(it.current, E); 266 return dart.as(it.current, E);
267 } 267 }
268 get last() { 268 get [core.$last]() {
269 let it = this.iterator; 269 let it = this.iterator;
270 if (!dart.notNull(it.moveNext())) { 270 if (!dart.notNull(it.moveNext())) {
271 throw _internal.IterableElementError.noElement(); 271 throw _internal.IterableElementError.noElement();
272 } 272 }
273 let result = null; 273 let result = null;
274 do { 274 do {
275 result = dart.as(it.current, E); 275 result = dart.as(it.current, E);
276 } while (it.moveNext()); 276 } while (it.moveNext());
277 return result; 277 return result;
278 } 278 }
279 firstWhere(test, opts) { 279 [core.$firstWhere](test, opts) {
280 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 280 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
281 for (let element of this) { 281 for (let element of this) {
282 if (test(element)) 282 if (test(element))
283 return element; 283 return element;
284 } 284 }
285 if (orElse != null) 285 if (orElse != null)
286 return orElse(); 286 return orElse();
287 throw _internal.IterableElementError.noElement(); 287 throw _internal.IterableElementError.noElement();
288 } 288 }
289 lastWhere(test, opts) { 289 [core.$lastWhere](test, opts) {
290 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 290 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
291 let result = null; 291 let result = null;
292 let foundMatching = false; 292 let foundMatching = false;
293 for (let element of this) { 293 for (let element of this) {
294 if (test(element)) { 294 if (test(element)) {
295 result = element; 295 result = element;
296 foundMatching = true; 296 foundMatching = true;
297 } 297 }
298 } 298 }
299 if (foundMatching) 299 if (foundMatching)
300 return result; 300 return result;
301 if (orElse != null) 301 if (orElse != null)
302 return orElse(); 302 return orElse();
303 throw _internal.IterableElementError.noElement(); 303 throw _internal.IterableElementError.noElement();
304 } 304 }
305 singleWhere(test) { 305 [core.$singleWhere](test) {
306 let result = null; 306 let result = null;
307 let foundMatching = false; 307 let foundMatching = false;
308 for (let element of this) { 308 for (let element of this) {
309 if (test(element)) { 309 if (test(element)) {
310 if (foundMatching) { 310 if (foundMatching) {
311 throw _internal.IterableElementError.tooMany(); 311 throw _internal.IterableElementError.tooMany();
312 } 312 }
313 result = element; 313 result = element;
314 foundMatching = true; 314 foundMatching = true;
315 } 315 }
316 } 316 }
317 if (foundMatching) 317 if (foundMatching)
318 return result; 318 return result;
319 throw _internal.IterableElementError.noElement(); 319 throw _internal.IterableElementError.noElement();
320 } 320 }
321 elementAt(index) { 321 [core.$elementAt](index) {
322 if (!(typeof index == 'number')) 322 if (!(typeof index == 'number'))
323 throw new core.ArgumentError.notNull("index"); 323 throw new core.ArgumentError.notNull("index");
324 core.RangeError.checkNotNegative(index, "index"); 324 core.RangeError.checkNotNegative(index, "index");
325 let elementIndex = 0; 325 let elementIndex = 0;
326 for (let element of this) { 326 for (let element of this) {
327 if (index == elementIndex) 327 if (index == elementIndex)
328 return element; 328 return element;
329 elementIndex = dart.notNull(elementIndex) + 1; 329 elementIndex = dart.notNull(elementIndex) + 1;
330 } 330 }
331 throw new core.RangeError.index(index, this, "index", null, elementIndex ); 331 throw new core.RangeError.index(index, this, "index", null, elementIndex );
(...skipping 10 matching lines...) Expand all
342 } 342 }
343 } 343 }
344 return SetBase; 344 return SetBase;
345 }); 345 });
346 let SetBase = SetBase$(dart.dynamic); 346 let SetBase = SetBase$(dart.dynamic);
347 let _HashSetBase$ = dart.generic(function(E) { 347 let _HashSetBase$ = dart.generic(function(E) {
348 class _HashSetBase extends SetBase$(E) { 348 class _HashSetBase extends SetBase$(E) {
349 difference(other) { 349 difference(other) {
350 let result = this[_newSet](); 350 let result = this[_newSet]();
351 for (let element of this) { 351 for (let element of this) {
352 if (!dart.notNull(other.contains(element))) 352 if (!dart.notNull(other[core.$contains](element)))
353 result.add(element); 353 result.add(element);
354 } 354 }
355 return result; 355 return result;
356 } 356 }
357 intersection(other) { 357 intersection(other) {
358 let result = this[_newSet](); 358 let result = this[_newSet]();
359 for (let element of this) { 359 for (let element of this) {
360 if (other.contains(element)) 360 if (other[core.$contains](element))
361 result.add(element); 361 result.add(element);
362 } 362 }
363 return result; 363 return result;
364 } 364 }
365 toSet() { 365 [core.$toSet]() {
366 return ((_) => { 366 return ((_) => {
367 _.addAll(this); 367 _.addAll(this);
368 return _; 368 return _;
369 }).bind(this)(this[_newSet]()); 369 }).bind(this)(this[_newSet]());
370 } 370 }
371 } 371 }
372 return _HashSetBase; 372 return _HashSetBase;
373 }); 373 });
374 let _HashSetBase = _HashSetBase$(dart.dynamic); 374 let _HashSetBase = _HashSetBase$(dart.dynamic);
375 let HashSet$ = dart.generic(function(E) { 375 let HashSet$ = dart.generic(function(E) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 413 }
414 } 414 }
415 HashSet[dart.implements] = () => [core.Set$(E)]; 415 HashSet[dart.implements] = () => [core.Set$(E)];
416 dart.defineNamedConstructor(HashSet, 'identity'); 416 dart.defineNamedConstructor(HashSet, 'identity');
417 dart.defineNamedConstructor(HashSet, 'from'); 417 dart.defineNamedConstructor(HashSet, 'from');
418 return HashSet; 418 return HashSet;
419 }); 419 });
420 let HashSet = HashSet$(dart.dynamic); 420 let HashSet = HashSet$(dart.dynamic);
421 let IterableMixin$ = dart.generic(function(E) { 421 let IterableMixin$ = dart.generic(function(E) {
422 class IterableMixin extends core.Object { 422 class IterableMixin extends core.Object {
423 map(f) { 423 [core.$map](f) {
424 return new (_internal.MappedIterable$(E, dynamic))(this, f); 424 return new (_internal.MappedIterable$(E, dynamic))(this, f);
425 } 425 }
426 where(f) { 426 [core.$where](f) {
427 return new (_internal.WhereIterable$(E))(this, f); 427 return new (_internal.WhereIterable$(E))(this, f);
428 } 428 }
429 expand(f) { 429 [core.$expand](f) {
430 return new (_internal.ExpandIterable$(E, dynamic))(this, f); 430 return new (_internal.ExpandIterable$(E, dynamic))(this, f);
431 } 431 }
432 contains(element) { 432 [core.$contains](element) {
433 for (let e of this) { 433 for (let e of this) {
434 if (dart.equals(e, element)) 434 if (dart.equals(e, element))
435 return true; 435 return true;
436 } 436 }
437 return false; 437 return false;
438 } 438 }
439 forEach(f) { 439 [core.$forEach](f) {
440 for (let element of this) 440 for (let element of this)
441 f(element); 441 f(element);
442 } 442 }
443 reduce(combine) { 443 [core.$reduce](combine) {
444 let iterator = this.iterator; 444 let iterator = this[core.$iterator];
445 if (!dart.notNull(iterator.moveNext())) { 445 if (!dart.notNull(iterator.moveNext())) {
446 throw _internal.IterableElementError.noElement(); 446 throw _internal.IterableElementError.noElement();
447 } 447 }
448 let value = iterator.current; 448 let value = iterator.current;
449 while (iterator.moveNext()) { 449 while (iterator.moveNext()) {
450 value = combine(value, iterator.current); 450 value = combine(value, iterator.current);
451 } 451 }
452 return value; 452 return value;
453 } 453 }
454 fold(initialValue, combine) { 454 [core.$fold](initialValue, combine) {
455 let value = initialValue; 455 let value = initialValue;
456 for (let element of this) 456 for (let element of this)
457 value = dart.dinvokef(combine, value, element); 457 value = dart.dinvokef(combine, value, element);
458 return value; 458 return value;
459 } 459 }
460 every(f) { 460 [core.$every](f) {
461 for (let element of this) { 461 for (let element of this) {
462 if (!dart.notNull(f(element))) 462 if (!dart.notNull(f(element)))
463 return false; 463 return false;
464 } 464 }
465 return true; 465 return true;
466 } 466 }
467 join(separator) { 467 [core.$join](separator) {
468 if (separator === void 0) 468 if (separator === void 0)
469 separator = ""; 469 separator = "";
470 let iterator = this.iterator; 470 let iterator = this[core.$iterator];
471 if (!dart.notNull(iterator.moveNext())) 471 if (!dart.notNull(iterator.moveNext()))
472 return ""; 472 return "";
473 let buffer = new core.StringBuffer(); 473 let buffer = new core.StringBuffer();
474 if (dart.notNull(separator == null) || dart.notNull(separator == "")) { 474 if (dart.notNull(separator == null) || dart.notNull(separator == "")) {
475 do { 475 do {
476 buffer.write(`${iterator.current}`); 476 buffer.write(`${iterator.current}`);
477 } while (iterator.moveNext()); 477 } while (iterator.moveNext());
478 } else { 478 } else {
479 buffer.write(`${iterator.current}`); 479 buffer.write(`${iterator.current}`);
480 while (iterator.moveNext()) { 480 while (iterator.moveNext()) {
481 buffer.write(separator); 481 buffer.write(separator);
482 buffer.write(`${iterator.current}`); 482 buffer.write(`${iterator.current}`);
483 } 483 }
484 } 484 }
485 return buffer.toString(); 485 return buffer.toString();
486 } 486 }
487 any(f) { 487 [core.$any](f) {
488 for (let element of this) { 488 for (let element of this) {
489 if (f(element)) 489 if (f(element))
490 return true; 490 return true;
491 } 491 }
492 return false; 492 return false;
493 } 493 }
494 toList(opts) { 494 [core.$toList](opts) {
495 let growable = opts && 'growable' in opts ? opts.growable : true; 495 let growable = opts && 'growable' in opts ? opts.growable : true;
496 return new core.List$(E).from(this, {growable: growable}); 496 return new core.List$(E).from(this, {growable: growable});
497 } 497 }
498 toSet() { 498 [core.$toSet]() {
499 return new core.Set$(E).from(this); 499 return new core.Set$(E).from(this);
500 } 500 }
501 get length() { 501 get [core.$length]() {
502 dart.assert(!dart.is(this, _internal.EfficientLength)); 502 dart.assert(!dart.is(this, _internal.EfficientLength));
503 let count = 0; 503 let count = 0;
504 let it = this.iterator; 504 let it = this.iterator;
505 while (it.moveNext()) { 505 while (it.moveNext()) {
506 count = dart.notNull(count) + 1; 506 count = dart.notNull(count) + 1;
507 } 507 }
508 return count; 508 return count;
509 } 509 }
510 get isEmpty() { 510 get [core.$isEmpty]() {
511 return !dart.notNull(this.iterator.moveNext()); 511 return !dart.notNull(this.iterator.moveNext());
512 } 512 }
513 get isNotEmpty() { 513 get [core.$isNotEmpty]() {
514 return !dart.notNull(this.isEmpty); 514 return !dart.notNull(this.isEmpty);
515 } 515 }
516 take(n) { 516 [core.$take](n) {
517 return new (_internal.TakeIterable$(E))(this, n); 517 return new (_internal.TakeIterable$(E))(this, n);
518 } 518 }
519 takeWhile(test) { 519 [core.$takeWhile](test) {
520 return new (_internal.TakeWhileIterable$(E))(this, test); 520 return new (_internal.TakeWhileIterable$(E))(this, test);
521 } 521 }
522 skip(n) { 522 [core.$skip](n) {
523 return new (_internal.SkipIterable$(E))(this, n); 523 return new (_internal.SkipIterable$(E))(this, n);
524 } 524 }
525 skipWhile(test) { 525 [core.$skipWhile](test) {
526 return new (_internal.SkipWhileIterable$(E))(this, test); 526 return new (_internal.SkipWhileIterable$(E))(this, test);
527 } 527 }
528 get first() { 528 get [core.$first]() {
529 let it = this.iterator; 529 let it = this.iterator;
530 if (!dart.notNull(it.moveNext())) { 530 if (!dart.notNull(it.moveNext())) {
531 throw _internal.IterableElementError.noElement(); 531 throw _internal.IterableElementError.noElement();
532 } 532 }
533 return dart.as(it.current, E); 533 return dart.as(it.current, E);
534 } 534 }
535 get last() { 535 get [core.$last]() {
536 let it = this.iterator; 536 let it = this.iterator;
537 if (!dart.notNull(it.moveNext())) { 537 if (!dart.notNull(it.moveNext())) {
538 throw _internal.IterableElementError.noElement(); 538 throw _internal.IterableElementError.noElement();
539 } 539 }
540 let result = null; 540 let result = null;
541 do { 541 do {
542 result = dart.as(it.current, E); 542 result = dart.as(it.current, E);
543 } while (it.moveNext()); 543 } while (it.moveNext());
544 return result; 544 return result;
545 } 545 }
546 get single() { 546 get [core.$single]() {
547 let it = this.iterator; 547 let it = this.iterator;
548 if (!dart.notNull(it.moveNext())) 548 if (!dart.notNull(it.moveNext()))
549 throw _internal.IterableElementError.noElement(); 549 throw _internal.IterableElementError.noElement();
550 let result = dart.as(it.current, E); 550 let result = dart.as(it.current, E);
551 if (it.moveNext()) 551 if (it.moveNext())
552 throw _internal.IterableElementError.tooMany(); 552 throw _internal.IterableElementError.tooMany();
553 return result; 553 return result;
554 } 554 }
555 firstWhere(test, opts) { 555 [core.$firstWhere](test, opts) {
556 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 556 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
557 for (let element of this) { 557 for (let element of this) {
558 if (test(element)) 558 if (test(element))
559 return element; 559 return element;
560 } 560 }
561 if (orElse != null) 561 if (orElse != null)
562 return orElse(); 562 return orElse();
563 throw _internal.IterableElementError.noElement(); 563 throw _internal.IterableElementError.noElement();
564 } 564 }
565 lastWhere(test, opts) { 565 [core.$lastWhere](test, opts) {
566 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 566 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
567 let result = null; 567 let result = null;
568 let foundMatching = false; 568 let foundMatching = false;
569 for (let element of this) { 569 for (let element of this) {
570 if (test(element)) { 570 if (test(element)) {
571 result = element; 571 result = element;
572 foundMatching = true; 572 foundMatching = true;
573 } 573 }
574 } 574 }
575 if (foundMatching) 575 if (foundMatching)
576 return result; 576 return result;
577 if (orElse != null) 577 if (orElse != null)
578 return orElse(); 578 return orElse();
579 throw _internal.IterableElementError.noElement(); 579 throw _internal.IterableElementError.noElement();
580 } 580 }
581 singleWhere(test) { 581 [core.$singleWhere](test) {
582 let result = null; 582 let result = null;
583 let foundMatching = false; 583 let foundMatching = false;
584 for (let element of this) { 584 for (let element of this) {
585 if (test(element)) { 585 if (test(element)) {
586 if (foundMatching) { 586 if (foundMatching) {
587 throw _internal.IterableElementError.tooMany(); 587 throw _internal.IterableElementError.tooMany();
588 } 588 }
589 result = element; 589 result = element;
590 foundMatching = true; 590 foundMatching = true;
591 } 591 }
592 } 592 }
593 if (foundMatching) 593 if (foundMatching)
594 return result; 594 return result;
595 throw _internal.IterableElementError.noElement(); 595 throw _internal.IterableElementError.noElement();
596 } 596 }
597 elementAt(index) { 597 [core.$elementAt](index) {
598 if (!(typeof index == 'number')) 598 if (!(typeof index == 'number'))
599 throw new core.ArgumentError.notNull("index"); 599 throw new core.ArgumentError.notNull("index");
600 core.RangeError.checkNotNegative(index, "index"); 600 core.RangeError.checkNotNegative(index, "index");
601 let elementIndex = 0; 601 let elementIndex = 0;
602 for (let element of this) { 602 for (let element of this) {
603 if (index == elementIndex) 603 if (index == elementIndex)
604 return element; 604 return element;
605 elementIndex = dart.notNull(elementIndex) + 1; 605 elementIndex = dart.notNull(elementIndex) + 1;
606 } 606 }
607 throw new core.RangeError.index(index, this, "index", null, elementIndex ); 607 throw new core.RangeError.index(index, this, "index", null, elementIndex );
608 } 608 }
609 toString() { 609 toString() {
610 return IterableBase.iterableToShortString(this, '(', ')'); 610 return IterableBase.iterableToShortString(this, '(', ')');
611 } 611 }
612 } 612 }
613 IterableMixin[dart.implements] = () => [core.Iterable$(E)]; 613 IterableMixin[dart.implements] = () => [core.Iterable$(E)];
614 return IterableMixin; 614 return IterableMixin;
615 }); 615 });
616 let IterableMixin = IterableMixin$(dart.dynamic); 616 let IterableMixin = IterableMixin$(dart.dynamic);
617 let _isToStringVisiting = Symbol('_isToStringVisiting'); 617 let _isToStringVisiting = Symbol('_isToStringVisiting');
618 let _toStringVisiting = Symbol('_toStringVisiting'); 618 let _toStringVisiting = Symbol('_toStringVisiting');
619 let _iterablePartsToStrings = Symbol('_iterablePartsToStrings'); 619 let _iterablePartsToStrings = Symbol('_iterablePartsToStrings');
620 let IterableBase$ = dart.generic(function(E) { 620 let IterableBase$ = dart.generic(function(E) {
621 class IterableBase extends core.Object { 621 class IterableBase extends core.Object {
622 IterableBase() { 622 IterableBase() {
623 } 623 }
624 map(f) { 624 [core.$map](f) {
625 return new (_internal.MappedIterable$(E, dynamic))(this, f); 625 return new (_internal.MappedIterable$(E, dynamic))(this, f);
626 } 626 }
627 where(f) { 627 [core.$where](f) {
628 return new (_internal.WhereIterable$(E))(this, f); 628 return new (_internal.WhereIterable$(E))(this, f);
629 } 629 }
630 expand(f) { 630 [core.$expand](f) {
631 return new (_internal.ExpandIterable$(E, dynamic))(this, f); 631 return new (_internal.ExpandIterable$(E, dynamic))(this, f);
632 } 632 }
633 contains(element) { 633 [core.$contains](element) {
634 for (let e of this) { 634 for (let e of this) {
635 if (dart.equals(e, element)) 635 if (dart.equals(e, element))
636 return true; 636 return true;
637 } 637 }
638 return false; 638 return false;
639 } 639 }
640 forEach(f) { 640 [core.$forEach](f) {
641 for (let element of this) 641 for (let element of this)
642 f(element); 642 f(element);
643 } 643 }
644 reduce(combine) { 644 [core.$reduce](combine) {
645 let iterator = this.iterator; 645 let iterator = this[core.$iterator];
646 if (!dart.notNull(iterator.moveNext())) { 646 if (!dart.notNull(iterator.moveNext())) {
647 throw _internal.IterableElementError.noElement(); 647 throw _internal.IterableElementError.noElement();
648 } 648 }
649 let value = iterator.current; 649 let value = iterator.current;
650 while (iterator.moveNext()) { 650 while (iterator.moveNext()) {
651 value = combine(value, iterator.current); 651 value = combine(value, iterator.current);
652 } 652 }
653 return value; 653 return value;
654 } 654 }
655 fold(initialValue, combine) { 655 [core.$fold](initialValue, combine) {
656 let value = initialValue; 656 let value = initialValue;
657 for (let element of this) 657 for (let element of this)
658 value = dart.dinvokef(combine, value, element); 658 value = dart.dinvokef(combine, value, element);
659 return value; 659 return value;
660 } 660 }
661 every(f) { 661 [core.$every](f) {
662 for (let element of this) { 662 for (let element of this) {
663 if (!dart.notNull(f(element))) 663 if (!dart.notNull(f(element)))
664 return false; 664 return false;
665 } 665 }
666 return true; 666 return true;
667 } 667 }
668 join(separator) { 668 [core.$join](separator) {
669 if (separator === void 0) 669 if (separator === void 0)
670 separator = ""; 670 separator = "";
671 let iterator = this.iterator; 671 let iterator = this[core.$iterator];
672 if (!dart.notNull(iterator.moveNext())) 672 if (!dart.notNull(iterator.moveNext()))
673 return ""; 673 return "";
674 let buffer = new core.StringBuffer(); 674 let buffer = new core.StringBuffer();
675 if (dart.notNull(separator == null) || dart.notNull(separator == "")) { 675 if (dart.notNull(separator == null) || dart.notNull(separator == "")) {
676 do { 676 do {
677 buffer.write(`${iterator.current}`); 677 buffer.write(`${iterator.current}`);
678 } while (iterator.moveNext()); 678 } while (iterator.moveNext());
679 } else { 679 } else {
680 buffer.write(`${iterator.current}`); 680 buffer.write(`${iterator.current}`);
681 while (iterator.moveNext()) { 681 while (iterator.moveNext()) {
682 buffer.write(separator); 682 buffer.write(separator);
683 buffer.write(`${iterator.current}`); 683 buffer.write(`${iterator.current}`);
684 } 684 }
685 } 685 }
686 return buffer.toString(); 686 return buffer.toString();
687 } 687 }
688 any(f) { 688 [core.$any](f) {
689 for (let element of this) { 689 for (let element of this) {
690 if (f(element)) 690 if (f(element))
691 return true; 691 return true;
692 } 692 }
693 return false; 693 return false;
694 } 694 }
695 toList(opts) { 695 [core.$toList](opts) {
696 let growable = opts && 'growable' in opts ? opts.growable : true; 696 let growable = opts && 'growable' in opts ? opts.growable : true;
697 return new core.List$(E).from(this, {growable: growable}); 697 return new core.List$(E).from(this, {growable: growable});
698 } 698 }
699 toSet() { 699 [core.$toSet]() {
700 return new core.Set$(E).from(this); 700 return new core.Set$(E).from(this);
701 } 701 }
702 get length() { 702 get [core.$length]() {
703 dart.assert(!dart.is(this, _internal.EfficientLength)); 703 dart.assert(!dart.is(this, _internal.EfficientLength));
704 let count = 0; 704 let count = 0;
705 let it = this.iterator; 705 let it = this.iterator;
706 while (it.moveNext()) { 706 while (it.moveNext()) {
707 count = dart.notNull(count) + 1; 707 count = dart.notNull(count) + 1;
708 } 708 }
709 return count; 709 return count;
710 } 710 }
711 get isEmpty() { 711 get [core.$isEmpty]() {
712 return !dart.notNull(this.iterator.moveNext()); 712 return !dart.notNull(this.iterator.moveNext());
713 } 713 }
714 get isNotEmpty() { 714 get [core.$isNotEmpty]() {
715 return !dart.notNull(this.isEmpty); 715 return !dart.notNull(this.isEmpty);
716 } 716 }
717 take(n) { 717 [core.$take](n) {
718 return new (_internal.TakeIterable$(E))(this, n); 718 return new (_internal.TakeIterable$(E))(this, n);
719 } 719 }
720 takeWhile(test) { 720 [core.$takeWhile](test) {
721 return new (_internal.TakeWhileIterable$(E))(this, test); 721 return new (_internal.TakeWhileIterable$(E))(this, test);
722 } 722 }
723 skip(n) { 723 [core.$skip](n) {
724 return new (_internal.SkipIterable$(E))(this, n); 724 return new (_internal.SkipIterable$(E))(this, n);
725 } 725 }
726 skipWhile(test) { 726 [core.$skipWhile](test) {
727 return new (_internal.SkipWhileIterable$(E))(this, test); 727 return new (_internal.SkipWhileIterable$(E))(this, test);
728 } 728 }
729 get first() { 729 get [core.$first]() {
730 let it = this.iterator; 730 let it = this.iterator;
731 if (!dart.notNull(it.moveNext())) { 731 if (!dart.notNull(it.moveNext())) {
732 throw _internal.IterableElementError.noElement(); 732 throw _internal.IterableElementError.noElement();
733 } 733 }
734 return dart.as(it.current, E); 734 return dart.as(it.current, E);
735 } 735 }
736 get last() { 736 get [core.$last]() {
737 let it = this.iterator; 737 let it = this.iterator;
738 if (!dart.notNull(it.moveNext())) { 738 if (!dart.notNull(it.moveNext())) {
739 throw _internal.IterableElementError.noElement(); 739 throw _internal.IterableElementError.noElement();
740 } 740 }
741 let result = null; 741 let result = null;
742 do { 742 do {
743 result = dart.as(it.current, E); 743 result = dart.as(it.current, E);
744 } while (it.moveNext()); 744 } while (it.moveNext());
745 return result; 745 return result;
746 } 746 }
747 get single() { 747 get [core.$single]() {
748 let it = this.iterator; 748 let it = this.iterator;
749 if (!dart.notNull(it.moveNext())) 749 if (!dart.notNull(it.moveNext()))
750 throw _internal.IterableElementError.noElement(); 750 throw _internal.IterableElementError.noElement();
751 let result = dart.as(it.current, E); 751 let result = dart.as(it.current, E);
752 if (it.moveNext()) 752 if (it.moveNext())
753 throw _internal.IterableElementError.tooMany(); 753 throw _internal.IterableElementError.tooMany();
754 return result; 754 return result;
755 } 755 }
756 firstWhere(test, opts) { 756 [core.$firstWhere](test, opts) {
757 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 757 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
758 for (let element of this) { 758 for (let element of this) {
759 if (test(element)) 759 if (test(element))
760 return element; 760 return element;
761 } 761 }
762 if (orElse != null) 762 if (orElse != null)
763 return orElse(); 763 return orElse();
764 throw _internal.IterableElementError.noElement(); 764 throw _internal.IterableElementError.noElement();
765 } 765 }
766 lastWhere(test, opts) { 766 [core.$lastWhere](test, opts) {
767 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 767 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
768 let result = null; 768 let result = null;
769 let foundMatching = false; 769 let foundMatching = false;
770 for (let element of this) { 770 for (let element of this) {
771 if (test(element)) { 771 if (test(element)) {
772 result = element; 772 result = element;
773 foundMatching = true; 773 foundMatching = true;
774 } 774 }
775 } 775 }
776 if (foundMatching) 776 if (foundMatching)
777 return result; 777 return result;
778 if (orElse != null) 778 if (orElse != null)
779 return orElse(); 779 return orElse();
780 throw _internal.IterableElementError.noElement(); 780 throw _internal.IterableElementError.noElement();
781 } 781 }
782 singleWhere(test) { 782 [core.$singleWhere](test) {
783 let result = null; 783 let result = null;
784 let foundMatching = false; 784 let foundMatching = false;
785 for (let element of this) { 785 for (let element of this) {
786 if (test(element)) { 786 if (test(element)) {
787 if (foundMatching) { 787 if (foundMatching) {
788 throw _internal.IterableElementError.tooMany(); 788 throw _internal.IterableElementError.tooMany();
789 } 789 }
790 result = element; 790 result = element;
791 foundMatching = true; 791 foundMatching = true;
792 } 792 }
793 } 793 }
794 if (foundMatching) 794 if (foundMatching)
795 return result; 795 return result;
796 throw _internal.IterableElementError.noElement(); 796 throw _internal.IterableElementError.noElement();
797 } 797 }
798 elementAt(index) { 798 [core.$elementAt](index) {
799 if (!(typeof index == 'number')) 799 if (!(typeof index == 'number'))
800 throw new core.ArgumentError.notNull("index"); 800 throw new core.ArgumentError.notNull("index");
801 core.RangeError.checkNotNegative(index, "index"); 801 core.RangeError.checkNotNegative(index, "index");
802 let elementIndex = 0; 802 let elementIndex = 0;
803 for (let element of this) { 803 for (let element of this) {
804 if (index == elementIndex) 804 if (index == elementIndex)
805 return element; 805 return element;
806 elementIndex = dart.notNull(elementIndex) + 1; 806 elementIndex = dart.notNull(elementIndex) + 1;
807 } 807 }
808 throw new core.RangeError.index(index, this, "index", null, elementIndex ); 808 throw new core.RangeError.index(index, this, "index", null, elementIndex );
809 } 809 }
810 toString() { 810 toString() {
811 return IterableBase.iterableToShortString(this, '(', ')'); 811 return IterableBase.iterableToShortString(this, '(', ')');
812 } 812 }
813 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { 813 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) {
814 if (leftDelimiter === void 0) 814 if (leftDelimiter === void 0)
815 leftDelimiter = '('; 815 leftDelimiter = '(';
816 if (rightDelimiter === void 0) 816 if (rightDelimiter === void 0)
817 rightDelimiter = ')'; 817 rightDelimiter = ')';
818 if (IterableBase[_isToStringVisiting](iterable)) { 818 if (IterableBase[_isToStringVisiting](iterable)) {
819 if (dart.notNull(leftDelimiter == "(") && dart.notNull(rightDelimiter == ")")) { 819 if (dart.notNull(leftDelimiter == "(") && dart.notNull(rightDelimiter == ")")) {
820 return "(...)"; 820 return "(...)";
821 } 821 }
822 return `${leftDelimiter}...${rightDelimiter}`; 822 return `${leftDelimiter}...${rightDelimiter}`;
823 } 823 }
824 let parts = new core.List.from([]); 824 let parts = new core.List.from([]);
825 IterableBase[_toStringVisiting].add(iterable); 825 IterableBase[_toStringVisiting][core.$add](iterable);
826 try { 826 try {
827 IterableBase[_iterablePartsToStrings](iterable, parts); 827 IterableBase[_iterablePartsToStrings](iterable, parts);
828 } finally { 828 } finally {
829 dart.assert(core.identical(IterableBase[_toStringVisiting].last, itera ble)); 829 dart.assert(core.identical(IterableBase[_toStringVisiting][core.$last] , iterable));
830 IterableBase[_toStringVisiting].removeLast(); 830 IterableBase[_toStringVisiting][core.$removeLast]();
831 } 831 }
832 return ((_) => { 832 return ((_) => {
833 _.writeAll(parts, ", "); 833 _.writeAll(parts, ", ");
834 _.write(rightDelimiter); 834 _.write(rightDelimiter);
835 return _; 835 return _;
836 }).bind(this)(new core.StringBuffer(leftDelimiter)).toString(); 836 }).bind(this)(new core.StringBuffer(leftDelimiter)).toString();
837 } 837 }
838 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { 838 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) {
839 if (leftDelimiter === void 0) 839 if (leftDelimiter === void 0)
840 leftDelimiter = '('; 840 leftDelimiter = '(';
841 if (rightDelimiter === void 0) 841 if (rightDelimiter === void 0)
842 rightDelimiter = ')'; 842 rightDelimiter = ')';
843 if (IterableBase[_isToStringVisiting](iterable)) { 843 if (IterableBase[_isToStringVisiting](iterable)) {
844 return `${leftDelimiter}...${rightDelimiter}`; 844 return `${leftDelimiter}...${rightDelimiter}`;
845 } 845 }
846 let buffer = new core.StringBuffer(leftDelimiter); 846 let buffer = new core.StringBuffer(leftDelimiter);
847 IterableBase[_toStringVisiting].add(iterable); 847 IterableBase[_toStringVisiting][core.$add](iterable);
848 try { 848 try {
849 buffer.writeAll(iterable, ", "); 849 buffer.writeAll(iterable, ", ");
850 } finally { 850 } finally {
851 dart.assert(core.identical(IterableBase[_toStringVisiting].last, itera ble)); 851 dart.assert(core.identical(IterableBase[_toStringVisiting][core.$last] , iterable));
852 IterableBase[_toStringVisiting].removeLast(); 852 IterableBase[_toStringVisiting][core.$removeLast]();
853 } 853 }
854 buffer.write(rightDelimiter); 854 buffer.write(rightDelimiter);
855 return buffer.toString(); 855 return buffer.toString();
856 } 856 }
857 static [_isToStringVisiting](o) { 857 static [_isToStringVisiting](o) {
858 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase[_toStringVis iting].length); i = dart.notNull(i) + 1) { 858 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase[_toStringVis iting][core.$length]); i = dart.notNull(i) + 1) {
859 if (core.identical(o, IterableBase[_toStringVisiting].get(i))) 859 if (core.identical(o, IterableBase[_toStringVisiting][core.$get](i)))
860 return true; 860 return true;
861 } 861 }
862 return false; 862 return false;
863 } 863 }
864 static [_iterablePartsToStrings](iterable, parts) { 864 static [_iterablePartsToStrings](iterable, parts) {
865 let LENGTH_LIMIT = 80; 865 let LENGTH_LIMIT = 80;
866 let HEAD_COUNT = 3; 866 let HEAD_COUNT = 3;
867 let TAIL_COUNT = 2; 867 let TAIL_COUNT = 2;
868 let MAX_COUNT = 100; 868 let MAX_COUNT = 100;
869 let OVERHEAD = 2; 869 let OVERHEAD = 2;
870 let ELLIPSIS_SIZE = 3; 870 let ELLIPSIS_SIZE = 3;
871 let length = 0; 871 let length = 0;
872 let count = 0; 872 let count = 0;
873 let it = iterable.iterator; 873 let it = iterable[core.$iterator];
874 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull (count) < dart.notNull(HEAD_COUNT)) { 874 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull (count) < dart.notNull(HEAD_COUNT)) {
875 if (!dart.notNull(it.moveNext())) 875 if (!dart.notNull(it.moveNext()))
876 return; 876 return;
877 let next = `${it.current}`; 877 let next = `${it.current}`;
878 parts.add(next); 878 parts[core.$add](next);
879 length = dart.notNull(next.length) + dart.notNull(OVERHEAD); 879 length = dart.notNull(next.length) + dart.notNull(OVERHEAD);
880 count = dart.notNull(count) + 1; 880 count = dart.notNull(count) + 1;
881 } 881 }
882 let penultimateString = null; 882 let penultimateString = null;
883 let ultimateString = null; 883 let ultimateString = null;
884 let penultimate = null; 884 let penultimate = null;
885 let ultimate = null; 885 let ultimate = null;
886 if (!dart.notNull(it.moveNext())) { 886 if (!dart.notNull(it.moveNext())) {
887 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + dart.notNull(TAI L_COUNT)) 887 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + dart.notNull(TAI L_COUNT))
888 return; 888 return;
889 ultimateString = dart.as(parts.removeLast(), core.String); 889 ultimateString = dart.as(parts[core.$removeLast](), core.String);
890 penultimateString = dart.as(parts.removeLast(), core.String); 890 penultimateString = dart.as(parts[core.$removeLast](), core.String);
891 } else { 891 } else {
892 penultimate = it.current; 892 penultimate = it.current;
893 count = dart.notNull(count) + 1; 893 count = dart.notNull(count) + 1;
894 if (!dart.notNull(it.moveNext())) { 894 if (!dart.notNull(it.moveNext())) {
895 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + 1) { 895 if (dart.notNull(count) <= dart.notNull(HEAD_COUNT) + 1) {
896 parts.add(`${penultimate}`); 896 parts[core.$add](`${penultimate}`);
897 return; 897 return;
898 } 898 }
899 ultimateString = `${penultimate}`; 899 ultimateString = `${penultimate}`;
900 penultimateString = dart.as(parts.removeLast(), core.String); 900 penultimateString = dart.as(parts[core.$removeLast](), core.String);
901 length = dart.notNull(ultimateString.length) + dart.notNull(OVERHEAD ); 901 length = dart.notNull(ultimateString.length) + dart.notNull(OVERHEAD );
902 } else { 902 } else {
903 ultimate = it.current; 903 ultimate = it.current;
904 count = dart.notNull(count) + 1; 904 count = dart.notNull(count) + 1;
905 dart.assert(dart.notNull(count) < dart.notNull(MAX_COUNT)); 905 dart.assert(dart.notNull(count) < dart.notNull(MAX_COUNT));
906 while (it.moveNext()) { 906 while (it.moveNext()) {
907 penultimate = ultimate; 907 penultimate = ultimate;
908 ultimate = it.current; 908 ultimate = it.current;
909 count = dart.notNull(count) + 1; 909 count = dart.notNull(count) + 1;
910 if (dart.notNull(count) > dart.notNull(MAX_COUNT)) { 910 if (dart.notNull(count) > dart.notNull(MAX_COUNT)) {
911 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) - dart. notNull(ELLIPSIS_SIZE) - dart.notNull(OVERHEAD) && dart.notNull(count) > dart.no tNull(HEAD_COUNT)) { 911 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) - dart. notNull(ELLIPSIS_SIZE) - dart.notNull(OVERHEAD) && dart.notNull(count) > dart.no tNull(HEAD_COUNT)) {
912 length = dart.as(dart.dbinary(dart.dload(parts.removeLast(), ' length'), '+', OVERHEAD), core.int); 912 length = dart.as(dart.dbinary(dart.dload(parts[core.$removeLas t](), 'length'), '+', OVERHEAD), core.int);
913 count = dart.notNull(count) - 1; 913 count = dart.notNull(count) - 1;
914 } 914 }
915 parts.add("..."); 915 parts[core.$add]("...");
916 return; 916 return;
917 } 917 }
918 } 918 }
919 penultimateString = `${penultimate}`; 919 penultimateString = `${penultimate}`;
920 ultimateString = `${ultimate}`; 920 ultimateString = `${ultimate}`;
921 length = dart.notNull(ultimateString.length) + dart.notNull(penultim ateString.length) + 2 * dart.notNull(OVERHEAD); 921 length = dart.notNull(ultimateString.length) + dart.notNull(penultim ateString.length) + 2 * dart.notNull(OVERHEAD);
922 } 922 }
923 } 923 }
924 let elision = null; 924 let elision = null;
925 if (dart.notNull(count) > dart.notNull(parts.length) + dart.notNull(TAIL _COUNT)) { 925 if (dart.notNull(count) > dart.notNull(parts[core.$length]) + dart.notNu ll(TAIL_COUNT)) {
926 elision = "..."; 926 elision = "...";
927 length = dart.notNull(ELLIPSIS_SIZE) + dart.notNull(OVERHEAD); 927 length = dart.notNull(ELLIPSIS_SIZE) + dart.notNull(OVERHEAD);
928 } 928 }
929 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) && dart.notNull (parts.length) > dart.notNull(HEAD_COUNT)) { 929 while (dart.notNull(length) > dart.notNull(LENGTH_LIMIT) && dart.notNull (parts[core.$length]) > dart.notNull(HEAD_COUNT)) {
930 length = dart.as(dart.dbinary(dart.dload(parts.removeLast(), 'length') , '+', OVERHEAD), core.int); 930 length = dart.as(dart.dbinary(dart.dload(parts[core.$removeLast](), 'l ength'), '+', OVERHEAD), core.int);
931 if (elision == null) { 931 if (elision == null) {
932 elision = "..."; 932 elision = "...";
933 length = dart.notNull(ELLIPSIS_SIZE) + dart.notNull(OVERHEAD); 933 length = dart.notNull(ELLIPSIS_SIZE) + dart.notNull(OVERHEAD);
934 } 934 }
935 } 935 }
936 if (elision != null) { 936 if (elision != null) {
937 parts.add(elision); 937 parts[core.$add](elision);
938 } 938 }
939 parts.add(penultimateString); 939 parts[core.$add](penultimateString);
940 parts.add(ultimateString); 940 parts[core.$add](ultimateString);
941 } 941 }
942 } 942 }
943 IterableBase[dart.implements] = () => [core.Iterable$(E)]; 943 IterableBase[dart.implements] = () => [core.Iterable$(E)];
944 dart.defineLazyProperties(IterableBase, { 944 dart.defineLazyProperties(IterableBase, {
945 get _toStringVisiting() { 945 get _toStringVisiting() {
946 return new core.List.from([]); 946 return new core.List.from([]);
947 } 947 }
948 }); 948 });
949 return IterableBase; 949 return IterableBase;
950 }); 950 });
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 super.IterableBase(); 1123 super.IterableBase();
1124 this[_next] = this[_previous] = this; 1124 this[_next] = this[_previous] = this;
1125 } 1125 }
1126 addFirst(entry) { 1126 addFirst(entry) {
1127 this[_insertAfter](this, entry); 1127 this[_insertAfter](this, entry);
1128 } 1128 }
1129 add(entry) { 1129 add(entry) {
1130 this[_insertAfter](this[_previous], entry); 1130 this[_insertAfter](this[_previous], entry);
1131 } 1131 }
1132 addAll(entries) { 1132 addAll(entries) {
1133 entries.forEach(dart.closureWrap(((entry) => this[_insertAfter](this[_pr evious], dart.as(entry, E))).bind(this), "(E) → void")); 1133 entries[core.$forEach](dart.closureWrap(((entry) => this[_insertAfter](t his[_previous], dart.as(entry, E))).bind(this), "(E) → void"));
1134 } 1134 }
1135 remove(entry) { 1135 remove(entry) {
1136 if (!dart.equals(entry[_list], this)) 1136 if (!dart.equals(entry[_list], this))
1137 return false; 1137 return false;
1138 this[_unlink](entry); 1138 this[_unlink](entry);
1139 return true; 1139 return true;
1140 } 1140 }
1141 get iterator() { 1141 get [core.$iterator]() {
1142 return new (_LinkedListIterator$(E))(this); 1142 return new (_LinkedListIterator$(E))(this);
1143 } 1143 }
1144 get length() { 1144 get [core.$length]() {
1145 return this[_length]; 1145 return this[_length];
1146 } 1146 }
1147 clear() { 1147 clear() {
1148 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 1148 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
1149 let next = this[_next]; 1149 let next = this[_next];
1150 while (!dart.notNull(core.identical(next, this))) { 1150 while (!dart.notNull(core.identical(next, this))) {
1151 let entry = dart.as(next, E); 1151 let entry = dart.as(next, E);
1152 next = entry[_next]; 1152 next = entry[_next];
1153 entry[_next] = entry[_previous] = entry[_list] = null; 1153 entry[_next] = entry[_previous] = entry[_list] = null;
1154 } 1154 }
1155 this[_next] = this[_previous] = this; 1155 this[_next] = this[_previous] = this;
1156 this[_length] = 0; 1156 this[_length] = 0;
1157 } 1157 }
1158 get first() { 1158 get [core.$first]() {
1159 if (core.identical(this[_next], this)) { 1159 if (core.identical(this[_next], this)) {
1160 throw new core.StateError('No such element'); 1160 throw new core.StateError('No such element');
1161 } 1161 }
1162 return dart.as(this[_next], E); 1162 return dart.as(this[_next], E);
1163 } 1163 }
1164 get last() { 1164 get [core.$last]() {
1165 if (core.identical(this[_previous], this)) { 1165 if (core.identical(this[_previous], this)) {
1166 throw new core.StateError('No such element'); 1166 throw new core.StateError('No such element');
1167 } 1167 }
1168 return dart.as(this[_previous], E); 1168 return dart.as(this[_previous], E);
1169 } 1169 }
1170 get single() { 1170 get [core.$single]() {
1171 if (core.identical(this[_previous], this)) { 1171 if (core.identical(this[_previous], this)) {
1172 throw new core.StateError('No such element'); 1172 throw new core.StateError('No such element');
1173 } 1173 }
1174 if (!dart.notNull(core.identical(this[_previous], this[_next]))) { 1174 if (!dart.notNull(core.identical(this[_previous], this[_next]))) {
1175 throw new core.StateError('Too many elements'); 1175 throw new core.StateError('Too many elements');
1176 } 1176 }
1177 return dart.as(this[_next], E); 1177 return dart.as(this[_next], E);
1178 } 1178 }
1179 forEach(action) { 1179 [core.$forEach](action) {
1180 let modificationCount = this[_modificationCount]; 1180 let modificationCount = this[_modificationCount];
1181 let current = this[_next]; 1181 let current = this[_next];
1182 while (!dart.notNull(core.identical(current, this))) { 1182 while (!dart.notNull(core.identical(current, this))) {
1183 action(dart.as(current, E)); 1183 action(dart.as(current, E));
1184 if (modificationCount != this[_modificationCount]) { 1184 if (modificationCount != this[_modificationCount]) {
1185 throw new core.ConcurrentModificationError(this); 1185 throw new core.ConcurrentModificationError(this);
1186 } 1186 }
1187 current = current[_next]; 1187 current = current[_next];
1188 } 1188 }
1189 } 1189 }
1190 get isEmpty() { 1190 get [core.$isEmpty]() {
1191 return this[_length] == 0; 1191 return this[_length] == 0;
1192 } 1192 }
1193 [_insertAfter](entry, newEntry) { 1193 [_insertAfter](entry, newEntry) {
1194 if (newEntry.list != null) { 1194 if (newEntry.list != null) {
1195 throw new core.StateError('LinkedListEntry is already in a LinkedList' ); 1195 throw new core.StateError('LinkedListEntry is already in a LinkedList' );
1196 } 1196 }
1197 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 1197 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
1198 newEntry[_list] = this; 1198 newEntry[_list] = this;
1199 let predecessor = entry; 1199 let predecessor = entry;
1200 let successor = entry[_next]; 1200 let successor = entry[_next];
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1282 this[_list]._insertAfter(this[_previous], entry); 1282 this[_list]._insertAfter(this[_previous], entry);
1283 } 1283 }
1284 } 1284 }
1285 LinkedListEntry[dart.implements] = () => [_LinkedListLink]; 1285 LinkedListEntry[dart.implements] = () => [_LinkedListLink];
1286 return LinkedListEntry; 1286 return LinkedListEntry;
1287 }); 1287 });
1288 let LinkedListEntry = LinkedListEntry$(dart.dynamic); 1288 let LinkedListEntry = LinkedListEntry$(dart.dynamic);
1289 let _filter = Symbol('_filter'); 1289 let _filter = Symbol('_filter');
1290 let ListMixin$ = dart.generic(function(E) { 1290 let ListMixin$ = dart.generic(function(E) {
1291 class ListMixin extends core.Object { 1291 class ListMixin extends core.Object {
1292 get iterator() { 1292 get [core.$iterator]() {
1293 return new (_internal.ListIterator$(E))(this); 1293 return new (_internal.ListIterator$(E))(this);
1294 } 1294 }
1295 elementAt(index) { 1295 [core.$elementAt](index) {
1296 return this.get(index); 1296 return this[core.$get](index);
1297 } 1297 }
1298 forEach(action) { 1298 [core.$forEach](action) {
1299 let length = this.length; 1299 let length = this[core.$length];
1300 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1300 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1301 action(this.get(i)); 1301 action(this[core.$get](i));
1302 if (length != this.length) { 1302 if (length != this[core.$length]) {
1303 throw new core.ConcurrentModificationError(this); 1303 throw new core.ConcurrentModificationError(this);
1304 } 1304 }
1305 } 1305 }
1306 } 1306 }
1307 get isEmpty() { 1307 get [core.$isEmpty]() {
1308 return this.length == 0; 1308 return this.length == 0;
1309 } 1309 }
1310 get isNotEmpty() { 1310 get [core.$isNotEmpty]() {
1311 return !dart.notNull(this.isEmpty); 1311 return !dart.notNull(this.isEmpty);
1312 } 1312 }
1313 get first() { 1313 get [core.$first]() {
1314 if (this.length == 0) 1314 if (this.length == 0)
1315 throw _internal.IterableElementError.noElement(); 1315 throw _internal.IterableElementError.noElement();
1316 return this.get(0); 1316 return this[core.$get](0);
1317 } 1317 }
1318 get last() { 1318 get [core.$last]() {
1319 if (this.length == 0) 1319 if (this.length == 0)
1320 throw _internal.IterableElementError.noElement(); 1320 throw _internal.IterableElementError.noElement();
1321 return this.get(dart.notNull(this.length) - 1); 1321 return this[core.$get](dart.notNull(this.length) - 1);
1322 } 1322 }
1323 get single() { 1323 get [core.$single]() {
1324 if (this.length == 0) 1324 if (this.length == 0)
1325 throw _internal.IterableElementError.noElement(); 1325 throw _internal.IterableElementError.noElement();
1326 if (dart.notNull(this.length) > 1) 1326 if (dart.notNull(this.length) > 1)
1327 throw _internal.IterableElementError.tooMany(); 1327 throw _internal.IterableElementError.tooMany();
1328 return this.get(0); 1328 return this[core.$get](0);
1329 } 1329 }
1330 contains(element) { 1330 [core.$contains](element) {
1331 let length = this.length; 1331 let length = this[core.$length];
1332 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) { 1332 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i = dart.notNull(i) + 1) {
1333 if (dart.equals(this.get(i), element)) 1333 if (dart.equals(this[core.$get](i), element))
1334 return true; 1334 return true;
1335 if (length != this.length) { 1335 if (length != this[core.$length]) {
1336 throw new core.ConcurrentModificationError(this); 1336 throw new core.ConcurrentModificationError(this);
1337 } 1337 }
1338 } 1338 }
1339 return false; 1339 return false;
1340 } 1340 }
1341 every(test) { 1341 [core.$every](test) {
1342 let length = this.length; 1342 let length = this[core.$length];
1343 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1343 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1344 if (!dart.notNull(test(this.get(i)))) 1344 if (!dart.notNull(test(this[core.$get](i))))
1345 return false; 1345 return false;
1346 if (length != this.length) { 1346 if (length != this[core.$length]) {
1347 throw new core.ConcurrentModificationError(this); 1347 throw new core.ConcurrentModificationError(this);
1348 } 1348 }
1349 } 1349 }
1350 return true; 1350 return true;
1351 } 1351 }
1352 any(test) { 1352 [core.$any](test) {
1353 let length = this.length; 1353 let length = this[core.$length];
1354 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1354 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1355 if (test(this.get(i))) 1355 if (test(this[core.$get](i)))
1356 return true; 1356 return true;
1357 if (length != this.length) { 1357 if (length != this[core.$length]) {
1358 throw new core.ConcurrentModificationError(this); 1358 throw new core.ConcurrentModificationError(this);
1359 } 1359 }
1360 } 1360 }
1361 return false; 1361 return false;
1362 } 1362 }
1363 firstWhere(test, opts) { 1363 [core.$firstWhere](test, opts) {
1364 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 1364 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
1365 let length = this.length; 1365 let length = this[core.$length];
1366 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1366 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1367 let element = this.get(i); 1367 let element = this[core.$get](i);
1368 if (test(element)) 1368 if (test(element))
1369 return element; 1369 return element;
1370 if (length != this.length) { 1370 if (length != this[core.$length]) {
1371 throw new core.ConcurrentModificationError(this); 1371 throw new core.ConcurrentModificationError(this);
1372 } 1372 }
1373 } 1373 }
1374 if (orElse != null) 1374 if (orElse != null)
1375 return orElse(); 1375 return orElse();
1376 throw _internal.IterableElementError.noElement(); 1376 throw _internal.IterableElementError.noElement();
1377 } 1377 }
1378 lastWhere(test, opts) { 1378 [core.$lastWhere](test, opts) {
1379 let orElse = opts && 'orElse' in opts ? opts.orElse : null; 1379 let orElse = opts && 'orElse' in opts ? opts.orElse : null;
1380 let length = this.length; 1380 let length = this[core.$length];
1381 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no tNull(i) - 1) { 1381 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart.no tNull(i) - 1) {
1382 let element = this.get(i); 1382 let element = this[core.$get](i);
1383 if (test(element)) 1383 if (test(element))
1384 return element; 1384 return element;
1385 if (length != this.length) { 1385 if (length != this[core.$length]) {
1386 throw new core.ConcurrentModificationError(this); 1386 throw new core.ConcurrentModificationError(this);
1387 } 1387 }
1388 } 1388 }
1389 if (orElse != null) 1389 if (orElse != null)
1390 return orElse(); 1390 return orElse();
1391 throw _internal.IterableElementError.noElement(); 1391 throw _internal.IterableElementError.noElement();
1392 } 1392 }
1393 singleWhere(test) { 1393 [core.$singleWhere](test) {
1394 let length = this.length; 1394 let length = this[core.$length];
1395 let match = null; 1395 let match = null;
1396 let matchFound = false; 1396 let matchFound = false;
1397 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1397 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1398 let element = this.get(i); 1398 let element = this[core.$get](i);
1399 if (test(element)) { 1399 if (test(element)) {
1400 if (matchFound) { 1400 if (matchFound) {
1401 throw _internal.IterableElementError.tooMany(); 1401 throw _internal.IterableElementError.tooMany();
1402 } 1402 }
1403 matchFound = true; 1403 matchFound = true;
1404 match = element; 1404 match = element;
1405 } 1405 }
1406 if (length != this.length) { 1406 if (length != this[core.$length]) {
1407 throw new core.ConcurrentModificationError(this); 1407 throw new core.ConcurrentModificationError(this);
1408 } 1408 }
1409 } 1409 }
1410 if (matchFound) 1410 if (matchFound)
1411 return match; 1411 return match;
1412 throw _internal.IterableElementError.noElement(); 1412 throw _internal.IterableElementError.noElement();
1413 } 1413 }
1414 join(separator) { 1414 [core.$join](separator) {
1415 if (separator === void 0) 1415 if (separator === void 0)
1416 separator = ""; 1416 separator = "";
1417 if (this.length == 0) 1417 if (this.length == 0)
1418 return ""; 1418 return "";
1419 let buffer = new core.StringBuffer(); 1419 let buffer = new core.StringBuffer();
1420 buffer.writeAll(this, separator); 1420 buffer.writeAll(this, separator);
1421 return buffer.toString(); 1421 return buffer.toString();
1422 } 1422 }
1423 where(test) { 1423 [core.$where](test) {
1424 return new (_internal.WhereIterable$(E))(this, test); 1424 return new (_internal.WhereIterable$(E))(this, test);
1425 } 1425 }
1426 map(f) { 1426 [core.$map](f) {
1427 return new _internal.MappedListIterable(this, f); 1427 return new _internal.MappedListIterable(this, f);
1428 } 1428 }
1429 expand(f) { 1429 [core.$expand](f) {
1430 return new (_internal.ExpandIterable$(E, dynamic))(this, f); 1430 return new (_internal.ExpandIterable$(E, dynamic))(this, f);
1431 } 1431 }
1432 reduce(combine) { 1432 [core.$reduce](combine) {
1433 let length = this.length; 1433 let length = this[core.$length];
1434 if (length == 0) 1434 if (length == 0)
1435 throw _internal.IterableElementError.noElement(); 1435 throw _internal.IterableElementError.noElement();
1436 let value = this.get(0); 1436 let value = this[core.$get](0);
1437 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1437 for (let i = 1; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1438 value = combine(value, this.get(i)); 1438 value = combine(value, this[core.$get](i));
1439 if (length != this.length) { 1439 if (length != this[core.$length]) {
1440 throw new core.ConcurrentModificationError(this); 1440 throw new core.ConcurrentModificationError(this);
1441 } 1441 }
1442 } 1442 }
1443 return value; 1443 return value;
1444 } 1444 }
1445 fold(initialValue, combine) { 1445 [core.$fold](initialValue, combine) {
1446 let value = initialValue; 1446 let value = initialValue;
1447 let length = this.length; 1447 let length = this[core.$length];
1448 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1448 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1449 value = dart.dinvokef(combine, value, this.get(i)); 1449 value = dart.dinvokef(combine, value, this[core.$get](i));
1450 if (length != this.length) { 1450 if (length != this[core.$length]) {
1451 throw new core.ConcurrentModificationError(this); 1451 throw new core.ConcurrentModificationError(this);
1452 } 1452 }
1453 } 1453 }
1454 return value; 1454 return value;
1455 } 1455 }
1456 skip(count) { 1456 [core.$skip](count) {
1457 return new (_internal.SubListIterable$(E))(this, count, null); 1457 return new (_internal.SubListIterable$(E))(this, count, null);
1458 } 1458 }
1459 skipWhile(test) { 1459 [core.$skipWhile](test) {
1460 return new (_internal.SkipWhileIterable$(E))(this, test); 1460 return new (_internal.SkipWhileIterable$(E))(this, test);
1461 } 1461 }
1462 take(count) { 1462 [core.$take](count) {
1463 return new (_internal.SubListIterable$(E))(this, 0, count); 1463 return new (_internal.SubListIterable$(E))(this, 0, count);
1464 } 1464 }
1465 takeWhile(test) { 1465 [core.$takeWhile](test) {
1466 return new (_internal.TakeWhileIterable$(E))(this, test); 1466 return new (_internal.TakeWhileIterable$(E))(this, test);
1467 } 1467 }
1468 toList(opts) { 1468 [core.$toList](opts) {
1469 let growable = opts && 'growable' in opts ? opts.growable : true; 1469 let growable = opts && 'growable' in opts ? opts.growable : true;
1470 let result = null; 1470 let result = null;
1471 if (growable) { 1471 if (growable) {
1472 result = ((_) => { 1472 result = ((_) => {
1473 _.length = this.length; 1473 _[core.$length] = this.length;
1474 return _; 1474 return _;
1475 }).bind(this)(new (core.List$(E))()); 1475 }).bind(this)(new (core.List$(E))());
1476 } else { 1476 } else {
1477 result = new (core.List$(E))(this.length); 1477 result = new (core.List$(E))(this.length);
1478 } 1478 }
1479 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) { 1479 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) {
1480 result.set(i, this.get(i)); 1480 result[core.$set](i, this[core.$get](i));
1481 } 1481 }
1482 return result; 1482 return result;
1483 } 1483 }
1484 toSet() { 1484 [core.$toSet]() {
1485 let result = new (core.Set$(E))(); 1485 let result = new (core.Set$(E))();
1486 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) { 1486 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) {
1487 result.add(this.get(i)); 1487 result.add(this[core.$get](i));
1488 } 1488 }
1489 return result; 1489 return result;
1490 } 1490 }
1491 add(element) { 1491 [core.$add](element) {
1492 this.set(((x$) => this.length = dart.notNull(x$) + 1, x$).bind(this)(thi s.length), element); 1492 this[core.$set](((x$) => this[core.$length] = dart.notNull(x$) + 1, x$). bind(this)(this[core.$length]), element);
1493 } 1493 }
1494 addAll(iterable) { 1494 [core.$addAll](iterable) {
1495 for (let element of iterable) { 1495 for (let element of iterable) {
1496 this.set(((x$) => this.length = dart.notNull(x$) + 1, x$).bind(this)(t his.length), element); 1496 this[core.$set](((x$) => this[core.$length] = dart.notNull(x$) + 1, x$ ).bind(this)(this[core.$length]), element);
1497 } 1497 }
1498 } 1498 }
1499 remove(element) { 1499 [core.$remove](element) {
1500 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no tNull(i) + 1) { 1500 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i = dart.notNull(i) + 1) {
1501 if (dart.equals(this.get(i), element)) { 1501 if (dart.equals(this[core.$get](i), element)) {
1502 this.setRange(i, dart.notNull(this.length) - 1, this, dart.notNull(i ) + 1); 1502 this[core.$setRange](i, dart.notNull(this[core.$length]) - 1, this, dart.notNull(i) + 1);
1503 this.length = 1; 1503 this[core.$length] = 1;
1504 return true; 1504 return true;
1505 } 1505 }
1506 } 1506 }
1507 return false; 1507 return false;
1508 } 1508 }
1509 removeWhere(test) { 1509 [core.$removeWhere](test) {
1510 ListMixin[_filter](this, test, false); 1510 ListMixin[_filter](this, test, false);
1511 } 1511 }
1512 retainWhere(test) { 1512 [core.$retainWhere](test) {
1513 ListMixin[_filter](this, test, true); 1513 ListMixin[_filter](this, test, true);
1514 } 1514 }
1515 static [_filter](source, test, retainMatching) { 1515 static [_filter](source, test, retainMatching) {
1516 let retained = new core.List.from([]); 1516 let retained = new core.List.from([]);
1517 let length = source.length; 1517 let length = source[core.$length];
1518 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1518 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1519 let element = source.get(i); 1519 let element = source[core.$get](i);
1520 if (dart.dinvokef(test, element) == retainMatching) { 1520 if (dart.dinvokef(test, element) == retainMatching) {
1521 retained.add(element); 1521 retained[core.$add](element);
1522 } 1522 }
1523 if (length != source.length) { 1523 if (length != source[core.$length]) {
1524 throw new core.ConcurrentModificationError(source); 1524 throw new core.ConcurrentModificationError(source);
1525 } 1525 }
1526 } 1526 }
1527 if (retained.length != source.length) { 1527 if (retained[core.$length] != source[core.$length]) {
1528 source.setRange(0, retained.length, retained); 1528 source[core.$setRange](0, retained[core.$length], retained);
1529 source.length = retained.length; 1529 source[core.$length] = retained[core.$length];
1530 } 1530 }
1531 } 1531 }
1532 clear() { 1532 [core.$clear]() {
1533 this.length = 0; 1533 this[core.$length] = 0;
1534 } 1534 }
1535 removeLast() { 1535 [core.$removeLast]() {
1536 if (this.length == 0) { 1536 if (this.length == 0) {
1537 throw _internal.IterableElementError.noElement(); 1537 throw _internal.IterableElementError.noElement();
1538 } 1538 }
1539 let result = this.get(dart.notNull(this.length) - 1); 1539 let result = this[core.$get](dart.notNull(this.length) - 1);
1540 this.length = dart.notNull(this.length) - 1; 1540 this.length = dart.notNull(this.length) - 1;
1541 return result; 1541 return result;
1542 } 1542 }
1543 sort(compare) { 1543 [core.$sort](compare) {
1544 if (compare === void 0) 1544 if (compare === void 0)
1545 compare = null; 1545 compare = null;
1546 if (compare == null) { 1546 if (compare == null) {
1547 let defaultCompare = core.Comparable.compare; 1547 let defaultCompare = core.Comparable.compare;
1548 compare = defaultCompare; 1548 compare = defaultCompare;
1549 } 1549 }
1550 _internal.Sort.sort(this, compare); 1550 _internal.Sort.sort(this, compare);
1551 } 1551 }
1552 shuffle(random) { 1552 [core.$shuffle](random) {
1553 if (random === void 0) 1553 if (random === void 0)
1554 random = null; 1554 random = null;
1555 if (random == null) 1555 if (random == null)
1556 random = new math.Random(); 1556 random = new math.Random();
1557 let length = this.length; 1557 let length = this[core.$length];
1558 while (dart.notNull(length) > 1) { 1558 while (dart.notNull(length) > 1) {
1559 let pos = random.nextInt(length); 1559 let pos = random.nextInt(length);
1560 length = 1; 1560 length = 1;
1561 let tmp = this.get(length); 1561 let tmp = this[core.$get](length);
1562 this.set(length, this.get(pos)); 1562 this[core.$set](length, this[core.$get](pos));
1563 this.set(pos, tmp); 1563 this[core.$set](pos, tmp);
1564 } 1564 }
1565 } 1565 }
1566 asMap() { 1566 [core.$asMap]() {
1567 return new (_internal.ListMapView$(E))(this); 1567 return new (_internal.ListMapView$(E))(this);
1568 } 1568 }
1569 sublist(start, end) { 1569 [core.$sublist](start, end) {
1570 if (end === void 0) 1570 if (end === void 0)
1571 end = null; 1571 end = null;
1572 let listLength = this.length; 1572 let listLength = this[core.$length];
1573 if (end == null) 1573 if (end == null)
1574 end = listLength; 1574 end = listLength;
1575 core.RangeError.checkValidRange(start, end, listLength); 1575 core.RangeError.checkValidRange(start, end, listLength);
1576 let length = dart.notNull(end) - dart.notNull(start); 1576 let length = dart.notNull(end) - dart.notNull(start);
1577 let result = new (core.List$(E))(); 1577 let result = new (core.List$(E))();
1578 result.length = length; 1578 result[core.$length] = length;
1579 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) { 1579 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull (i) + 1) {
1580 result.set(i, this.get(dart.notNull(start) + dart.notNull(i))); 1580 result[core.$set](i, this[core.$get](dart.notNull(start) + dart.notNul l(i)));
1581 } 1581 }
1582 return result; 1582 return result;
1583 } 1583 }
1584 getRange(start, end) { 1584 [core.$getRange](start, end) {
1585 core.RangeError.checkValidRange(start, end, this.length); 1585 core.RangeError.checkValidRange(start, end, this[core.$length]);
1586 return new (_internal.SubListIterable$(E))(this, start, end); 1586 return new (_internal.SubListIterable$(E))(this, start, end);
1587 } 1587 }
1588 removeRange(start, end) { 1588 [core.$removeRange](start, end) {
1589 core.RangeError.checkValidRange(start, end, this.length); 1589 core.RangeError.checkValidRange(start, end, this[core.$length]);
1590 let length = dart.notNull(end) - dart.notNull(start); 1590 let length = dart.notNull(end) - dart.notNull(start);
1591 this.setRange(start, dart.notNull(this.length) - dart.notNull(length), t his, end); 1591 this.setRange(start, dart.notNull(this[core.$length]) - dart.notNull(len gth), this, end);
1592 this.length = length; 1592 this[core.$length] = length;
1593 } 1593 }
1594 fillRange(start, end, fill) { 1594 [core.$fillRange](start, end, fill) {
1595 if (fill === void 0) 1595 if (fill === void 0)
1596 fill = null; 1596 fill = null;
1597 core.RangeError.checkValidRange(start, end, this.length); 1597 core.RangeError.checkValidRange(start, end, this[core.$length]);
1598 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) { 1598 for (let i = start; dart.notNull(i) < dart.notNull(end); i = dart.notNul l(i) + 1) {
1599 this.set(i, fill); 1599 this[core.$set](i, fill);
1600 } 1600 }
1601 } 1601 }
1602 setRange(start, end, iterable, skipCount) { 1602 [core.$setRange](start, end, iterable, skipCount) {
1603 if (skipCount === void 0) 1603 if (skipCount === void 0)
1604 skipCount = 0; 1604 skipCount = 0;
1605 core.RangeError.checkValidRange(start, end, this.length); 1605 core.RangeError.checkValidRange(start, end, this[core.$length]);
1606 let length = dart.notNull(end) - dart.notNull(start); 1606 let length = dart.notNull(end) - dart.notNull(start);
1607 if (length == 0) 1607 if (length == 0)
1608 return; 1608 return;
1609 core.RangeError.checkNotNegative(skipCount, "skipCount"); 1609 core.RangeError.checkNotNegative(skipCount, "skipCount");
1610 let otherList = null; 1610 let otherList = null;
1611 let otherStart = null; 1611 let otherStart = null;
1612 if (dart.is(iterable, core.List)) { 1612 if (dart.is(iterable, core.List)) {
1613 otherList = dart.as(iterable, core.List); 1613 otherList = dart.as(iterable, core.List);
1614 otherStart = skipCount; 1614 otherStart = skipCount;
1615 } else { 1615 } else {
1616 otherList = iterable.skip(skipCount).toList({growable: false}); 1616 otherList = iterable[core.$skip](skipCount)[core.$toList]({growable: f alse});
1617 otherStart = 0; 1617 otherStart = 0;
1618 } 1618 }
1619 if (dart.notNull(otherStart) + dart.notNull(length) > dart.notNull(other List.length)) { 1619 if (dart.notNull(otherStart) + dart.notNull(length) > dart.notNull(other List[core.$length])) {
1620 throw _internal.IterableElementError.tooFew(); 1620 throw _internal.IterableElementError.tooFew();
1621 } 1621 }
1622 if (dart.notNull(otherStart) < dart.notNull(start)) { 1622 if (dart.notNull(otherStart) < dart.notNull(start)) {
1623 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart. notNull(i) - 1) { 1623 for (let i = dart.notNull(length) - 1; dart.notNull(i) >= 0; i = dart. notNull(i) - 1) {
1624 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList.ge t(dart.notNull(otherStart) + dart.notNull(i)), E)); 1624 this[core.$set](dart.notNull(start) + dart.notNull(i), dart.as(other List[core.$get](dart.notNull(otherStart) + dart.notNull(i)), E));
1625 } 1625 }
1626 } else { 1626 } else {
1627 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNu ll(i) + 1) { 1627 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNu ll(i) + 1) {
1628 this.set(dart.notNull(start) + dart.notNull(i), dart.as(otherList.ge t(dart.notNull(otherStart) + dart.notNull(i)), E)); 1628 this[core.$set](dart.notNull(start) + dart.notNull(i), dart.as(other List[core.$get](dart.notNull(otherStart) + dart.notNull(i)), E));
1629 } 1629 }
1630 } 1630 }
1631 } 1631 }
1632 replaceRange(start, end, newContents) { 1632 [core.$replaceRange](start, end, newContents) {
1633 core.RangeError.checkValidRange(start, end, this.length); 1633 core.RangeError.checkValidRange(start, end, this[core.$length]);
1634 if (!dart.is(newContents, _internal.EfficientLength)) { 1634 if (!dart.is(newContents, _internal.EfficientLength)) {
1635 newContents = newContents.toList(); 1635 newContents = newContents[core.$toList]();
1636 } 1636 }
1637 let removeLength = dart.notNull(end) - dart.notNull(start); 1637 let removeLength = dart.notNull(end) - dart.notNull(start);
1638 let insertLength = newContents.length; 1638 let insertLength = newContents[core.$length];
1639 if (dart.notNull(removeLength) >= dart.notNull(insertLength)) { 1639 if (dart.notNull(removeLength) >= dart.notNull(insertLength)) {
1640 let delta = dart.notNull(removeLength) - dart.notNull(insertLength); 1640 let delta = dart.notNull(removeLength) - dart.notNull(insertLength);
1641 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); 1641 let insertEnd = dart.notNull(start) + dart.notNull(insertLength);
1642 let newLength = dart.notNull(this.length) - dart.notNull(delta); 1642 let newLength = dart.notNull(this[core.$length]) - dart.notNull(delta) ;
1643 this.setRange(start, insertEnd, newContents); 1643 this[core.$setRange](start, insertEnd, newContents);
1644 if (delta != 0) { 1644 if (delta != 0) {
1645 this.setRange(insertEnd, newLength, this, end); 1645 this[core.$setRange](insertEnd, newLength, this, end);
1646 this.length = newLength; 1646 this[core.$length] = newLength;
1647 } 1647 }
1648 } else { 1648 } else {
1649 let delta = dart.notNull(insertLength) - dart.notNull(removeLength); 1649 let delta = dart.notNull(insertLength) - dart.notNull(removeLength);
1650 let newLength = dart.notNull(this.length) + dart.notNull(delta); 1650 let newLength = dart.notNull(this[core.$length]) + dart.notNull(delta) ;
1651 let insertEnd = dart.notNull(start) + dart.notNull(insertLength); 1651 let insertEnd = dart.notNull(start) + dart.notNull(insertLength);
1652 this.length = newLength; 1652 this[core.$length] = newLength;
1653 this.setRange(insertEnd, newLength, this, end); 1653 this[core.$setRange](insertEnd, newLength, this, end);
1654 this.setRange(start, insertEnd, newContents); 1654 this[core.$setRange](start, insertEnd, newContents);
1655 } 1655 }
1656 } 1656 }
1657 indexOf(element, startIndex) { 1657 [core.$indexOf](element, startIndex) {
1658 if (startIndex === void 0) 1658 if (startIndex === void 0)
1659 startIndex = 0; 1659 startIndex = 0;
1660 if (dart.notNull(startIndex) >= dart.notNull(this.length)) { 1660 if (dart.notNull(startIndex) >= dart.notNull(this[core.$length])) {
1661 return -1; 1661 return -1;
1662 } 1662 }
1663 if (dart.notNull(startIndex) < 0) { 1663 if (dart.notNull(startIndex) < 0) {
1664 startIndex = 0; 1664 startIndex = 0;
1665 } 1665 }
1666 for (let i = startIndex; dart.notNull(i) < dart.notNull(this.length); i = dart.notNull(i) + 1) { 1666 for (let i = startIndex; dart.notNull(i) < dart.notNull(this[core.$lengt h]); i = dart.notNull(i) + 1) {
1667 if (dart.equals(this.get(i), element)) { 1667 if (dart.equals(this[core.$get](i), element)) {
1668 return i; 1668 return i;
1669 } 1669 }
1670 } 1670 }
1671 return -1; 1671 return -1;
1672 } 1672 }
1673 lastIndexOf(element, startIndex) { 1673 [core.$lastIndexOf](element, startIndex) {
1674 if (startIndex === void 0) 1674 if (startIndex === void 0)
1675 startIndex = null; 1675 startIndex = null;
1676 if (startIndex == null) { 1676 if (startIndex == null) {
1677 startIndex = dart.notNull(this.length) - 1; 1677 startIndex = dart.notNull(this[core.$length]) - 1;
1678 } else { 1678 } else {
1679 if (dart.notNull(startIndex) < 0) { 1679 if (dart.notNull(startIndex) < 0) {
1680 return -1; 1680 return -1;
1681 } 1681 }
1682 if (dart.notNull(startIndex) >= dart.notNull(this.length)) { 1682 if (dart.notNull(startIndex) >= dart.notNull(this[core.$length])) {
1683 startIndex = dart.notNull(this.length) - 1; 1683 startIndex = dart.notNull(this[core.$length]) - 1;
1684 } 1684 }
1685 } 1685 }
1686 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) { 1686 for (let i = startIndex; dart.notNull(i) >= 0; i = dart.notNull(i) - 1) {
1687 if (dart.equals(this.get(i), element)) { 1687 if (dart.equals(this[core.$get](i), element)) {
1688 return i; 1688 return i;
1689 } 1689 }
1690 } 1690 }
1691 return -1; 1691 return -1;
1692 } 1692 }
1693 insert(index, element) { 1693 [core.$insert](index, element) {
1694 core.RangeError.checkValueInInterval(index, 0, this.length, "index"); 1694 core.RangeError.checkValueInInterval(index, 0, this.length, "index");
1695 if (index == this.length) { 1695 if (index == this[core.$length]) {
1696 this.add(element); 1696 this.add(element);
1697 return; 1697 return;
1698 } 1698 }
1699 if (!(typeof index == 'number')) 1699 if (!(typeof index == 'number'))
1700 throw new core.ArgumentError(index); 1700 throw new core.ArgumentError(index);
1701 this.length = dart.notNull(this.length) + 1; 1701 this[core.$length] = dart.notNull(this[core.$length]) + 1;
1702 this.setRange(dart.notNull(index) + 1, this.length, this, index); 1702 this.setRange(dart.notNull(index) + 1, this[core.$length], this, index);
1703 this.set(index, element); 1703 this[core.$set](index, element);
1704 } 1704 }
1705 removeAt(index) { 1705 [core.$removeAt](index) {
1706 let result = this.get(index); 1706 let result = this[core.$get](index);
1707 this.setRange(index, dart.notNull(this.length) - 1, this, dart.notNull(i ndex) + 1); 1707 this.setRange(index, dart.notNull(this[core.$length]) - 1, this, dart.no tNull(index) + 1);
1708 this.length = dart.notNull(this.length) - 1; 1708 this.length = dart.notNull(this.length) - 1;
1709 return result; 1709 return result;
1710 } 1710 }
1711 insertAll(index, iterable) { 1711 [core.$insertAll](index, iterable) {
1712 core.RangeError.checkValueInInterval(index, 0, this.length, "index"); 1712 core.RangeError.checkValueInInterval(index, 0, this.length, "index");
1713 if (dart.is(iterable, _internal.EfficientLength)) { 1713 if (dart.is(iterable, _internal.EfficientLength)) {
1714 iterable = iterable.toList(); 1714 iterable = iterable[core.$toList]();
1715 } 1715 }
1716 let insertionLength = iterable.length; 1716 let insertionLength = iterable[core.$length];
1717 this.length = insertionLength; 1717 this[core.$length] = insertionLength;
1718 this.setRange(dart.notNull(index) + dart.notNull(insertionLength), this. length, this, index); 1718 this.setRange(dart.notNull(index) + dart.notNull(insertionLength), this[ core.$length], this, index);
1719 this.setAll(index, iterable); 1719 this.setAll(index, iterable);
1720 } 1720 }
1721 setAll(index, iterable) { 1721 [core.$setAll](index, iterable) {
1722 if (dart.is(iterable, core.List)) { 1722 if (dart.is(iterable, core.List)) {
1723 this.setRange(index, dart.notNull(index) + dart.notNull(iterable.lengt h), iterable); 1723 this.setRange(index, dart.notNull(index) + dart.notNull(iterable[core. $length]), iterable);
1724 } else { 1724 } else {
1725 for (let element of iterable) { 1725 for (let element of iterable) {
1726 this.set(((x$) => index = dart.notNull(x$) + 1, x$)(index), element) ; 1726 this[core.$set](((x$) => index = dart.notNull(x$) + 1, x$)(index), e lement);
1727 } 1727 }
1728 } 1728 }
1729 } 1729 }
1730 get reversed() { 1730 get [core.$reversed]() {
1731 return new (_internal.ReversedListIterable$(E))(this); 1731 return new (_internal.ReversedListIterable$(E))(this);
1732 } 1732 }
1733 toString() { 1733 toString() {
1734 return IterableBase.iterableToFullString(this, '[', ']'); 1734 return IterableBase.iterableToFullString(this, '[', ']');
1735 } 1735 }
1736 } 1736 }
1737 ListMixin[dart.implements] = () => [core.List$(E)]; 1737 ListMixin[dart.implements] = () => [core.List$(E)];
1738 return ListMixin; 1738 return ListMixin;
1739 }); 1739 });
1740 let ListMixin = ListMixin$(dart.dynamic); 1740 let ListMixin = ListMixin$(dart.dynamic);
(...skipping 19 matching lines...) Expand all
1760 } 1760 }
1761 } 1761 }
1762 containsValue(value) { 1762 containsValue(value) {
1763 for (let key of this.keys) { 1763 for (let key of this.keys) {
1764 if (dart.equals(this.get(key), value)) 1764 if (dart.equals(this.get(key), value))
1765 return true; 1765 return true;
1766 } 1766 }
1767 return false; 1767 return false;
1768 } 1768 }
1769 putIfAbsent(key, ifAbsent) { 1769 putIfAbsent(key, ifAbsent) {
1770 if (this.keys.contains(key)) { 1770 if (this.keys[core.$contains](key)) {
1771 return this.get(key); 1771 return this.get(key);
1772 } 1772 }
1773 return this.set(key, ifAbsent()); 1773 return this.set(key, ifAbsent());
1774 } 1774 }
1775 containsKey(key) { 1775 containsKey(key) {
1776 return this.keys.contains(key); 1776 return this.keys[core.$contains](key);
1777 } 1777 }
1778 get length() { 1778 get length() {
1779 return this.keys.length; 1779 return this.keys[core.$length];
1780 } 1780 }
1781 get isEmpty() { 1781 get isEmpty() {
1782 return this.keys.isEmpty; 1782 return this.keys[core.$isEmpty];
1783 } 1783 }
1784 get isNotEmpty() { 1784 get isNotEmpty() {
1785 return this.keys.isNotEmpty; 1785 return this.keys[core.$isNotEmpty];
1786 } 1786 }
1787 get values() { 1787 get values() {
1788 return new (_MapBaseValueIterable$(V))(this); 1788 return new (_MapBaseValueIterable$(V))(this);
1789 } 1789 }
1790 toString() { 1790 toString() {
1791 return Maps.mapToString(this); 1791 return Maps.mapToString(this);
1792 } 1792 }
1793 } 1793 }
1794 MapMixin[dart.implements] = () => [core.Map$(K, V)]; 1794 MapMixin[dart.implements] = () => [core.Map$(K, V)];
1795 return MapMixin; 1795 return MapMixin;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1829 return UnmodifiableMapBase; 1829 return UnmodifiableMapBase;
1830 }); 1830 });
1831 let UnmodifiableMapBase = UnmodifiableMapBase$(dart.dynamic, dart.dynamic); 1831 let UnmodifiableMapBase = UnmodifiableMapBase$(dart.dynamic, dart.dynamic);
1832 let _map = Symbol('_map'); 1832 let _map = Symbol('_map');
1833 let _MapBaseValueIterable$ = dart.generic(function(V) { 1833 let _MapBaseValueIterable$ = dart.generic(function(V) {
1834 class _MapBaseValueIterable extends IterableBase$(V) { 1834 class _MapBaseValueIterable extends IterableBase$(V) {
1835 _MapBaseValueIterable(map$) { 1835 _MapBaseValueIterable(map$) {
1836 this[_map] = map$; 1836 this[_map] = map$;
1837 super.IterableBase(); 1837 super.IterableBase();
1838 } 1838 }
1839 get length() { 1839 get [core.$length]() {
1840 return this[_map].length; 1840 return this[_map].length;
1841 } 1841 }
1842 get isEmpty() { 1842 get [core.$isEmpty]() {
1843 return this[_map].isEmpty; 1843 return this[_map].isEmpty;
1844 } 1844 }
1845 get isNotEmpty() { 1845 get [core.$isNotEmpty]() {
1846 return this[_map].isNotEmpty; 1846 return this[_map].isNotEmpty;
1847 } 1847 }
1848 get first() { 1848 get [core.$first]() {
1849 return dart.as(this[_map].get(this[_map].keys.first), V); 1849 return dart.as(this[_map].get(this[_map].keys[core.$first]), V);
1850 } 1850 }
1851 get single() { 1851 get [core.$single]() {
1852 return dart.as(this[_map].get(this[_map].keys.single), V); 1852 return dart.as(this[_map].get(this[_map].keys[core.$single]), V);
1853 } 1853 }
1854 get last() { 1854 get [core.$last]() {
1855 return dart.as(this[_map].get(this[_map].keys.last), V); 1855 return dart.as(this[_map].get(this[_map].keys[core.$last]), V);
1856 } 1856 }
1857 get iterator() { 1857 get [core.$iterator]() {
1858 return new (_MapBaseValueIterator$(V))(this[_map]); 1858 return new (_MapBaseValueIterator$(V))(this[_map]);
1859 } 1859 }
1860 } 1860 }
1861 _MapBaseValueIterable[dart.implements] = () => [_internal.EfficientLength]; 1861 _MapBaseValueIterable[dart.implements] = () => [_internal.EfficientLength];
1862 return _MapBaseValueIterable; 1862 return _MapBaseValueIterable;
1863 }); 1863 });
1864 let _MapBaseValueIterable = _MapBaseValueIterable$(dart.dynamic); 1864 let _MapBaseValueIterable = _MapBaseValueIterable$(dart.dynamic);
1865 let _keys = Symbol('_keys'); 1865 let _keys = Symbol('_keys');
1866 let _MapBaseValueIterator$ = dart.generic(function(V) { 1866 let _MapBaseValueIterator$ = dart.generic(function(V) {
1867 class _MapBaseValueIterator extends core.Object { 1867 class _MapBaseValueIterator extends core.Object {
1868 _MapBaseValueIterator(map) { 1868 _MapBaseValueIterator(map) {
1869 this[_map] = map; 1869 this[_map] = map;
1870 this[_keys] = map.keys.iterator; 1870 this[_keys] = map.keys[core.$iterator];
1871 this[_current] = null; 1871 this[_current] = null;
1872 } 1872 }
1873 moveNext() { 1873 moveNext() {
1874 if (this[_keys].moveNext()) { 1874 if (this[_keys].moveNext()) {
1875 this[_current] = dart.as(this[_map].get(this[_keys].current), V); 1875 this[_current] = dart.as(this[_map].get(this[_keys].current), V);
1876 return true; 1876 return true;
1877 } 1877 }
1878 this[_current] = null; 1878 this[_current] = null;
1879 return false; 1879 return false;
1880 } 1880 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 } 1969 }
1970 static putIfAbsent(map, key, ifAbsent) { 1970 static putIfAbsent(map, key, ifAbsent) {
1971 if (map.containsKey(key)) { 1971 if (map.containsKey(key)) {
1972 return map.get(key); 1972 return map.get(key);
1973 } 1973 }
1974 let v = ifAbsent(); 1974 let v = ifAbsent();
1975 map.set(key, v); 1975 map.set(key, v);
1976 return v; 1976 return v;
1977 } 1977 }
1978 static clear(map) { 1978 static clear(map) {
1979 for (let k of map.keys.toList()) { 1979 for (let k of map.keys[core.$toList]()) {
1980 map.remove(k); 1980 map.remove(k);
1981 } 1981 }
1982 } 1982 }
1983 static forEach(map, f) { 1983 static forEach(map, f) {
1984 for (let k of map.keys) { 1984 for (let k of map.keys) {
1985 dart.dinvokef(f, k, map.get(k)); 1985 dart.dinvokef(f, k, map.get(k));
1986 } 1986 }
1987 } 1987 }
1988 static getValues(map) { 1988 static getValues(map) {
1989 return map.keys.map((key) => map.get(key)); 1989 return map.keys[core.$map]((key) => map.get(key));
1990 } 1990 }
1991 static length(map) { 1991 static length(map) {
1992 return map.keys.length; 1992 return map.keys[core.$length];
1993 } 1993 }
1994 static isEmpty(map) { 1994 static isEmpty(map) {
1995 return map.keys.isEmpty; 1995 return map.keys[core.$isEmpty];
1996 } 1996 }
1997 static isNotEmpty(map) { 1997 static isNotEmpty(map) {
1998 return map.keys.isNotEmpty; 1998 return map.keys[core.$isNotEmpty];
1999 } 1999 }
2000 static mapToString(m) { 2000 static mapToString(m) {
2001 if (IterableBase._isToStringVisiting(m)) { 2001 if (IterableBase._isToStringVisiting(m)) {
2002 return '{...}'; 2002 return '{...}';
2003 } 2003 }
2004 let result = new core.StringBuffer(); 2004 let result = new core.StringBuffer();
2005 try { 2005 try {
2006 IterableBase[_toStringVisiting].add(m); 2006 IterableBase[_toStringVisiting][core.$add](m);
2007 result.write('{'); 2007 result.write('{');
2008 let first = true; 2008 let first = true;
2009 m.forEach(((k, v) => { 2009 m.forEach(((k, v) => {
2010 if (!dart.notNull(first)) { 2010 if (!dart.notNull(first)) {
2011 result.write(', '); 2011 result.write(', ');
2012 } 2012 }
2013 first = false; 2013 first = false;
2014 result.write(k); 2014 result.write(k);
2015 result.write(': '); 2015 result.write(': ');
2016 result.write(v); 2016 result.write(v);
2017 }).bind(this)); 2017 }).bind(this));
2018 result.write('}'); 2018 result.write('}');
2019 } finally { 2019 } finally {
2020 dart.assert(core.identical(IterableBase[_toStringVisiting].last, m)); 2020 dart.assert(core.identical(IterableBase[_toStringVisiting][core.$last], m));
2021 IterableBase[_toStringVisiting].removeLast(); 2021 IterableBase[_toStringVisiting][core.$removeLast]();
2022 } 2022 }
2023 return result.toString(); 2023 return result.toString();
2024 } 2024 }
2025 static [_id](x) { 2025 static [_id](x) {
2026 return x; 2026 return x;
2027 } 2027 }
2028 static [_fillMapWithMappedIterable](map, iterable, key, value) { 2028 static [_fillMapWithMappedIterable](map, iterable, key, value) {
2029 if (key == null) 2029 if (key == null)
2030 key = Maps[_id]; 2030 key = Maps[_id];
2031 if (value == null) 2031 if (value == null)
2032 value = Maps[_id]; 2032 value = Maps[_id];
2033 for (let element of iterable) { 2033 for (let element of iterable) {
2034 map.set(dart.dinvokef(key, element), dart.dinvokef(value, element)); 2034 map.set(dart.dinvokef(key, element), dart.dinvokef(value, element));
2035 } 2035 }
2036 } 2036 }
2037 static [_fillMapWithIterables](map, keys, values) { 2037 static [_fillMapWithIterables](map, keys, values) {
2038 let keyIterator = keys.iterator; 2038 let keyIterator = keys[core.$iterator];
2039 let valueIterator = values.iterator; 2039 let valueIterator = values[core.$iterator];
2040 let hasNextKey = keyIterator.moveNext(); 2040 let hasNextKey = keyIterator.moveNext();
2041 let hasNextValue = valueIterator.moveNext(); 2041 let hasNextValue = valueIterator.moveNext();
2042 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { 2042 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) {
2043 map.set(keyIterator.current, valueIterator.current); 2043 map.set(keyIterator.current, valueIterator.current);
2044 hasNextKey = keyIterator.moveNext(); 2044 hasNextKey = keyIterator.moveNext();
2045 hasNextValue = valueIterator.moveNext(); 2045 hasNextValue = valueIterator.moveNext();
2046 } 2046 }
2047 if (dart.notNull(hasNextKey) || dart.notNull(hasNextValue)) { 2047 if (dart.notNull(hasNextKey) || dart.notNull(hasNextValue)) {
2048 throw new core.ArgumentError("Iterables do not have same length."); 2048 throw new core.ArgumentError("Iterables do not have same length.");
2049 } 2049 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
2143 super.IterableBase(); 2143 super.IterableBase();
2144 this[_sentinel] = new (_DoubleLinkedQueueEntrySentinel$(E))(); 2144 this[_sentinel] = new (_DoubleLinkedQueueEntrySentinel$(E))();
2145 } 2145 }
2146 from(elements) { 2146 from(elements) {
2147 let list = dart.as(new DoubleLinkedQueue(), Queue$(E)); 2147 let list = dart.as(new DoubleLinkedQueue(), Queue$(E));
2148 for (let e of dart.as(elements, core.Iterable$(E))) { 2148 for (let e of dart.as(elements, core.Iterable$(E))) {
2149 list.addLast(e); 2149 list.addLast(e);
2150 } 2150 }
2151 return dart.as(list, DoubleLinkedQueue$(E)); 2151 return dart.as(list, DoubleLinkedQueue$(E));
2152 } 2152 }
2153 get length() { 2153 get [core.$length]() {
2154 return this[_elementCount]; 2154 return this[_elementCount];
2155 } 2155 }
2156 addLast(value) { 2156 addLast(value) {
2157 this[_sentinel].prepend(value); 2157 this[_sentinel].prepend(value);
2158 this[_elementCount] = dart.notNull(this[_elementCount]) + 1; 2158 this[_elementCount] = dart.notNull(this[_elementCount]) + 1;
2159 } 2159 }
2160 addFirst(value) { 2160 addFirst(value) {
2161 this[_sentinel].append(value); 2161 this[_sentinel].append(value);
2162 this[_elementCount] = dart.notNull(this[_elementCount]) + 1; 2162 this[_elementCount] = dart.notNull(this[_elementCount]) + 1;
2163 } 2163 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 } 2203 }
2204 entry = next; 2204 entry = next;
2205 } 2205 }
2206 } 2206 }
2207 removeWhere(test) { 2207 removeWhere(test) {
2208 this[_filter](test, true); 2208 this[_filter](test, true);
2209 } 2209 }
2210 retainWhere(test) { 2210 retainWhere(test) {
2211 this[_filter](test, false); 2211 this[_filter](test, false);
2212 } 2212 }
2213 get first() { 2213 get [core.$first]() {
2214 return this[_sentinel][_next].element; 2214 return this[_sentinel][_next].element;
2215 } 2215 }
2216 get last() { 2216 get [core.$last]() {
2217 return this[_sentinel][_previous].element; 2217 return this[_sentinel][_previous].element;
2218 } 2218 }
2219 get single() { 2219 get [core.$single]() {
2220 if (core.identical(this[_sentinel][_next], this[_sentinel][_previous])) { 2220 if (core.identical(this[_sentinel][_next], this[_sentinel][_previous])) {
2221 return this[_sentinel][_next].element; 2221 return this[_sentinel][_next].element;
2222 } 2222 }
2223 throw _internal.IterableElementError.tooMany(); 2223 throw _internal.IterableElementError.tooMany();
2224 } 2224 }
2225 lastEntry() { 2225 lastEntry() {
2226 return this[_sentinel].previousEntry(); 2226 return this[_sentinel].previousEntry();
2227 } 2227 }
2228 firstEntry() { 2228 firstEntry() {
2229 return this[_sentinel].nextEntry(); 2229 return this[_sentinel].nextEntry();
2230 } 2230 }
2231 get isEmpty() { 2231 get [core.$isEmpty]() {
2232 return core.identical(this[_sentinel][_next], this[_sentinel]); 2232 return core.identical(this[_sentinel][_next], this[_sentinel]);
2233 } 2233 }
2234 clear() { 2234 clear() {
2235 this[_sentinel][_next] = this[_sentinel]; 2235 this[_sentinel][_next] = this[_sentinel];
2236 this[_sentinel][_previous] = this[_sentinel]; 2236 this[_sentinel][_previous] = this[_sentinel];
2237 this[_elementCount] = 0; 2237 this[_elementCount] = 0;
2238 } 2238 }
2239 forEachEntry(f) { 2239 forEachEntry(f) {
2240 let entry = this[_sentinel][_next]; 2240 let entry = this[_sentinel][_next];
2241 while (!dart.notNull(core.identical(entry, this[_sentinel]))) { 2241 while (!dart.notNull(core.identical(entry, this[_sentinel]))) {
2242 let nextEntry = entry[_next]; 2242 let nextEntry = entry[_next];
2243 f(entry); 2243 f(entry);
2244 entry = nextEntry; 2244 entry = nextEntry;
2245 } 2245 }
2246 } 2246 }
2247 get iterator() { 2247 get [core.$iterator]() {
2248 return new (_DoubleLinkedQueueIterator$(E))(this[_sentinel]); 2248 return new (_DoubleLinkedQueueIterator$(E))(this[_sentinel]);
2249 } 2249 }
2250 toString() { 2250 toString() {
2251 return IterableBase.iterableToFullString(this, '{', '}'); 2251 return IterableBase.iterableToFullString(this, '{', '}');
2252 } 2252 }
2253 } 2253 }
2254 DoubleLinkedQueue[dart.implements] = () => [Queue$(E)]; 2254 DoubleLinkedQueue[dart.implements] = () => [Queue$(E)];
2255 dart.defineNamedConstructor(DoubleLinkedQueue, 'from'); 2255 dart.defineNamedConstructor(DoubleLinkedQueue, 'from');
2256 return DoubleLinkedQueue; 2256 return DoubleLinkedQueue;
2257 }); 2257 });
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
2308 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN ull(ListQueue[_INITIAL_CAPACITY])) { 2308 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN ull(ListQueue[_INITIAL_CAPACITY])) {
2309 initialCapacity = ListQueue[_INITIAL_CAPACITY]; 2309 initialCapacity = ListQueue[_INITIAL_CAPACITY];
2310 } else if (!dart.notNull(ListQueue[_isPowerOf2](initialCapacity))) { 2310 } else if (!dart.notNull(ListQueue[_isPowerOf2](initialCapacity))) {
2311 initialCapacity = ListQueue[_nextPowerOf2](initialCapacity); 2311 initialCapacity = ListQueue[_nextPowerOf2](initialCapacity);
2312 } 2312 }
2313 dart.assert(ListQueue[_isPowerOf2](initialCapacity)); 2313 dart.assert(ListQueue[_isPowerOf2](initialCapacity));
2314 this[_table] = new (core.List$(E))(initialCapacity); 2314 this[_table] = new (core.List$(E))(initialCapacity);
2315 } 2315 }
2316 from(elements) { 2316 from(elements) {
2317 if (dart.is(elements, core.List)) { 2317 if (dart.is(elements, core.List)) {
2318 let length = elements.length; 2318 let length = elements[core.$length];
2319 let queue = dart.as(new ListQueue(dart.notNull(length) + 1), ListQueue $(E)); 2319 let queue = dart.as(new ListQueue(dart.notNull(length) + 1), ListQueue $(E));
2320 dart.assert(dart.notNull(queue[_table].length) > dart.notNull(length)) ; 2320 dart.assert(dart.notNull(queue[_table][core.$length]) > dart.notNull(l ength));
2321 let sourceList = elements; 2321 let sourceList = elements;
2322 queue[_table].setRange(0, length, dart.as(sourceList, core.Iterable$(E )), 0); 2322 queue[_table][core.$setRange](0, length, dart.as(sourceList, core.Iter able$(E)), 0);
2323 queue[_tail] = length; 2323 queue[_tail] = length;
2324 return queue; 2324 return queue;
2325 } else { 2325 } else {
2326 let capacity = ListQueue[_INITIAL_CAPACITY]; 2326 let capacity = ListQueue[_INITIAL_CAPACITY];
2327 if (dart.is(elements, _internal.EfficientLength)) { 2327 if (dart.is(elements, _internal.EfficientLength)) {
2328 capacity = elements.length; 2328 capacity = elements[core.$length];
2329 } 2329 }
2330 let result = new (ListQueue$(E))(capacity); 2330 let result = new (ListQueue$(E))(capacity);
2331 for (let element of dart.as(elements, core.Iterable$(E))) { 2331 for (let element of dart.as(elements, core.Iterable$(E))) {
2332 result.addLast(element); 2332 result.addLast(element);
2333 } 2333 }
2334 return result; 2334 return result;
2335 } 2335 }
2336 } 2336 }
2337 get iterator() { 2337 get [core.$iterator]() {
2338 return new (_ListQueueIterator$(E))(this); 2338 return new (_ListQueueIterator$(E))(this);
2339 } 2339 }
2340 forEach(action) { 2340 [core.$forEach](action) {
2341 let modificationCount = this[_modificationCount]; 2341 let modificationCount = this[_modificationCount];
2342 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da rt.notNull(this[_table].length) - 1) { 2342 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da rt.notNull(this[_table][core.$length]) - 1) {
2343 action(this[_table].get(i)); 2343 action(this[_table][core.$get](i));
2344 this[_checkModification](modificationCount); 2344 this[_checkModification](modificationCount);
2345 } 2345 }
2346 } 2346 }
2347 get isEmpty() { 2347 get [core.$isEmpty]() {
2348 return this[_head] == this[_tail]; 2348 return this[_head] == this[_tail];
2349 } 2349 }
2350 get length() { 2350 get [core.$length]() {
2351 return dart.notNull(this[_tail]) - dart.notNull(this[_head]) & dart.notN ull(this[_table].length) - 1; 2351 return dart.notNull(this[_tail]) - dart.notNull(this[_head]) & dart.notN ull(this[_table][core.$length]) - 1;
2352 } 2352 }
2353 get first() { 2353 get [core.$first]() {
2354 if (this[_head] == this[_tail]) 2354 if (this[_head] == this[_tail])
2355 throw _internal.IterableElementError.noElement(); 2355 throw _internal.IterableElementError.noElement();
2356 return this[_table].get(this[_head]); 2356 return this[_table][core.$get](this[_head]);
2357 } 2357 }
2358 get last() { 2358 get [core.$last]() {
2359 if (this[_head] == this[_tail]) 2359 if (this[_head] == this[_tail])
2360 throw _internal.IterableElementError.noElement(); 2360 throw _internal.IterableElementError.noElement();
2361 return this[_table].get(dart.notNull(this[_tail]) - 1 & dart.notNull(thi s[_table].length) - 1); 2361 return this[_table][core.$get](dart.notNull(this[_tail]) - 1 & dart.notN ull(this[_table][core.$length]) - 1);
2362 } 2362 }
2363 get single() { 2363 get [core.$single]() {
2364 if (this[_head] == this[_tail]) 2364 if (this[_head] == this[_tail])
2365 throw _internal.IterableElementError.noElement(); 2365 throw _internal.IterableElementError.noElement();
2366 if (dart.notNull(this.length) > 1) 2366 if (dart.notNull(this.length) > 1)
2367 throw _internal.IterableElementError.tooMany(); 2367 throw _internal.IterableElementError.tooMany();
2368 return this[_table].get(this[_head]); 2368 return this[_table][core.$get](this[_head]);
2369 } 2369 }
2370 elementAt(index) { 2370 [core.$elementAt](index) {
2371 core.RangeError.checkValidIndex(index, this); 2371 core.RangeError.checkValidIndex(index, this);
2372 return this[_table].get(dart.notNull(this[_head]) + dart.notNull(index) & dart.notNull(this[_table].length) - 1); 2372 return this[_table][core.$get](dart.notNull(this[_head]) + dart.notNull( index) & dart.notNull(this[_table][core.$length]) - 1);
2373 } 2373 }
2374 toList(opts) { 2374 [core.$toList](opts) {
2375 let growable = opts && 'growable' in opts ? opts.growable : true; 2375 let growable = opts && 'growable' in opts ? opts.growable : true;
2376 let list = null; 2376 let list = null;
2377 if (growable) { 2377 if (growable) {
2378 list = ((_) => { 2378 list = ((_) => {
2379 _.length = this.length; 2379 _[core.$length] = this.length;
2380 return _; 2380 return _;
2381 }).bind(this)(new (core.List$(E))()); 2381 }).bind(this)(new (core.List$(E))());
2382 } else { 2382 } else {
2383 list = new (core.List$(E))(this.length); 2383 list = new (core.List$(E))(this.length);
2384 } 2384 }
2385 this[_writeToList](list); 2385 this[_writeToList](list);
2386 return list; 2386 return list;
2387 } 2387 }
2388 add(element) { 2388 add(element) {
2389 this[_add](element); 2389 this[_add](element);
2390 } 2390 }
2391 addAll(elements) { 2391 addAll(elements) {
2392 if (dart.is(elements, core.List)) { 2392 if (dart.is(elements, core.List)) {
2393 let list = dart.as(elements, core.List); 2393 let list = dart.as(elements, core.List);
2394 let addCount = list.length; 2394 let addCount = list[core.$length];
2395 let length = this.length; 2395 let length = this[core.$length];
2396 if (dart.notNull(length) + dart.notNull(addCount) >= dart.notNull(this [_table].length)) { 2396 if (dart.notNull(length) + dart.notNull(addCount) >= dart.notNull(this [_table][core.$length])) {
2397 this[_preGrow](dart.notNull(length) + dart.notNull(addCount)); 2397 this[_preGrow](dart.notNull(length) + dart.notNull(addCount));
2398 this[_table].setRange(length, dart.notNull(length) + dart.notNull(ad dCount), dart.as(list, core.Iterable$(E)), 0); 2398 this[_table][core.$setRange](length, dart.notNull(length) + dart.not Null(addCount), dart.as(list, core.Iterable$(E)), 0);
2399 this[_tail] = addCount; 2399 this[_tail] = addCount;
2400 } else { 2400 } else {
2401 let endSpace = dart.notNull(this[_table].length) - dart.notNull(this [_tail]); 2401 let endSpace = dart.notNull(this[_table][core.$length]) - dart.notNu ll(this[_tail]);
2402 if (dart.notNull(addCount) < dart.notNull(endSpace)) { 2402 if (dart.notNull(addCount) < dart.notNull(endSpace)) {
2403 this[_table].setRange(this[_tail], dart.notNull(this[_tail]) + dar t.notNull(addCount), dart.as(list, core.Iterable$(E)), 0); 2403 this[_table][core.$setRange](this[_tail], dart.notNull(this[_tail] ) + dart.notNull(addCount), dart.as(list, core.Iterable$(E)), 0);
2404 this[_tail] = addCount; 2404 this[_tail] = addCount;
2405 } else { 2405 } else {
2406 let preSpace = dart.notNull(addCount) - dart.notNull(endSpace); 2406 let preSpace = dart.notNull(addCount) - dart.notNull(endSpace);
2407 this[_table].setRange(this[_tail], dart.notNull(this[_tail]) + dar t.notNull(endSpace), dart.as(list, core.Iterable$(E)), 0); 2407 this[_table][core.$setRange](this[_tail], dart.notNull(this[_tail] ) + dart.notNull(endSpace), dart.as(list, core.Iterable$(E)), 0);
2408 this[_table].setRange(0, preSpace, dart.as(list, core.Iterable$(E) ), endSpace); 2408 this[_table][core.$setRange](0, preSpace, dart.as(list, core.Itera ble$(E)), endSpace);
2409 this[_tail] = preSpace; 2409 this[_tail] = preSpace;
2410 } 2410 }
2411 } 2411 }
2412 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 2412 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
2413 } else { 2413 } else {
2414 for (let element of elements) 2414 for (let element of elements)
2415 this[_add](element); 2415 this[_add](element);
2416 } 2416 }
2417 } 2417 }
2418 remove(object) { 2418 remove(object) {
2419 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da rt.notNull(this[_table].length) - 1) { 2419 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & da rt.notNull(this[_table][core.$length]) - 1) {
2420 let element = this[_table].get(i); 2420 let element = this[_table][core.$get](i);
2421 if (dart.equals(element, object)) { 2421 if (dart.equals(element, object)) {
2422 this[_remove](i); 2422 this[_remove](i);
2423 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 2423 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
2424 return true; 2424 return true;
2425 } 2425 }
2426 } 2426 }
2427 return false; 2427 return false;
2428 } 2428 }
2429 [_filterWhere](test, removeMatching) { 2429 [_filterWhere](test, removeMatching) {
2430 let index = this[_head]; 2430 let index = this[_head];
2431 let modificationCount = this[_modificationCount]; 2431 let modificationCount = this[_modificationCount];
2432 let i = this[_head]; 2432 let i = this[_head];
2433 while (i != this[_tail]) { 2433 while (i != this[_tail]) {
2434 let element = this[_table].get(i); 2434 let element = this[_table][core.$get](i);
2435 let remove = core.identical(removeMatching, test(element)); 2435 let remove = core.identical(removeMatching, test(element));
2436 this[_checkModification](modificationCount); 2436 this[_checkModification](modificationCount);
2437 if (remove) { 2437 if (remove) {
2438 i = this[_remove](i); 2438 i = this[_remove](i);
2439 modificationCount = this[_modificationCount] = dart.notNull(this[_mo dificationCount]) + 1; 2439 modificationCount = this[_modificationCount] = dart.notNull(this[_mo dificationCount]) + 1;
2440 } else { 2440 } else {
2441 i = dart.notNull(i) + 1 & dart.notNull(this[_table].length) - 1; 2441 i = dart.notNull(i) + 1 & dart.notNull(this[_table][core.$length]) - 1;
2442 } 2442 }
2443 } 2443 }
2444 } 2444 }
2445 removeWhere(test) { 2445 removeWhere(test) {
2446 this[_filterWhere](test, true); 2446 this[_filterWhere](test, true);
2447 } 2447 }
2448 retainWhere(test) { 2448 retainWhere(test) {
2449 this[_filterWhere](test, false); 2449 this[_filterWhere](test, false);
2450 } 2450 }
2451 clear() { 2451 clear() {
2452 if (this[_head] != this[_tail]) { 2452 if (this[_head] != this[_tail]) {
2453 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & dart.notNull(this[_table].length) - 1) { 2453 for (let i = this[_head]; i != this[_tail]; i = dart.notNull(i) + 1 & dart.notNull(this[_table][core.$length]) - 1) {
2454 this[_table].set(i, null); 2454 this[_table][core.$set](i, null);
2455 } 2455 }
2456 this[_head] = this[_tail] = 0; 2456 this[_head] = this[_tail] = 0;
2457 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 2457 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
2458 } 2458 }
2459 } 2459 }
2460 toString() { 2460 toString() {
2461 return IterableBase.iterableToFullString(this, "{", "}"); 2461 return IterableBase.iterableToFullString(this, "{", "}");
2462 } 2462 }
2463 addLast(element) { 2463 addLast(element) {
2464 this[_add](element); 2464 this[_add](element);
2465 } 2465 }
2466 addFirst(element) { 2466 addFirst(element) {
2467 this[_head] = dart.notNull(this[_head]) - 1 & dart.notNull(this[_table]. length) - 1; 2467 this[_head] = dart.notNull(this[_head]) - 1 & dart.notNull(this[_table][ core.$length]) - 1;
2468 this[_table].set(this[_head], element); 2468 this[_table][core.$set](this[_head], element);
2469 if (this[_head] == this[_tail]) 2469 if (this[_head] == this[_tail])
2470 this[_grow](); 2470 this[_grow]();
2471 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 2471 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
2472 } 2472 }
2473 removeFirst() { 2473 removeFirst() {
2474 if (this[_head] == this[_tail]) 2474 if (this[_head] == this[_tail])
2475 throw _internal.IterableElementError.noElement(); 2475 throw _internal.IterableElementError.noElement();
2476 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 2476 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
2477 let result = this[_table].get(this[_head]); 2477 let result = this[_table][core.$get](this[_head]);
2478 this[_table].set(this[_head], null); 2478 this[_table][core.$set](this[_head], null);
2479 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(this[_table]. length) - 1; 2479 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(this[_table][ core.$length]) - 1;
2480 return result; 2480 return result;
2481 } 2481 }
2482 removeLast() { 2482 removeLast() {
2483 if (this[_head] == this[_tail]) 2483 if (this[_head] == this[_tail])
2484 throw _internal.IterableElementError.noElement(); 2484 throw _internal.IterableElementError.noElement();
2485 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 2485 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
2486 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table]. length) - 1; 2486 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table][ core.$length]) - 1;
2487 let result = this[_table].get(this[_tail]); 2487 let result = this[_table][core.$get](this[_tail]);
2488 this[_table].set(this[_tail], null); 2488 this[_table][core.$set](this[_tail], null);
2489 return result; 2489 return result;
2490 } 2490 }
2491 static [_isPowerOf2](number) { 2491 static [_isPowerOf2](number) {
2492 return (dart.notNull(number) & dart.notNull(number) - 1) == 0; 2492 return (dart.notNull(number) & dart.notNull(number) - 1) == 0;
2493 } 2493 }
2494 static [_nextPowerOf2](number) { 2494 static [_nextPowerOf2](number) {
2495 dart.assert(dart.notNull(number) > 0); 2495 dart.assert(dart.notNull(number) > 0);
2496 number = (dart.notNull(number) << 1) - 1; 2496 number = (dart.notNull(number) << 1) - 1;
2497 for (;;) { 2497 for (;;) {
2498 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1; 2498 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1;
2499 if (nextNumber == 0) 2499 if (nextNumber == 0)
2500 return number; 2500 return number;
2501 number = nextNumber; 2501 number = nextNumber;
2502 } 2502 }
2503 } 2503 }
2504 [_checkModification](expectedModificationCount) { 2504 [_checkModification](expectedModificationCount) {
2505 if (expectedModificationCount != this[_modificationCount]) { 2505 if (expectedModificationCount != this[_modificationCount]) {
2506 throw new core.ConcurrentModificationError(this); 2506 throw new core.ConcurrentModificationError(this);
2507 } 2507 }
2508 } 2508 }
2509 [_add](element) { 2509 [_add](element) {
2510 this[_table].set(this[_tail], element); 2510 this[_table][core.$set](this[_tail], element);
2511 this[_tail] = dart.notNull(this[_tail]) + 1 & dart.notNull(this[_table]. length) - 1; 2511 this[_tail] = dart.notNull(this[_tail]) + 1 & dart.notNull(this[_table][ core.$length]) - 1;
2512 if (this[_head] == this[_tail]) 2512 if (this[_head] == this[_tail])
2513 this[_grow](); 2513 this[_grow]();
2514 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; 2514 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1;
2515 } 2515 }
2516 [_remove](offset) { 2516 [_remove](offset) {
2517 let mask = dart.notNull(this[_table].length) - 1; 2517 let mask = dart.notNull(this[_table][core.$length]) - 1;
2518 let startDistance = dart.notNull(offset) - dart.notNull(this[_head]) & d art.notNull(mask); 2518 let startDistance = dart.notNull(offset) - dart.notNull(this[_head]) & d art.notNull(mask);
2519 let endDistance = dart.notNull(this[_tail]) - dart.notNull(offset) & dar t.notNull(mask); 2519 let endDistance = dart.notNull(this[_tail]) - dart.notNull(offset) & dar t.notNull(mask);
2520 if (dart.notNull(startDistance) < dart.notNull(endDistance)) { 2520 if (dart.notNull(startDistance) < dart.notNull(endDistance)) {
2521 let i = offset; 2521 let i = offset;
2522 while (i != this[_head]) { 2522 while (i != this[_head]) {
2523 let prevOffset = dart.notNull(i) - 1 & dart.notNull(mask); 2523 let prevOffset = dart.notNull(i) - 1 & dart.notNull(mask);
2524 this[_table].set(i, this[_table].get(prevOffset)); 2524 this[_table][core.$set](i, this[_table][core.$get](prevOffset));
2525 i = prevOffset; 2525 i = prevOffset;
2526 } 2526 }
2527 this[_table].set(this[_head], null); 2527 this[_table][core.$set](this[_head], null);
2528 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(mask); 2528 this[_head] = dart.notNull(this[_head]) + 1 & dart.notNull(mask);
2529 return dart.notNull(offset) + 1 & dart.notNull(mask); 2529 return dart.notNull(offset) + 1 & dart.notNull(mask);
2530 } else { 2530 } else {
2531 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(mask); 2531 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(mask);
2532 let i = offset; 2532 let i = offset;
2533 while (i != this[_tail]) { 2533 while (i != this[_tail]) {
2534 let nextOffset = dart.notNull(i) + 1 & dart.notNull(mask); 2534 let nextOffset = dart.notNull(i) + 1 & dart.notNull(mask);
2535 this[_table].set(i, this[_table].get(nextOffset)); 2535 this[_table][core.$set](i, this[_table][core.$get](nextOffset));
2536 i = nextOffset; 2536 i = nextOffset;
2537 } 2537 }
2538 this[_table].set(this[_tail], null); 2538 this[_table][core.$set](this[_tail], null);
2539 return offset; 2539 return offset;
2540 } 2540 }
2541 } 2541 }
2542 [_grow]() { 2542 [_grow]() {
2543 let newTable = new (core.List$(E))(dart.notNull(this[_table].length) * 2 ); 2543 let newTable = new (core.List$(E))(dart.notNull(this[_table][core.$lengt h]) * 2);
2544 let split = dart.notNull(this[_table].length) - dart.notNull(this[_head] ); 2544 let split = dart.notNull(this[_table][core.$length]) - dart.notNull(this [_head]);
2545 newTable.setRange(0, split, this[_table], this[_head]); 2545 newTable[core.$setRange](0, split, this[_table], this[_head]);
2546 newTable.setRange(split, dart.notNull(split) + dart.notNull(this[_head]) , this[_table], 0); 2546 newTable[core.$setRange](split, dart.notNull(split) + dart.notNull(this[ _head]), this[_table], 0);
2547 this[_head] = 0; 2547 this[_head] = 0;
2548 this[_tail] = this[_table].length; 2548 this[_tail] = this[_table][core.$length];
2549 this[_table] = newTable; 2549 this[_table] = newTable;
2550 } 2550 }
2551 [_writeToList](target) { 2551 [_writeToList](target) {
2552 dart.assert(dart.notNull(target.length) >= dart.notNull(this.length)); 2552 dart.assert(dart.notNull(target[core.$length]) >= dart.notNull(this.leng th));
2553 if (dart.notNull(this[_head]) <= dart.notNull(this[_tail])) { 2553 if (dart.notNull(this[_head]) <= dart.notNull(this[_tail])) {
2554 let length = dart.notNull(this[_tail]) - dart.notNull(this[_head]); 2554 let length = dart.notNull(this[_tail]) - dart.notNull(this[_head]);
2555 target.setRange(0, length, this[_table], this[_head]); 2555 target[core.$setRange](0, length, this[_table], this[_head]);
2556 return length; 2556 return length;
2557 } else { 2557 } else {
2558 let firstPartSize = dart.notNull(this[_table].length) - dart.notNull(t his[_head]); 2558 let firstPartSize = dart.notNull(this[_table][core.$length]) - dart.no tNull(this[_head]);
2559 target.setRange(0, firstPartSize, this[_table], this[_head]); 2559 target[core.$setRange](0, firstPartSize, this[_table], this[_head]);
2560 target.setRange(firstPartSize, dart.notNull(firstPartSize) + dart.notN ull(this[_tail]), this[_table], 0); 2560 target[core.$setRange](firstPartSize, dart.notNull(firstPartSize) + da rt.notNull(this[_tail]), this[_table], 0);
2561 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); 2561 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize);
2562 } 2562 }
2563 } 2563 }
2564 [_preGrow](newElementCount) { 2564 [_preGrow](newElementCount) {
2565 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this.length)); 2565 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this.length));
2566 newElementCount = dart.notNull(newElementCount) >> 1; 2566 newElementCount = dart.notNull(newElementCount) >> 1;
2567 let newCapacity = ListQueue[_nextPowerOf2](newElementCount); 2567 let newCapacity = ListQueue[_nextPowerOf2](newElementCount);
2568 let newTable = new (core.List$(E))(newCapacity); 2568 let newTable = new (core.List$(E))(newCapacity);
2569 this[_tail] = this[_writeToList](newTable); 2569 this[_tail] = this[_writeToList](newTable);
2570 this[_table] = newTable; 2570 this[_table] = newTable;
(...skipping 20 matching lines...) Expand all
2591 } 2591 }
2592 get current() { 2592 get current() {
2593 return this[_current]; 2593 return this[_current];
2594 } 2594 }
2595 moveNext() { 2595 moveNext() {
2596 this[_queue]._checkModification(this[_modificationCount]); 2596 this[_queue]._checkModification(this[_modificationCount]);
2597 if (this[_position] == this[_end]) { 2597 if (this[_position] == this[_end]) {
2598 this[_current] = null; 2598 this[_current] = null;
2599 return false; 2599 return false;
2600 } 2600 }
2601 this[_current] = dart.as(this[_queue][_table].get(this[_position]), E); 2601 this[_current] = dart.as(this[_queue][_table][core.$get](this[_position] ), E);
2602 this[_position] = dart.notNull(this[_position]) + 1 & dart.notNull(this[ _queue][_table].length) - 1; 2602 this[_position] = dart.notNull(this[_position]) + 1 & dart.notNull(this[ _queue][_table][core.$length]) - 1;
2603 return true; 2603 return true;
2604 } 2604 }
2605 } 2605 }
2606 _ListQueueIterator[dart.implements] = () => [core.Iterator$(E)]; 2606 _ListQueueIterator[dart.implements] = () => [core.Iterator$(E)];
2607 return _ListQueueIterator; 2607 return _ListQueueIterator;
2608 }); 2608 });
2609 let _ListQueueIterator = _ListQueueIterator$(dart.dynamic); 2609 let _ListQueueIterator = _ListQueueIterator$(dart.dynamic);
2610 let _SplayTreeNode$ = dart.generic(function(K) { 2610 let _SplayTreeNode$ = dart.generic(function(K) {
2611 class _SplayTreeNode extends core.Object { 2611 class _SplayTreeNode extends core.Object {
2612 _SplayTreeNode(key) { 2612 _SplayTreeNode(key) {
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
3021 this[_modificationCount] = tree[_modificationCount]; 3021 this[_modificationCount] = tree[_modificationCount];
3022 this[_splayCount] = null; 3022 this[_splayCount] = null;
3023 this[_currentNode] = null; 3023 this[_currentNode] = null;
3024 if (tree[_root] == null) 3024 if (tree[_root] == null)
3025 return; 3025 return;
3026 let compare = tree._splay(startKey); 3026 let compare = tree._splay(startKey);
3027 this[_splayCount] = tree[_splayCount]; 3027 this[_splayCount] = tree[_splayCount];
3028 if (dart.notNull(compare) < 0) { 3028 if (dart.notNull(compare) < 0) {
3029 this[_findLeftMostDescendent](tree[_root].right); 3029 this[_findLeftMostDescendent](tree[_root].right);
3030 } else { 3030 } else {
3031 this[_workList].add(tree[_root]); 3031 this[_workList][core.$add](tree[_root]);
3032 } 3032 }
3033 } 3033 }
3034 get current() { 3034 get current() {
3035 if (this[_currentNode] == null) 3035 if (this[_currentNode] == null)
3036 return null; 3036 return null;
3037 return this[_getValue](this[_currentNode]); 3037 return this[_getValue](this[_currentNode]);
3038 } 3038 }
3039 [_findLeftMostDescendent](node) { 3039 [_findLeftMostDescendent](node) {
3040 while (node != null) { 3040 while (node != null) {
3041 this[_workList].add(node); 3041 this[_workList][core.$add](node);
3042 node = node.left; 3042 node = node.left;
3043 } 3043 }
3044 } 3044 }
3045 [_rebuildWorkList](currentNode) { 3045 [_rebuildWorkList](currentNode) {
3046 dart.assert(!dart.notNull(this[_workList].isEmpty)); 3046 dart.assert(!dart.notNull(this[_workList][core.$isEmpty]));
3047 this[_workList].clear(); 3047 this[_workList][core.$clear]();
3048 if (currentNode == null) { 3048 if (currentNode == null) {
3049 this[_findLeftMostDescendent](this[_tree][_root]); 3049 this[_findLeftMostDescendent](this[_tree][_root]);
3050 } else { 3050 } else {
3051 this[_tree]._splay(currentNode.key); 3051 this[_tree]._splay(currentNode.key);
3052 this[_findLeftMostDescendent](this[_tree][_root].right); 3052 this[_findLeftMostDescendent](this[_tree][_root].right);
3053 dart.assert(!dart.notNull(this[_workList].isEmpty)); 3053 dart.assert(!dart.notNull(this[_workList][core.$isEmpty]));
3054 } 3054 }
3055 } 3055 }
3056 moveNext() { 3056 moveNext() {
3057 if (this[_modificationCount] != this[_tree][_modificationCount]) { 3057 if (this[_modificationCount] != this[_tree][_modificationCount]) {
3058 throw new core.ConcurrentModificationError(this[_tree]); 3058 throw new core.ConcurrentModificationError(this[_tree]);
3059 } 3059 }
3060 if (this[_workList].isEmpty) { 3060 if (this[_workList][core.$isEmpty]) {
3061 this[_currentNode] = null; 3061 this[_currentNode] = null;
3062 return false; 3062 return false;
3063 } 3063 }
3064 if (this[_tree][_splayCount] != this[_splayCount] && dart.notNull(this[_ currentNode] != null)) { 3064 if (this[_tree][_splayCount] != this[_splayCount] && dart.notNull(this[_ currentNode] != null)) {
3065 this[_rebuildWorkList](this[_currentNode]); 3065 this[_rebuildWorkList](this[_currentNode]);
3066 } 3066 }
3067 this[_currentNode] = this[_workList].removeLast(); 3067 this[_currentNode] = this[_workList][core.$removeLast]();
3068 this[_findLeftMostDescendent](this[_currentNode].right); 3068 this[_findLeftMostDescendent](this[_currentNode].right);
3069 return true; 3069 return true;
3070 } 3070 }
3071 } 3071 }
3072 _SplayTreeIterator[dart.implements] = () => [core.Iterator$(T)]; 3072 _SplayTreeIterator[dart.implements] = () => [core.Iterator$(T)];
3073 dart.defineNamedConstructor(_SplayTreeIterator, 'startAt'); 3073 dart.defineNamedConstructor(_SplayTreeIterator, 'startAt');
3074 return _SplayTreeIterator; 3074 return _SplayTreeIterator;
3075 }); 3075 });
3076 let _SplayTreeIterator = _SplayTreeIterator$(dart.dynamic); 3076 let _SplayTreeIterator = _SplayTreeIterator$(dart.dynamic);
3077 let _SplayTreeKeyIterable$ = dart.generic(function(K) { 3077 let _SplayTreeKeyIterable$ = dart.generic(function(K) {
3078 class _SplayTreeKeyIterable extends IterableBase$(K) { 3078 class _SplayTreeKeyIterable extends IterableBase$(K) {
3079 _SplayTreeKeyIterable(tree$) { 3079 _SplayTreeKeyIterable(tree$) {
3080 this[_tree] = tree$; 3080 this[_tree] = tree$;
3081 super.IterableBase(); 3081 super.IterableBase();
3082 } 3082 }
3083 get length() { 3083 get [core.$length]() {
3084 return this[_tree][_count]; 3084 return this[_tree][_count];
3085 } 3085 }
3086 get isEmpty() { 3086 get [core.$isEmpty]() {
3087 return this[_tree][_count] == 0; 3087 return this[_tree][_count] == 0;
3088 } 3088 }
3089 get iterator() { 3089 get [core.$iterator]() {
3090 return new (_SplayTreeKeyIterator$(K))(this[_tree]); 3090 return new (_SplayTreeKeyIterator$(K))(this[_tree]);
3091 } 3091 }
3092 toSet() { 3092 [core.$toSet]() {
3093 let setOrMap = this[_tree]; 3093 let setOrMap = this[_tree];
3094 let set = new (SplayTreeSet$(K))(dart.as(setOrMap[_comparator], dart.thr ow_("Unimplemented type (K, K) → int")), dart.as(setOrMap[_validKey], dart.throw _("Unimplemented type (dynamic) → bool"))); 3094 let set = new (SplayTreeSet$(K))(dart.as(setOrMap[_comparator], dart.thr ow_("Unimplemented type (K, K) → int")), dart.as(setOrMap[_validKey], dart.throw _("Unimplemented type (dynamic) → bool")));
3095 set[_count] = this[_tree][_count]; 3095 set[_count] = this[_tree][_count];
3096 set[_root] = set._copyNode(this[_tree][_root]); 3096 set[_root] = set._copyNode(this[_tree][_root]);
3097 return set; 3097 return set;
3098 } 3098 }
3099 } 3099 }
3100 _SplayTreeKeyIterable[dart.implements] = () => [_internal.EfficientLength]; 3100 _SplayTreeKeyIterable[dart.implements] = () => [_internal.EfficientLength];
3101 return _SplayTreeKeyIterable; 3101 return _SplayTreeKeyIterable;
3102 }); 3102 });
3103 let _SplayTreeKeyIterable = _SplayTreeKeyIterable$(dart.dynamic); 3103 let _SplayTreeKeyIterable = _SplayTreeKeyIterable$(dart.dynamic);
3104 let _SplayTreeValueIterable$ = dart.generic(function(K, V) { 3104 let _SplayTreeValueIterable$ = dart.generic(function(K, V) {
3105 class _SplayTreeValueIterable extends IterableBase$(V) { 3105 class _SplayTreeValueIterable extends IterableBase$(V) {
3106 _SplayTreeValueIterable(map$) { 3106 _SplayTreeValueIterable(map$) {
3107 this[_map] = map$; 3107 this[_map] = map$;
3108 super.IterableBase(); 3108 super.IterableBase();
3109 } 3109 }
3110 get length() { 3110 get [core.$length]() {
3111 return this[_map][_count]; 3111 return this[_map][_count];
3112 } 3112 }
3113 get isEmpty() { 3113 get [core.$isEmpty]() {
3114 return this[_map][_count] == 0; 3114 return this[_map][_count] == 0;
3115 } 3115 }
3116 get iterator() { 3116 get [core.$iterator]() {
3117 return new (_SplayTreeValueIterator$(K, V))(this[_map]); 3117 return new (_SplayTreeValueIterator$(K, V))(this[_map]);
3118 } 3118 }
3119 } 3119 }
3120 _SplayTreeValueIterable[dart.implements] = () => [_internal.EfficientLength] ; 3120 _SplayTreeValueIterable[dart.implements] = () => [_internal.EfficientLength] ;
3121 return _SplayTreeValueIterable; 3121 return _SplayTreeValueIterable;
3122 }); 3122 });
3123 let _SplayTreeValueIterable = _SplayTreeValueIterable$(dart.dynamic, dart.dyna mic); 3123 let _SplayTreeValueIterable = _SplayTreeValueIterable$(dart.dynamic, dart.dyna mic);
3124 let _SplayTreeKeyIterator$ = dart.generic(function(K) { 3124 let _SplayTreeKeyIterator$ = dart.generic(function(K) {
3125 class _SplayTreeKeyIterator extends _SplayTreeIterator$(K) { 3125 class _SplayTreeKeyIterator extends _SplayTreeIterator$(K) {
3126 _SplayTreeKeyIterator(map) { 3126 _SplayTreeKeyIterator(map) {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
3181 isValidKey = null; 3181 isValidKey = null;
3182 let result = new (SplayTreeSet$(E))(compare, isValidKey); 3182 let result = new (SplayTreeSet$(E))(compare, isValidKey);
3183 for (let element of dart.as(elements, core.Iterable$(E))) { 3183 for (let element of dart.as(elements, core.Iterable$(E))) {
3184 result.add(element); 3184 result.add(element);
3185 } 3185 }
3186 return result; 3186 return result;
3187 } 3187 }
3188 [_compare](e1, e2) { 3188 [_compare](e1, e2) {
3189 return dart.dinvokef(this[_comparator], e1, e2); 3189 return dart.dinvokef(this[_comparator], e1, e2);
3190 } 3190 }
3191 get iterator() { 3191 get [core.$iterator]() {
3192 return new (_SplayTreeKeyIterator$(E))(this); 3192 return new (_SplayTreeKeyIterator$(E))(this);
3193 } 3193 }
3194 get length() { 3194 get [core.$length]() {
3195 return this[_count]; 3195 return this[_count];
3196 } 3196 }
3197 get isEmpty() { 3197 get [core.$isEmpty]() {
3198 return this[_root] == null; 3198 return this[_root] == null;
3199 } 3199 }
3200 get isNotEmpty() { 3200 get [core.$isNotEmpty]() {
3201 return this[_root] != null; 3201 return this[_root] != null;
3202 } 3202 }
3203 get first() { 3203 get [core.$first]() {
3204 if (this[_count] == 0) 3204 if (this[_count] == 0)
3205 throw _internal.IterableElementError.noElement(); 3205 throw _internal.IterableElementError.noElement();
3206 return dart.as(this[_first].key, E); 3206 return dart.as(this[_first].key, E);
3207 } 3207 }
3208 get last() { 3208 get [core.$last]() {
3209 if (this[_count] == 0) 3209 if (this[_count] == 0)
3210 throw _internal.IterableElementError.noElement(); 3210 throw _internal.IterableElementError.noElement();
3211 return dart.as(this[_last].key, E); 3211 return dart.as(this[_last].key, E);
3212 } 3212 }
3213 get single() { 3213 get [core.$single]() {
3214 if (this[_count] == 0) 3214 if (this[_count] == 0)
3215 throw _internal.IterableElementError.noElement(); 3215 throw _internal.IterableElementError.noElement();
3216 if (dart.notNull(this[_count]) > 1) 3216 if (dart.notNull(this[_count]) > 1)
3217 throw _internal.IterableElementError.tooMany(); 3217 throw _internal.IterableElementError.tooMany();
3218 return this[_root].key; 3218 return this[_root].key;
3219 } 3219 }
3220 contains(object) { 3220 [core.$contains](object) {
3221 return dart.notNull(dart.dinvokef(this[_validKey], object)) && this[_spl ay](dart.as(object, E)) == 0; 3221 return dart.notNull(dart.dinvokef(this[_validKey], object)) && this[_spl ay](dart.as(object, E)) == 0;
3222 } 3222 }
3223 add(element) { 3223 add(element) {
3224 let compare = this[_splay](element); 3224 let compare = this[_splay](element);
3225 if (compare == 0) 3225 if (compare == 0)
3226 return false; 3226 return false;
3227 this[_addNewRoot](dart.as(new _SplayTreeNode(element), _SplayTreeNode$(E )), compare); 3227 this[_addNewRoot](dart.as(new _SplayTreeNode(element), _SplayTreeNode$(E )), compare);
3228 return true; 3228 return true;
3229 } 3229 }
3230 remove(object) { 3230 remove(object) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
3266 if (!dart.notNull(dart.dinvokef(this[_validKey], object))) 3266 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
3267 return null; 3267 return null;
3268 let comp = this[_splay](dart.as(object, E)); 3268 let comp = this[_splay](dart.as(object, E));
3269 if (comp != 0) 3269 if (comp != 0)
3270 return null; 3270 return null;
3271 return this[_root].key; 3271 return this[_root].key;
3272 } 3272 }
3273 intersection(other) { 3273 intersection(other) {
3274 let result = new (SplayTreeSet$(E))(dart.closureWrap(this[_comparator], "(E, E) → int"), this[_validKey]); 3274 let result = new (SplayTreeSet$(E))(dart.closureWrap(this[_comparator], "(E, E) → int"), this[_validKey]);
3275 for (let element of this) { 3275 for (let element of this) {
3276 if (other.contains(element)) 3276 if (other[core.$contains](element))
3277 result.add(element); 3277 result.add(element);
3278 } 3278 }
3279 return result; 3279 return result;
3280 } 3280 }
3281 difference(other) { 3281 difference(other) {
3282 let result = new (SplayTreeSet$(E))(dart.closureWrap(this[_comparator], "(E, E) → int"), this[_validKey]); 3282 let result = new (SplayTreeSet$(E))(dart.closureWrap(this[_comparator], "(E, E) → int"), this[_validKey]);
3283 for (let element of this) { 3283 for (let element of this) {
3284 if (!dart.notNull(other.contains(element))) 3284 if (!dart.notNull(other[core.$contains](element)))
3285 result.add(element); 3285 result.add(element);
3286 } 3286 }
3287 return result; 3287 return result;
3288 } 3288 }
3289 union(other) { 3289 union(other) {
3290 return ((_) => { 3290 return ((_) => {
3291 _.addAll(other); 3291 _.addAll(other);
3292 return _; 3292 return _;
3293 }).bind(this)(this[_clone]()); 3293 }).bind(this)(this[_clone]());
3294 } 3294 }
3295 [_clone]() { 3295 [_clone]() {
3296 let set = new (SplayTreeSet$(E))(dart.closureWrap(this[_comparator], "(E , E) → int"), this[_validKey]); 3296 let set = new (SplayTreeSet$(E))(dart.closureWrap(this[_comparator], "(E , E) → int"), this[_validKey]);
3297 set[_count] = this[_count]; 3297 set[_count] = this[_count];
3298 set[_root] = this[_copyNode](this[_root]); 3298 set[_root] = this[_copyNode](this[_root]);
3299 return set; 3299 return set;
3300 } 3300 }
3301 [_copyNode](node) { 3301 [_copyNode](node) {
3302 if (node == null) 3302 if (node == null)
3303 return null; 3303 return null;
3304 return ((_) => { 3304 return ((_) => {
3305 _.left = this[_copyNode](node.left); 3305 _.left = this[_copyNode](node.left);
3306 _.right = this[_copyNode](node.right); 3306 _.right = this[_copyNode](node.right);
3307 return _; 3307 return _;
3308 }).bind(this)(new (_SplayTreeNode$(E))(node.key)); 3308 }).bind(this)(new (_SplayTreeNode$(E))(node.key));
3309 } 3309 }
3310 clear() { 3310 clear() {
3311 this[_clear](); 3311 this[_clear]();
3312 } 3312 }
3313 toSet() { 3313 [core.$toSet]() {
3314 return this[_clone](); 3314 return this[_clone]();
3315 } 3315 }
3316 toString() { 3316 toString() {
3317 return IterableBase.iterableToFullString(this, '{', '}'); 3317 return IterableBase.iterableToFullString(this, '{', '}');
3318 } 3318 }
3319 } 3319 }
3320 dart.defineNamedConstructor(SplayTreeSet, 'from'); 3320 dart.defineNamedConstructor(SplayTreeSet, 'from');
3321 return SplayTreeSet; 3321 return SplayTreeSet;
3322 }); 3322 });
3323 let SplayTreeSet = SplayTreeSet$(dart.dynamic); 3323 let SplayTreeSet = SplayTreeSet$(dart.dynamic);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
3376 } 3376 }
3377 } 3377 }
3378 [_containsKey](key) { 3378 [_containsKey](key) {
3379 let rest = this[_rest]; 3379 let rest = this[_rest];
3380 if (rest == null) 3380 if (rest == null)
3381 return false; 3381 return false;
3382 let bucket = this[_getBucket](rest, key); 3382 let bucket = this[_getBucket](rest, key);
3383 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; 3383 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0;
3384 } 3384 }
3385 containsValue(value) { 3385 containsValue(value) {
3386 return this[_computeKeys]().any(((each) => dart.equals(this.get(each), v alue)).bind(this)); 3386 return this[_computeKeys]()[core.$any](((each) => dart.equals(this.get(e ach), value)).bind(this));
3387 } 3387 }
3388 addAll(other) { 3388 addAll(other) {
3389 other.forEach(((key, value) => { 3389 other.forEach(((key, value) => {
3390 this.set(key, value); 3390 this.set(key, value);
3391 }).bind(this)); 3391 }).bind(this));
3392 } 3392 }
3393 get(key) { 3393 get(key) {
3394 if (_HashMap[_isStringKey](key)) { 3394 if (_HashMap[_isStringKey](key)) {
3395 let strings = this[_strings]; 3395 let strings = this[_strings];
3396 return dart.as(strings == null ? null : _HashMap[_getTableEntry](strin gs, key), V); 3396 return dart.as(strings == null ? null : _HashMap[_getTableEntry](strin gs, key), V);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
3474 return dart.as(bucket.splice(index, 2)[1], V); 3474 return dart.as(bucket.splice(index, 2)[1], V);
3475 } 3475 }
3476 clear() { 3476 clear() {
3477 if (dart.notNull(this[_length]) > 0) { 3477 if (dart.notNull(this[_length]) > 0) {
3478 this[_strings] = this[_nums] = this[_rest] = this[_keys] = null; 3478 this[_strings] = this[_nums] = this[_rest] = this[_keys] = null;
3479 this[_length] = 0; 3479 this[_length] = 0;
3480 } 3480 }
3481 } 3481 }
3482 forEach(action) { 3482 forEach(action) {
3483 let keys = this[_computeKeys](); 3483 let keys = this[_computeKeys]();
3484 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len gth); i = dart.notNull(i) + 1) { 3484 for (let i = 0, length = keys[core.$length]; dart.notNull(i) < dart.notN ull(length); i = dart.notNull(i) + 1) {
3485 let key = keys[i]; 3485 let key = keys[i];
3486 action(dart.as(key, K), this.get(key)); 3486 action(dart.as(key, K), this.get(key));
3487 if (keys !== this[_keys]) { 3487 if (keys !== this[_keys]) {
3488 throw new core.ConcurrentModificationError(this); 3488 throw new core.ConcurrentModificationError(this);
3489 } 3489 }
3490 } 3490 }
3491 } 3491 }
3492 [_computeKeys]() { 3492 [_computeKeys]() {
3493 if (this[_keys] != null) 3493 if (this[_keys] != null)
3494 return this[_keys]; 3494 return this[_keys];
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
3669 } 3669 }
3670 return _CustomHashMap; 3670 return _CustomHashMap;
3671 }); 3671 });
3672 let _CustomHashMap = _CustomHashMap$(dart.dynamic, dart.dynamic); 3672 let _CustomHashMap = _CustomHashMap$(dart.dynamic, dart.dynamic);
3673 let HashMapKeyIterable$ = dart.generic(function(E) { 3673 let HashMapKeyIterable$ = dart.generic(function(E) {
3674 class HashMapKeyIterable extends IterableBase$(E) { 3674 class HashMapKeyIterable extends IterableBase$(E) {
3675 HashMapKeyIterable(map$) { 3675 HashMapKeyIterable(map$) {
3676 this[_map] = map$; 3676 this[_map] = map$;
3677 super.IterableBase(); 3677 super.IterableBase();
3678 } 3678 }
3679 get length() { 3679 get [core.$length]() {
3680 return dart.as(dart.dload(this[_map], '_length'), core.int); 3680 return dart.as(dart.dload(this[_map], '_length'), core.int);
3681 } 3681 }
3682 get isEmpty() { 3682 get [core.$isEmpty]() {
3683 return dart.equals(dart.dload(this[_map], '_length'), 0); 3683 return dart.equals(dart.dload(this[_map], '_length'), 0);
3684 } 3684 }
3685 get iterator() { 3685 get [core.$iterator]() {
3686 return new (HashMapKeyIterator$(E))(this[_map], dart.as(dart.dinvoke(thi s[_map], '_computeKeys'), core.List)); 3686 return new (HashMapKeyIterator$(E))(this[_map], dart.as(dart.dinvoke(thi s[_map], '_computeKeys'), core.List));
3687 } 3687 }
3688 contains(element) { 3688 [core.$contains](element) {
3689 return dart.as(dart.dinvoke(this[_map], 'containsKey', element), core.bo ol); 3689 return dart.as(dart.dinvoke(this[_map], 'containsKey', element), core.bo ol);
3690 } 3690 }
3691 forEach(f) { 3691 [core.$forEach](f) {
3692 let keys = dart.as(dart.dinvoke(this[_map], '_computeKeys'), core.List); 3692 let keys = dart.as(dart.dinvoke(this[_map], '_computeKeys'), core.List);
3693 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len gth); i = dart.notNull(i) + 1) { 3693 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len gth); i = dart.notNull(i) + 1) {
3694 f(dart.as(keys[i], E)); 3694 f(dart.as(keys[i], E));
3695 if (keys !== dart.dload(this[_map], '_keys')) { 3695 if (keys !== dart.dload(this[_map], '_keys')) {
3696 throw new core.ConcurrentModificationError(this[_map]); 3696 throw new core.ConcurrentModificationError(this[_map]);
3697 } 3697 }
3698 } 3698 }
3699 } 3699 }
3700 } 3700 }
3701 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength]; 3701 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength];
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
3783 } 3783 }
3784 } 3784 }
3785 [_containsKey](key) { 3785 [_containsKey](key) {
3786 let rest = this[_rest]; 3786 let rest = this[_rest];
3787 if (rest == null) 3787 if (rest == null)
3788 return false; 3788 return false;
3789 let bucket = this[_getBucket](rest, key); 3789 let bucket = this[_getBucket](rest, key);
3790 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; 3790 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0;
3791 } 3791 }
3792 containsValue(value) { 3792 containsValue(value) {
3793 return this.keys.any(dart.closureWrap(((each) => dart.equals(this.get(ea ch), value)).bind(this), "(K) → bool")); 3793 return this.keys[core.$any](dart.closureWrap(((each) => dart.equals(this .get(each), value)).bind(this), "(K) → bool"));
3794 } 3794 }
3795 addAll(other) { 3795 addAll(other) {
3796 other.forEach(((key, value) => { 3796 other.forEach(((key, value) => {
3797 this.set(key, value); 3797 this.set(key, value);
3798 }).bind(this)); 3798 }).bind(this));
3799 } 3799 }
3800 get(key) { 3800 get(key) {
3801 if (_LinkedHashMap[_isStringKey](key)) { 3801 if (_LinkedHashMap[_isStringKey](key)) {
3802 let strings = this[_strings]; 3802 let strings = this[_strings];
3803 if (strings == null) 3803 if (strings == null)
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
4078 this[_next] = null; 4078 this[_next] = null;
4079 this[_previous] = null; 4079 this[_previous] = null;
4080 } 4080 }
4081 } 4081 }
4082 let LinkedHashMapKeyIterable$ = dart.generic(function(E) { 4082 let LinkedHashMapKeyIterable$ = dart.generic(function(E) {
4083 class LinkedHashMapKeyIterable extends IterableBase$(E) { 4083 class LinkedHashMapKeyIterable extends IterableBase$(E) {
4084 LinkedHashMapKeyIterable(map$) { 4084 LinkedHashMapKeyIterable(map$) {
4085 this[_map] = map$; 4085 this[_map] = map$;
4086 super.IterableBase(); 4086 super.IterableBase();
4087 } 4087 }
4088 get length() { 4088 get [core.$length]() {
4089 return dart.as(dart.dload(this[_map], '_length'), core.int); 4089 return dart.as(dart.dload(this[_map], '_length'), core.int);
4090 } 4090 }
4091 get isEmpty() { 4091 get [core.$isEmpty]() {
4092 return dart.equals(dart.dload(this[_map], '_length'), 0); 4092 return dart.equals(dart.dload(this[_map], '_length'), 0);
4093 } 4093 }
4094 get iterator() { 4094 get [core.$iterator]() {
4095 return new (LinkedHashMapKeyIterator$(E))(this[_map], dart.as(dart.dload (this[_map], '_modifications'), core.int)); 4095 return new (LinkedHashMapKeyIterator$(E))(this[_map], dart.as(dart.dload (this[_map], '_modifications'), core.int));
4096 } 4096 }
4097 contains(element) { 4097 [core.$contains](element) {
4098 return dart.as(dart.dinvoke(this[_map], 'containsKey', element), core.bo ol); 4098 return dart.as(dart.dinvoke(this[_map], 'containsKey', element), core.bo ol);
4099 } 4099 }
4100 forEach(f) { 4100 [core.$forEach](f) {
4101 let cell = dart.as(dart.dload(this[_map], '_first'), LinkedHashMapCell); 4101 let cell = dart.as(dart.dload(this[_map], '_first'), LinkedHashMapCell);
4102 let modifications = dart.as(dart.dload(this[_map], '_modifications'), co re.int); 4102 let modifications = dart.as(dart.dload(this[_map], '_modifications'), co re.int);
4103 while (cell != null) { 4103 while (cell != null) {
4104 f(dart.as(cell[_key], E)); 4104 f(dart.as(cell[_key], E));
4105 if (!dart.equals(modifications, dart.dload(this[_map], '_modifications '))) { 4105 if (!dart.equals(modifications, dart.dload(this[_map], '_modifications '))) {
4106 throw new core.ConcurrentModificationError(this[_map]); 4106 throw new core.ConcurrentModificationError(this[_map]);
4107 } 4107 }
4108 cell = cell[_next]; 4108 cell = cell[_next];
4109 } 4109 }
4110 } 4110 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
4155 this[_length] = 0; 4155 this[_length] = 0;
4156 this[_strings] = null; 4156 this[_strings] = null;
4157 this[_nums] = null; 4157 this[_nums] = null;
4158 this[_rest] = null; 4158 this[_rest] = null;
4159 this[_elements] = null; 4159 this[_elements] = null;
4160 super._HashSetBase(); 4160 super._HashSetBase();
4161 } 4161 }
4162 [_newSet]() { 4162 [_newSet]() {
4163 return new (_HashSet$(E))(); 4163 return new (_HashSet$(E))();
4164 } 4164 }
4165 get iterator() { 4165 get [core.$iterator]() {
4166 return new (HashSetIterator$(E))(this, this[_computeElements]()); 4166 return new (HashSetIterator$(E))(this, this[_computeElements]());
4167 } 4167 }
4168 get length() { 4168 get [core.$length]() {
4169 return this[_length]; 4169 return this[_length];
4170 } 4170 }
4171 get isEmpty() { 4171 get [core.$isEmpty]() {
4172 return this[_length] == 0; 4172 return this[_length] == 0;
4173 } 4173 }
4174 get isNotEmpty() { 4174 get [core.$isNotEmpty]() {
4175 return !dart.notNull(this.isEmpty); 4175 return !dart.notNull(this.isEmpty);
4176 } 4176 }
4177 contains(object) { 4177 [core.$contains](object) {
4178 if (_HashSet[_isStringElement](object)) { 4178 if (_HashSet[_isStringElement](object)) {
4179 let strings = this[_strings]; 4179 let strings = this[_strings];
4180 return strings == null ? false : _HashSet[_hasTableEntry](strings, obj ect); 4180 return strings == null ? false : _HashSet[_hasTableEntry](strings, obj ect);
4181 } else if (_HashSet[_isNumericElement](object)) { 4181 } else if (_HashSet[_isNumericElement](object)) {
4182 let nums = this[_nums]; 4182 let nums = this[_nums];
4183 return nums == null ? false : _HashSet[_hasTableEntry](nums, object); 4183 return nums == null ? false : _HashSet[_hasTableEntry](nums, object);
4184 } else { 4184 } else {
4185 return this[_contains](object); 4185 return this[_contains](object);
4186 } 4186 }
4187 } 4187 }
4188 [_contains](object) { 4188 [_contains](object) {
4189 let rest = this[_rest]; 4189 let rest = this[_rest];
4190 if (rest == null) 4190 if (rest == null)
4191 return false; 4191 return false;
4192 let bucket = this[_getBucket](rest, object); 4192 let bucket = this[_getBucket](rest, object);
4193 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; 4193 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0;
4194 } 4194 }
4195 lookup(object) { 4195 lookup(object) {
4196 if (dart.notNull(_HashSet[_isStringElement](object)) || dart.notNull(_Ha shSet[_isNumericElement](object))) { 4196 if (dart.notNull(_HashSet[_isStringElement](object)) || dart.notNull(_Ha shSet[_isNumericElement](object))) {
4197 return dart.as(this.contains(object) ? object : null, E); 4197 return dart.as(this[core.$contains](object) ? object : null, E);
4198 } 4198 }
4199 return this[_lookup](object); 4199 return this[_lookup](object);
4200 } 4200 }
4201 [_lookup](object) { 4201 [_lookup](object) {
4202 let rest = this[_rest]; 4202 let rest = this[_rest];
4203 if (rest == null) 4203 if (rest == null)
4204 return null; 4204 return null;
4205 let bucket = this[_getBucket](rest, object); 4205 let bucket = this[_getBucket](rest, object);
4206 let index = this[_findBucketIndex](bucket, object); 4206 let index = this[_findBucketIndex](bucket, object);
4207 if (dart.notNull(index) < 0) 4207 if (dart.notNull(index) < 0)
4208 return null; 4208 return null;
4209 return dart.as(bucket.get(index), E); 4209 return dart.as(bucket[core.$get](index), E);
4210 } 4210 }
4211 add(element) { 4211 add(element) {
4212 if (_HashSet[_isStringElement](element)) { 4212 if (_HashSet[_isStringElement](element)) {
4213 let strings = this[_strings]; 4213 let strings = this[_strings];
4214 if (strings == null) 4214 if (strings == null)
4215 this[_strings] = strings = _HashSet[_newHashTable](); 4215 this[_strings] = strings = _HashSet[_newHashTable]();
4216 return this[_addHashTableEntry](strings, element); 4216 return this[_addHashTableEntry](strings, element);
4217 } else if (_HashSet[_isNumericElement](element)) { 4217 } else if (_HashSet[_isNumericElement](element)) {
4218 let nums = this[_nums]; 4218 let nums = this[_nums];
4219 if (nums == null) 4219 if (nums == null)
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
4424 return i; 4424 return i;
4425 } 4425 }
4426 return -1; 4426 return -1;
4427 } 4427 }
4428 [_computeHashCode](element) { 4428 [_computeHashCode](element) {
4429 return this[_hasher](dart.as(element, E)) & 0x3ffffff; 4429 return this[_hasher](dart.as(element, E)) & 0x3ffffff;
4430 } 4430 }
4431 add(object) { 4431 add(object) {
4432 return super._add(object); 4432 return super._add(object);
4433 } 4433 }
4434 contains(object) { 4434 [core.$contains](object) {
4435 if (!dart.notNull(dart.dinvokef(this[_validKey], object))) 4435 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
4436 return false; 4436 return false;
4437 return super._contains(object); 4437 return super._contains(object);
4438 } 4438 }
4439 lookup(object) { 4439 lookup(object) {
4440 if (!dart.notNull(dart.dinvokef(this[_validKey], object))) 4440 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
4441 return null; 4441 return null;
4442 return super._lookup(object); 4442 return super._lookup(object);
4443 } 4443 }
4444 remove(object) { 4444 remove(object) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
4492 this[_last] = null; 4492 this[_last] = null;
4493 this[_modifications] = 0; 4493 this[_modifications] = 0;
4494 super._HashSetBase(); 4494 super._HashSetBase();
4495 } 4495 }
4496 [_newSet]() { 4496 [_newSet]() {
4497 return new (_LinkedHashSet$(E))(); 4497 return new (_LinkedHashSet$(E))();
4498 } 4498 }
4499 [_unsupported](operation) { 4499 [_unsupported](operation) {
4500 throw `LinkedHashSet: unsupported ${operation}`; 4500 throw `LinkedHashSet: unsupported ${operation}`;
4501 } 4501 }
4502 get iterator() { 4502 get [core.$iterator]() {
4503 return dart.as(new LinkedHashSetIterator(this, this[_modifications]), co re.Iterator$(E)); 4503 return dart.as(new LinkedHashSetIterator(this, this[_modifications]), co re.Iterator$(E));
4504 } 4504 }
4505 get length() { 4505 get [core.$length]() {
4506 return this[_length]; 4506 return this[_length];
4507 } 4507 }
4508 get isEmpty() { 4508 get [core.$isEmpty]() {
4509 return this[_length] == 0; 4509 return this[_length] == 0;
4510 } 4510 }
4511 get isNotEmpty() { 4511 get [core.$isNotEmpty]() {
4512 return !dart.notNull(this.isEmpty); 4512 return !dart.notNull(this.isEmpty);
4513 } 4513 }
4514 contains(object) { 4514 [core.$contains](object) {
4515 if (_LinkedHashSet[_isStringElement](object)) { 4515 if (_LinkedHashSet[_isStringElement](object)) {
4516 let strings = this[_strings]; 4516 let strings = this[_strings];
4517 if (strings == null) 4517 if (strings == null)
4518 return false; 4518 return false;
4519 let cell = dart.as(_LinkedHashSet[_getTableEntry](strings, object), Li nkedHashSetCell); 4519 let cell = dart.as(_LinkedHashSet[_getTableEntry](strings, object), Li nkedHashSetCell);
4520 return cell != null; 4520 return cell != null;
4521 } else if (_LinkedHashSet[_isNumericElement](object)) { 4521 } else if (_LinkedHashSet[_isNumericElement](object)) {
4522 let nums = this[_nums]; 4522 let nums = this[_nums];
4523 if (nums == null) 4523 if (nums == null)
4524 return false; 4524 return false;
4525 let cell = dart.as(_LinkedHashSet[_getTableEntry](nums, object), Linke dHashSetCell); 4525 let cell = dart.as(_LinkedHashSet[_getTableEntry](nums, object), Linke dHashSetCell);
4526 return cell != null; 4526 return cell != null;
4527 } else { 4527 } else {
4528 return this[_contains](object); 4528 return this[_contains](object);
4529 } 4529 }
4530 } 4530 }
4531 [_contains](object) { 4531 [_contains](object) {
4532 let rest = this[_rest]; 4532 let rest = this[_rest];
4533 if (rest == null) 4533 if (rest == null)
4534 return false; 4534 return false;
4535 let bucket = this[_getBucket](rest, object); 4535 let bucket = this[_getBucket](rest, object);
4536 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; 4536 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0;
4537 } 4537 }
4538 lookup(object) { 4538 lookup(object) {
4539 if (dart.notNull(_LinkedHashSet[_isStringElement](object)) || dart.notNu ll(_LinkedHashSet[_isNumericElement](object))) { 4539 if (dart.notNull(_LinkedHashSet[_isStringElement](object)) || dart.notNu ll(_LinkedHashSet[_isNumericElement](object))) {
4540 return dart.as(this.contains(object) ? object : null, E); 4540 return dart.as(this[core.$contains](object) ? object : null, E);
4541 } else { 4541 } else {
4542 return this[_lookup](object); 4542 return this[_lookup](object);
4543 } 4543 }
4544 } 4544 }
4545 [_lookup](object) { 4545 [_lookup](object) {
4546 let rest = this[_rest]; 4546 let rest = this[_rest];
4547 if (rest == null) 4547 if (rest == null)
4548 return null; 4548 return null;
4549 let bucket = this[_getBucket](rest, object); 4549 let bucket = this[_getBucket](rest, object);
4550 let index = this[_findBucketIndex](bucket, object); 4550 let index = this[_findBucketIndex](bucket, object);
4551 if (dart.notNull(index) < 0) 4551 if (dart.notNull(index) < 0)
4552 return null; 4552 return null;
4553 return dart.as(dart.dload(bucket.get(index), '_element'), E); 4553 return dart.as(dart.dload(bucket[core.$get](index), '_element'), E);
4554 } 4554 }
4555 forEach(action) { 4555 [core.$forEach](action) {
4556 let cell = this[_first]; 4556 let cell = this[_first];
4557 let modifications = this[_modifications]; 4557 let modifications = this[_modifications];
4558 while (cell != null) { 4558 while (cell != null) {
4559 action(dart.as(cell[_element], E)); 4559 action(dart.as(cell[_element], E));
4560 if (modifications != this[_modifications]) { 4560 if (modifications != this[_modifications]) {
4561 throw new core.ConcurrentModificationError(this); 4561 throw new core.ConcurrentModificationError(this);
4562 } 4562 }
4563 cell = cell[_next]; 4563 cell = cell[_next];
4564 } 4564 }
4565 } 4565 }
4566 get first() { 4566 get [core.$first]() {
4567 if (this[_first] == null) 4567 if (this[_first] == null)
4568 throw new core.StateError("No elements"); 4568 throw new core.StateError("No elements");
4569 return dart.as(this[_first][_element], E); 4569 return dart.as(this[_first][_element], E);
4570 } 4570 }
4571 get last() { 4571 get [core.$last]() {
4572 if (this[_last] == null) 4572 if (this[_last] == null)
4573 throw new core.StateError("No elements"); 4573 throw new core.StateError("No elements");
4574 return dart.as(this[_last][_element], E); 4574 return dart.as(this[_last][_element], E);
4575 } 4575 }
4576 add(element) { 4576 add(element) {
4577 if (_LinkedHashSet[_isStringElement](element)) { 4577 if (_LinkedHashSet[_isStringElement](element)) {
4578 let strings = this[_strings]; 4578 let strings = this[_strings];
4579 if (strings == null) 4579 if (strings == null)
4580 this[_strings] = strings = _LinkedHashSet[_newHashTable](); 4580 this[_strings] = strings = _LinkedHashSet[_newHashTable]();
4581 return this[_addHashTableEntry](strings, element); 4581 return this[_addHashTableEntry](strings, element);
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
4796 return i; 4796 return i;
4797 } 4797 }
4798 return -1; 4798 return -1;
4799 } 4799 }
4800 [_computeHashCode](element) { 4800 [_computeHashCode](element) {
4801 return this[_hasher](dart.as(element, E)) & 0x3ffffff; 4801 return this[_hasher](dart.as(element, E)) & 0x3ffffff;
4802 } 4802 }
4803 add(element) { 4803 add(element) {
4804 return super._add(element); 4804 return super._add(element);
4805 } 4805 }
4806 contains(object) { 4806 [core.$contains](object) {
4807 if (!dart.notNull(dart.dinvokef(this[_validKey], object))) 4807 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
4808 return false; 4808 return false;
4809 return super._contains(object); 4809 return super._contains(object);
4810 } 4810 }
4811 lookup(object) { 4811 lookup(object) {
4812 if (!dart.notNull(dart.dinvokef(this[_validKey], object))) 4812 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
4813 return null; 4813 return null;
4814 return super._lookup(object); 4814 return super._lookup(object);
4815 } 4815 }
4816 remove(object) { 4816 remove(object) {
4817 if (!dart.notNull(dart.dinvokef(this[_validKey], object))) 4817 if (!dart.notNull(dart.dinvokef(this[_validKey], object)))
4818 return false; 4818 return false;
4819 return super._remove(object); 4819 return super._remove(object);
4820 } 4820 }
4821 containsAll(elements) { 4821 containsAll(elements) {
4822 for (let element of elements) { 4822 for (let element of elements) {
4823 if (!dart.notNull(dart.dinvokef(this[_validKey], element)) || !dart.no tNull(this.contains(element))) 4823 if (!dart.notNull(dart.dinvokef(this[_validKey], element)) || !dart.no tNull(this[core.$contains](element)))
4824 return false; 4824 return false;
4825 } 4825 }
4826 return true; 4826 return true;
4827 } 4827 }
4828 removeAll(elements) { 4828 removeAll(elements) {
4829 for (let element of elements) { 4829 for (let element of elements) {
4830 if (dart.dinvokef(this[_validKey], element)) { 4830 if (dart.dinvokef(this[_validKey], element)) {
4831 super._remove(element); 4831 super._remove(element);
4832 } 4832 }
4833 } 4833 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
4930 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; 4930 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable;
4931 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; 4931 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$;
4932 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; 4932 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator;
4933 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; 4933 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$;
4934 exports.HashSetIterator = HashSetIterator; 4934 exports.HashSetIterator = HashSetIterator;
4935 exports.HashSetIterator$ = HashSetIterator$; 4935 exports.HashSetIterator$ = HashSetIterator$;
4936 exports.LinkedHashSetCell = LinkedHashSetCell; 4936 exports.LinkedHashSetCell = LinkedHashSetCell;
4937 exports.LinkedHashSetIterator = LinkedHashSetIterator; 4937 exports.LinkedHashSetIterator = LinkedHashSetIterator;
4938 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; 4938 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$;
4939 })(collection || (collection = {})); 4939 })(collection || (collection = {}));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698