| OLD | NEW |
| 1 var collection = dart.defineLibrary(collection, {}); | 1 var collection = dart.defineLibrary(collection, {}); |
| 2 var _internal = dart.lazyImport(_internal); | 2 var _internal = dart.lazyImport(_internal); |
| 3 var core = dart.import(core); | 3 var core = dart.import(core); |
| 4 var _js_helper = dart.lazyImport(_js_helper); | 4 var _js_helper = dart.lazyImport(_js_helper); |
| 5 var math = dart.lazyImport(math); | 5 var math = dart.lazyImport(math); |
| 6 (function(exports, _internal, core, _js_helper, math) { | 6 (function(exports, _internal, core, _js_helper, math) { |
| 7 'use strict'; | 7 'use strict'; |
| 8 let _source = Symbol('_source'); | 8 let _source = Symbol('_source'); |
| 9 let UnmodifiableListView$ = dart.generic(function(E) { | 9 let UnmodifiableListView$ = dart.generic(function(E) { |
| 10 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { | 10 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 return _Equality; | 38 return _Equality; |
| 39 }); | 39 }); |
| 40 let _Equality = _Equality$(); | 40 let _Equality = _Equality$(); |
| 41 let _Hasher$ = dart.generic(function(K) { | 41 let _Hasher$ = dart.generic(function(K) { |
| 42 let _Hasher = dart.typedef('_Hasher', () => dart.functionType(core.int, [K])
); | 42 let _Hasher = dart.typedef('_Hasher', () => dart.functionType(core.int, [K])
); |
| 43 return _Hasher; | 43 return _Hasher; |
| 44 }); | 44 }); |
| 45 let _Hasher = _Hasher$(); | 45 let _Hasher = _Hasher$(); |
| 46 let HashMap$ = dart.generic(function(K, V) { | 46 let HashMap$ = dart.generic(function(K, V) { |
| 47 class HashMap extends core.Object { | 47 class HashMap extends core.Object { |
| 48 HashMap(opts) { | 48 static new(opts) { |
| 49 let equals = opts && 'equals' in opts ? opts.equals : null; | 49 let equals = opts && 'equals' in opts ? opts.equals : null; |
| 50 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; | 50 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; |
| 51 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; | 51 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; |
| 52 if (isValidKey == null) { | 52 if (isValidKey == null) { |
| 53 if (hashCode == null) { | 53 if (hashCode == null) { |
| 54 if (equals == null) { | 54 if (equals == null) { |
| 55 return new (_HashMap$(K, V))(); | 55 return new (_HashMap$(K, V))(); |
| 56 } | 56 } |
| 57 hashCode = _defaultHashCode; | 57 hashCode = _defaultHashCode; |
| 58 } else { | 58 } else { |
| 59 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) &&
dart.notNull(core.identical(core.identical, equals))) { | 59 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) &&
dart.notNull(core.identical(core.identical, equals))) { |
| 60 return new (_IdentityHashMap$(K, V))(); | 60 return new (_IdentityHashMap$(K, V))(); |
| 61 } | 61 } |
| 62 if (equals == null) { | 62 if (equals == null) { |
| 63 equals = _defaultEquals; | 63 equals = _defaultEquals; |
| 64 } | 64 } |
| 65 } | 65 } |
| 66 } else { | 66 } else { |
| 67 if (hashCode == null) { | 67 if (hashCode == null) { |
| 68 hashCode = _defaultHashCode; | 68 hashCode = _defaultHashCode; |
| 69 } | 69 } |
| 70 if (equals == null) { | 70 if (equals == null) { |
| 71 equals = _defaultEquals; | 71 equals = _defaultEquals; |
| 72 } | 72 } |
| 73 } | 73 } |
| 74 return new (_CustomHashMap$(K, V))(equals, hashCode, isValidKey); | 74 return new (_CustomHashMap$(K, V))(equals, hashCode, isValidKey); |
| 75 } | 75 } |
| 76 identity() { | 76 static identity() { |
| 77 return new (_IdentityHashMap$(K, V))(); | 77 return new (_IdentityHashMap$(K, V))(); |
| 78 } | 78 } |
| 79 from(other) { | 79 static from(other) { |
| 80 let result = new (HashMap$(K, V))(); | 80 let result = HashMap$(K, V).new(); |
| 81 other.forEach(dart.fn((k, v) => { | 81 other.forEach(dart.fn((k, v) => { |
| 82 result.set(k, dart.as(v, V)); | 82 result.set(k, dart.as(v, V)); |
| 83 })); | 83 })); |
| 84 return result; | 84 return result; |
| 85 } | 85 } |
| 86 fromIterable(iterable, opts) { | 86 static fromIterable(iterable, opts) { |
| 87 let key = opts && 'key' in opts ? opts.key : null; | 87 let key = opts && 'key' in opts ? opts.key : null; |
| 88 let value = opts && 'value' in opts ? opts.value : null; | 88 let value = opts && 'value' in opts ? opts.value : null; |
| 89 let map = new (HashMap$(K, V))(); | 89 let map = HashMap$(K, V).new(); |
| 90 Maps._fillMapWithMappedIterable(map, iterable, key, value); | 90 Maps._fillMapWithMappedIterable(map, iterable, key, value); |
| 91 return map; | 91 return map; |
| 92 } | 92 } |
| 93 fromIterables(keys, values) { | 93 static fromIterables(keys, values) { |
| 94 let map = new (HashMap$(K, V))(); | 94 let map = HashMap$(K, V).new(); |
| 95 Maps._fillMapWithIterables(map, keys, values); | 95 Maps._fillMapWithIterables(map, keys, values); |
| 96 return map; | 96 return map; |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 HashMap[dart.implements] = () => [core.Map$(K, V)]; | 99 HashMap[dart.implements] = () => [core.Map$(K, V)]; |
| 100 dart.defineNamedConstructor(HashMap, 'identity'); | |
| 101 dart.defineNamedConstructor(HashMap, 'from'); | |
| 102 dart.defineNamedConstructor(HashMap, 'fromIterable'); | |
| 103 dart.defineNamedConstructor(HashMap, 'fromIterables'); | |
| 104 dart.setSignature(HashMap, { | 100 dart.setSignature(HashMap, { |
| 105 constructors: () => ({ | 101 constructors: () => ({ |
| 106 HashMap: [HashMap$(K, V), [], {equals: dart.functionType(core.bool, [K,
K]), hashCode: dart.functionType(core.int, [K]), isValidKey: dart.functionType(c
ore.bool, [core.Object])}], | 102 new: [HashMap$(K, V), [], {equals: dart.functionType(core.bool, [K, K]),
hashCode: dart.functionType(core.int, [K]), isValidKey: dart.functionType(core.
bool, [core.Object])}], |
| 107 identity: [HashMap$(K, V), []], | 103 identity: [HashMap$(K, V), []], |
| 108 from: [HashMap$(K, V), [core.Map]], | 104 from: [HashMap$(K, V), [core.Map]], |
| 109 fromIterable: [HashMap$(K, V), [core.Iterable], {key: dart.functionType(
K, [dart.bottom]), value: dart.functionType(V, [dart.bottom])}], | 105 fromIterable: [HashMap$(K, V), [core.Iterable], {key: dart.functionType(
K, [dart.bottom]), value: dart.functionType(V, [dart.bottom])}], |
| 110 fromIterables: [HashMap$(K, V), [core.Iterable$(K), core.Iterable$(V)]] | 106 fromIterables: [HashMap$(K, V), [core.Iterable$(K), core.Iterable$(V)]] |
| 111 }) | 107 }) |
| 112 }); | 108 }); |
| 113 return HashMap; | 109 return HashMap; |
| 114 }); | 110 }); |
| 115 let HashMap = HashMap$(); | 111 let HashMap = HashMap$(); |
| 116 let SetMixin$ = dart.generic(function(E) { | 112 let SetMixin$ = dart.generic(function(E) { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 let result = this[core.$toSet](); | 182 let result = this[core.$toSet](); |
| 187 for (let element of this) { | 183 for (let element of this) { |
| 188 if (other[core.$contains](element)) | 184 if (other[core.$contains](element)) |
| 189 result.remove(element); | 185 result.remove(element); |
| 190 } | 186 } |
| 191 return result; | 187 return result; |
| 192 } | 188 } |
| 193 [core.$toList](opts) { | 189 [core.$toList](opts) { |
| 194 let growable = opts && 'growable' in opts ? opts.growable : true; | 190 let growable = opts && 'growable' in opts ? opts.growable : true; |
| 195 let result = growable ? (() => { | 191 let result = growable ? (() => { |
| 196 let _ = new (core.List$(E))(); | 192 let _ = core.List$(E).new(); |
| 197 _[core.$length] = this[core.$length]; | 193 _[core.$length] = this[core.$length]; |
| 198 return _; | 194 return _; |
| 199 }).bind(this)() : new (core.List$(E))(this[core.$length]); | 195 }).bind(this)() : core.List$(E).new(this[core.$length]); |
| 200 let i = 0; | 196 let i = 0; |
| 201 for (let element of this) | 197 for (let element of this) |
| 202 result[core.$set]((() => { | 198 result[core.$set]((() => { |
| 203 let x = i; | 199 let x = i; |
| 204 i = dart.notNull(x) + 1; | 200 i = dart.notNull(x) + 1; |
| 205 return x; | 201 return x; |
| 206 })(), element); | 202 })(), element); |
| 207 return result; | 203 return result; |
| 208 } | 204 } |
| 209 [core.$map](f) { | 205 [core.$map](f) { |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 } | 280 } |
| 285 [core.$any](test) { | 281 [core.$any](test) { |
| 286 dart.as(test, dart.functionType(core.bool, [E])); | 282 dart.as(test, dart.functionType(core.bool, [E])); |
| 287 for (let element of this) { | 283 for (let element of this) { |
| 288 if (test(element)) | 284 if (test(element)) |
| 289 return true; | 285 return true; |
| 290 } | 286 } |
| 291 return false; | 287 return false; |
| 292 } | 288 } |
| 293 [core.$take](n) { | 289 [core.$take](n) { |
| 294 return new (_internal.TakeIterable$(E))(this, n); | 290 return _internal.TakeIterable$(E).new(this, n); |
| 295 } | 291 } |
| 296 [core.$takeWhile](test) { | 292 [core.$takeWhile](test) { |
| 297 dart.as(test, dart.functionType(core.bool, [E])); | 293 dart.as(test, dart.functionType(core.bool, [E])); |
| 298 return new (_internal.TakeWhileIterable$(E))(this, test); | 294 return new (_internal.TakeWhileIterable$(E))(this, test); |
| 299 } | 295 } |
| 300 [core.$skip](n) { | 296 [core.$skip](n) { |
| 301 return new (_internal.SkipIterable$(E))(this, n); | 297 return _internal.SkipIterable$(E).new(this, n); |
| 302 } | 298 } |
| 303 [core.$skipWhile](test) { | 299 [core.$skipWhile](test) { |
| 304 dart.as(test, dart.functionType(core.bool, [E])); | 300 dart.as(test, dart.functionType(core.bool, [E])); |
| 305 return new (_internal.SkipWhileIterable$(E))(this, test); | 301 return new (_internal.SkipWhileIterable$(E))(this, test); |
| 306 } | 302 } |
| 307 get [core.$first]() { | 303 get [core.$first]() { |
| 308 let it = this[core.$iterator]; | 304 let it = this[core.$iterator]; |
| 309 if (!dart.notNull(it.moveNext())) { | 305 if (!dart.notNull(it.moveNext())) { |
| 310 throw _internal.IterableElementError.noElement(); | 306 throw _internal.IterableElementError.noElement(); |
| 311 } | 307 } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 [core.$elementAt](index) { | 368 [core.$elementAt](index) { |
| 373 if (!(typeof index == 'number')) | 369 if (!(typeof index == 'number')) |
| 374 throw new core.ArgumentError.notNull("index"); | 370 throw new core.ArgumentError.notNull("index"); |
| 375 core.RangeError.checkNotNegative(index, "index"); | 371 core.RangeError.checkNotNegative(index, "index"); |
| 376 let elementIndex = 0; | 372 let elementIndex = 0; |
| 377 for (let element of this) { | 373 for (let element of this) { |
| 378 if (index == elementIndex) | 374 if (index == elementIndex) |
| 379 return element; | 375 return element; |
| 380 elementIndex = dart.notNull(elementIndex) + 1; | 376 elementIndex = dart.notNull(elementIndex) + 1; |
| 381 } | 377 } |
| 382 throw new core.RangeError.index(index, this, "index", null, elementIndex
); | 378 throw core.RangeError.index(index, this, "index", null, elementIndex); |
| 383 } | 379 } |
| 384 } | 380 } |
| 385 SetMixin[dart.implements] = () => [core.Set$(E)]; | 381 SetMixin[dart.implements] = () => [core.Set$(E)]; |
| 386 dart.setSignature(SetMixin, { | 382 dart.setSignature(SetMixin, { |
| 387 methods: () => ({ | 383 methods: () => ({ |
| 388 clear: [dart.void, []], | 384 clear: [dart.void, []], |
| 389 addAll: [dart.void, [core.Iterable$(E)]], | 385 addAll: [dart.void, [core.Iterable$(E)]], |
| 390 removeAll: [dart.void, [core.Iterable$(core.Object)]], | 386 removeAll: [dart.void, [core.Iterable$(core.Object)]], |
| 391 retainAll: [dart.void, [core.Iterable$(core.Object)]], | 387 retainAll: [dart.void, [core.Iterable$(core.Object)]], |
| 392 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], | 388 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 difference: [core.Set$(E), [core.Set$(core.Object)]], | 459 difference: [core.Set$(E), [core.Set$(core.Object)]], |
| 464 intersection: [core.Set$(E), [core.Set$(core.Object)]], | 460 intersection: [core.Set$(E), [core.Set$(core.Object)]], |
| 465 [core.$toSet]: [core.Set$(E), []] | 461 [core.$toSet]: [core.Set$(E), []] |
| 466 }) | 462 }) |
| 467 }); | 463 }); |
| 468 return _HashSetBase; | 464 return _HashSetBase; |
| 469 }); | 465 }); |
| 470 let _HashSetBase = _HashSetBase$(); | 466 let _HashSetBase = _HashSetBase$(); |
| 471 let HashSet$ = dart.generic(function(E) { | 467 let HashSet$ = dart.generic(function(E) { |
| 472 class HashSet extends core.Object { | 468 class HashSet extends core.Object { |
| 473 HashSet(opts) { | 469 static new(opts) { |
| 474 let equals = opts && 'equals' in opts ? opts.equals : null; | 470 let equals = opts && 'equals' in opts ? opts.equals : null; |
| 475 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; | 471 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; |
| 476 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; | 472 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; |
| 477 if (isValidKey == null) { | 473 if (isValidKey == null) { |
| 478 if (hashCode == null) { | 474 if (hashCode == null) { |
| 479 if (equals == null) { | 475 if (equals == null) { |
| 480 return new (_HashSet$(E))(); | 476 return new (_HashSet$(E))(); |
| 481 } | 477 } |
| 482 hashCode = _defaultHashCode; | 478 hashCode = _defaultHashCode; |
| 483 } else { | 479 } else { |
| 484 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) &&
dart.notNull(core.identical(core.identical, equals))) { | 480 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) &&
dart.notNull(core.identical(core.identical, equals))) { |
| 485 return new (_IdentityHashSet$(E))(); | 481 return new (_IdentityHashSet$(E))(); |
| 486 } | 482 } |
| 487 if (equals == null) { | 483 if (equals == null) { |
| 488 equals = _defaultEquals; | 484 equals = _defaultEquals; |
| 489 } | 485 } |
| 490 } | 486 } |
| 491 } else { | 487 } else { |
| 492 if (hashCode == null) { | 488 if (hashCode == null) { |
| 493 hashCode = _defaultHashCode; | 489 hashCode = _defaultHashCode; |
| 494 } | 490 } |
| 495 if (equals == null) { | 491 if (equals == null) { |
| 496 equals = _defaultEquals; | 492 equals = _defaultEquals; |
| 497 } | 493 } |
| 498 } | 494 } |
| 499 return new (_CustomHashSet$(E))(equals, hashCode, isValidKey); | 495 return new (_CustomHashSet$(E))(equals, hashCode, isValidKey); |
| 500 } | 496 } |
| 501 identity() { | 497 static identity() { |
| 502 return new (_IdentityHashSet$(E))(); | 498 return new (_IdentityHashSet$(E))(); |
| 503 } | 499 } |
| 504 from(elements) { | 500 static from(elements) { |
| 505 let result = new (HashSet$(E))(); | 501 let result = HashSet$(E).new(); |
| 506 for (let e of dart.as(elements, core.Iterable$(E))) | 502 for (let e of dart.as(elements, core.Iterable$(E))) |
| 507 result.add(e); | 503 result.add(e); |
| 508 return result; | 504 return result; |
| 509 } | 505 } |
| 510 [Symbol.iterator]() { | 506 [Symbol.iterator]() { |
| 511 return new dart.JsIterator(this[core.$iterator]); | 507 return new dart.JsIterator(this[core.$iterator]); |
| 512 } | 508 } |
| 513 } | 509 } |
| 514 HashSet[dart.implements] = () => [core.Set$(E)]; | 510 HashSet[dart.implements] = () => [core.Set$(E)]; |
| 515 dart.defineNamedConstructor(HashSet, 'identity'); | |
| 516 dart.defineNamedConstructor(HashSet, 'from'); | |
| 517 dart.setSignature(HashSet, { | 511 dart.setSignature(HashSet, { |
| 518 constructors: () => ({ | 512 constructors: () => ({ |
| 519 HashSet: [HashSet$(E), [], {equals: dart.functionType(core.bool, [E, E])
, hashCode: dart.functionType(core.int, [E]), isValidKey: dart.functionType(core
.bool, [core.Object])}], | 513 new: [HashSet$(E), [], {equals: dart.functionType(core.bool, [E, E]), ha
shCode: dart.functionType(core.int, [E]), isValidKey: dart.functionType(core.boo
l, [core.Object])}], |
| 520 identity: [HashSet$(E), []], | 514 identity: [HashSet$(E), []], |
| 521 from: [HashSet$(E), [core.Iterable]] | 515 from: [HashSet$(E), [core.Iterable]] |
| 522 }) | 516 }) |
| 523 }); | 517 }); |
| 524 return HashSet; | 518 return HashSet; |
| 525 }); | 519 }); |
| 526 let HashSet = HashSet$(); | 520 let HashSet = HashSet$(); |
| 527 let IterableMixin$ = dart.generic(function(E) { | 521 let IterableMixin$ = dart.generic(function(E) { |
| 528 class IterableMixin extends core.Object { | 522 class IterableMixin extends core.Object { |
| 529 [core.$map](f) { | 523 [core.$map](f) { |
| 530 dart.as(f, dart.functionType(core.Object, [E])); | 524 dart.as(f, dart.functionType(core.Object, [E])); |
| 531 return new (_internal.MappedIterable$(E, core.Object))(this, f); | 525 return _internal.MappedIterable$(E, core.Object).new(this, f); |
| 532 } | 526 } |
| 533 [core.$where](f) { | 527 [core.$where](f) { |
| 534 dart.as(f, dart.functionType(core.bool, [E])); | 528 dart.as(f, dart.functionType(core.bool, [E])); |
| 535 return new (_internal.WhereIterable$(E))(this, f); | 529 return new (_internal.WhereIterable$(E))(this, f); |
| 536 } | 530 } |
| 537 [core.$expand](f) { | 531 [core.$expand](f) { |
| 538 dart.as(f, dart.functionType(core.Iterable, [E])); | 532 dart.as(f, dart.functionType(core.Iterable, [E])); |
| 539 return new (_internal.ExpandIterable$(E, core.Object))(this, f); | 533 return new (_internal.ExpandIterable$(E, core.Object))(this, f); |
| 540 } | 534 } |
| 541 [core.$contains](element) { | 535 [core.$contains](element) { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 [core.$any](f) { | 594 [core.$any](f) { |
| 601 dart.as(f, dart.functionType(core.bool, [E])); | 595 dart.as(f, dart.functionType(core.bool, [E])); |
| 602 for (let element of this) { | 596 for (let element of this) { |
| 603 if (f(element)) | 597 if (f(element)) |
| 604 return true; | 598 return true; |
| 605 } | 599 } |
| 606 return false; | 600 return false; |
| 607 } | 601 } |
| 608 [core.$toList](opts) { | 602 [core.$toList](opts) { |
| 609 let growable = opts && 'growable' in opts ? opts.growable : true; | 603 let growable = opts && 'growable' in opts ? opts.growable : true; |
| 610 return new (core.List$(E)).from(this, {growable: growable}); | 604 return core.List$(E).from(this, {growable: growable}); |
| 611 } | 605 } |
| 612 [core.$toSet]() { | 606 [core.$toSet]() { |
| 613 return new (core.Set$(E)).from(this); | 607 return core.Set$(E).from(this); |
| 614 } | 608 } |
| 615 get [core.$length]() { | 609 get [core.$length]() { |
| 616 dart.assert(!dart.is(this, _internal.EfficientLength)); | 610 dart.assert(!dart.is(this, _internal.EfficientLength)); |
| 617 let count = 0; | 611 let count = 0; |
| 618 let it = this[core.$iterator]; | 612 let it = this[core.$iterator]; |
| 619 while (it.moveNext()) { | 613 while (it.moveNext()) { |
| 620 count = dart.notNull(count) + 1; | 614 count = dart.notNull(count) + 1; |
| 621 } | 615 } |
| 622 return count; | 616 return count; |
| 623 } | 617 } |
| 624 get [core.$isEmpty]() { | 618 get [core.$isEmpty]() { |
| 625 return !dart.notNull(this[core.$iterator].moveNext()); | 619 return !dart.notNull(this[core.$iterator].moveNext()); |
| 626 } | 620 } |
| 627 get [core.$isNotEmpty]() { | 621 get [core.$isNotEmpty]() { |
| 628 return !dart.notNull(this[core.$isEmpty]); | 622 return !dart.notNull(this[core.$isEmpty]); |
| 629 } | 623 } |
| 630 [core.$take](n) { | 624 [core.$take](n) { |
| 631 return new (_internal.TakeIterable$(E))(this, n); | 625 return _internal.TakeIterable$(E).new(this, n); |
| 632 } | 626 } |
| 633 [core.$takeWhile](test) { | 627 [core.$takeWhile](test) { |
| 634 dart.as(test, dart.functionType(core.bool, [E])); | 628 dart.as(test, dart.functionType(core.bool, [E])); |
| 635 return new (_internal.TakeWhileIterable$(E))(this, test); | 629 return new (_internal.TakeWhileIterable$(E))(this, test); |
| 636 } | 630 } |
| 637 [core.$skip](n) { | 631 [core.$skip](n) { |
| 638 return new (_internal.SkipIterable$(E))(this, n); | 632 return _internal.SkipIterable$(E).new(this, n); |
| 639 } | 633 } |
| 640 [core.$skipWhile](test) { | 634 [core.$skipWhile](test) { |
| 641 dart.as(test, dart.functionType(core.bool, [E])); | 635 dart.as(test, dart.functionType(core.bool, [E])); |
| 642 return new (_internal.SkipWhileIterable$(E))(this, test); | 636 return new (_internal.SkipWhileIterable$(E))(this, test); |
| 643 } | 637 } |
| 644 get [core.$first]() { | 638 get [core.$first]() { |
| 645 let it = this[core.$iterator]; | 639 let it = this[core.$iterator]; |
| 646 if (!dart.notNull(it.moveNext())) { | 640 if (!dart.notNull(it.moveNext())) { |
| 647 throw _internal.IterableElementError.noElement(); | 641 throw _internal.IterableElementError.noElement(); |
| 648 } | 642 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 [core.$elementAt](index) { | 712 [core.$elementAt](index) { |
| 719 if (!(typeof index == 'number')) | 713 if (!(typeof index == 'number')) |
| 720 throw new core.ArgumentError.notNull("index"); | 714 throw new core.ArgumentError.notNull("index"); |
| 721 core.RangeError.checkNotNegative(index, "index"); | 715 core.RangeError.checkNotNegative(index, "index"); |
| 722 let elementIndex = 0; | 716 let elementIndex = 0; |
| 723 for (let element of this) { | 717 for (let element of this) { |
| 724 if (index == elementIndex) | 718 if (index == elementIndex) |
| 725 return element; | 719 return element; |
| 726 elementIndex = dart.notNull(elementIndex) + 1; | 720 elementIndex = dart.notNull(elementIndex) + 1; |
| 727 } | 721 } |
| 728 throw new core.RangeError.index(index, this, "index", null, elementIndex
); | 722 throw core.RangeError.index(index, this, "index", null, elementIndex); |
| 729 } | 723 } |
| 730 toString() { | 724 toString() { |
| 731 return IterableBase.iterableToShortString(this, '(', ')'); | 725 return IterableBase.iterableToShortString(this, '(', ')'); |
| 732 } | 726 } |
| 733 [Symbol.iterator]() { | 727 [Symbol.iterator]() { |
| 734 return new dart.JsIterator(this[core.$iterator]); | 728 return new dart.JsIterator(this[core.$iterator]); |
| 735 } | 729 } |
| 736 } | 730 } |
| 737 IterableMixin[dart.implements] = () => [core.Iterable$(E)]; | 731 IterableMixin[dart.implements] = () => [core.Iterable$(E)]; |
| 738 dart.setSignature(IterableMixin, { | 732 dart.setSignature(IterableMixin, { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 761 }); | 755 }); |
| 762 return IterableMixin; | 756 return IterableMixin; |
| 763 }); | 757 }); |
| 764 let IterableMixin = IterableMixin$(); | 758 let IterableMixin = IterableMixin$(); |
| 765 let IterableBase$ = dart.generic(function(E) { | 759 let IterableBase$ = dart.generic(function(E) { |
| 766 class IterableBase extends core.Object { | 760 class IterableBase extends core.Object { |
| 767 IterableBase() { | 761 IterableBase() { |
| 768 } | 762 } |
| 769 [core.$map](f) { | 763 [core.$map](f) { |
| 770 dart.as(f, dart.functionType(core.Object, [E])); | 764 dart.as(f, dart.functionType(core.Object, [E])); |
| 771 return new (_internal.MappedIterable$(E, core.Object))(this, f); | 765 return _internal.MappedIterable$(E, core.Object).new(this, f); |
| 772 } | 766 } |
| 773 [core.$where](f) { | 767 [core.$where](f) { |
| 774 dart.as(f, dart.functionType(core.bool, [E])); | 768 dart.as(f, dart.functionType(core.bool, [E])); |
| 775 return new (_internal.WhereIterable$(E))(this, f); | 769 return new (_internal.WhereIterable$(E))(this, f); |
| 776 } | 770 } |
| 777 [core.$expand](f) { | 771 [core.$expand](f) { |
| 778 dart.as(f, dart.functionType(core.Iterable, [E])); | 772 dart.as(f, dart.functionType(core.Iterable, [E])); |
| 779 return new (_internal.ExpandIterable$(E, core.Object))(this, f); | 773 return new (_internal.ExpandIterable$(E, core.Object))(this, f); |
| 780 } | 774 } |
| 781 [core.$contains](element) { | 775 [core.$contains](element) { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 [core.$any](f) { | 834 [core.$any](f) { |
| 841 dart.as(f, dart.functionType(core.bool, [E])); | 835 dart.as(f, dart.functionType(core.bool, [E])); |
| 842 for (let element of this) { | 836 for (let element of this) { |
| 843 if (f(element)) | 837 if (f(element)) |
| 844 return true; | 838 return true; |
| 845 } | 839 } |
| 846 return false; | 840 return false; |
| 847 } | 841 } |
| 848 [core.$toList](opts) { | 842 [core.$toList](opts) { |
| 849 let growable = opts && 'growable' in opts ? opts.growable : true; | 843 let growable = opts && 'growable' in opts ? opts.growable : true; |
| 850 return new (core.List$(E)).from(this, {growable: growable}); | 844 return core.List$(E).from(this, {growable: growable}); |
| 851 } | 845 } |
| 852 [core.$toSet]() { | 846 [core.$toSet]() { |
| 853 return new (core.Set$(E)).from(this); | 847 return core.Set$(E).from(this); |
| 854 } | 848 } |
| 855 get [core.$length]() { | 849 get [core.$length]() { |
| 856 dart.assert(!dart.is(this, _internal.EfficientLength)); | 850 dart.assert(!dart.is(this, _internal.EfficientLength)); |
| 857 let count = 0; | 851 let count = 0; |
| 858 let it = this[core.$iterator]; | 852 let it = this[core.$iterator]; |
| 859 while (it.moveNext()) { | 853 while (it.moveNext()) { |
| 860 count = dart.notNull(count) + 1; | 854 count = dart.notNull(count) + 1; |
| 861 } | 855 } |
| 862 return count; | 856 return count; |
| 863 } | 857 } |
| 864 get [core.$isEmpty]() { | 858 get [core.$isEmpty]() { |
| 865 return !dart.notNull(this[core.$iterator].moveNext()); | 859 return !dart.notNull(this[core.$iterator].moveNext()); |
| 866 } | 860 } |
| 867 get [core.$isNotEmpty]() { | 861 get [core.$isNotEmpty]() { |
| 868 return !dart.notNull(this[core.$isEmpty]); | 862 return !dart.notNull(this[core.$isEmpty]); |
| 869 } | 863 } |
| 870 [core.$take](n) { | 864 [core.$take](n) { |
| 871 return new (_internal.TakeIterable$(E))(this, n); | 865 return _internal.TakeIterable$(E).new(this, n); |
| 872 } | 866 } |
| 873 [core.$takeWhile](test) { | 867 [core.$takeWhile](test) { |
| 874 dart.as(test, dart.functionType(core.bool, [E])); | 868 dart.as(test, dart.functionType(core.bool, [E])); |
| 875 return new (_internal.TakeWhileIterable$(E))(this, test); | 869 return new (_internal.TakeWhileIterable$(E))(this, test); |
| 876 } | 870 } |
| 877 [core.$skip](n) { | 871 [core.$skip](n) { |
| 878 return new (_internal.SkipIterable$(E))(this, n); | 872 return _internal.SkipIterable$(E).new(this, n); |
| 879 } | 873 } |
| 880 [core.$skipWhile](test) { | 874 [core.$skipWhile](test) { |
| 881 dart.as(test, dart.functionType(core.bool, [E])); | 875 dart.as(test, dart.functionType(core.bool, [E])); |
| 882 return new (_internal.SkipWhileIterable$(E))(this, test); | 876 return new (_internal.SkipWhileIterable$(E))(this, test); |
| 883 } | 877 } |
| 884 get [core.$first]() { | 878 get [core.$first]() { |
| 885 let it = this[core.$iterator]; | 879 let it = this[core.$iterator]; |
| 886 if (!dart.notNull(it.moveNext())) { | 880 if (!dart.notNull(it.moveNext())) { |
| 887 throw _internal.IterableElementError.noElement(); | 881 throw _internal.IterableElementError.noElement(); |
| 888 } | 882 } |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 958 [core.$elementAt](index) { | 952 [core.$elementAt](index) { |
| 959 if (!(typeof index == 'number')) | 953 if (!(typeof index == 'number')) |
| 960 throw new core.ArgumentError.notNull("index"); | 954 throw new core.ArgumentError.notNull("index"); |
| 961 core.RangeError.checkNotNegative(index, "index"); | 955 core.RangeError.checkNotNegative(index, "index"); |
| 962 let elementIndex = 0; | 956 let elementIndex = 0; |
| 963 for (let element of this) { | 957 for (let element of this) { |
| 964 if (index == elementIndex) | 958 if (index == elementIndex) |
| 965 return element; | 959 return element; |
| 966 elementIndex = dart.notNull(elementIndex) + 1; | 960 elementIndex = dart.notNull(elementIndex) + 1; |
| 967 } | 961 } |
| 968 throw new core.RangeError.index(index, this, "index", null, elementIndex
); | 962 throw core.RangeError.index(index, this, "index", null, elementIndex); |
| 969 } | 963 } |
| 970 toString() { | 964 toString() { |
| 971 return IterableBase$().iterableToShortString(this, '(', ')'); | 965 return IterableBase$().iterableToShortString(this, '(', ')'); |
| 972 } | 966 } |
| 973 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { | 967 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { |
| 974 if (leftDelimiter === void 0) | 968 if (leftDelimiter === void 0) |
| 975 leftDelimiter = '('; | 969 leftDelimiter = '('; |
| 976 if (rightDelimiter === void 0) | 970 if (rightDelimiter === void 0) |
| 977 rightDelimiter = ')'; | 971 rightDelimiter = ')'; |
| 978 if (IterableBase$()._isToStringVisiting(iterable)) { | 972 if (IterableBase$()._isToStringVisiting(iterable)) { |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1183 }) | 1177 }) |
| 1184 }); | 1178 }); |
| 1185 return HasNextIterator; | 1179 return HasNextIterator; |
| 1186 }); | 1180 }); |
| 1187 let HasNextIterator = HasNextIterator$(); | 1181 let HasNextIterator = HasNextIterator$(); |
| 1188 HasNextIterator._HAS_NEXT_AND_NEXT_IN_CURRENT = 0; | 1182 HasNextIterator._HAS_NEXT_AND_NEXT_IN_CURRENT = 0; |
| 1189 HasNextIterator._NO_NEXT = 1; | 1183 HasNextIterator._NO_NEXT = 1; |
| 1190 HasNextIterator._NOT_MOVED_YET = 2; | 1184 HasNextIterator._NOT_MOVED_YET = 2; |
| 1191 let LinkedHashMap$ = dart.generic(function(K, V) { | 1185 let LinkedHashMap$ = dart.generic(function(K, V) { |
| 1192 class LinkedHashMap extends core.Object { | 1186 class LinkedHashMap extends core.Object { |
| 1193 LinkedHashMap(opts) { | 1187 static new(opts) { |
| 1194 let equals = opts && 'equals' in opts ? opts.equals : null; | 1188 let equals = opts && 'equals' in opts ? opts.equals : null; |
| 1195 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; | 1189 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; |
| 1196 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; | 1190 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; |
| 1197 if (isValidKey == null) { | 1191 if (isValidKey == null) { |
| 1198 if (hashCode == null) { | 1192 if (hashCode == null) { |
| 1199 if (equals == null) { | 1193 if (equals == null) { |
| 1200 return new (_LinkedHashMap$(K, V))(); | 1194 return new (_LinkedHashMap$(K, V))(); |
| 1201 } | 1195 } |
| 1202 hashCode = _defaultHashCode; | 1196 hashCode = _defaultHashCode; |
| 1203 } else { | 1197 } else { |
| 1204 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) &&
dart.notNull(core.identical(core.identical, equals))) { | 1198 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) &&
dart.notNull(core.identical(core.identical, equals))) { |
| 1205 return new (_LinkedIdentityHashMap$(K, V))(); | 1199 return new (_LinkedIdentityHashMap$(K, V))(); |
| 1206 } | 1200 } |
| 1207 if (equals == null) { | 1201 if (equals == null) { |
| 1208 equals = _defaultEquals; | 1202 equals = _defaultEquals; |
| 1209 } | 1203 } |
| 1210 } | 1204 } |
| 1211 } else { | 1205 } else { |
| 1212 if (hashCode == null) { | 1206 if (hashCode == null) { |
| 1213 hashCode = _defaultHashCode; | 1207 hashCode = _defaultHashCode; |
| 1214 } | 1208 } |
| 1215 if (equals == null) { | 1209 if (equals == null) { |
| 1216 equals = _defaultEquals; | 1210 equals = _defaultEquals; |
| 1217 } | 1211 } |
| 1218 } | 1212 } |
| 1219 return new (_LinkedCustomHashMap$(K, V))(equals, hashCode, isValidKey); | 1213 return new (_LinkedCustomHashMap$(K, V))(equals, hashCode, isValidKey); |
| 1220 } | 1214 } |
| 1221 identity() { | 1215 static identity() { |
| 1222 return new (_LinkedIdentityHashMap$(K, V))(); | 1216 return new (_LinkedIdentityHashMap$(K, V))(); |
| 1223 } | 1217 } |
| 1224 from(other) { | 1218 static from(other) { |
| 1225 let result = new (LinkedHashMap$(K, V))(); | 1219 let result = LinkedHashMap$(K, V).new(); |
| 1226 other.forEach(dart.fn((k, v) => { | 1220 other.forEach(dart.fn((k, v) => { |
| 1227 result.set(k, dart.as(v, V)); | 1221 result.set(k, dart.as(v, V)); |
| 1228 })); | 1222 })); |
| 1229 return result; | 1223 return result; |
| 1230 } | 1224 } |
| 1231 fromIterable(iterable, opts) { | 1225 static fromIterable(iterable, opts) { |
| 1232 let key = opts && 'key' in opts ? opts.key : null; | 1226 let key = opts && 'key' in opts ? opts.key : null; |
| 1233 let value = opts && 'value' in opts ? opts.value : null; | 1227 let value = opts && 'value' in opts ? opts.value : null; |
| 1234 let map = new (LinkedHashMap$(K, V))(); | 1228 let map = LinkedHashMap$(K, V).new(); |
| 1235 Maps._fillMapWithMappedIterable(map, iterable, key, value); | 1229 Maps._fillMapWithMappedIterable(map, iterable, key, value); |
| 1236 return map; | 1230 return map; |
| 1237 } | 1231 } |
| 1238 fromIterables(keys, values) { | 1232 static fromIterables(keys, values) { |
| 1239 let map = new (LinkedHashMap$(K, V))(); | 1233 let map = LinkedHashMap$(K, V).new(); |
| 1240 Maps._fillMapWithIterables(map, keys, values); | 1234 Maps._fillMapWithIterables(map, keys, values); |
| 1241 return map; | 1235 return map; |
| 1242 } | 1236 } |
| 1243 _literal(keyValuePairs) { | 1237 static _literal(keyValuePairs) { |
| 1244 return dart.as(_js_helper.fillLiteralMap(keyValuePairs, new (_LinkedHash
Map$(K, V))()), LinkedHashMap$(K, V)); | 1238 return dart.as(_js_helper.fillLiteralMap(keyValuePairs, new (_LinkedHash
Map$(K, V))()), LinkedHashMap$(K, V)); |
| 1245 } | 1239 } |
| 1246 _empty() { | 1240 static _empty() { |
| 1247 return new (_LinkedHashMap$(K, V))(); | 1241 return new (_LinkedHashMap$(K, V))(); |
| 1248 } | 1242 } |
| 1249 } | 1243 } |
| 1250 LinkedHashMap[dart.implements] = () => [HashMap$(K, V)]; | 1244 LinkedHashMap[dart.implements] = () => [HashMap$(K, V)]; |
| 1251 dart.defineNamedConstructor(LinkedHashMap, 'identity'); | |
| 1252 dart.defineNamedConstructor(LinkedHashMap, 'from'); | |
| 1253 dart.defineNamedConstructor(LinkedHashMap, 'fromIterable'); | |
| 1254 dart.defineNamedConstructor(LinkedHashMap, 'fromIterables'); | |
| 1255 dart.defineNamedConstructor(LinkedHashMap, '_literal'); | |
| 1256 dart.defineNamedConstructor(LinkedHashMap, '_empty'); | |
| 1257 dart.setSignature(LinkedHashMap, { | 1245 dart.setSignature(LinkedHashMap, { |
| 1258 constructors: () => ({ | 1246 constructors: () => ({ |
| 1259 LinkedHashMap: [LinkedHashMap$(K, V), [], {equals: dart.functionType(cor
e.bool, [K, K]), hashCode: dart.functionType(core.int, [K]), isValidKey: dart.fu
nctionType(core.bool, [core.Object])}], | 1247 new: [LinkedHashMap$(K, V), [], {equals: dart.functionType(core.bool, [K
, K]), hashCode: dart.functionType(core.int, [K]), isValidKey: dart.functionType
(core.bool, [core.Object])}], |
| 1260 identity: [LinkedHashMap$(K, V), []], | 1248 identity: [LinkedHashMap$(K, V), []], |
| 1261 from: [LinkedHashMap$(K, V), [core.Map]], | 1249 from: [LinkedHashMap$(K, V), [core.Map]], |
| 1262 fromIterable: [LinkedHashMap$(K, V), [core.Iterable], {key: dart.functio
nType(K, [dart.bottom]), value: dart.functionType(V, [dart.bottom])}], | 1250 fromIterable: [LinkedHashMap$(K, V), [core.Iterable], {key: dart.functio
nType(K, [dart.bottom]), value: dart.functionType(V, [dart.bottom])}], |
| 1263 fromIterables: [LinkedHashMap$(K, V), [core.Iterable$(K), core.Iterable$
(V)]], | 1251 fromIterables: [LinkedHashMap$(K, V), [core.Iterable$(K), core.Iterable$
(V)]], |
| 1264 _literal: [LinkedHashMap$(K, V), [core.List]], | 1252 _literal: [LinkedHashMap$(K, V), [core.List]], |
| 1265 _empty: [LinkedHashMap$(K, V), []] | 1253 _empty: [LinkedHashMap$(K, V), []] |
| 1266 }) | 1254 }) |
| 1267 }); | 1255 }); |
| 1268 return LinkedHashMap; | 1256 return LinkedHashMap; |
| 1269 }); | 1257 }); |
| 1270 let LinkedHashMap = LinkedHashMap$(); | 1258 let LinkedHashMap = LinkedHashMap$(); |
| 1271 let LinkedHashSet$ = dart.generic(function(E) { | 1259 let LinkedHashSet$ = dart.generic(function(E) { |
| 1272 class LinkedHashSet extends core.Object { | 1260 class LinkedHashSet extends core.Object { |
| 1273 LinkedHashSet(opts) { | 1261 static new(opts) { |
| 1274 let equals = opts && 'equals' in opts ? opts.equals : null; | 1262 let equals = opts && 'equals' in opts ? opts.equals : null; |
| 1275 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; | 1263 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; |
| 1276 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; | 1264 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; |
| 1277 if (isValidKey == null) { | 1265 if (isValidKey == null) { |
| 1278 if (hashCode == null) { | 1266 if (hashCode == null) { |
| 1279 if (equals == null) { | 1267 if (equals == null) { |
| 1280 return new (_LinkedHashSet$(E))(); | 1268 return new (_LinkedHashSet$(E))(); |
| 1281 } | 1269 } |
| 1282 hashCode = _defaultHashCode; | 1270 hashCode = _defaultHashCode; |
| 1283 } else { | 1271 } else { |
| 1284 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) &&
dart.notNull(core.identical(core.identical, equals))) { | 1272 if (dart.notNull(core.identical(core.identityHashCode, hashCode)) &&
dart.notNull(core.identical(core.identical, equals))) { |
| 1285 return new (_LinkedIdentityHashSet$(E))(); | 1273 return new (_LinkedIdentityHashSet$(E))(); |
| 1286 } | 1274 } |
| 1287 if (equals == null) { | 1275 if (equals == null) { |
| 1288 equals = _defaultEquals; | 1276 equals = _defaultEquals; |
| 1289 } | 1277 } |
| 1290 } | 1278 } |
| 1291 } else { | 1279 } else { |
| 1292 if (hashCode == null) { | 1280 if (hashCode == null) { |
| 1293 hashCode = _defaultHashCode; | 1281 hashCode = _defaultHashCode; |
| 1294 } | 1282 } |
| 1295 if (equals == null) { | 1283 if (equals == null) { |
| 1296 equals = _defaultEquals; | 1284 equals = _defaultEquals; |
| 1297 } | 1285 } |
| 1298 } | 1286 } |
| 1299 return new (_LinkedCustomHashSet$(E))(equals, hashCode, isValidKey); | 1287 return new (_LinkedCustomHashSet$(E))(equals, hashCode, isValidKey); |
| 1300 } | 1288 } |
| 1301 identity() { | 1289 static identity() { |
| 1302 return new (_LinkedIdentityHashSet$(E))(); | 1290 return new (_LinkedIdentityHashSet$(E))(); |
| 1303 } | 1291 } |
| 1304 from(elements) { | 1292 static from(elements) { |
| 1305 let result = new (LinkedHashSet$(E))(); | 1293 let result = LinkedHashSet$(E).new(); |
| 1306 for (let element of elements) { | 1294 for (let element of elements) { |
| 1307 result.add(element); | 1295 result.add(element); |
| 1308 } | 1296 } |
| 1309 return result; | 1297 return result; |
| 1310 } | 1298 } |
| 1311 [Symbol.iterator]() { | 1299 [Symbol.iterator]() { |
| 1312 return new dart.JsIterator(this[core.$iterator]); | 1300 return new dart.JsIterator(this[core.$iterator]); |
| 1313 } | 1301 } |
| 1314 } | 1302 } |
| 1315 LinkedHashSet[dart.implements] = () => [HashSet$(E)]; | 1303 LinkedHashSet[dart.implements] = () => [HashSet$(E)]; |
| 1316 dart.defineNamedConstructor(LinkedHashSet, 'identity'); | |
| 1317 dart.defineNamedConstructor(LinkedHashSet, 'from'); | |
| 1318 dart.setSignature(LinkedHashSet, { | 1304 dart.setSignature(LinkedHashSet, { |
| 1319 constructors: () => ({ | 1305 constructors: () => ({ |
| 1320 LinkedHashSet: [LinkedHashSet$(E), [], {equals: dart.functionType(core.b
ool, [E, E]), hashCode: dart.functionType(core.int, [E]), isValidKey: dart.funct
ionType(core.bool, [core.Object])}], | 1306 new: [LinkedHashSet$(E), [], {equals: dart.functionType(core.bool, [E, E
]), hashCode: dart.functionType(core.int, [E]), isValidKey: dart.functionType(co
re.bool, [core.Object])}], |
| 1321 identity: [LinkedHashSet$(E), []], | 1307 identity: [LinkedHashSet$(E), []], |
| 1322 from: [LinkedHashSet$(E), [core.Iterable$(E)]] | 1308 from: [LinkedHashSet$(E), [core.Iterable$(E)]] |
| 1323 }) | 1309 }) |
| 1324 }); | 1310 }); |
| 1325 return LinkedHashSet; | 1311 return LinkedHashSet; |
| 1326 }); | 1312 }); |
| 1327 let LinkedHashSet = LinkedHashSet$(); | 1313 let LinkedHashSet = LinkedHashSet$(); |
| 1328 let _modificationCount = Symbol('_modificationCount'); | 1314 let _modificationCount = Symbol('_modificationCount'); |
| 1329 let _length = Symbol('_length'); | 1315 let _length = Symbol('_length'); |
| 1330 let _next = Symbol('_next'); | 1316 let _next = Symbol('_next'); |
| (...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1731 return new (_internal.SubListIterable$(E))(this, 0, count); | 1717 return new (_internal.SubListIterable$(E))(this, 0, count); |
| 1732 } | 1718 } |
| 1733 [core.$takeWhile](test) { | 1719 [core.$takeWhile](test) { |
| 1734 dart.as(test, dart.functionType(core.bool, [E])); | 1720 dart.as(test, dart.functionType(core.bool, [E])); |
| 1735 return new (_internal.TakeWhileIterable$(E))(this, test); | 1721 return new (_internal.TakeWhileIterable$(E))(this, test); |
| 1736 } | 1722 } |
| 1737 [core.$toList](opts) { | 1723 [core.$toList](opts) { |
| 1738 let growable = opts && 'growable' in opts ? opts.growable : true; | 1724 let growable = opts && 'growable' in opts ? opts.growable : true; |
| 1739 let result = null; | 1725 let result = null; |
| 1740 if (growable) { | 1726 if (growable) { |
| 1741 result = new (core.List$(E))(); | 1727 result = core.List$(E).new(); |
| 1742 result[core.$length] = this[core.$length]; | 1728 result[core.$length] = this[core.$length]; |
| 1743 } else { | 1729 } else { |
| 1744 result = new (core.List$(E))(this[core.$length]); | 1730 result = core.List$(E).new(this[core.$length]); |
| 1745 } | 1731 } |
| 1746 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { | 1732 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { |
| 1747 result[core.$set](i, this[core.$get](i)); | 1733 result[core.$set](i, this[core.$get](i)); |
| 1748 } | 1734 } |
| 1749 return result; | 1735 return result; |
| 1750 } | 1736 } |
| 1751 [core.$toSet]() { | 1737 [core.$toSet]() { |
| 1752 let result = new (core.Set$(E))(); | 1738 let result = core.Set$(E).new(); |
| 1753 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { | 1739 for (let i = 0; dart.notNull(i) < dart.notNull(this[core.$length]); i =
dart.notNull(i) + 1) { |
| 1754 result.add(this[core.$get](i)); | 1740 result.add(this[core.$get](i)); |
| 1755 } | 1741 } |
| 1756 return result; | 1742 return result; |
| 1757 } | 1743 } |
| 1758 [core.$add](element) { | 1744 [core.$add](element) { |
| 1759 dart.as(element, E); | 1745 dart.as(element, E); |
| 1760 this[core.$set]((() => { | 1746 this[core.$set]((() => { |
| 1761 let x = this[core.$length]; | 1747 let x = this[core.$length]; |
| 1762 this[core.$length] = dart.notNull(x) + 1; | 1748 this[core.$length] = dart.notNull(x) + 1; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1823 [core.$sort](compare) { | 1809 [core.$sort](compare) { |
| 1824 if (compare === void 0) | 1810 if (compare === void 0) |
| 1825 compare = null; | 1811 compare = null; |
| 1826 dart.as(compare, dart.functionType(core.int, [E, E])); | 1812 dart.as(compare, dart.functionType(core.int, [E, E])); |
| 1827 _internal.Sort.sort(this, compare == null ? core.Comparable.compare : co
mpare); | 1813 _internal.Sort.sort(this, compare == null ? core.Comparable.compare : co
mpare); |
| 1828 } | 1814 } |
| 1829 [core.$shuffle](random) { | 1815 [core.$shuffle](random) { |
| 1830 if (random === void 0) | 1816 if (random === void 0) |
| 1831 random = null; | 1817 random = null; |
| 1832 if (random == null) | 1818 if (random == null) |
| 1833 random = new math.Random(); | 1819 random = math.Random.new(); |
| 1834 let length = this[core.$length]; | 1820 let length = this[core.$length]; |
| 1835 while (dart.notNull(length) > 1) { | 1821 while (dart.notNull(length) > 1) { |
| 1836 let pos = random.nextInt(length); | 1822 let pos = random.nextInt(length); |
| 1837 length = dart.notNull(length) - 1; | 1823 length = dart.notNull(length) - 1; |
| 1838 let tmp = this[core.$get](length); | 1824 let tmp = this[core.$get](length); |
| 1839 this[core.$set](length, this[core.$get](pos)); | 1825 this[core.$set](length, this[core.$get](pos)); |
| 1840 this[core.$set](pos, tmp); | 1826 this[core.$set](pos, tmp); |
| 1841 } | 1827 } |
| 1842 } | 1828 } |
| 1843 [core.$asMap]() { | 1829 [core.$asMap]() { |
| 1844 return new (_internal.ListMapView$(E))(this); | 1830 return new (_internal.ListMapView$(E))(this); |
| 1845 } | 1831 } |
| 1846 [core.$sublist](start, end) { | 1832 [core.$sublist](start, end) { |
| 1847 if (end === void 0) | 1833 if (end === void 0) |
| 1848 end = null; | 1834 end = null; |
| 1849 let listLength = this[core.$length]; | 1835 let listLength = this[core.$length]; |
| 1850 if (end == null) | 1836 if (end == null) |
| 1851 end = listLength; | 1837 end = listLength; |
| 1852 core.RangeError.checkValidRange(start, end, listLength); | 1838 core.RangeError.checkValidRange(start, end, listLength); |
| 1853 let length = dart.notNull(end) - dart.notNull(start); | 1839 let length = dart.notNull(end) - dart.notNull(start); |
| 1854 let result = new (core.List$(E))(); | 1840 let result = core.List$(E).new(); |
| 1855 result[core.$length] = length; | 1841 result[core.$length] = length; |
| 1856 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1842 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 1857 result[core.$set](i, this[core.$get](dart.notNull(start) + dart.notNul
l(i))); | 1843 result[core.$set](i, this[core.$get](dart.notNull(start) + dart.notNul
l(i))); |
| 1858 } | 1844 } |
| 1859 return result; | 1845 return result; |
| 1860 } | 1846 } |
| 1861 [core.$getRange](start, end) { | 1847 [core.$getRange](start, end) { |
| 1862 core.RangeError.checkValidRange(start, end, this[core.$length]); | 1848 core.RangeError.checkValidRange(start, end, this[core.$length]); |
| 1863 return new (_internal.SubListIterable$(E))(this, start, end); | 1849 return new (_internal.SubListIterable$(E))(this, start, end); |
| 1864 } | 1850 } |
| (...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2449 isNotEmpty: [core.bool, [core.Map]], | 2435 isNotEmpty: [core.bool, [core.Map]], |
| 2450 mapToString: [core.String, [core.Map]], | 2436 mapToString: [core.String, [core.Map]], |
| 2451 _id: [core.Object, [core.Object]], | 2437 _id: [core.Object, [core.Object]], |
| 2452 _fillMapWithMappedIterable: [dart.void, [core.Map, core.Iterable, dart.fun
ctionType(core.Object, [dart.bottom]), dart.functionType(core.Object, [dart.bott
om])]], | 2438 _fillMapWithMappedIterable: [dart.void, [core.Map, core.Iterable, dart.fun
ctionType(core.Object, [dart.bottom]), dart.functionType(core.Object, [dart.bott
om])]], |
| 2453 _fillMapWithIterables: [dart.void, [core.Map, core.Iterable, core.Iterable
]] | 2439 _fillMapWithIterables: [dart.void, [core.Map, core.Iterable, core.Iterable
]] |
| 2454 }), | 2440 }), |
| 2455 names: ['containsValue', 'containsKey', 'putIfAbsent', 'clear', 'forEach', '
getValues', 'length', 'isEmpty', 'isNotEmpty', 'mapToString', '_id', '_fillMapWi
thMappedIterable', '_fillMapWithIterables'] | 2441 names: ['containsValue', 'containsKey', 'putIfAbsent', 'clear', 'forEach', '
getValues', 'length', 'isEmpty', 'isNotEmpty', 'mapToString', '_id', '_fillMapWi
thMappedIterable', '_fillMapWithIterables'] |
| 2456 }); | 2442 }); |
| 2457 let Queue$ = dart.generic(function(E) { | 2443 let Queue$ = dart.generic(function(E) { |
| 2458 class Queue extends core.Object { | 2444 class Queue extends core.Object { |
| 2459 Queue() { | 2445 static new() { |
| 2460 return new (ListQueue$(E))(); | 2446 return new (ListQueue$(E))(); |
| 2461 } | 2447 } |
| 2462 from(elements) { | 2448 static from(elements) { |
| 2463 return new (ListQueue$(E)).from(elements); | 2449 return ListQueue$(E).from(elements); |
| 2464 } | 2450 } |
| 2465 [Symbol.iterator]() { | 2451 [Symbol.iterator]() { |
| 2466 return new dart.JsIterator(this[core.$iterator]); | 2452 return new dart.JsIterator(this[core.$iterator]); |
| 2467 } | 2453 } |
| 2468 } | 2454 } |
| 2469 Queue[dart.implements] = () => [core.Iterable$(E), _internal.EfficientLength
]; | 2455 Queue[dart.implements] = () => [core.Iterable$(E), _internal.EfficientLength
]; |
| 2470 dart.defineNamedConstructor(Queue, 'from'); | |
| 2471 dart.setSignature(Queue, { | 2456 dart.setSignature(Queue, { |
| 2472 constructors: () => ({ | 2457 constructors: () => ({ |
| 2473 Queue: [Queue$(E), []], | 2458 new: [Queue$(E), []], |
| 2474 from: [Queue$(E), [core.Iterable]] | 2459 from: [Queue$(E), [core.Iterable]] |
| 2475 }) | 2460 }) |
| 2476 }); | 2461 }); |
| 2477 return Queue; | 2462 return Queue; |
| 2478 }); | 2463 }); |
| 2479 let Queue = Queue$(); | 2464 let Queue = Queue$(); |
| 2480 let _element = Symbol('_element'); | 2465 let _element = Symbol('_element'); |
| 2481 let _link = Symbol('_link'); | 2466 let _link = Symbol('_link'); |
| 2482 let _asNonSentinelEntry = Symbol('_asNonSentinelEntry'); | 2467 let _asNonSentinelEntry = Symbol('_asNonSentinelEntry'); |
| 2483 let DoubleLinkedQueueEntry$ = dart.generic(function(E) { | 2468 let DoubleLinkedQueueEntry$ = dart.generic(function(E) { |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2576 let _elementCount = Symbol('_elementCount'); | 2561 let _elementCount = Symbol('_elementCount'); |
| 2577 let _filter = Symbol('_filter'); | 2562 let _filter = Symbol('_filter'); |
| 2578 let DoubleLinkedQueue$ = dart.generic(function(E) { | 2563 let DoubleLinkedQueue$ = dart.generic(function(E) { |
| 2579 class DoubleLinkedQueue extends IterableBase$(E) { | 2564 class DoubleLinkedQueue extends IterableBase$(E) { |
| 2580 DoubleLinkedQueue() { | 2565 DoubleLinkedQueue() { |
| 2581 this[_sentinel] = null; | 2566 this[_sentinel] = null; |
| 2582 this[_elementCount] = 0; | 2567 this[_elementCount] = 0; |
| 2583 super.IterableBase(); | 2568 super.IterableBase(); |
| 2584 this[_sentinel] = new (_DoubleLinkedQueueEntrySentinel$(E))(); | 2569 this[_sentinel] = new (_DoubleLinkedQueueEntrySentinel$(E))(); |
| 2585 } | 2570 } |
| 2586 from(elements) { | 2571 static from(elements) { |
| 2587 let list = new (DoubleLinkedQueue$(E))(); | 2572 let list = new (DoubleLinkedQueue$(E))(); |
| 2588 for (let e of dart.as(elements, core.Iterable$(E))) { | 2573 for (let e of dart.as(elements, core.Iterable$(E))) { |
| 2589 list.addLast(e); | 2574 list.addLast(e); |
| 2590 } | 2575 } |
| 2591 return dart.as(list, DoubleLinkedQueue$(E)); | 2576 return dart.as(list, DoubleLinkedQueue$(E)); |
| 2592 } | 2577 } |
| 2593 get [core.$length]() { | 2578 get [core.$length]() { |
| 2594 return this[_elementCount]; | 2579 return this[_elementCount]; |
| 2595 } | 2580 } |
| 2596 addLast(value) { | 2581 addLast(value) { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2693 } | 2678 } |
| 2694 } | 2679 } |
| 2695 get [core.$iterator]() { | 2680 get [core.$iterator]() { |
| 2696 return new (_DoubleLinkedQueueIterator$(E))(this[_sentinel]); | 2681 return new (_DoubleLinkedQueueIterator$(E))(this[_sentinel]); |
| 2697 } | 2682 } |
| 2698 toString() { | 2683 toString() { |
| 2699 return IterableBase.iterableToFullString(this, '{', '}'); | 2684 return IterableBase.iterableToFullString(this, '{', '}'); |
| 2700 } | 2685 } |
| 2701 } | 2686 } |
| 2702 DoubleLinkedQueue[dart.implements] = () => [Queue$(E)]; | 2687 DoubleLinkedQueue[dart.implements] = () => [Queue$(E)]; |
| 2703 dart.defineNamedConstructor(DoubleLinkedQueue, 'from'); | |
| 2704 dart.setSignature(DoubleLinkedQueue, { | 2688 dart.setSignature(DoubleLinkedQueue, { |
| 2705 constructors: () => ({ | 2689 constructors: () => ({ |
| 2706 DoubleLinkedQueue: [DoubleLinkedQueue$(E), []], | 2690 DoubleLinkedQueue: [DoubleLinkedQueue$(E), []], |
| 2707 from: [DoubleLinkedQueue$(E), [core.Iterable]] | 2691 from: [DoubleLinkedQueue$(E), [core.Iterable]] |
| 2708 }), | 2692 }), |
| 2709 methods: () => ({ | 2693 methods: () => ({ |
| 2710 addLast: [dart.void, [E]], | 2694 addLast: [dart.void, [E]], |
| 2711 addFirst: [dart.void, [E]], | 2695 addFirst: [dart.void, [E]], |
| 2712 add: [dart.void, [E]], | 2696 add: [dart.void, [E]], |
| 2713 addAll: [dart.void, [core.Iterable$(E)]], | 2697 addAll: [dart.void, [core.Iterable$(E)]], |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2775 this[_tail] = 0; | 2759 this[_tail] = 0; |
| 2776 this[_table] = null; | 2760 this[_table] = null; |
| 2777 this[_modificationCount] = 0; | 2761 this[_modificationCount] = 0; |
| 2778 super.IterableBase(); | 2762 super.IterableBase(); |
| 2779 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN
ull(ListQueue$()._INITIAL_CAPACITY)) { | 2763 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN
ull(ListQueue$()._INITIAL_CAPACITY)) { |
| 2780 initialCapacity = ListQueue$()._INITIAL_CAPACITY; | 2764 initialCapacity = ListQueue$()._INITIAL_CAPACITY; |
| 2781 } else if (!dart.notNull(ListQueue$()._isPowerOf2(initialCapacity))) { | 2765 } else if (!dart.notNull(ListQueue$()._isPowerOf2(initialCapacity))) { |
| 2782 initialCapacity = ListQueue$()._nextPowerOf2(initialCapacity); | 2766 initialCapacity = ListQueue$()._nextPowerOf2(initialCapacity); |
| 2783 } | 2767 } |
| 2784 dart.assert(ListQueue$()._isPowerOf2(initialCapacity)); | 2768 dart.assert(ListQueue$()._isPowerOf2(initialCapacity)); |
| 2785 this[_table] = new (core.List$(E))(initialCapacity); | 2769 this[_table] = core.List$(E).new(initialCapacity); |
| 2786 } | 2770 } |
| 2787 from(elements) { | 2771 static from(elements) { |
| 2788 if (dart.is(elements, core.List)) { | 2772 if (dart.is(elements, core.List)) { |
| 2789 let length = elements[core.$length]; | 2773 let length = elements[core.$length]; |
| 2790 let queue = new (ListQueue$(E))(dart.notNull(length) + 1); | 2774 let queue = new (ListQueue$(E))(dart.notNull(length) + 1); |
| 2791 dart.assert(dart.notNull(queue[_table][core.$length]) > dart.notNull(l
ength)); | 2775 dart.assert(dart.notNull(queue[_table][core.$length]) > dart.notNull(l
ength)); |
| 2792 let sourceList = elements; | 2776 let sourceList = elements; |
| 2793 queue[_table][core.$setRange](0, length, dart.as(sourceList, core.Iter
able$(E)), 0); | 2777 queue[_table][core.$setRange](0, length, dart.as(sourceList, core.Iter
able$(E)), 0); |
| 2794 queue[_tail] = length; | 2778 queue[_tail] = length; |
| 2795 return queue; | 2779 return queue; |
| 2796 } else { | 2780 } else { |
| 2797 let capacity = ListQueue$()._INITIAL_CAPACITY; | 2781 let capacity = ListQueue$()._INITIAL_CAPACITY; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2840 return this[_table][core.$get](this[_head]); | 2824 return this[_table][core.$get](this[_head]); |
| 2841 } | 2825 } |
| 2842 [core.$elementAt](index) { | 2826 [core.$elementAt](index) { |
| 2843 core.RangeError.checkValidIndex(index, this); | 2827 core.RangeError.checkValidIndex(index, this); |
| 2844 return this[_table][core.$get](dart.notNull(this[_head]) + dart.notNull(
index) & dart.notNull(this[_table][core.$length]) - 1); | 2828 return this[_table][core.$get](dart.notNull(this[_head]) + dart.notNull(
index) & dart.notNull(this[_table][core.$length]) - 1); |
| 2845 } | 2829 } |
| 2846 [core.$toList](opts) { | 2830 [core.$toList](opts) { |
| 2847 let growable = opts && 'growable' in opts ? opts.growable : true; | 2831 let growable = opts && 'growable' in opts ? opts.growable : true; |
| 2848 let list = null; | 2832 let list = null; |
| 2849 if (growable) { | 2833 if (growable) { |
| 2850 list = new (core.List$(E))(); | 2834 list = core.List$(E).new(); |
| 2851 list[core.$length] = this[core.$length]; | 2835 list[core.$length] = this[core.$length]; |
| 2852 } else { | 2836 } else { |
| 2853 list = new (core.List$(E))(this[core.$length]); | 2837 list = core.List$(E).new(this[core.$length]); |
| 2854 } | 2838 } |
| 2855 this[_writeToList](list); | 2839 this[_writeToList](list); |
| 2856 return list; | 2840 return list; |
| 2857 } | 2841 } |
| 2858 add(element) { | 2842 add(element) { |
| 2859 dart.as(element, E); | 2843 dart.as(element, E); |
| 2860 this[_add](element); | 2844 this[_add](element); |
| 2861 } | 2845 } |
| 2862 addAll(elements) { | 2846 addAll(elements) { |
| 2863 dart.as(elements, core.Iterable$(E)); | 2847 dart.as(elements, core.Iterable$(E)); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3011 while (i != this[_tail]) { | 2995 while (i != this[_tail]) { |
| 3012 let nextOffset = dart.notNull(i) + 1 & dart.notNull(mask); | 2996 let nextOffset = dart.notNull(i) + 1 & dart.notNull(mask); |
| 3013 this[_table][core.$set](i, this[_table][core.$get](nextOffset)); | 2997 this[_table][core.$set](i, this[_table][core.$get](nextOffset)); |
| 3014 i = nextOffset; | 2998 i = nextOffset; |
| 3015 } | 2999 } |
| 3016 this[_table][core.$set](this[_tail], null); | 3000 this[_table][core.$set](this[_tail], null); |
| 3017 return offset; | 3001 return offset; |
| 3018 } | 3002 } |
| 3019 } | 3003 } |
| 3020 [_grow]() { | 3004 [_grow]() { |
| 3021 let newTable = new (core.List$(E))(dart.notNull(this[_table][core.$lengt
h]) * 2); | 3005 let newTable = core.List$(E).new(dart.notNull(this[_table][core.$length]
) * 2); |
| 3022 let split = dart.notNull(this[_table][core.$length]) - dart.notNull(this
[_head]); | 3006 let split = dart.notNull(this[_table][core.$length]) - dart.notNull(this
[_head]); |
| 3023 newTable[core.$setRange](0, split, this[_table], this[_head]); | 3007 newTable[core.$setRange](0, split, this[_table], this[_head]); |
| 3024 newTable[core.$setRange](split, dart.notNull(split) + dart.notNull(this[
_head]), this[_table], 0); | 3008 newTable[core.$setRange](split, dart.notNull(split) + dart.notNull(this[
_head]), this[_table], 0); |
| 3025 this[_head] = 0; | 3009 this[_head] = 0; |
| 3026 this[_tail] = this[_table][core.$length]; | 3010 this[_tail] = this[_table][core.$length]; |
| 3027 this[_table] = newTable; | 3011 this[_table] = newTable; |
| 3028 } | 3012 } |
| 3029 [_writeToList](target) { | 3013 [_writeToList](target) { |
| 3030 dart.as(target, core.List$(E)); | 3014 dart.as(target, core.List$(E)); |
| 3031 dart.assert(dart.notNull(target[core.$length]) >= dart.notNull(this[core
.$length])); | 3015 dart.assert(dart.notNull(target[core.$length]) >= dart.notNull(this[core
.$length])); |
| 3032 if (dart.notNull(this[_head]) <= dart.notNull(this[_tail])) { | 3016 if (dart.notNull(this[_head]) <= dart.notNull(this[_tail])) { |
| 3033 let length = dart.notNull(this[_tail]) - dart.notNull(this[_head]); | 3017 let length = dart.notNull(this[_tail]) - dart.notNull(this[_head]); |
| 3034 target[core.$setRange](0, length, this[_table], this[_head]); | 3018 target[core.$setRange](0, length, this[_table], this[_head]); |
| 3035 return length; | 3019 return length; |
| 3036 } else { | 3020 } else { |
| 3037 let firstPartSize = dart.notNull(this[_table][core.$length]) - dart.no
tNull(this[_head]); | 3021 let firstPartSize = dart.notNull(this[_table][core.$length]) - dart.no
tNull(this[_head]); |
| 3038 target[core.$setRange](0, firstPartSize, this[_table], this[_head]); | 3022 target[core.$setRange](0, firstPartSize, this[_table], this[_head]); |
| 3039 target[core.$setRange](firstPartSize, dart.notNull(firstPartSize) + da
rt.notNull(this[_tail]), this[_table], 0); | 3023 target[core.$setRange](firstPartSize, dart.notNull(firstPartSize) + da
rt.notNull(this[_tail]), this[_table], 0); |
| 3040 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); | 3024 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); |
| 3041 } | 3025 } |
| 3042 } | 3026 } |
| 3043 [_preGrow](newElementCount) { | 3027 [_preGrow](newElementCount) { |
| 3044 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this[core.$len
gth])); | 3028 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this[core.$len
gth])); |
| 3045 newElementCount = dart.notNull(newElementCount) + (dart.notNull(newEleme
ntCount) >> 1); | 3029 newElementCount = dart.notNull(newElementCount) + (dart.notNull(newEleme
ntCount) >> 1); |
| 3046 let newCapacity = ListQueue$()._nextPowerOf2(newElementCount); | 3030 let newCapacity = ListQueue$()._nextPowerOf2(newElementCount); |
| 3047 let newTable = new (core.List$(E))(newCapacity); | 3031 let newTable = core.List$(E).new(newCapacity); |
| 3048 this[_tail] = this[_writeToList](newTable); | 3032 this[_tail] = this[_writeToList](newTable); |
| 3049 this[_table] = newTable; | 3033 this[_table] = newTable; |
| 3050 this[_head] = 0; | 3034 this[_head] = 0; |
| 3051 } | 3035 } |
| 3052 } | 3036 } |
| 3053 ListQueue[dart.implements] = () => [Queue$(E)]; | 3037 ListQueue[dart.implements] = () => [Queue$(E)]; |
| 3054 dart.defineNamedConstructor(ListQueue, 'from'); | |
| 3055 dart.setSignature(ListQueue, { | 3038 dart.setSignature(ListQueue, { |
| 3056 constructors: () => ({ | 3039 constructors: () => ({ |
| 3057 ListQueue: [ListQueue$(E), [], [core.int]], | 3040 ListQueue: [ListQueue$(E), [], [core.int]], |
| 3058 from: [ListQueue$(E), [core.Iterable]] | 3041 from: [ListQueue$(E), [core.Iterable]] |
| 3059 }), | 3042 }), |
| 3060 methods: () => ({ | 3043 methods: () => ({ |
| 3061 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], | 3044 [core.$forEach]: [dart.void, [dart.functionType(dart.void, [E])]], |
| 3062 [core.$elementAt]: [E, [core.int]], | 3045 [core.$elementAt]: [E, [core.int]], |
| 3063 [core.$toList]: [core.List$(E), [], {growable: core.bool}], | 3046 [core.$toList]: [core.List$(E), [], {growable: core.bool}], |
| 3064 add: [dart.void, [E]], | 3047 add: [dart.void, [E]], |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3327 class SplayTreeMap extends _SplayTree$(K) { | 3310 class SplayTreeMap extends _SplayTree$(K) { |
| 3328 SplayTreeMap(compare, isValidKey) { | 3311 SplayTreeMap(compare, isValidKey) { |
| 3329 if (compare === void 0) | 3312 if (compare === void 0) |
| 3330 compare = null; | 3313 compare = null; |
| 3331 if (isValidKey === void 0) | 3314 if (isValidKey === void 0) |
| 3332 isValidKey = null; | 3315 isValidKey = null; |
| 3333 this[_comparator] = dart.as(compare == null ? core.Comparable.compare :
compare, core.Comparator$(K)); | 3316 this[_comparator] = dart.as(compare == null ? core.Comparable.compare :
compare, core.Comparator$(K)); |
| 3334 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is
(v, K), core.bool, [core.Object]); | 3317 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is
(v, K), core.bool, [core.Object]); |
| 3335 super._SplayTree(); | 3318 super._SplayTree(); |
| 3336 } | 3319 } |
| 3337 from(other, compare, isValidKey) { | 3320 static from(other, compare, isValidKey) { |
| 3338 if (compare === void 0) | 3321 if (compare === void 0) |
| 3339 compare = null; | 3322 compare = null; |
| 3340 if (isValidKey === void 0) | 3323 if (isValidKey === void 0) |
| 3341 isValidKey = null; | 3324 isValidKey = null; |
| 3342 let result = new (SplayTreeMap$(K, V))(); | 3325 let result = new (SplayTreeMap$(K, V))(); |
| 3343 other.forEach(dart.fn((k, v) => { | 3326 other.forEach(dart.fn((k, v) => { |
| 3344 result.set(k, dart.as(v, V)); | 3327 result.set(k, dart.as(v, V)); |
| 3345 })); | 3328 })); |
| 3346 return result; | 3329 return result; |
| 3347 } | 3330 } |
| 3348 fromIterable(iterable, opts) { | 3331 static fromIterable(iterable, opts) { |
| 3349 let key = opts && 'key' in opts ? opts.key : null; | 3332 let key = opts && 'key' in opts ? opts.key : null; |
| 3350 let value = opts && 'value' in opts ? opts.value : null; | 3333 let value = opts && 'value' in opts ? opts.value : null; |
| 3351 let compare = opts && 'compare' in opts ? opts.compare : null; | 3334 let compare = opts && 'compare' in opts ? opts.compare : null; |
| 3352 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; | 3335 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; |
| 3353 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); | 3336 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); |
| 3354 Maps._fillMapWithMappedIterable(map, iterable, key, value); | 3337 Maps._fillMapWithMappedIterable(map, iterable, key, value); |
| 3355 return map; | 3338 return map; |
| 3356 } | 3339 } |
| 3357 fromIterables(keys, values, compare, isValidKey) { | 3340 static fromIterables(keys, values, compare, isValidKey) { |
| 3358 if (compare === void 0) | 3341 if (compare === void 0) |
| 3359 compare = null; | 3342 compare = null; |
| 3360 if (isValidKey === void 0) | 3343 if (isValidKey === void 0) |
| 3361 isValidKey = null; | 3344 isValidKey = null; |
| 3362 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); | 3345 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); |
| 3363 Maps._fillMapWithIterables(map, keys, values); | 3346 Maps._fillMapWithIterables(map, keys, values); |
| 3364 return map; | 3347 return map; |
| 3365 } | 3348 } |
| 3366 [_compare](key1, key2) { | 3349 [_compare](key1, key2) { |
| 3367 dart.as(key1, K); | 3350 dart.as(key1, K); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3529 let node = this[_root].right; | 3512 let node = this[_root].right; |
| 3530 if (node == null) | 3513 if (node == null) |
| 3531 return null; | 3514 return null; |
| 3532 while (node.left != null) { | 3515 while (node.left != null) { |
| 3533 node = node.left; | 3516 node = node.left; |
| 3534 } | 3517 } |
| 3535 return node.key; | 3518 return node.key; |
| 3536 } | 3519 } |
| 3537 } | 3520 } |
| 3538 SplayTreeMap[dart.implements] = () => [core.Map$(K, V)]; | 3521 SplayTreeMap[dart.implements] = () => [core.Map$(K, V)]; |
| 3539 dart.defineNamedConstructor(SplayTreeMap, 'from'); | |
| 3540 dart.defineNamedConstructor(SplayTreeMap, 'fromIterable'); | |
| 3541 dart.defineNamedConstructor(SplayTreeMap, 'fromIterables'); | |
| 3542 dart.defineNamedConstructor(SplayTreeMap, '_internal'); | 3522 dart.defineNamedConstructor(SplayTreeMap, '_internal'); |
| 3543 dart.setSignature(SplayTreeMap, { | 3523 dart.setSignature(SplayTreeMap, { |
| 3544 constructors: () => ({ | 3524 constructors: () => ({ |
| 3545 SplayTreeMap: [SplayTreeMap$(K, V), [], [dart.functionType(core.int, [K,
K]), dart.functionType(core.bool, [core.Object])]], | 3525 SplayTreeMap: [SplayTreeMap$(K, V), [], [dart.functionType(core.int, [K,
K]), dart.functionType(core.bool, [core.Object])]], |
| 3546 from: [SplayTreeMap$(K, V), [core.Map], [dart.functionType(core.int, [K,
K]), dart.functionType(core.bool, [core.Object])]], | 3526 from: [SplayTreeMap$(K, V), [core.Map], [dart.functionType(core.int, [K,
K]), dart.functionType(core.bool, [core.Object])]], |
| 3547 fromIterable: [SplayTreeMap$(K, V), [core.Iterable], {key: dart.function
Type(K, [dart.bottom]), value: dart.functionType(V, [dart.bottom]), compare: dar
t.functionType(core.int, [K, K]), isValidKey: dart.functionType(core.bool, [core
.Object])}], | 3527 fromIterable: [SplayTreeMap$(K, V), [core.Iterable], {key: dart.function
Type(K, [dart.bottom]), value: dart.functionType(V, [dart.bottom]), compare: dar
t.functionType(core.int, [K, K]), isValidKey: dart.functionType(core.bool, [core
.Object])}], |
| 3548 fromIterables: [SplayTreeMap$(K, V), [core.Iterable$(K), core.Iterable$(
V)], [dart.functionType(core.int, [K, K]), dart.functionType(core.bool, [core.Ob
ject])]], | 3528 fromIterables: [SplayTreeMap$(K, V), [core.Iterable$(K), core.Iterable$(
V)], [dart.functionType(core.int, [K, K]), dart.functionType(core.bool, [core.Ob
ject])]], |
| 3549 _internal: [SplayTreeMap$(K, V), []] | 3529 _internal: [SplayTreeMap$(K, V), []] |
| 3550 }), | 3530 }), |
| 3551 methods: () => ({ | 3531 methods: () => ({ |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3769 class SplayTreeSet extends dart.mixin(_SplayTree$(E), IterableMixin$(E), Set
Mixin$(E)) { | 3749 class SplayTreeSet extends dart.mixin(_SplayTree$(E), IterableMixin$(E), Set
Mixin$(E)) { |
| 3770 SplayTreeSet(compare, isValidKey) { | 3750 SplayTreeSet(compare, isValidKey) { |
| 3771 if (compare === void 0) | 3751 if (compare === void 0) |
| 3772 compare = null; | 3752 compare = null; |
| 3773 if (isValidKey === void 0) | 3753 if (isValidKey === void 0) |
| 3774 isValidKey = null; | 3754 isValidKey = null; |
| 3775 this[_comparator] = dart.as(compare == null ? core.Comparable.compare :
compare, core.Comparator$(E)); | 3755 this[_comparator] = dart.as(compare == null ? core.Comparable.compare :
compare, core.Comparator$(E)); |
| 3776 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is
(v, E), core.bool, [core.Object]); | 3756 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is
(v, E), core.bool, [core.Object]); |
| 3777 super._SplayTree(); | 3757 super._SplayTree(); |
| 3778 } | 3758 } |
| 3779 from(elements, compare, isValidKey) { | 3759 static from(elements, compare, isValidKey) { |
| 3780 if (compare === void 0) | 3760 if (compare === void 0) |
| 3781 compare = null; | 3761 compare = null; |
| 3782 if (isValidKey === void 0) | 3762 if (isValidKey === void 0) |
| 3783 isValidKey = null; | 3763 isValidKey = null; |
| 3784 let result = new (SplayTreeSet$(E))(compare, isValidKey); | 3764 let result = new (SplayTreeSet$(E))(compare, isValidKey); |
| 3785 for (let element of dart.as(elements, core.Iterable$(E))) { | 3765 for (let element of dart.as(elements, core.Iterable$(E))) { |
| 3786 result.add(element); | 3766 result.add(element); |
| 3787 } | 3767 } |
| 3788 return result; | 3768 return result; |
| 3789 } | 3769 } |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3916 clear() { | 3896 clear() { |
| 3917 this[_clear](); | 3897 this[_clear](); |
| 3918 } | 3898 } |
| 3919 [core.$toSet]() { | 3899 [core.$toSet]() { |
| 3920 return this[_clone](); | 3900 return this[_clone](); |
| 3921 } | 3901 } |
| 3922 toString() { | 3902 toString() { |
| 3923 return IterableBase.iterableToFullString(this, '{', '}'); | 3903 return IterableBase.iterableToFullString(this, '{', '}'); |
| 3924 } | 3904 } |
| 3925 } | 3905 } |
| 3926 dart.defineNamedConstructor(SplayTreeSet, 'from'); | |
| 3927 dart.setSignature(SplayTreeSet, { | 3906 dart.setSignature(SplayTreeSet, { |
| 3928 constructors: () => ({ | 3907 constructors: () => ({ |
| 3929 SplayTreeSet: [SplayTreeSet$(E), [], [dart.functionType(core.int, [E, E]
), dart.functionType(core.bool, [core.Object])]], | 3908 SplayTreeSet: [SplayTreeSet$(E), [], [dart.functionType(core.int, [E, E]
), dart.functionType(core.bool, [core.Object])]], |
| 3930 from: [SplayTreeSet$(E), [core.Iterable], [dart.functionType(core.int, [
E, E]), dart.functionType(core.bool, [core.Object])]] | 3909 from: [SplayTreeSet$(E), [core.Iterable], [dart.functionType(core.int, [
E, E]), dart.functionType(core.bool, [core.Object])]] |
| 3931 }), | 3910 }), |
| 3932 methods: () => ({ | 3911 methods: () => ({ |
| 3933 [_compare]: [core.int, [E, E]], | 3912 [_compare]: [core.int, [E, E]], |
| 3934 [core.$contains]: [core.bool, [core.Object]], | 3913 [core.$contains]: [core.bool, [core.Object]], |
| 3935 add: [core.bool, [E]], | 3914 add: [core.bool, [E]], |
| 3936 remove: [core.bool, [core.Object]], | 3915 remove: [core.bool, [core.Object]], |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3980 get isEmpty() { | 3959 get isEmpty() { |
| 3981 return this[_length] == 0; | 3960 return this[_length] == 0; |
| 3982 } | 3961 } |
| 3983 get isNotEmpty() { | 3962 get isNotEmpty() { |
| 3984 return !dart.notNull(this.isEmpty); | 3963 return !dart.notNull(this.isEmpty); |
| 3985 } | 3964 } |
| 3986 get keys() { | 3965 get keys() { |
| 3987 return new (HashMapKeyIterable$(K))(this); | 3966 return new (HashMapKeyIterable$(K))(this); |
| 3988 } | 3967 } |
| 3989 get values() { | 3968 get values() { |
| 3990 return new (_internal.MappedIterable$(K, V))(this.keys, dart.fn((each =>
this.get(each)).bind(this), V, [core.Object])); | 3969 return _internal.MappedIterable$(K, V).new(this.keys, dart.fn((each => t
his.get(each)).bind(this), V, [core.Object])); |
| 3991 } | 3970 } |
| 3992 containsKey(key) { | 3971 containsKey(key) { |
| 3993 if (_HashMap$()._isStringKey(key)) { | 3972 if (_HashMap$()._isStringKey(key)) { |
| 3994 let strings = this[_strings]; | 3973 let strings = this[_strings]; |
| 3995 return strings == null ? false : _HashMap$()._hasTableEntry(strings, k
ey); | 3974 return strings == null ? false : _HashMap$()._hasTableEntry(strings, k
ey); |
| 3996 } else if (_HashMap$()._isNumericKey(key)) { | 3975 } else if (_HashMap$()._isNumericKey(key)) { |
| 3997 let nums = this[_nums]; | 3976 let nums = this[_nums]; |
| 3998 return nums == null ? false : _HashMap$()._hasTableEntry(nums, key); | 3977 return nums == null ? false : _HashMap$()._hasTableEntry(nums, key); |
| 3999 } else { | 3978 } else { |
| 4000 return this[_containsKey](key); | 3979 return this[_containsKey](key); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4120 let key = keys[i]; | 4099 let key = keys[i]; |
| 4121 action(dart.as(key, K), this.get(key)); | 4100 action(dart.as(key, K), this.get(key)); |
| 4122 if (keys !== this[_keys]) { | 4101 if (keys !== this[_keys]) { |
| 4123 throw new core.ConcurrentModificationError(this); | 4102 throw new core.ConcurrentModificationError(this); |
| 4124 } | 4103 } |
| 4125 } | 4104 } |
| 4126 } | 4105 } |
| 4127 [_computeKeys]() { | 4106 [_computeKeys]() { |
| 4128 if (this[_keys] != null) | 4107 if (this[_keys] != null) |
| 4129 return this[_keys]; | 4108 return this[_keys]; |
| 4130 let result = new core.List(this[_length]); | 4109 let result = core.List.new(this[_length]); |
| 4131 let index = 0; | 4110 let index = 0; |
| 4132 let strings = this[_strings]; | 4111 let strings = this[_strings]; |
| 4133 if (strings != null) { | 4112 if (strings != null) { |
| 4134 let names = Object.getOwnPropertyNames(strings); | 4113 let names = Object.getOwnPropertyNames(strings); |
| 4135 let entries = names.length; | 4114 let entries = names.length; |
| 4136 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN
ull(i) + 1) { | 4115 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN
ull(i) + 1) { |
| 4137 let key = names[i]; | 4116 let key = names[i]; |
| 4138 result[index] = key; | 4117 result[index] = key; |
| 4139 index = dart.notNull(index) + 1; | 4118 index = dart.notNull(index) + 1; |
| 4140 } | 4119 } |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4449 get isEmpty() { | 4428 get isEmpty() { |
| 4450 return this[_length] == 0; | 4429 return this[_length] == 0; |
| 4451 } | 4430 } |
| 4452 get isNotEmpty() { | 4431 get isNotEmpty() { |
| 4453 return !dart.notNull(this.isEmpty); | 4432 return !dart.notNull(this.isEmpty); |
| 4454 } | 4433 } |
| 4455 get keys() { | 4434 get keys() { |
| 4456 return new (LinkedHashMapKeyIterable$(K))(this); | 4435 return new (LinkedHashMapKeyIterable$(K))(this); |
| 4457 } | 4436 } |
| 4458 get values() { | 4437 get values() { |
| 4459 return new (_internal.MappedIterable$(K, V))(this.keys, dart.fn((each =>
this.get(each)).bind(this), V, [core.Object])); | 4438 return _internal.MappedIterable$(K, V).new(this.keys, dart.fn((each => t
his.get(each)).bind(this), V, [core.Object])); |
| 4460 } | 4439 } |
| 4461 containsKey(key) { | 4440 containsKey(key) { |
| 4462 if (_LinkedHashMap$()._isStringKey(key)) { | 4441 if (_LinkedHashMap$()._isStringKey(key)) { |
| 4463 let strings = this[_strings]; | 4442 let strings = this[_strings]; |
| 4464 if (strings == null) | 4443 if (strings == null) |
| 4465 return false; | 4444 return false; |
| 4466 let cell = dart.as(_LinkedHashMap$()._getTableEntry(strings, key), Lin
kedHashMapCell); | 4445 let cell = dart.as(_LinkedHashMap$()._getTableEntry(strings, key), Lin
kedHashMapCell); |
| 4467 return cell != null; | 4446 return cell != null; |
| 4468 } else if (_LinkedHashMap$()._isNumericKey(key)) { | 4447 } else if (_LinkedHashMap$()._isNumericKey(key)) { |
| 4469 let nums = this[_nums]; | 4448 let nums = this[_nums]; |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5037 } | 5016 } |
| 5038 clear() { | 5017 clear() { |
| 5039 if (dart.notNull(this[_length]) > 0) { | 5018 if (dart.notNull(this[_length]) > 0) { |
| 5040 this[_strings] = this[_nums] = this[_rest] = this[_elements] = null; | 5019 this[_strings] = this[_nums] = this[_rest] = this[_elements] = null; |
| 5041 this[_length] = 0; | 5020 this[_length] = 0; |
| 5042 } | 5021 } |
| 5043 } | 5022 } |
| 5044 [_computeElements]() { | 5023 [_computeElements]() { |
| 5045 if (this[_elements] != null) | 5024 if (this[_elements] != null) |
| 5046 return this[_elements]; | 5025 return this[_elements]; |
| 5047 let result = new core.List(this[_length]); | 5026 let result = core.List.new(this[_length]); |
| 5048 let index = 0; | 5027 let index = 0; |
| 5049 let strings = this[_strings]; | 5028 let strings = this[_strings]; |
| 5050 if (strings != null) { | 5029 if (strings != null) { |
| 5051 let names = Object.getOwnPropertyNames(strings); | 5030 let names = Object.getOwnPropertyNames(strings); |
| 5052 let entries = names.length; | 5031 let entries = names.length; |
| 5053 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN
ull(i) + 1) { | 5032 for (let i = 0; dart.notNull(i) < dart.notNull(entries); i = dart.notN
ull(i) + 1) { |
| 5054 let element = names[i]; | 5033 let element = names[i]; |
| 5055 result[index] = element; | 5034 result[index] = element; |
| 5056 index = dart.notNull(index) + 1; | 5035 index = dart.notNull(index) + 1; |
| 5057 } | 5036 } |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5813 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; | 5792 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; |
| 5814 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; | 5793 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; |
| 5815 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; | 5794 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; |
| 5816 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; | 5795 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; |
| 5817 exports.HashSetIterator$ = HashSetIterator$; | 5796 exports.HashSetIterator$ = HashSetIterator$; |
| 5818 exports.HashSetIterator = HashSetIterator; | 5797 exports.HashSetIterator = HashSetIterator; |
| 5819 exports.LinkedHashSetCell = LinkedHashSetCell; | 5798 exports.LinkedHashSetCell = LinkedHashSetCell; |
| 5820 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; | 5799 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; |
| 5821 exports.LinkedHashSetIterator = LinkedHashSetIterator; | 5800 exports.LinkedHashSetIterator = LinkedHashSetIterator; |
| 5822 })(collection, _internal, core, _js_helper, math); | 5801 })(collection, _internal, core, _js_helper, math); |
| OLD | NEW |