| OLD | NEW |
| 1 dart_library.library('dart/collection', null, /* Imports */[ | 1 dart_library.library('dart/collection', null, /* Imports */[ |
| 2 'dart/_runtime', | 2 'dart/_runtime', |
| 3 'dart/core' | 3 'dart/core' |
| 4 ], /* Lazy imports */[ | 4 ], /* Lazy imports */[ |
| 5 'dart/_internal', | 5 'dart/_internal', |
| 6 'dart/_js_helper', | 6 'dart/_js_helper', |
| 7 'dart/math' | 7 'dart/math' |
| 8 ], function(exports, dart, core, _internal, _js_helper, math) { | 8 ], function(exports, dart, core, _internal, _js_helper, math) { |
| 9 'use strict'; | 9 'use strict'; |
| 10 let dartx = dart.dartx; | 10 let dartx = dart.dartx; |
| (...skipping 4103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4114 } | 4114 } |
| 4115 } | 4115 } |
| 4116 [_remove](key) { | 4116 [_remove](key) { |
| 4117 let rest = this[_rest]; | 4117 let rest = this[_rest]; |
| 4118 if (rest == null) return null; | 4118 if (rest == null) return null; |
| 4119 let bucket = this[_getBucket](rest, key); | 4119 let bucket = this[_getBucket](rest, key); |
| 4120 let index = this[_findBucketIndex](bucket, key); | 4120 let index = this[_findBucketIndex](bucket, key); |
| 4121 if (dart.notNull(index) < 0) return null; | 4121 if (dart.notNull(index) < 0) return null; |
| 4122 this[_length] = dart.notNull(this[_length]) - 1; | 4122 this[_length] = dart.notNull(this[_length]) - 1; |
| 4123 this[_keys] = null; | 4123 this[_keys] = null; |
| 4124 return dart.as(bucket.splice(index, 2)[1], V); | 4124 return bucket.splice(index, 2)[1]; |
| 4125 } | 4125 } |
| 4126 clear() { | 4126 clear() { |
| 4127 if (dart.notNull(this[_length]) > 0) { | 4127 if (dart.notNull(this[_length]) > 0) { |
| 4128 this[_strings] = this[_nums] = this[_rest] = this[_keys] = null; | 4128 this[_strings] = this[_nums] = this[_rest] = this[_keys] = null; |
| 4129 this[_length] = 0; | 4129 this[_length] = 0; |
| 4130 } | 4130 } |
| 4131 } | 4131 } |
| 4132 forEach(action) { | 4132 forEach(action) { |
| 4133 dart.as(action, dart.functionType(dart.void, [K, V])); | 4133 dart.as(action, dart.functionType(dart.void, [K, V])); |
| 4134 let keys = this[_computeKeys](); | 4134 let keys = this[_computeKeys](); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4224 table[key] = table; | 4224 table[key] = table; |
| 4225 } else { | 4225 } else { |
| 4226 table[key] = value; | 4226 table[key] = value; |
| 4227 } | 4227 } |
| 4228 } | 4228 } |
| 4229 static _deleteTableEntry(table, key) { | 4229 static _deleteTableEntry(table, key) { |
| 4230 delete table[key]; | 4230 delete table[key]; |
| 4231 } | 4231 } |
| 4232 [_getBucket](table, key) { | 4232 [_getBucket](table, key) { |
| 4233 let hash = this[_computeHashCode](key); | 4233 let hash = this[_computeHashCode](key); |
| 4234 return dart.as(table[hash], core.List); | 4234 return table[hash]; |
| 4235 } | 4235 } |
| 4236 [_findBucketIndex](bucket, key) { | 4236 [_findBucketIndex](bucket, key) { |
| 4237 if (bucket == null) return -1; | 4237 if (bucket == null) return -1; |
| 4238 let length = bucket.length; | 4238 let length = bucket.length; |
| 4239 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { | 4239 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { |
| 4240 if (dart.equals(bucket[i], key)) return i; | 4240 if (dart.equals(bucket[i], key)) return i; |
| 4241 } | 4241 } |
| 4242 return -1; | 4242 return -1; |
| 4243 } | 4243 } |
| 4244 static _newHashTable() { | 4244 static _newHashTable() { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4335 if (!dart.notNull(this[_validKey](key))) return null; | 4335 if (!dart.notNull(this[_validKey](key))) return null; |
| 4336 return super[_remove](key); | 4336 return super[_remove](key); |
| 4337 } | 4337 } |
| 4338 [_computeHashCode](key) { | 4338 [_computeHashCode](key) { |
| 4339 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; | 4339 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; |
| 4340 } | 4340 } |
| 4341 [_findBucketIndex](bucket, key) { | 4341 [_findBucketIndex](bucket, key) { |
| 4342 if (bucket == null) return -1; | 4342 if (bucket == null) return -1; |
| 4343 let length = bucket.length; | 4343 let length = bucket.length; |
| 4344 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { | 4344 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { |
| 4345 if (dart.notNull(this[_equals](dart.as(bucket[i], K), dart.as(key, K))
)) return i; | 4345 if (dart.notNull(this[_equals](bucket[i], dart.as(key, K)))) return i; |
| 4346 } | 4346 } |
| 4347 return -1; | 4347 return -1; |
| 4348 } | 4348 } |
| 4349 toString() { | 4349 toString() { |
| 4350 return Maps.mapToString(this); | 4350 return Maps.mapToString(this); |
| 4351 } | 4351 } |
| 4352 } | 4352 } |
| 4353 dart.setSignature(_CustomHashMap, { | 4353 dart.setSignature(_CustomHashMap, { |
| 4354 constructors: () => ({_CustomHashMap: [_CustomHashMap$(K, V), [_Equality$(
K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}), | 4354 constructors: () => ({_CustomHashMap: [_CustomHashMap$(K, V), [_Equality$(
K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}), |
| 4355 methods: () => ({ | 4355 methods: () => ({ |
| (...skipping 20 matching lines...) Expand all Loading... |
| 4376 get iterator() { | 4376 get iterator() { |
| 4377 return new (HashMapKeyIterator$(E))(this[_map], dart.as(dart.dsend(this[
_map], _computeKeys), core.List)); | 4377 return new (HashMapKeyIterator$(E))(this[_map], dart.as(dart.dsend(this[
_map], _computeKeys), core.List)); |
| 4378 } | 4378 } |
| 4379 contains(element) { | 4379 contains(element) { |
| 4380 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool
); | 4380 return dart.as(dart.dsend(this[_map], 'containsKey', element), core.bool
); |
| 4381 } | 4381 } |
| 4382 forEach(f) { | 4382 forEach(f) { |
| 4383 dart.as(f, dart.functionType(dart.void, [E])); | 4383 dart.as(f, dart.functionType(dart.void, [E])); |
| 4384 let keys = dart.as(dart.dsend(this[_map], _computeKeys), core.List); | 4384 let keys = dart.as(dart.dsend(this[_map], _computeKeys), core.List); |
| 4385 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len
gth); i = dart.notNull(i) + 1) { | 4385 for (let i = 0, length = keys.length; dart.notNull(i) < dart.notNull(len
gth); i = dart.notNull(i) + 1) { |
| 4386 f(dart.as(keys[i], E)); | 4386 f(keys[i]); |
| 4387 if (keys !== dart.dload(this[_map], _keys)) { | 4387 if (keys !== dart.dload(this[_map], _keys)) { |
| 4388 dart.throw(new core.ConcurrentModificationError(this[_map])); | 4388 dart.throw(new core.ConcurrentModificationError(this[_map])); |
| 4389 } | 4389 } |
| 4390 } | 4390 } |
| 4391 } | 4391 } |
| 4392 } | 4392 } |
| 4393 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength]; | 4393 HashMapKeyIterable[dart.implements] = () => [_internal.EfficientLength]; |
| 4394 dart.setSignature(HashMapKeyIterable, { | 4394 dart.setSignature(HashMapKeyIterable, { |
| 4395 constructors: () => ({HashMapKeyIterable: [HashMapKeyIterable$(E), [dart.d
ynamic]]}), | 4395 constructors: () => ({HashMapKeyIterable: [HashMapKeyIterable$(E), [dart.d
ynamic]]}), |
| 4396 methods: () => ({forEach: [dart.void, [dart.functionType(dart.void, [E])]]
}) | 4396 methods: () => ({forEach: [dart.void, [dart.functionType(dart.void, [E])]]
}) |
| (...skipping 22 matching lines...) Expand all Loading... |
| 4419 } | 4419 } |
| 4420 moveNext() { | 4420 moveNext() { |
| 4421 let keys = this[_keys]; | 4421 let keys = this[_keys]; |
| 4422 let offset = this[_offset]; | 4422 let offset = this[_offset]; |
| 4423 if (keys !== dart.dload(this[_map], _keys)) { | 4423 if (keys !== dart.dload(this[_map], _keys)) { |
| 4424 dart.throw(new core.ConcurrentModificationError(this[_map])); | 4424 dart.throw(new core.ConcurrentModificationError(this[_map])); |
| 4425 } else if (dart.notNull(offset) >= keys.length) { | 4425 } else if (dart.notNull(offset) >= keys.length) { |
| 4426 this[_current] = null; | 4426 this[_current] = null; |
| 4427 return false; | 4427 return false; |
| 4428 } else { | 4428 } else { |
| 4429 this[_current] = dart.as(keys[offset], E); | 4429 this[_current] = keys[offset]; |
| 4430 this[_offset] = dart.notNull(offset) + 1; | 4430 this[_offset] = dart.notNull(offset) + 1; |
| 4431 return true; | 4431 return true; |
| 4432 } | 4432 } |
| 4433 } | 4433 } |
| 4434 } | 4434 } |
| 4435 HashMapKeyIterator[dart.implements] = () => [core.Iterator$(E)]; | 4435 HashMapKeyIterator[dart.implements] = () => [core.Iterator$(E)]; |
| 4436 dart.setSignature(HashMapKeyIterator, { | 4436 dart.setSignature(HashMapKeyIterator, { |
| 4437 constructors: () => ({HashMapKeyIterator: [HashMapKeyIterator$(E), [dart.d
ynamic, core.List]]}), | 4437 constructors: () => ({HashMapKeyIterator: [HashMapKeyIterator$(E), [dart.d
ynamic, core.List]]}), |
| 4438 methods: () => ({moveNext: [core.bool, []]}) | 4438 methods: () => ({moveNext: [core.bool, []]}) |
| 4439 }); | 4439 }); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4518 } else { | 4518 } else { |
| 4519 return this[_get](key); | 4519 return this[_get](key); |
| 4520 } | 4520 } |
| 4521 } | 4521 } |
| 4522 [_get](key) { | 4522 [_get](key) { |
| 4523 let rest = this[_rest]; | 4523 let rest = this[_rest]; |
| 4524 if (rest == null) return null; | 4524 if (rest == null) return null; |
| 4525 let bucket = this[_getBucket](rest, key); | 4525 let bucket = this[_getBucket](rest, key); |
| 4526 let index = this[_findBucketIndex](bucket, key); | 4526 let index = this[_findBucketIndex](bucket, key); |
| 4527 if (dart.notNull(index) < 0) return null; | 4527 if (dart.notNull(index) < 0) return null; |
| 4528 let cell = dart.as(bucket[index], LinkedHashMapCell); | 4528 let cell = bucket[index]; |
| 4529 return dart.as(cell[_value], V); | 4529 return dart.as(cell[_value], V); |
| 4530 } | 4530 } |
| 4531 set(key, value) { | 4531 set(key, value) { |
| 4532 dart.as(key, K); | 4532 dart.as(key, K); |
| 4533 dart.as(value, V); | 4533 dart.as(value, V); |
| 4534 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { | 4534 if (dart.notNull(_LinkedHashMap$()._isStringKey(key))) { |
| 4535 let strings = this[_strings]; | 4535 let strings = this[_strings]; |
| 4536 if (strings == null) this[_strings] = strings = _LinkedHashMap$()._new
HashTable(); | 4536 if (strings == null) this[_strings] = strings = _LinkedHashMap$()._new
HashTable(); |
| 4537 this[_addHashTableEntry](strings, key, value); | 4537 this[_addHashTableEntry](strings, key, value); |
| 4538 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { | 4538 } else if (dart.notNull(_LinkedHashMap$()._isNumericKey(key))) { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 4550 let rest = this[_rest]; | 4550 let rest = this[_rest]; |
| 4551 if (rest == null) this[_rest] = rest = _LinkedHashMap$()._newHashTable()
; | 4551 if (rest == null) this[_rest] = rest = _LinkedHashMap$()._newHashTable()
; |
| 4552 let hash = this[_computeHashCode](key); | 4552 let hash = this[_computeHashCode](key); |
| 4553 let bucket = rest[hash]; | 4553 let bucket = rest[hash]; |
| 4554 if (bucket == null) { | 4554 if (bucket == null) { |
| 4555 let cell = this[_newLinkedCell](key, value); | 4555 let cell = this[_newLinkedCell](key, value); |
| 4556 _LinkedHashMap$()._setTableEntry(rest, hash, [cell]); | 4556 _LinkedHashMap$()._setTableEntry(rest, hash, [cell]); |
| 4557 } else { | 4557 } else { |
| 4558 let index = this[_findBucketIndex](bucket, key); | 4558 let index = this[_findBucketIndex](bucket, key); |
| 4559 if (dart.notNull(index) >= 0) { | 4559 if (dart.notNull(index) >= 0) { |
| 4560 let cell = dart.as(bucket[index], LinkedHashMapCell); | 4560 let cell = bucket[index]; |
| 4561 cell[_value] = value; | 4561 cell[_value] = value; |
| 4562 } else { | 4562 } else { |
| 4563 let cell = this[_newLinkedCell](key, value); | 4563 let cell = this[_newLinkedCell](key, value); |
| 4564 bucket.push(cell); | 4564 bucket.push(cell); |
| 4565 } | 4565 } |
| 4566 } | 4566 } |
| 4567 } | 4567 } |
| 4568 putIfAbsent(key, ifAbsent) { | 4568 putIfAbsent(key, ifAbsent) { |
| 4569 dart.as(key, K); | 4569 dart.as(key, K); |
| 4570 dart.as(ifAbsent, dart.functionType(V, [])); | 4570 dart.as(ifAbsent, dart.functionType(V, [])); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 4581 } else { | 4581 } else { |
| 4582 return this[_remove](key); | 4582 return this[_remove](key); |
| 4583 } | 4583 } |
| 4584 } | 4584 } |
| 4585 [_remove](key) { | 4585 [_remove](key) { |
| 4586 let rest = this[_rest]; | 4586 let rest = this[_rest]; |
| 4587 if (rest == null) return null; | 4587 if (rest == null) return null; |
| 4588 let bucket = this[_getBucket](rest, key); | 4588 let bucket = this[_getBucket](rest, key); |
| 4589 let index = this[_findBucketIndex](bucket, key); | 4589 let index = this[_findBucketIndex](bucket, key); |
| 4590 if (dart.notNull(index) < 0) return null; | 4590 if (dart.notNull(index) < 0) return null; |
| 4591 let cell = dart.as(bucket.splice(index, 1)[0], LinkedHashMapCell); | 4591 let cell = bucket.splice(index, 1)[0]; |
| 4592 this[_unlinkCell](cell); | 4592 this[_unlinkCell](cell); |
| 4593 return dart.as(cell[_value], V); | 4593 return dart.as(cell[_value], V); |
| 4594 } | 4594 } |
| 4595 clear() { | 4595 clear() { |
| 4596 if (dart.notNull(this[_length]) > 0) { | 4596 if (dart.notNull(this[_length]) > 0) { |
| 4597 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last
] = null; | 4597 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last
] = null; |
| 4598 this[_length] = 0; | 4598 this[_length] = 0; |
| 4599 this[_modified](); | 4599 this[_modified](); |
| 4600 } | 4600 } |
| 4601 } | 4601 } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4679 } | 4679 } |
| 4680 static _setTableEntry(table, key, value) { | 4680 static _setTableEntry(table, key, value) { |
| 4681 dart.assert(value != null); | 4681 dart.assert(value != null); |
| 4682 table[key] = value; | 4682 table[key] = value; |
| 4683 } | 4683 } |
| 4684 static _deleteTableEntry(table, key) { | 4684 static _deleteTableEntry(table, key) { |
| 4685 delete table[key]; | 4685 delete table[key]; |
| 4686 } | 4686 } |
| 4687 [_getBucket](table, key) { | 4687 [_getBucket](table, key) { |
| 4688 let hash = this[_computeHashCode](key); | 4688 let hash = this[_computeHashCode](key); |
| 4689 return dart.as(table[hash], core.List); | 4689 return table[hash]; |
| 4690 } | 4690 } |
| 4691 [_findBucketIndex](bucket, key) { | 4691 [_findBucketIndex](bucket, key) { |
| 4692 if (bucket == null) return -1; | 4692 if (bucket == null) return -1; |
| 4693 let length = bucket.length; | 4693 let length = bucket.length; |
| 4694 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 4694 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 4695 let cell = dart.as(bucket[i], LinkedHashMapCell); | 4695 let cell = bucket[i]; |
| 4696 if (dart.equals(cell[_key], key)) return i; | 4696 if (dart.equals(cell[_key], key)) return i; |
| 4697 } | 4697 } |
| 4698 return -1; | 4698 return -1; |
| 4699 } | 4699 } |
| 4700 static _newHashTable() { | 4700 static _newHashTable() { |
| 4701 let table = Object.create(null); | 4701 let table = Object.create(null); |
| 4702 let temporaryKey = '<non-identifier-key>'; | 4702 let temporaryKey = '<non-identifier-key>'; |
| 4703 _LinkedHashMap$()._setTableEntry(table, temporaryKey, table); | 4703 _LinkedHashMap$()._setTableEntry(table, temporaryKey, table); |
| 4704 _LinkedHashMap$()._deleteTableEntry(table, temporaryKey); | 4704 _LinkedHashMap$()._deleteTableEntry(table, temporaryKey); |
| 4705 return table; | 4705 return table; |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4752 _LinkedIdentityHashMap() { | 4752 _LinkedIdentityHashMap() { |
| 4753 super._LinkedHashMap(); | 4753 super._LinkedHashMap(); |
| 4754 } | 4754 } |
| 4755 [_computeHashCode](key) { | 4755 [_computeHashCode](key) { |
| 4756 return core.identityHashCode(key) & 0x3ffffff; | 4756 return core.identityHashCode(key) & 0x3ffffff; |
| 4757 } | 4757 } |
| 4758 [_findBucketIndex](bucket, key) { | 4758 [_findBucketIndex](bucket, key) { |
| 4759 if (bucket == null) return -1; | 4759 if (bucket == null) return -1; |
| 4760 let length = bucket.length; | 4760 let length = bucket.length; |
| 4761 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 4761 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 4762 let cell = dart.as(bucket[i], LinkedHashMapCell); | 4762 let cell = bucket[i]; |
| 4763 if (dart.notNull(core.identical(cell[_key], key))) return i; | 4763 if (dart.notNull(core.identical(cell[_key], key))) return i; |
| 4764 } | 4764 } |
| 4765 return -1; | 4765 return -1; |
| 4766 } | 4766 } |
| 4767 } | 4767 } |
| 4768 return _LinkedIdentityHashMap; | 4768 return _LinkedIdentityHashMap; |
| 4769 }); | 4769 }); |
| 4770 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(); | 4770 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(); |
| 4771 const _LinkedCustomHashMap$ = dart.generic(function(K, V) { | 4771 const _LinkedCustomHashMap$ = dart.generic(function(K, V) { |
| 4772 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) { | 4772 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 4794 if (!dart.notNull(this[_validKey](key))) return null; | 4794 if (!dart.notNull(this[_validKey](key))) return null; |
| 4795 return super[_remove](key); | 4795 return super[_remove](key); |
| 4796 } | 4796 } |
| 4797 [_computeHashCode](key) { | 4797 [_computeHashCode](key) { |
| 4798 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; | 4798 return this[_hashCode](dart.as(key, K)) & 0x3ffffff; |
| 4799 } | 4799 } |
| 4800 [_findBucketIndex](bucket, key) { | 4800 [_findBucketIndex](bucket, key) { |
| 4801 if (bucket == null) return -1; | 4801 if (bucket == null) return -1; |
| 4802 let length = bucket.length; | 4802 let length = bucket.length; |
| 4803 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 4803 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 4804 let cell = dart.as(bucket[i], LinkedHashMapCell); | 4804 let cell = bucket[i]; |
| 4805 if (dart.notNull(this[_equals](dart.as(cell[_key], K), dart.as(key, K)
))) return i; | 4805 if (dart.notNull(this[_equals](dart.as(cell[_key], K), dart.as(key, K)
))) return i; |
| 4806 } | 4806 } |
| 4807 return -1; | 4807 return -1; |
| 4808 } | 4808 } |
| 4809 } | 4809 } |
| 4810 dart.setSignature(_LinkedCustomHashMap, { | 4810 dart.setSignature(_LinkedCustomHashMap, { |
| 4811 constructors: () => ({_LinkedCustomHashMap: [_LinkedCustomHashMap$(K, V),
[_Equality$(K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}), | 4811 constructors: () => ({_LinkedCustomHashMap: [_LinkedCustomHashMap$(K, V),
[_Equality$(K), _Hasher$(K), dart.functionType(core.bool, [core.Object])]]}), |
| 4812 methods: () => ({ | 4812 methods: () => ({ |
| 4813 get: [V, [core.Object]], | 4813 get: [V, [core.Object]], |
| 4814 set: [dart.void, [K, V]], | 4814 set: [dart.void, [K, V]], |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5105 } | 5105 } |
| 5106 static _setTableEntry(table, key, value) { | 5106 static _setTableEntry(table, key, value) { |
| 5107 dart.assert(value != null); | 5107 dart.assert(value != null); |
| 5108 table[key] = value; | 5108 table[key] = value; |
| 5109 } | 5109 } |
| 5110 static _deleteTableEntry(table, key) { | 5110 static _deleteTableEntry(table, key) { |
| 5111 delete table[key]; | 5111 delete table[key]; |
| 5112 } | 5112 } |
| 5113 [_getBucket](table, element) { | 5113 [_getBucket](table, element) { |
| 5114 let hash = this[_computeHashCode](element); | 5114 let hash = this[_computeHashCode](element); |
| 5115 return dart.as(table[hash], core.List); | 5115 return table[hash]; |
| 5116 } | 5116 } |
| 5117 [_findBucketIndex](bucket, element) { | 5117 [_findBucketIndex](bucket, element) { |
| 5118 if (bucket == null) return -1; | 5118 if (bucket == null) return -1; |
| 5119 let length = bucket.length; | 5119 let length = bucket.length; |
| 5120 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 5120 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 5121 if (dart.equals(bucket[i], element)) return i; | 5121 if (dart.equals(bucket[i], element)) return i; |
| 5122 } | 5122 } |
| 5123 return -1; | 5123 return -1; |
| 5124 } | 5124 } |
| 5125 static _newHashTable() { | 5125 static _newHashTable() { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5207 this[_validKey] = dart.as(validKey != null ? validKey : dart.fn(x => dar
t.is(x, E), core.bool, [core.Object]), _Predicate$(core.Object)); | 5207 this[_validKey] = dart.as(validKey != null ? validKey : dart.fn(x => dar
t.is(x, E), core.bool, [core.Object]), _Predicate$(core.Object)); |
| 5208 super._HashSet(); | 5208 super._HashSet(); |
| 5209 } | 5209 } |
| 5210 [_newSet]() { | 5210 [_newSet]() { |
| 5211 return new (_CustomHashSet$(E))(this[_equality], this[_hasher], this[_va
lidKey]); | 5211 return new (_CustomHashSet$(E))(this[_equality], this[_hasher], this[_va
lidKey]); |
| 5212 } | 5212 } |
| 5213 [_findBucketIndex](bucket, element) { | 5213 [_findBucketIndex](bucket, element) { |
| 5214 if (bucket == null) return -1; | 5214 if (bucket == null) return -1; |
| 5215 let length = bucket.length; | 5215 let length = bucket.length; |
| 5216 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 5216 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 5217 if (dart.notNull(this[_equality](dart.as(bucket[i], E), dart.as(elemen
t, E)))) return i; | 5217 if (dart.notNull(this[_equality](bucket[i], dart.as(element, E)))) ret
urn i; |
| 5218 } | 5218 } |
| 5219 return -1; | 5219 return -1; |
| 5220 } | 5220 } |
| 5221 [_computeHashCode](element) { | 5221 [_computeHashCode](element) { |
| 5222 return this[_hasher](dart.as(element, E)) & 0x3ffffff; | 5222 return this[_hasher](dart.as(element, E)) & 0x3ffffff; |
| 5223 } | 5223 } |
| 5224 add(object) { | 5224 add(object) { |
| 5225 dart.as(object, E); | 5225 dart.as(object, E); |
| 5226 return super[_add](object); | 5226 return super[_add](object); |
| 5227 } | 5227 } |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5263 } | 5263 } |
| 5264 moveNext() { | 5264 moveNext() { |
| 5265 let elements = this[_elements]; | 5265 let elements = this[_elements]; |
| 5266 let offset = this[_offset]; | 5266 let offset = this[_offset]; |
| 5267 if (elements !== dart.dload(this[_set], _elements)) { | 5267 if (elements !== dart.dload(this[_set], _elements)) { |
| 5268 dart.throw(new core.ConcurrentModificationError(this[_set])); | 5268 dart.throw(new core.ConcurrentModificationError(this[_set])); |
| 5269 } else if (dart.notNull(offset) >= elements.length) { | 5269 } else if (dart.notNull(offset) >= elements.length) { |
| 5270 this[_current] = null; | 5270 this[_current] = null; |
| 5271 return false; | 5271 return false; |
| 5272 } else { | 5272 } else { |
| 5273 this[_current] = dart.as(elements[offset], E); | 5273 this[_current] = elements[offset]; |
| 5274 this[_offset] = dart.notNull(offset) + 1; | 5274 this[_offset] = dart.notNull(offset) + 1; |
| 5275 return true; | 5275 return true; |
| 5276 } | 5276 } |
| 5277 } | 5277 } |
| 5278 } | 5278 } |
| 5279 HashSetIterator[dart.implements] = () => [core.Iterator$(E)]; | 5279 HashSetIterator[dart.implements] = () => [core.Iterator$(E)]; |
| 5280 dart.setSignature(HashSetIterator, { | 5280 dart.setSignature(HashSetIterator, { |
| 5281 constructors: () => ({HashSetIterator: [HashSetIterator$(E), [dart.dynamic
, core.List]]}), | 5281 constructors: () => ({HashSetIterator: [HashSetIterator$(E), [dart.dynamic
, core.List]]}), |
| 5282 methods: () => ({moveNext: [core.bool, []]}) | 5282 methods: () => ({moveNext: [core.bool, []]}) |
| 5283 }); | 5283 }); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5409 } else { | 5409 } else { |
| 5410 return this[_remove](object); | 5410 return this[_remove](object); |
| 5411 } | 5411 } |
| 5412 } | 5412 } |
| 5413 [_remove](object) { | 5413 [_remove](object) { |
| 5414 let rest = this[_rest]; | 5414 let rest = this[_rest]; |
| 5415 if (rest == null) return false; | 5415 if (rest == null) return false; |
| 5416 let bucket = this[_getBucket](rest, object); | 5416 let bucket = this[_getBucket](rest, object); |
| 5417 let index = this[_findBucketIndex](bucket, object); | 5417 let index = this[_findBucketIndex](bucket, object); |
| 5418 if (dart.notNull(index) < 0) return false; | 5418 if (dart.notNull(index) < 0) return false; |
| 5419 let cell = dart.as(bucket.splice(index, 1)[0], LinkedHashSetCell); | 5419 let cell = bucket.splice(index, 1)[0]; |
| 5420 this[_unlinkCell](cell); | 5420 this[_unlinkCell](cell); |
| 5421 return true; | 5421 return true; |
| 5422 } | 5422 } |
| 5423 removeWhere(test) { | 5423 removeWhere(test) { |
| 5424 dart.as(test, dart.functionType(core.bool, [E])); | 5424 dart.as(test, dart.functionType(core.bool, [E])); |
| 5425 this[_filterWhere](test, true); | 5425 this[_filterWhere](test, true); |
| 5426 } | 5426 } |
| 5427 retainWhere(test) { | 5427 retainWhere(test) { |
| 5428 dart.as(test, dart.functionType(core.bool, [E])); | 5428 dart.as(test, dart.functionType(core.bool, [E])); |
| 5429 this[_filterWhere](test, false); | 5429 this[_filterWhere](test, false); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5514 } | 5514 } |
| 5515 static _setTableEntry(table, key, value) { | 5515 static _setTableEntry(table, key, value) { |
| 5516 dart.assert(value != null); | 5516 dart.assert(value != null); |
| 5517 table[key] = value; | 5517 table[key] = value; |
| 5518 } | 5518 } |
| 5519 static _deleteTableEntry(table, key) { | 5519 static _deleteTableEntry(table, key) { |
| 5520 delete table[key]; | 5520 delete table[key]; |
| 5521 } | 5521 } |
| 5522 [_getBucket](table, element) { | 5522 [_getBucket](table, element) { |
| 5523 let hash = this[_computeHashCode](element); | 5523 let hash = this[_computeHashCode](element); |
| 5524 return dart.as(table[hash], core.List); | 5524 return table[hash]; |
| 5525 } | 5525 } |
| 5526 [_findBucketIndex](bucket, element) { | 5526 [_findBucketIndex](bucket, element) { |
| 5527 if (bucket == null) return -1; | 5527 if (bucket == null) return -1; |
| 5528 let length = bucket.length; | 5528 let length = bucket.length; |
| 5529 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 5529 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 5530 let cell = dart.as(bucket[i], LinkedHashSetCell); | 5530 let cell = bucket[i]; |
| 5531 if (dart.equals(cell[_element], element)) return i; | 5531 if (dart.equals(cell[_element], element)) return i; |
| 5532 } | 5532 } |
| 5533 return -1; | 5533 return -1; |
| 5534 } | 5534 } |
| 5535 static _newHashTable() { | 5535 static _newHashTable() { |
| 5536 let table = Object.create(null); | 5536 let table = Object.create(null); |
| 5537 let temporaryKey = '<non-identifier-key>'; | 5537 let temporaryKey = '<non-identifier-key>'; |
| 5538 _LinkedHashSet$()._setTableEntry(table, temporaryKey, table); | 5538 _LinkedHashSet$()._setTableEntry(table, temporaryKey, table); |
| 5539 _LinkedHashSet$()._deleteTableEntry(table, temporaryKey); | 5539 _LinkedHashSet$()._deleteTableEntry(table, temporaryKey); |
| 5540 return table; | 5540 return table; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5598 [_newSet]() { | 5598 [_newSet]() { |
| 5599 return new (_LinkedIdentityHashSet$(E))(); | 5599 return new (_LinkedIdentityHashSet$(E))(); |
| 5600 } | 5600 } |
| 5601 [_computeHashCode](key) { | 5601 [_computeHashCode](key) { |
| 5602 return core.identityHashCode(key) & 0x3ffffff; | 5602 return core.identityHashCode(key) & 0x3ffffff; |
| 5603 } | 5603 } |
| 5604 [_findBucketIndex](bucket, element) { | 5604 [_findBucketIndex](bucket, element) { |
| 5605 if (bucket == null) return -1; | 5605 if (bucket == null) return -1; |
| 5606 let length = bucket.length; | 5606 let length = bucket.length; |
| 5607 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 5607 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 5608 let cell = dart.as(bucket[i], LinkedHashSetCell); | 5608 let cell = bucket[i]; |
| 5609 if (dart.notNull(core.identical(cell[_element], element))) return i; | 5609 if (dart.notNull(core.identical(cell[_element], element))) return i; |
| 5610 } | 5610 } |
| 5611 return -1; | 5611 return -1; |
| 5612 } | 5612 } |
| 5613 } | 5613 } |
| 5614 dart.setSignature(_LinkedIdentityHashSet, { | 5614 dart.setSignature(_LinkedIdentityHashSet, { |
| 5615 methods: () => ({[_newSet]: [core.Set$(E), []]}) | 5615 methods: () => ({[_newSet]: [core.Set$(E), []]}) |
| 5616 }); | 5616 }); |
| 5617 return _LinkedIdentityHashSet; | 5617 return _LinkedIdentityHashSet; |
| 5618 }); | 5618 }); |
| 5619 let _LinkedIdentityHashSet = _LinkedIdentityHashSet$(); | 5619 let _LinkedIdentityHashSet = _LinkedIdentityHashSet$(); |
| 5620 const _LinkedCustomHashSet$ = dart.generic(function(E) { | 5620 const _LinkedCustomHashSet$ = dart.generic(function(E) { |
| 5621 class _LinkedCustomHashSet extends _LinkedHashSet$(E) { | 5621 class _LinkedCustomHashSet extends _LinkedHashSet$(E) { |
| 5622 _LinkedCustomHashSet(equality, hasher, validKey) { | 5622 _LinkedCustomHashSet(equality, hasher, validKey) { |
| 5623 this[_equality] = equality; | 5623 this[_equality] = equality; |
| 5624 this[_hasher] = hasher; | 5624 this[_hasher] = hasher; |
| 5625 this[_validKey] = dart.as(validKey != null ? validKey : dart.fn(x => dar
t.is(x, E), core.bool, [core.Object]), _Predicate$(core.Object)); | 5625 this[_validKey] = dart.as(validKey != null ? validKey : dart.fn(x => dar
t.is(x, E), core.bool, [core.Object]), _Predicate$(core.Object)); |
| 5626 super._LinkedHashSet(); | 5626 super._LinkedHashSet(); |
| 5627 } | 5627 } |
| 5628 [_newSet]() { | 5628 [_newSet]() { |
| 5629 return new (_LinkedCustomHashSet$(E))(this[_equality], this[_hasher], th
is[_validKey]); | 5629 return new (_LinkedCustomHashSet$(E))(this[_equality], this[_hasher], th
is[_validKey]); |
| 5630 } | 5630 } |
| 5631 [_findBucketIndex](bucket, element) { | 5631 [_findBucketIndex](bucket, element) { |
| 5632 if (bucket == null) return -1; | 5632 if (bucket == null) return -1; |
| 5633 let length = bucket.length; | 5633 let length = bucket.length; |
| 5634 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 5634 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 5635 let cell = dart.as(bucket[i], LinkedHashSetCell); | 5635 let cell = bucket[i]; |
| 5636 if (dart.notNull(this[_equality](dart.as(cell[_element], E), dart.as(e
lement, E)))) return i; | 5636 if (dart.notNull(this[_equality](dart.as(cell[_element], E), dart.as(e
lement, E)))) return i; |
| 5637 } | 5637 } |
| 5638 return -1; | 5638 return -1; |
| 5639 } | 5639 } |
| 5640 [_computeHashCode](element) { | 5640 [_computeHashCode](element) { |
| 5641 return this[_hasher](dart.as(element, E)) & 0x3ffffff; | 5641 return this[_hasher](dart.as(element, E)) & 0x3ffffff; |
| 5642 } | 5642 } |
| 5643 add(element) { | 5643 add(element) { |
| 5644 dart.as(element, E); | 5644 dart.as(element, E); |
| 5645 return super[_add](element); | 5645 return super[_add](element); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5784 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; | 5784 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; |
| 5785 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; | 5785 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; |
| 5786 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; | 5786 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; |
| 5787 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; | 5787 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; |
| 5788 exports.HashSetIterator$ = HashSetIterator$; | 5788 exports.HashSetIterator$ = HashSetIterator$; |
| 5789 exports.HashSetIterator = HashSetIterator; | 5789 exports.HashSetIterator = HashSetIterator; |
| 5790 exports.LinkedHashSetCell = LinkedHashSetCell; | 5790 exports.LinkedHashSetCell = LinkedHashSetCell; |
| 5791 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; | 5791 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; |
| 5792 exports.LinkedHashSetIterator = LinkedHashSetIterator; | 5792 exports.LinkedHashSetIterator = LinkedHashSetIterator; |
| 5793 }); | 5793 }); |
| OLD | NEW |