| OLD | NEW |
| 1 var collection; | 1 var collection; |
| 2 (function(exports) { | 2 (function(exports) { |
| 3 'use strict'; | 3 'use strict'; |
| 4 let _source = Symbol('_source'); | 4 let _source = Symbol('_source'); |
| 5 let UnmodifiableListView$ = dart.generic(function(E) { | 5 let UnmodifiableListView$ = dart.generic(function(E) { |
| 6 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { | 6 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { |
| 7 UnmodifiableListView(source) { | 7 UnmodifiableListView(source) { |
| 8 this[_source] = source; | 8 this[_source] = source; |
| 9 super.UnmodifiableListBase(); | 9 super.UnmodifiableListBase(); |
| 10 } | 10 } |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 } | 603 } |
| 604 throw new core.RangeError.index(index, this, "index", null, elementIndex
); | 604 throw new core.RangeError.index(index, this, "index", null, elementIndex
); |
| 605 } | 605 } |
| 606 toString() { | 606 toString() { |
| 607 return IterableBase.iterableToShortString(this, '(', ')'); | 607 return IterableBase.iterableToShortString(this, '(', ')'); |
| 608 } | 608 } |
| 609 } | 609 } |
| 610 return IterableMixin; | 610 return IterableMixin; |
| 611 }); | 611 }); |
| 612 let IterableMixin = IterableMixin$(dart.dynamic); | 612 let IterableMixin = IterableMixin$(dart.dynamic); |
| 613 let _isToStringVisiting$ = Symbol('_isToStringVisiting'); | 613 let _isToStringVisiting = Symbol('_isToStringVisiting'); |
| 614 let _iterablePartsToStrings$ = Symbol('_iterablePartsToStrings'); | 614 let _toStringVisiting = Symbol('_toStringVisiting'); |
| 615 let _iterablePartsToStrings = Symbol('_iterablePartsToStrings'); |
| 615 let IterableBase$ = dart.generic(function(E) { | 616 let IterableBase$ = dart.generic(function(E) { |
| 616 class IterableBase extends core.Object { | 617 class IterableBase extends core.Object { |
| 617 IterableBase() { | 618 IterableBase() { |
| 618 } | 619 } |
| 619 map(f) { | 620 map(f) { |
| 620 return new _internal.MappedIterable(this, f); | 621 return new _internal.MappedIterable(this, f); |
| 621 } | 622 } |
| 622 where(f) { | 623 where(f) { |
| 623 return new _internal.WhereIterable(this, f); | 624 return new _internal.WhereIterable(this, f); |
| 624 } | 625 } |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 core.RangeError.checkNotNegative(index, "index"); | 797 core.RangeError.checkNotNegative(index, "index"); |
| 797 let elementIndex = 0; | 798 let elementIndex = 0; |
| 798 for (let element of this) { | 799 for (let element of this) { |
| 799 if (index === elementIndex) | 800 if (index === elementIndex) |
| 800 return element; | 801 return element; |
| 801 elementIndex = dart.notNull(elementIndex) + 1; | 802 elementIndex = dart.notNull(elementIndex) + 1; |
| 802 } | 803 } |
| 803 throw new core.RangeError.index(index, this, "index", null, elementIndex
); | 804 throw new core.RangeError.index(index, this, "index", null, elementIndex
); |
| 804 } | 805 } |
| 805 toString() { | 806 toString() { |
| 806 return iterableToShortString(this, '(', ')'); | 807 return IterableBase.iterableToShortString(this, '(', ')'); |
| 807 } | 808 } |
| 808 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { | 809 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { |
| 809 if (leftDelimiter === void 0) | 810 if (leftDelimiter === void 0) |
| 810 leftDelimiter = '('; | 811 leftDelimiter = '('; |
| 811 if (rightDelimiter === void 0) | 812 if (rightDelimiter === void 0) |
| 812 rightDelimiter = ')'; | 813 rightDelimiter = ')'; |
| 813 if (_isToStringVisiting(iterable)) { | 814 if (IterableBase[_isToStringVisiting](iterable)) { |
| 814 if (dart.notNull(dart.equals(leftDelimiter, "(")) && dart.notNull(dart
.equals(rightDelimiter, ")"))) { | 815 if (dart.notNull(dart.equals(leftDelimiter, "(")) && dart.notNull(dart
.equals(rightDelimiter, ")"))) { |
| 815 return "(...)"; | 816 return "(...)"; |
| 816 } | 817 } |
| 817 return `${leftDelimiter}...${rightDelimiter}`; | 818 return `${leftDelimiter}...${rightDelimiter}`; |
| 818 } | 819 } |
| 819 let parts = new List.from([]); | 820 let parts = new List.from([]); |
| 820 _toStringVisiting.add(iterable); | 821 IterableBase[_toStringVisiting].add(iterable); |
| 821 try { | 822 try { |
| 822 _iterablePartsToStrings(iterable, parts); | 823 IterableBase[_iterablePartsToStrings](iterable, parts); |
| 823 } finally { | 824 } finally { |
| 824 dart.assert(core.identical(_toStringVisiting.last, iterable)); | 825 dart.assert(core.identical(IterableBase[_toStringVisiting].last, itera
ble)); |
| 825 _toStringVisiting.removeLast(); | 826 IterableBase[_toStringVisiting].removeLast(); |
| 826 } | 827 } |
| 827 return ((_) => { | 828 return ((_) => { |
| 828 _.writeAll(parts, ", "); | 829 _.writeAll(parts, ", "); |
| 829 _.write(rightDelimiter); | 830 _.write(rightDelimiter); |
| 830 return _; | 831 return _; |
| 831 }).bind(this)(new core.StringBuffer(leftDelimiter)).toString(); | 832 }).bind(this)(new core.StringBuffer(leftDelimiter)).toString(); |
| 832 } | 833 } |
| 833 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { | 834 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { |
| 834 if (leftDelimiter === void 0) | 835 if (leftDelimiter === void 0) |
| 835 leftDelimiter = '('; | 836 leftDelimiter = '('; |
| 836 if (rightDelimiter === void 0) | 837 if (rightDelimiter === void 0) |
| 837 rightDelimiter = ')'; | 838 rightDelimiter = ')'; |
| 838 if (_isToStringVisiting(iterable)) { | 839 if (IterableBase[_isToStringVisiting](iterable)) { |
| 839 return `${leftDelimiter}...${rightDelimiter}`; | 840 return `${leftDelimiter}...${rightDelimiter}`; |
| 840 } | 841 } |
| 841 let buffer = new core.StringBuffer(leftDelimiter); | 842 let buffer = new core.StringBuffer(leftDelimiter); |
| 842 _toStringVisiting.add(iterable); | 843 IterableBase[_toStringVisiting].add(iterable); |
| 843 try { | 844 try { |
| 844 buffer.writeAll(iterable, ", "); | 845 buffer.writeAll(iterable, ", "); |
| 845 } finally { | 846 } finally { |
| 846 dart.assert(core.identical(_toStringVisiting.last, iterable)); | 847 dart.assert(core.identical(IterableBase[_toStringVisiting].last, itera
ble)); |
| 847 _toStringVisiting.removeLast(); | 848 IterableBase[_toStringVisiting].removeLast(); |
| 848 } | 849 } |
| 849 buffer.write(rightDelimiter); | 850 buffer.write(rightDelimiter); |
| 850 return buffer.toString(); | 851 return buffer.toString(); |
| 851 } | 852 } |
| 852 static [_isToStringVisiting$](o) { | 853 static [_isToStringVisiting](o) { |
| 853 for (let i = 0; dart.notNull(i) < dart.notNull(_toStringVisiting.length)
; i = dart.notNull(i) + 1) { | 854 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase[_toStringVis
iting].length); i = dart.notNull(i) + 1) { |
| 854 if (core.identical(o, _toStringVisiting.get(i))) | 855 if (core.identical(o, IterableBase[_toStringVisiting].get(i))) |
| 855 return true; | 856 return true; |
| 856 } | 857 } |
| 857 return false; | 858 return false; |
| 858 } | 859 } |
| 859 static [_iterablePartsToStrings$](iterable, parts) { | 860 static [_iterablePartsToStrings](iterable, parts) { |
| 860 let LENGTH_LIMIT = 80; | 861 let LENGTH_LIMIT = 80; |
| 861 let HEAD_COUNT = 3; | 862 let HEAD_COUNT = 3; |
| 862 let TAIL_COUNT = 2; | 863 let TAIL_COUNT = 2; |
| 863 let MAX_COUNT = 100; | 864 let MAX_COUNT = 100; |
| 864 let OVERHEAD = 2; | 865 let OVERHEAD = 2; |
| 865 let ELLIPSIS_SIZE = 3; | 866 let ELLIPSIS_SIZE = 3; |
| 866 let length = 0; | 867 let length = 0; |
| 867 let count = 0; | 868 let count = 0; |
| 868 let it = iterable.iterator; | 869 let it = iterable.iterator; |
| 869 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull
(count) < dart.notNull(HEAD_COUNT)) { | 870 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull
(count) < dart.notNull(HEAD_COUNT)) { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 937 } | 938 } |
| 938 dart.defineLazyProperties(IterableBase, { | 939 dart.defineLazyProperties(IterableBase, { |
| 939 get _toStringVisiting() { | 940 get _toStringVisiting() { |
| 940 return new List.from([]); | 941 return new List.from([]); |
| 941 } | 942 } |
| 942 }); | 943 }); |
| 943 return IterableBase; | 944 return IterableBase; |
| 944 }); | 945 }); |
| 945 let IterableBase = IterableBase$(dart.dynamic); | 946 let IterableBase = IterableBase$(dart.dynamic); |
| 946 let _iterator = Symbol('_iterator'); | 947 let _iterator = Symbol('_iterator'); |
| 948 let _NOT_MOVED_YET = Symbol('_NOT_MOVED_YET'); |
| 947 let _state = Symbol('_state'); | 949 let _state = Symbol('_state'); |
| 948 let _move = Symbol('_move'); | 950 let _move = Symbol('_move'); |
| 951 let _HAS_NEXT_AND_NEXT_IN_CURRENT = Symbol('_HAS_NEXT_AND_NEXT_IN_CURRENT'); |
| 952 let _NO_NEXT = Symbol('_NO_NEXT'); |
| 949 let HasNextIterator$ = dart.generic(function(E) { | 953 let HasNextIterator$ = dart.generic(function(E) { |
| 950 class HasNextIterator extends core.Object { | 954 class HasNextIterator extends core.Object { |
| 951 HasNextIterator(iterator$) { | 955 HasNextIterator(iterator$) { |
| 952 this[_iterator] = iterator$; | 956 this[_iterator] = iterator$; |
| 953 this[_state] = HasNextIterator._NOT_MOVED_YET; | 957 this[_state] = HasNextIterator[_NOT_MOVED_YET]; |
| 954 } | 958 } |
| 955 get hasNext() { | 959 get hasNext() { |
| 956 if (this[_state] === HasNextIterator._NOT_MOVED_YET) | 960 if (this[_state] === HasNextIterator[_NOT_MOVED_YET]) |
| 957 this[_move](); | 961 this[_move](); |
| 958 return this[_state] === HasNextIterator._HAS_NEXT_AND_NEXT_IN_CURRENT; | 962 return this[_state] === HasNextIterator[_HAS_NEXT_AND_NEXT_IN_CURRENT]; |
| 959 } | 963 } |
| 960 next() { | 964 next() { |
| 961 if (!dart.notNull(this.hasNext)) | 965 if (!dart.notNull(this.hasNext)) |
| 962 throw new core.StateError("No more elements"); | 966 throw new core.StateError("No more elements"); |
| 963 dart.assert(this[_state] === HasNextIterator._HAS_NEXT_AND_NEXT_IN_CURRE
NT); | 967 dart.assert(this[_state] === HasNextIterator[_HAS_NEXT_AND_NEXT_IN_CURRE
NT]); |
| 964 let result = dart.as(this[_iterator].current, E); | 968 let result = dart.as(this[_iterator].current, E); |
| 965 this[_move](); | 969 this[_move](); |
| 966 return result; | 970 return result; |
| 967 } | 971 } |
| 968 [_move]() { | 972 [_move]() { |
| 969 if (this[_iterator].moveNext()) { | 973 if (this[_iterator].moveNext()) { |
| 970 this[_state] = HasNextIterator._HAS_NEXT_AND_NEXT_IN_CURRENT; | 974 this[_state] = HasNextIterator[_HAS_NEXT_AND_NEXT_IN_CURRENT]; |
| 971 } else { | 975 } else { |
| 972 this[_state] = HasNextIterator._NO_NEXT; | 976 this[_state] = HasNextIterator[_NO_NEXT]; |
| 973 } | 977 } |
| 974 } | 978 } |
| 975 } | 979 } |
| 976 HasNextIterator._HAS_NEXT_AND_NEXT_IN_CURRENT = 0; | 980 HasNextIterator._HAS_NEXT_AND_NEXT_IN_CURRENT = 0; |
| 977 HasNextIterator._NO_NEXT = 1; | 981 HasNextIterator._NO_NEXT = 1; |
| 978 HasNextIterator._NOT_MOVED_YET = 2; | 982 HasNextIterator._NOT_MOVED_YET = 2; |
| 979 return HasNextIterator; | 983 return HasNextIterator; |
| 980 }); | 984 }); |
| 981 let HasNextIterator = HasNextIterator$(dart.dynamic); | 985 let HasNextIterator = HasNextIterator$(dart.dynamic); |
| 986 let _literal = Symbol('_literal'); |
| 987 let _empty = Symbol('_empty'); |
| 982 let LinkedHashMap$ = dart.generic(function(K, V) { | 988 let LinkedHashMap$ = dart.generic(function(K, V) { |
| 983 class LinkedHashMap extends core.Object { | 989 class LinkedHashMap extends core.Object { |
| 984 LinkedHashMap(opts) { | 990 LinkedHashMap(opts) { |
| 985 let equals = opts && 'equals' in opts ? opts.equals : null; | 991 let equals = opts && 'equals' in opts ? opts.equals : null; |
| 986 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; | 992 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; |
| 987 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; | 993 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; |
| 988 if (isValidKey === null) { | 994 if (isValidKey === null) { |
| 989 if (hashCode === null) { | 995 if (hashCode === null) { |
| 990 if (equals === null) { | 996 if (equals === null) { |
| 991 return new _LinkedHashMap(); | 997 return new _LinkedHashMap(); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 return dart.as(_js_helper.fillLiteralMap(keyValuePairs, new _LinkedHashM
ap()), LinkedHashMap$(K, V)); | 1041 return dart.as(_js_helper.fillLiteralMap(keyValuePairs, new _LinkedHashM
ap()), LinkedHashMap$(K, V)); |
| 1036 } | 1042 } |
| 1037 LinkedHashMap$_empty() { | 1043 LinkedHashMap$_empty() { |
| 1038 return new _LinkedHashMap(); | 1044 return new _LinkedHashMap(); |
| 1039 } | 1045 } |
| 1040 } | 1046 } |
| 1041 dart.defineNamedConstructor(LinkedHashMap, 'identity'); | 1047 dart.defineNamedConstructor(LinkedHashMap, 'identity'); |
| 1042 dart.defineNamedConstructor(LinkedHashMap, 'from'); | 1048 dart.defineNamedConstructor(LinkedHashMap, 'from'); |
| 1043 dart.defineNamedConstructor(LinkedHashMap, 'fromIterable'); | 1049 dart.defineNamedConstructor(LinkedHashMap, 'fromIterable'); |
| 1044 dart.defineNamedConstructor(LinkedHashMap, 'fromIterables'); | 1050 dart.defineNamedConstructor(LinkedHashMap, 'fromIterables'); |
| 1045 dart.defineNamedConstructor(LinkedHashMap, '_literal'); | 1051 dart.defineNamedConstructor(LinkedHashMap, _literal); |
| 1046 dart.defineNamedConstructor(LinkedHashMap, '_empty'); | 1052 dart.defineNamedConstructor(LinkedHashMap, _empty); |
| 1047 return LinkedHashMap; | 1053 return LinkedHashMap; |
| 1048 }); | 1054 }); |
| 1049 let LinkedHashMap = LinkedHashMap$(dart.dynamic, dart.dynamic); | 1055 let LinkedHashMap = LinkedHashMap$(dart.dynamic, dart.dynamic); |
| 1050 let LinkedHashSet$ = dart.generic(function(E) { | 1056 let LinkedHashSet$ = dart.generic(function(E) { |
| 1051 class LinkedHashSet extends core.Object { | 1057 class LinkedHashSet extends core.Object { |
| 1052 LinkedHashSet(opts) { | 1058 LinkedHashSet(opts) { |
| 1053 let equals = opts && 'equals' in opts ? opts.equals : null; | 1059 let equals = opts && 'equals' in opts ? opts.equals : null; |
| 1054 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; | 1060 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; |
| 1055 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; | 1061 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; |
| 1056 if (isValidKey === null) { | 1062 if (isValidKey === null) { |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1263 insertAfter(entry) { | 1269 insertAfter(entry) { |
| 1264 this[_list]._insertAfter(this, entry); | 1270 this[_list]._insertAfter(this, entry); |
| 1265 } | 1271 } |
| 1266 insertBefore(entry) { | 1272 insertBefore(entry) { |
| 1267 this[_list]._insertAfter(this[_previous], entry); | 1273 this[_list]._insertAfter(this[_previous], entry); |
| 1268 } | 1274 } |
| 1269 } | 1275 } |
| 1270 return LinkedListEntry; | 1276 return LinkedListEntry; |
| 1271 }); | 1277 }); |
| 1272 let LinkedListEntry = LinkedListEntry$(dart.dynamic); | 1278 let LinkedListEntry = LinkedListEntry$(dart.dynamic); |
| 1273 let _filter$ = Symbol('_filter'); | 1279 let _filter = Symbol('_filter'); |
| 1274 let ListMixin$ = dart.generic(function(E) { | 1280 let ListMixin$ = dart.generic(function(E) { |
| 1275 class ListMixin extends core.Object { | 1281 class ListMixin extends core.Object { |
| 1276 get iterator() { | 1282 get iterator() { |
| 1277 return new _internal.ListIterator(this); | 1283 return new _internal.ListIterator(this); |
| 1278 } | 1284 } |
| 1279 elementAt(index) { | 1285 elementAt(index) { |
| 1280 return this.get(index); | 1286 return this.get(index); |
| 1281 } | 1287 } |
| 1282 forEach(action) { | 1288 forEach(action) { |
| 1283 let length = this.length; | 1289 let length = this.length; |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1484 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no
tNull(i) + 1) { | 1490 for (let i = 0; dart.notNull(i) < dart.notNull(this.length); i = dart.no
tNull(i) + 1) { |
| 1485 if (dart.equals(this.get(i), element)) { | 1491 if (dart.equals(this.get(i), element)) { |
| 1486 this.setRange(i, dart.notNull(this.length) - 1, this, dart.notNull(i
) + 1); | 1492 this.setRange(i, dart.notNull(this.length) - 1, this, dart.notNull(i
) + 1); |
| 1487 this.length = 1; | 1493 this.length = 1; |
| 1488 return true; | 1494 return true; |
| 1489 } | 1495 } |
| 1490 } | 1496 } |
| 1491 return false; | 1497 return false; |
| 1492 } | 1498 } |
| 1493 removeWhere(test) { | 1499 removeWhere(test) { |
| 1494 _filter(this, test, false); | 1500 ListMixin[_filter](this, test, false); |
| 1495 } | 1501 } |
| 1496 retainWhere(test) { | 1502 retainWhere(test) { |
| 1497 _filter(this, test, true); | 1503 ListMixin[_filter](this, test, true); |
| 1498 } | 1504 } |
| 1499 static [_filter$](source, test, retainMatching) { | 1505 static [_filter](source, test, retainMatching) { |
| 1500 let retained = new List.from([]); | 1506 let retained = new List.from([]); |
| 1501 let length = source.length; | 1507 let length = source.length; |
| 1502 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1508 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 1503 let element = source.get(i); | 1509 let element = source.get(i); |
| 1504 if (dart.dinvokef(test, element) === retainMatching) { | 1510 if (dart.dinvokef(test, element) === retainMatching) { |
| 1505 retained.add(element); | 1511 retained.add(element); |
| 1506 } | 1512 } |
| 1507 if (length !== source.length) { | 1513 if (length !== source.length) { |
| 1508 throw new core.ConcurrentModificationError(source); | 1514 throw new core.ConcurrentModificationError(source); |
| 1509 } | 1515 } |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1918 } | 1924 } |
| 1919 return MapView; | 1925 return MapView; |
| 1920 }); | 1926 }); |
| 1921 let MapView = MapView$(dart.dynamic, dart.dynamic); | 1927 let MapView = MapView$(dart.dynamic, dart.dynamic); |
| 1922 let UnmodifiableMapView$ = dart.generic(function(K, V) { | 1928 let UnmodifiableMapView$ = dart.generic(function(K, V) { |
| 1923 class UnmodifiableMapView extends dart.mixin(_UnmodifiableMapMixin$(K, V)) { | 1929 class UnmodifiableMapView extends dart.mixin(_UnmodifiableMapMixin$(K, V)) { |
| 1924 } | 1930 } |
| 1925 return UnmodifiableMapView; | 1931 return UnmodifiableMapView; |
| 1926 }); | 1932 }); |
| 1927 let UnmodifiableMapView = UnmodifiableMapView$(dart.dynamic, dart.dynamic); | 1933 let UnmodifiableMapView = UnmodifiableMapView$(dart.dynamic, dart.dynamic); |
| 1928 let _toStringVisiting$ = Symbol('_toStringVisiting'); | 1934 let _id = Symbol('_id'); |
| 1929 let _id$ = Symbol('_id'); | |
| 1930 let _fillMapWithMappedIterable = Symbol('_fillMapWithMappedIterable'); | 1935 let _fillMapWithMappedIterable = Symbol('_fillMapWithMappedIterable'); |
| 1931 let _fillMapWithIterables = Symbol('_fillMapWithIterables'); | 1936 let _fillMapWithIterables = Symbol('_fillMapWithIterables'); |
| 1932 class Maps extends core.Object { | 1937 class Maps extends core.Object { |
| 1933 static containsValue(map, value) { | 1938 static containsValue(map, value) { |
| 1934 for (let v of map.values) { | 1939 for (let v of map.values) { |
| 1935 if (dart.equals(value, v)) { | 1940 if (dart.equals(value, v)) { |
| 1936 return true; | 1941 return true; |
| 1937 } | 1942 } |
| 1938 } | 1943 } |
| 1939 return false; | 1944 return false; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1975 } | 1980 } |
| 1976 static isNotEmpty(map) { | 1981 static isNotEmpty(map) { |
| 1977 return map.keys.isNotEmpty; | 1982 return map.keys.isNotEmpty; |
| 1978 } | 1983 } |
| 1979 static mapToString(m) { | 1984 static mapToString(m) { |
| 1980 if (IterableBase._isToStringVisiting(m)) { | 1985 if (IterableBase._isToStringVisiting(m)) { |
| 1981 return '{...}'; | 1986 return '{...}'; |
| 1982 } | 1987 } |
| 1983 let result = new core.StringBuffer(); | 1988 let result = new core.StringBuffer(); |
| 1984 try { | 1989 try { |
| 1985 IterableBase[_toStringVisiting$].add(m); | 1990 IterableBase[_toStringVisiting].add(m); |
| 1986 result.write('{'); | 1991 result.write('{'); |
| 1987 let first = true; | 1992 let first = true; |
| 1988 m.forEach(((k, v) => { | 1993 m.forEach(((k, v) => { |
| 1989 if (!dart.notNull(first)) { | 1994 if (!dart.notNull(first)) { |
| 1990 result.write(', '); | 1995 result.write(', '); |
| 1991 } | 1996 } |
| 1992 first = false; | 1997 first = false; |
| 1993 result.write(k); | 1998 result.write(k); |
| 1994 result.write(': '); | 1999 result.write(': '); |
| 1995 result.write(v); | 2000 result.write(v); |
| 1996 }).bind(this)); | 2001 }).bind(this)); |
| 1997 result.write('}'); | 2002 result.write('}'); |
| 1998 } finally { | 2003 } finally { |
| 1999 dart.assert(core.identical(IterableBase[_toStringVisiting$].last, m)); | 2004 dart.assert(core.identical(IterableBase[_toStringVisiting].last, m)); |
| 2000 IterableBase[_toStringVisiting$].removeLast(); | 2005 IterableBase[_toStringVisiting].removeLast(); |
| 2001 } | 2006 } |
| 2002 return result.toString(); | 2007 return result.toString(); |
| 2003 } | 2008 } |
| 2004 static [_id$](x) { | 2009 static [_id](x) { |
| 2005 return x; | 2010 return x; |
| 2006 } | 2011 } |
| 2007 static [_fillMapWithMappedIterable](map, iterable, key, value) { | 2012 static [_fillMapWithMappedIterable](map, iterable, key, value) { |
| 2008 if (key === null) | 2013 if (key === null) |
| 2009 key = _id; | 2014 key = Maps[_id]; |
| 2010 if (value === null) | 2015 if (value === null) |
| 2011 value = _id; | 2016 value = Maps[_id]; |
| 2012 for (let element of iterable) { | 2017 for (let element of iterable) { |
| 2013 map.set(dart.dinvokef(key, element), dart.dinvokef(value, element)); | 2018 map.set(dart.dinvokef(key, element), dart.dinvokef(value, element)); |
| 2014 } | 2019 } |
| 2015 } | 2020 } |
| 2016 static [_fillMapWithIterables](map, keys, values) { | 2021 static [_fillMapWithIterables](map, keys, values) { |
| 2017 let keyIterator = keys.iterator; | 2022 let keyIterator = keys.iterator; |
| 2018 let valueIterator = values.iterator; | 2023 let valueIterator = values.iterator; |
| 2019 let hasNextKey = keyIterator.moveNext(); | 2024 let hasNextKey = keyIterator.moveNext(); |
| 2020 let hasNextValue = valueIterator.moveNext(); | 2025 let hasNextValue = valueIterator.moveNext(); |
| 2021 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { | 2026 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2164 while (!dart.notNull(core.identical(entry, this[_sentinel]))) { | 2169 while (!dart.notNull(core.identical(entry, this[_sentinel]))) { |
| 2165 if (dart.equals(entry.element, o)) { | 2170 if (dart.equals(entry.element, o)) { |
| 2166 entry.remove(); | 2171 entry.remove(); |
| 2167 this[_elementCount] = dart.notNull(this[_elementCount]) - 1; | 2172 this[_elementCount] = dart.notNull(this[_elementCount]) - 1; |
| 2168 return true; | 2173 return true; |
| 2169 } | 2174 } |
| 2170 entry = entry[_next]; | 2175 entry = entry[_next]; |
| 2171 } | 2176 } |
| 2172 return false; | 2177 return false; |
| 2173 } | 2178 } |
| 2174 [_filter$](test, removeMatching) { | 2179 [_filter](test, removeMatching) { |
| 2175 let entry = this[_sentinel][_next]; | 2180 let entry = this[_sentinel][_next]; |
| 2176 while (!dart.notNull(core.identical(entry, this[_sentinel]))) { | 2181 while (!dart.notNull(core.identical(entry, this[_sentinel]))) { |
| 2177 let next = entry[_next]; | 2182 let next = entry[_next]; |
| 2178 if (core.identical(removeMatching, test(entry.element))) { | 2183 if (core.identical(removeMatching, test(entry.element))) { |
| 2179 entry.remove(); | 2184 entry.remove(); |
| 2180 this[_elementCount] = dart.notNull(this[_elementCount]) - 1; | 2185 this[_elementCount] = dart.notNull(this[_elementCount]) - 1; |
| 2181 } | 2186 } |
| 2182 entry = next; | 2187 entry = next; |
| 2183 } | 2188 } |
| 2184 } | 2189 } |
| 2185 removeWhere(test) { | 2190 removeWhere(test) { |
| 2186 this[_filter$](test, true); | 2191 this[_filter](test, true); |
| 2187 } | 2192 } |
| 2188 retainWhere(test) { | 2193 retainWhere(test) { |
| 2189 this[_filter$](test, false); | 2194 this[_filter](test, false); |
| 2190 } | 2195 } |
| 2191 get first() { | 2196 get first() { |
| 2192 return this[_sentinel][_next].element; | 2197 return this[_sentinel][_next].element; |
| 2193 } | 2198 } |
| 2194 get last() { | 2199 get last() { |
| 2195 return this[_sentinel][_previous].element; | 2200 return this[_sentinel][_previous].element; |
| 2196 } | 2201 } |
| 2197 get single() { | 2202 get single() { |
| 2198 if (core.identical(this[_sentinel][_next], this[_sentinel][_previous]))
{ | 2203 if (core.identical(this[_sentinel][_next], this[_sentinel][_previous]))
{ |
| 2199 return this[_sentinel][_next].element; | 2204 return this[_sentinel][_next].element; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2254 get current() { | 2259 get current() { |
| 2255 return this[_current]; | 2260 return this[_current]; |
| 2256 } | 2261 } |
| 2257 } | 2262 } |
| 2258 return _DoubleLinkedQueueIterator; | 2263 return _DoubleLinkedQueueIterator; |
| 2259 }); | 2264 }); |
| 2260 let _DoubleLinkedQueueIterator = _DoubleLinkedQueueIterator$(dart.dynamic); | 2265 let _DoubleLinkedQueueIterator = _DoubleLinkedQueueIterator$(dart.dynamic); |
| 2261 let _head = Symbol('_head'); | 2266 let _head = Symbol('_head'); |
| 2262 let _tail = Symbol('_tail'); | 2267 let _tail = Symbol('_tail'); |
| 2263 let _table = Symbol('_table'); | 2268 let _table = Symbol('_table'); |
| 2269 let _INITIAL_CAPACITY = Symbol('_INITIAL_CAPACITY'); |
| 2270 let _isPowerOf2 = Symbol('_isPowerOf2'); |
| 2271 let _nextPowerOf2 = Symbol('_nextPowerOf2'); |
| 2264 let _checkModification = Symbol('_checkModification'); | 2272 let _checkModification = Symbol('_checkModification'); |
| 2265 let _writeToList = Symbol('_writeToList'); | 2273 let _writeToList = Symbol('_writeToList'); |
| 2266 let _add = Symbol('_add'); | 2274 let _add = Symbol('_add'); |
| 2267 let _preGrow = Symbol('_preGrow'); | 2275 let _preGrow = Symbol('_preGrow'); |
| 2268 let _remove = Symbol('_remove'); | 2276 let _remove = Symbol('_remove'); |
| 2269 let _filterWhere = Symbol('_filterWhere'); | 2277 let _filterWhere = Symbol('_filterWhere'); |
| 2270 let _grow = Symbol('_grow'); | 2278 let _grow = Symbol('_grow'); |
| 2271 let _isPowerOf2$ = Symbol('_isPowerOf2'); | |
| 2272 let _nextPowerOf2$ = Symbol('_nextPowerOf2'); | |
| 2273 let ListQueue$ = dart.generic(function(E) { | 2279 let ListQueue$ = dart.generic(function(E) { |
| 2274 class ListQueue extends IterableBase$(E) { | 2280 class ListQueue extends IterableBase$(E) { |
| 2275 ListQueue(initialCapacity) { | 2281 ListQueue(initialCapacity) { |
| 2276 if (initialCapacity === void 0) | 2282 if (initialCapacity === void 0) |
| 2277 initialCapacity = null; | 2283 initialCapacity = null; |
| 2278 this[_head] = 0; | 2284 this[_head] = 0; |
| 2279 this[_tail] = 0; | 2285 this[_tail] = 0; |
| 2280 this[_table] = null; | 2286 this[_table] = null; |
| 2281 this[_modificationCount] = 0; | 2287 this[_modificationCount] = 0; |
| 2282 super.IterableBase(); | 2288 super.IterableBase(); |
| 2283 if (initialCapacity === null || dart.notNull(initialCapacity) < dart.not
Null(ListQueue._INITIAL_CAPACITY)) { | 2289 if (initialCapacity === null || dart.notNull(initialCapacity) < dart.not
Null(ListQueue[_INITIAL_CAPACITY])) { |
| 2284 initialCapacity = ListQueue._INITIAL_CAPACITY; | 2290 initialCapacity = ListQueue[_INITIAL_CAPACITY]; |
| 2285 } else if (!dart.notNull(_isPowerOf2(initialCapacity))) { | 2291 } else if (!dart.notNull(ListQueue[_isPowerOf2](initialCapacity))) { |
| 2286 initialCapacity = _nextPowerOf2(initialCapacity); | 2292 initialCapacity = ListQueue[_nextPowerOf2](initialCapacity); |
| 2287 } | 2293 } |
| 2288 dart.assert(_isPowerOf2(initialCapacity)); | 2294 dart.assert(ListQueue[_isPowerOf2](initialCapacity)); |
| 2289 this[_table] = new core.List(initialCapacity); | 2295 this[_table] = new core.List(initialCapacity); |
| 2290 } | 2296 } |
| 2291 ListQueue$from(elements) { | 2297 ListQueue$from(elements) { |
| 2292 if (dart.is(elements, core.List)) { | 2298 if (dart.is(elements, core.List)) { |
| 2293 let length = elements.length; | 2299 let length = elements.length; |
| 2294 let queue = dart.as(new ListQueue(dart.notNull(length) + 1), ListQueue
$(E)); | 2300 let queue = dart.as(new ListQueue(dart.notNull(length) + 1), ListQueue
$(E)); |
| 2295 dart.assert(dart.notNull(queue[_table].length) > dart.notNull(length))
; | 2301 dart.assert(dart.notNull(queue[_table].length) > dart.notNull(length))
; |
| 2296 let sourceList = elements; | 2302 let sourceList = elements; |
| 2297 queue[_table].setRange(0, length, dart.as(sourceList, core.Iterable$(E
)), 0); | 2303 queue[_table].setRange(0, length, dart.as(sourceList, core.Iterable$(E
)), 0); |
| 2298 queue[_tail] = length; | 2304 queue[_tail] = length; |
| 2299 return queue; | 2305 return queue; |
| 2300 } else { | 2306 } else { |
| 2301 let capacity = ListQueue._INITIAL_CAPACITY; | 2307 let capacity = ListQueue[_INITIAL_CAPACITY]; |
| 2302 if (dart.is(elements, _internal.EfficientLength)) { | 2308 if (dart.is(elements, _internal.EfficientLength)) { |
| 2303 capacity = elements.length; | 2309 capacity = elements.length; |
| 2304 } | 2310 } |
| 2305 let result = new ListQueue(capacity); | 2311 let result = new ListQueue(capacity); |
| 2306 for (let element of elements) { | 2312 for (let element of elements) { |
| 2307 result.addLast(element); | 2313 result.addLast(element); |
| 2308 } | 2314 } |
| 2309 return result; | 2315 return result; |
| 2310 } | 2316 } |
| 2311 } | 2317 } |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2456 } | 2462 } |
| 2457 removeLast() { | 2463 removeLast() { |
| 2458 if (this[_head] === this[_tail]) | 2464 if (this[_head] === this[_tail]) |
| 2459 throw _internal.IterableElementError.noElement(); | 2465 throw _internal.IterableElementError.noElement(); |
| 2460 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 2466 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
| 2461 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table].
length) - 1; | 2467 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table].
length) - 1; |
| 2462 let result = this[_table].get(this[_tail]); | 2468 let result = this[_table].get(this[_tail]); |
| 2463 this[_table].set(this[_tail], null); | 2469 this[_table].set(this[_tail], null); |
| 2464 return result; | 2470 return result; |
| 2465 } | 2471 } |
| 2466 static [_isPowerOf2$](number) { | 2472 static [_isPowerOf2](number) { |
| 2467 return (dart.notNull(number) & dart.notNull(number) - 1) === 0; | 2473 return (dart.notNull(number) & dart.notNull(number) - 1) === 0; |
| 2468 } | 2474 } |
| 2469 static [_nextPowerOf2$](number) { | 2475 static [_nextPowerOf2](number) { |
| 2470 dart.assert(dart.notNull(number) > 0); | 2476 dart.assert(dart.notNull(number) > 0); |
| 2471 number = (dart.notNull(number) << 1) - 1; | 2477 number = (dart.notNull(number) << 1) - 1; |
| 2472 for (;;) { | 2478 for (;;) { |
| 2473 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1; | 2479 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1; |
| 2474 if (nextNumber === 0) | 2480 if (nextNumber === 0) |
| 2475 return number; | 2481 return number; |
| 2476 number = nextNumber; | 2482 number = nextNumber; |
| 2477 } | 2483 } |
| 2478 } | 2484 } |
| 2479 [_checkModification](expectedModificationCount) { | 2485 [_checkModification](expectedModificationCount) { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2532 } else { | 2538 } else { |
| 2533 let firstPartSize = dart.notNull(this[_table].length) - dart.notNull(t
his[_head]); | 2539 let firstPartSize = dart.notNull(this[_table].length) - dart.notNull(t
his[_head]); |
| 2534 target.setRange(0, firstPartSize, this[_table], this[_head]); | 2540 target.setRange(0, firstPartSize, this[_table], this[_head]); |
| 2535 target.setRange(firstPartSize, dart.notNull(firstPartSize) + dart.notN
ull(this[_tail]), this[_table], 0); | 2541 target.setRange(firstPartSize, dart.notNull(firstPartSize) + dart.notN
ull(this[_tail]), this[_table], 0); |
| 2536 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); | 2542 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); |
| 2537 } | 2543 } |
| 2538 } | 2544 } |
| 2539 [_preGrow](newElementCount) { | 2545 [_preGrow](newElementCount) { |
| 2540 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this.length)); | 2546 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this.length)); |
| 2541 newElementCount = dart.notNull(newElementCount) >> 1; | 2547 newElementCount = dart.notNull(newElementCount) >> 1; |
| 2542 let newCapacity = _nextPowerOf2(newElementCount); | 2548 let newCapacity = ListQueue[_nextPowerOf2](newElementCount); |
| 2543 let newTable = new core.List(newCapacity); | 2549 let newTable = new core.List(newCapacity); |
| 2544 this[_tail] = this[_writeToList](newTable); | 2550 this[_tail] = this[_writeToList](newTable); |
| 2545 this[_table] = newTable; | 2551 this[_table] = newTable; |
| 2546 this[_head] = 0; | 2552 this[_head] = 0; |
| 2547 } | 2553 } |
| 2548 } | 2554 } |
| 2549 dart.defineNamedConstructor(ListQueue, 'from'); | 2555 dart.defineNamedConstructor(ListQueue, 'from'); |
| 2550 ListQueue._INITIAL_CAPACITY = 8; | 2556 ListQueue._INITIAL_CAPACITY = 8; |
| 2551 return ListQueue; | 2557 return ListQueue; |
| 2552 }); | 2558 }); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2756 class _TypeTest extends core.Object { | 2762 class _TypeTest extends core.Object { |
| 2757 test(v) { | 2763 test(v) { |
| 2758 return dart.is(v, T); | 2764 return dart.is(v, T); |
| 2759 } | 2765 } |
| 2760 } | 2766 } |
| 2761 return _TypeTest; | 2767 return _TypeTest; |
| 2762 }); | 2768 }); |
| 2763 let _TypeTest = _TypeTest$(dart.dynamic); | 2769 let _TypeTest = _TypeTest$(dart.dynamic); |
| 2764 let _comparator = Symbol('_comparator'); | 2770 let _comparator = Symbol('_comparator'); |
| 2765 let _validKey = Symbol('_validKey'); | 2771 let _validKey = Symbol('_validKey'); |
| 2772 let _internal$ = Symbol('_internal'); |
| 2766 let SplayTreeMap$ = dart.generic(function(K, V) { | 2773 let SplayTreeMap$ = dart.generic(function(K, V) { |
| 2767 class SplayTreeMap extends _SplayTree$(K) { | 2774 class SplayTreeMap extends _SplayTree$(K) { |
| 2768 SplayTreeMap(compare, isValidKey) { | 2775 SplayTreeMap(compare, isValidKey) { |
| 2769 if (compare === void 0) | 2776 if (compare === void 0) |
| 2770 compare = null; | 2777 compare = null; |
| 2771 if (isValidKey === void 0) | 2778 if (isValidKey === void 0) |
| 2772 isValidKey = null; | 2779 isValidKey = null; |
| 2773 this[_comparator] = dart.as(compare === null ? core.Comparable.compare :
compare, core.Comparator); | 2780 this[_comparator] = dart.as(compare === null ? core.Comparable.compare :
compare, core.Comparator); |
| 2774 this[_validKey] = dart.as(isValidKey !== null ? isValidKey : (v) => dart
.is(v, K), _Predicate); | 2781 this[_validKey] = dart.as(isValidKey !== null ? isValidKey : (v) => dart
.is(v, K), _Predicate); |
| 2775 super._SplayTree(); | 2782 super._SplayTree(); |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2959 return null; | 2966 return null; |
| 2960 while (node.left !== null) { | 2967 while (node.left !== null) { |
| 2961 node = node.left; | 2968 node = node.left; |
| 2962 } | 2969 } |
| 2963 return node.key; | 2970 return node.key; |
| 2964 } | 2971 } |
| 2965 } | 2972 } |
| 2966 dart.defineNamedConstructor(SplayTreeMap, 'from'); | 2973 dart.defineNamedConstructor(SplayTreeMap, 'from'); |
| 2967 dart.defineNamedConstructor(SplayTreeMap, 'fromIterable'); | 2974 dart.defineNamedConstructor(SplayTreeMap, 'fromIterable'); |
| 2968 dart.defineNamedConstructor(SplayTreeMap, 'fromIterables'); | 2975 dart.defineNamedConstructor(SplayTreeMap, 'fromIterables'); |
| 2969 dart.defineNamedConstructor(SplayTreeMap, '_internal'); | 2976 dart.defineNamedConstructor(SplayTreeMap, _internal$); |
| 2970 return SplayTreeMap; | 2977 return SplayTreeMap; |
| 2971 }); | 2978 }); |
| 2972 let SplayTreeMap = SplayTreeMap$(dart.dynamic, dart.dynamic); | 2979 let SplayTreeMap = SplayTreeMap$(dart.dynamic, dart.dynamic); |
| 2973 let _workList = Symbol('_workList'); | 2980 let _workList = Symbol('_workList'); |
| 2974 let _tree = Symbol('_tree'); | 2981 let _tree = Symbol('_tree'); |
| 2975 let _currentNode = Symbol('_currentNode'); | 2982 let _currentNode = Symbol('_currentNode'); |
| 2976 let _findLeftMostDescendent = Symbol('_findLeftMostDescendent'); | 2983 let _findLeftMostDescendent = Symbol('_findLeftMostDescendent'); |
| 2977 let _getValue = Symbol('_getValue'); | 2984 let _getValue = Symbol('_getValue'); |
| 2978 let _rebuildWorkList = Symbol('_rebuildWorkList'); | 2985 let _rebuildWorkList = Symbol('_rebuildWorkList'); |
| 2979 let _SplayTreeIterator$ = dart.generic(function(T) { | 2986 let _SplayTreeIterator$ = dart.generic(function(T) { |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3285 return IterableBase.iterableToFullString(this, '{', '}'); | 3292 return IterableBase.iterableToFullString(this, '{', '}'); |
| 3286 } | 3293 } |
| 3287 } | 3294 } |
| 3288 dart.defineNamedConstructor(SplayTreeSet, 'from'); | 3295 dart.defineNamedConstructor(SplayTreeSet, 'from'); |
| 3289 return SplayTreeSet; | 3296 return SplayTreeSet; |
| 3290 }); | 3297 }); |
| 3291 let SplayTreeSet = SplayTreeSet$(dart.dynamic); | 3298 let SplayTreeSet = SplayTreeSet$(dart.dynamic); |
| 3292 let _strings = Symbol('_strings'); | 3299 let _strings = Symbol('_strings'); |
| 3293 let _nums = Symbol('_nums'); | 3300 let _nums = Symbol('_nums'); |
| 3294 let _rest = Symbol('_rest'); | 3301 let _rest = Symbol('_rest'); |
| 3302 let _isStringKey = Symbol('_isStringKey'); |
| 3303 let _hasTableEntry = Symbol('_hasTableEntry'); |
| 3304 let _isNumericKey = Symbol('_isNumericKey'); |
| 3295 let _containsKey = Symbol('_containsKey'); | 3305 let _containsKey = Symbol('_containsKey'); |
| 3296 let _getBucket = Symbol('_getBucket'); | 3306 let _getBucket = Symbol('_getBucket'); |
| 3297 let _findBucketIndex = Symbol('_findBucketIndex'); | 3307 let _findBucketIndex = Symbol('_findBucketIndex'); |
| 3298 let _computeKeys = Symbol('_computeKeys'); | 3308 let _computeKeys = Symbol('_computeKeys'); |
| 3309 let _getTableEntry = Symbol('_getTableEntry'); |
| 3299 let _get = Symbol('_get'); | 3310 let _get = Symbol('_get'); |
| 3311 let _newHashTable = Symbol('_newHashTable'); |
| 3300 let _addHashTableEntry = Symbol('_addHashTableEntry'); | 3312 let _addHashTableEntry = Symbol('_addHashTableEntry'); |
| 3301 let _set = Symbol('_set'); | 3313 let _set = Symbol('_set'); |
| 3302 let _computeHashCode = Symbol('_computeHashCode'); | 3314 let _computeHashCode = Symbol('_computeHashCode'); |
| 3315 let _setTableEntry = Symbol('_setTableEntry'); |
| 3303 let _removeHashTableEntry = Symbol('_removeHashTableEntry'); | 3316 let _removeHashTableEntry = Symbol('_removeHashTableEntry'); |
| 3304 let _isStringKey$ = Symbol('_isStringKey'); | 3317 let _deleteTableEntry = Symbol('_deleteTableEntry'); |
| 3305 let _isNumericKey$ = Symbol('_isNumericKey'); | |
| 3306 let _hasTableEntry$ = Symbol('_hasTableEntry'); | |
| 3307 let _getTableEntry$ = Symbol('_getTableEntry'); | |
| 3308 let _setTableEntry$ = Symbol('_setTableEntry'); | |
| 3309 let _deleteTableEntry$ = Symbol('_deleteTableEntry'); | |
| 3310 let _newHashTable$ = Symbol('_newHashTable'); | |
| 3311 let _HashMap$ = dart.generic(function(K, V) { | 3318 let _HashMap$ = dart.generic(function(K, V) { |
| 3312 class _HashMap extends core.Object { | 3319 class _HashMap extends core.Object { |
| 3313 _HashMap() { | 3320 _HashMap() { |
| 3314 this[_length] = 0; | 3321 this[_length] = 0; |
| 3315 this[_strings] = null; | 3322 this[_strings] = null; |
| 3316 this[_nums] = null; | 3323 this[_nums] = null; |
| 3317 this[_rest] = null; | 3324 this[_rest] = null; |
| 3318 this[_keys] = null; | 3325 this[_keys] = null; |
| 3319 } | 3326 } |
| 3320 get length() { | 3327 get length() { |
| 3321 return this[_length]; | 3328 return this[_length]; |
| 3322 } | 3329 } |
| 3323 get isEmpty() { | 3330 get isEmpty() { |
| 3324 return this[_length] === 0; | 3331 return this[_length] === 0; |
| 3325 } | 3332 } |
| 3326 get isNotEmpty() { | 3333 get isNotEmpty() { |
| 3327 return !dart.notNull(this.isEmpty); | 3334 return !dart.notNull(this.isEmpty); |
| 3328 } | 3335 } |
| 3329 get keys() { | 3336 get keys() { |
| 3330 return new HashMapKeyIterable(this); | 3337 return new HashMapKeyIterable(this); |
| 3331 } | 3338 } |
| 3332 get values() { | 3339 get values() { |
| 3333 return new _internal.MappedIterable(this.keys, dart.closureWrap(((each)
=> this.get(each)).bind(this), "(K) → V")); | 3340 return new _internal.MappedIterable(this.keys, dart.closureWrap(((each)
=> this.get(each)).bind(this), "(K) → V")); |
| 3334 } | 3341 } |
| 3335 containsKey(key) { | 3342 containsKey(key) { |
| 3336 if (_isStringKey(key)) { | 3343 if (_HashMap[_isStringKey](key)) { |
| 3337 let strings = this[_strings]; | 3344 let strings = this[_strings]; |
| 3338 return strings === null ? false : _hasTableEntry(strings, key); | 3345 return strings === null ? false : _HashMap[_hasTableEntry](strings, ke
y); |
| 3339 } else if (_isNumericKey(key)) { | 3346 } else if (_HashMap[_isNumericKey](key)) { |
| 3340 let nums = this[_nums]; | 3347 let nums = this[_nums]; |
| 3341 return nums === null ? false : _hasTableEntry(nums, key); | 3348 return nums === null ? false : _HashMap[_hasTableEntry](nums, key); |
| 3342 } else { | 3349 } else { |
| 3343 return this[_containsKey](key); | 3350 return this[_containsKey](key); |
| 3344 } | 3351 } |
| 3345 } | 3352 } |
| 3346 [_containsKey](key) { | 3353 [_containsKey](key) { |
| 3347 let rest = this[_rest]; | 3354 let rest = this[_rest]; |
| 3348 if (rest === null) | 3355 if (rest === null) |
| 3349 return false; | 3356 return false; |
| 3350 let bucket = this[_getBucket](rest, key); | 3357 let bucket = this[_getBucket](rest, key); |
| 3351 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; | 3358 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; |
| 3352 } | 3359 } |
| 3353 containsValue(value) { | 3360 containsValue(value) { |
| 3354 return this[_computeKeys]().any(((each) => dart.equals(this.get(each), v
alue)).bind(this)); | 3361 return this[_computeKeys]().any(((each) => dart.equals(this.get(each), v
alue)).bind(this)); |
| 3355 } | 3362 } |
| 3356 addAll(other) { | 3363 addAll(other) { |
| 3357 other.forEach(((key, value) => { | 3364 other.forEach(((key, value) => { |
| 3358 this.set(key, value); | 3365 this.set(key, value); |
| 3359 }).bind(this)); | 3366 }).bind(this)); |
| 3360 } | 3367 } |
| 3361 get(key) { | 3368 get(key) { |
| 3362 if (_isStringKey(key)) { | 3369 if (_HashMap[_isStringKey](key)) { |
| 3363 let strings = this[_strings]; | 3370 let strings = this[_strings]; |
| 3364 return dart.as(strings === null ? null : _getTableEntry(strings, key),
V); | 3371 return dart.as(strings === null ? null : _HashMap[_getTableEntry](stri
ngs, key), V); |
| 3365 } else if (_isNumericKey(key)) { | 3372 } else if (_HashMap[_isNumericKey](key)) { |
| 3366 let nums = this[_nums]; | 3373 let nums = this[_nums]; |
| 3367 return dart.as(nums === null ? null : _getTableEntry(nums, key), V); | 3374 return dart.as(nums === null ? null : _HashMap[_getTableEntry](nums, k
ey), V); |
| 3368 } else { | 3375 } else { |
| 3369 return this[_get](key); | 3376 return this[_get](key); |
| 3370 } | 3377 } |
| 3371 } | 3378 } |
| 3372 [_get](key) { | 3379 [_get](key) { |
| 3373 let rest = this[_rest]; | 3380 let rest = this[_rest]; |
| 3374 if (rest === null) | 3381 if (rest === null) |
| 3375 return null; | 3382 return null; |
| 3376 let bucket = this[_getBucket](rest, key); | 3383 let bucket = this[_getBucket](rest, key); |
| 3377 let index = this[_findBucketIndex](bucket, key); | 3384 let index = this[_findBucketIndex](bucket, key); |
| 3378 return dart.as(dart.notNull(index) < 0 ? null : bucket[dart.notNull(inde
x) + 1], V); | 3385 return dart.as(dart.notNull(index) < 0 ? null : bucket[dart.notNull(inde
x) + 1], V); |
| 3379 } | 3386 } |
| 3380 set(key, value) { | 3387 set(key, value) { |
| 3381 if (_isStringKey(key)) { | 3388 if (_HashMap[_isStringKey](key)) { |
| 3382 let strings = this[_strings]; | 3389 let strings = this[_strings]; |
| 3383 if (strings === null) | 3390 if (strings === null) |
| 3384 this[_strings] = strings = _newHashTable(); | 3391 this[_strings] = strings = _HashMap[_newHashTable](); |
| 3385 this[_addHashTableEntry](strings, key, value); | 3392 this[_addHashTableEntry](strings, key, value); |
| 3386 } else if (_isNumericKey(key)) { | 3393 } else if (_HashMap[_isNumericKey](key)) { |
| 3387 let nums = this[_nums]; | 3394 let nums = this[_nums]; |
| 3388 if (nums === null) | 3395 if (nums === null) |
| 3389 this[_nums] = nums = _newHashTable(); | 3396 this[_nums] = nums = _HashMap[_newHashTable](); |
| 3390 this[_addHashTableEntry](nums, key, value); | 3397 this[_addHashTableEntry](nums, key, value); |
| 3391 } else { | 3398 } else { |
| 3392 this[_set](key, value); | 3399 this[_set](key, value); |
| 3393 } | 3400 } |
| 3394 } | 3401 } |
| 3395 [_set](key, value) { | 3402 [_set](key, value) { |
| 3396 let rest = this[_rest]; | 3403 let rest = this[_rest]; |
| 3397 if (rest === null) | 3404 if (rest === null) |
| 3398 this[_rest] = rest = _newHashTable(); | 3405 this[_rest] = rest = _HashMap[_newHashTable](); |
| 3399 let hash = this[_computeHashCode](key); | 3406 let hash = this[_computeHashCode](key); |
| 3400 let bucket = rest[hash]; | 3407 let bucket = rest[hash]; |
| 3401 if (bucket === null) { | 3408 if (bucket === null) { |
| 3402 _setTableEntry(rest, hash, [key, value]); | 3409 _HashMap[_setTableEntry](rest, hash, [key, value]); |
| 3403 this[_length] = dart.notNull(this[_length]) + 1; | 3410 this[_length] = dart.notNull(this[_length]) + 1; |
| 3404 this[_keys] = null; | 3411 this[_keys] = null; |
| 3405 } else { | 3412 } else { |
| 3406 let index = this[_findBucketIndex](bucket, key); | 3413 let index = this[_findBucketIndex](bucket, key); |
| 3407 if (dart.notNull(index) >= 0) { | 3414 if (dart.notNull(index) >= 0) { |
| 3408 bucket[dart.notNull(index) + 1] = value; | 3415 bucket[dart.notNull(index) + 1] = value; |
| 3409 } else { | 3416 } else { |
| 3410 bucket.push(key, value); | 3417 bucket.push(key, value); |
| 3411 this[_length] = dart.notNull(this[_length]) + 1; | 3418 this[_length] = dart.notNull(this[_length]) + 1; |
| 3412 this[_keys] = null; | 3419 this[_keys] = null; |
| 3413 } | 3420 } |
| 3414 } | 3421 } |
| 3415 } | 3422 } |
| 3416 putIfAbsent(key, ifAbsent) { | 3423 putIfAbsent(key, ifAbsent) { |
| 3417 if (this.containsKey(key)) | 3424 if (this.containsKey(key)) |
| 3418 return this.get(key); | 3425 return this.get(key); |
| 3419 let value = ifAbsent(); | 3426 let value = ifAbsent(); |
| 3420 this.set(key, value); | 3427 this.set(key, value); |
| 3421 return value; | 3428 return value; |
| 3422 } | 3429 } |
| 3423 remove(key) { | 3430 remove(key) { |
| 3424 if (_isStringKey(key)) { | 3431 if (_HashMap[_isStringKey](key)) { |
| 3425 return this[_removeHashTableEntry](this[_strings], key); | 3432 return this[_removeHashTableEntry](this[_strings], key); |
| 3426 } else if (_isNumericKey(key)) { | 3433 } else if (_HashMap[_isNumericKey](key)) { |
| 3427 return this[_removeHashTableEntry](this[_nums], key); | 3434 return this[_removeHashTableEntry](this[_nums], key); |
| 3428 } else { | 3435 } else { |
| 3429 return this[_remove](key); | 3436 return this[_remove](key); |
| 3430 } | 3437 } |
| 3431 } | 3438 } |
| 3432 [_remove](key) { | 3439 [_remove](key) { |
| 3433 let rest = this[_rest]; | 3440 let rest = this[_rest]; |
| 3434 if (rest === null) | 3441 if (rest === null) |
| 3435 return null; | 3442 return null; |
| 3436 let bucket = this[_getBucket](rest, key); | 3443 let bucket = this[_getBucket](rest, key); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3494 let key = bucket[i]; | 3501 let key = bucket[i]; |
| 3495 result[index] = key; | 3502 result[index] = key; |
| 3496 index = dart.notNull(index) + 1; | 3503 index = dart.notNull(index) + 1; |
| 3497 } | 3504 } |
| 3498 } | 3505 } |
| 3499 } | 3506 } |
| 3500 dart.assert(index === this[_length]); | 3507 dart.assert(index === this[_length]); |
| 3501 return this[_keys] = result; | 3508 return this[_keys] = result; |
| 3502 } | 3509 } |
| 3503 [_addHashTableEntry](table, key, value) { | 3510 [_addHashTableEntry](table, key, value) { |
| 3504 if (!dart.notNull(_hasTableEntry(table, key))) { | 3511 if (!dart.notNull(_HashMap[_hasTableEntry](table, key))) { |
| 3505 this[_length] = dart.notNull(this[_length]) + 1; | 3512 this[_length] = dart.notNull(this[_length]) + 1; |
| 3506 this[_keys] = null; | 3513 this[_keys] = null; |
| 3507 } | 3514 } |
| 3508 _setTableEntry(table, key, value); | 3515 _HashMap[_setTableEntry](table, key, value); |
| 3509 } | 3516 } |
| 3510 [_removeHashTableEntry](table, key) { | 3517 [_removeHashTableEntry](table, key) { |
| 3511 if (dart.notNull(table !== null) && dart.notNull(_hasTableEntry(table, k
ey))) { | 3518 if (dart.notNull(table !== null) && dart.notNull(_HashMap[_hasTableEntry
](table, key))) { |
| 3512 let value = dart.as(_getTableEntry(table, key), V); | 3519 let value = dart.as(_HashMap[_getTableEntry](table, key), V); |
| 3513 _deleteTableEntry(table, key); | 3520 _HashMap[_deleteTableEntry](table, key); |
| 3514 this[_length] = dart.notNull(this[_length]) - 1; | 3521 this[_length] = dart.notNull(this[_length]) - 1; |
| 3515 this[_keys] = null; | 3522 this[_keys] = null; |
| 3516 return value; | 3523 return value; |
| 3517 } else { | 3524 } else { |
| 3518 return null; | 3525 return null; |
| 3519 } | 3526 } |
| 3520 } | 3527 } |
| 3521 static [_isStringKey$](key) { | 3528 static [_isStringKey](key) { |
| 3522 return dart.notNull(typeof key == string) && dart.notNull(!dart.equals(k
ey, '__proto__')); | 3529 return dart.notNull(typeof key == string) && dart.notNull(!dart.equals(k
ey, '__proto__')); |
| 3523 } | 3530 } |
| 3524 static [_isNumericKey$](key) { | 3531 static [_isNumericKey](key) { |
| 3525 return dart.notNull(dart.is(key, core.num)) && (key & 0x3ffffff) === key
; | 3532 return dart.notNull(dart.is(key, core.num)) && (key & 0x3ffffff) === key
; |
| 3526 } | 3533 } |
| 3527 [_computeHashCode](key) { | 3534 [_computeHashCode](key) { |
| 3528 return dart.dload(key, 'hashCode') & 0x3ffffff; | 3535 return dart.dload(key, 'hashCode') & 0x3ffffff; |
| 3529 } | 3536 } |
| 3530 static [_hasTableEntry$](table, key) { | 3537 static [_hasTableEntry](table, key) { |
| 3531 let entry = table[key]; | 3538 let entry = table[key]; |
| 3532 return entry !== null; | 3539 return entry !== null; |
| 3533 } | 3540 } |
| 3534 static [_getTableEntry$](table, key) { | 3541 static [_getTableEntry](table, key) { |
| 3535 let entry = table[key]; | 3542 let entry = table[key]; |
| 3536 return entry === table ? null : entry; | 3543 return entry === table ? null : entry; |
| 3537 } | 3544 } |
| 3538 static [_setTableEntry$](table, key, value) { | 3545 static [_setTableEntry](table, key, value) { |
| 3539 if (value === null) { | 3546 if (value === null) { |
| 3540 table[key] = table; | 3547 table[key] = table; |
| 3541 } else { | 3548 } else { |
| 3542 table[key] = value; | 3549 table[key] = value; |
| 3543 } | 3550 } |
| 3544 } | 3551 } |
| 3545 static [_deleteTableEntry$](table, key) { | 3552 static [_deleteTableEntry](table, key) { |
| 3546 delete table[key]; | 3553 delete table[key]; |
| 3547 } | 3554 } |
| 3548 [_getBucket](table, key) { | 3555 [_getBucket](table, key) { |
| 3549 let hash = this[_computeHashCode](key); | 3556 let hash = this[_computeHashCode](key); |
| 3550 return dart.as(table[hash], core.List); | 3557 return dart.as(table[hash], core.List); |
| 3551 } | 3558 } |
| 3552 [_findBucketIndex](bucket, key) { | 3559 [_findBucketIndex](bucket, key) { |
| 3553 if (bucket === null) | 3560 if (bucket === null) |
| 3554 return -1; | 3561 return -1; |
| 3555 let length = bucket.length; | 3562 let length = bucket.length; |
| 3556 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = 2) { | 3563 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = 2) { |
| 3557 if (dart.equals(bucket[i], key)) | 3564 if (dart.equals(bucket[i], key)) |
| 3558 return i; | 3565 return i; |
| 3559 } | 3566 } |
| 3560 return -1; | 3567 return -1; |
| 3561 } | 3568 } |
| 3562 static [_newHashTable$]() { | 3569 static [_newHashTable]() { |
| 3563 let table = Object.create(null); | 3570 let table = Object.create(null); |
| 3564 let temporaryKey = '<non-identifier-key>'; | 3571 let temporaryKey = '<non-identifier-key>'; |
| 3565 _setTableEntry(table, temporaryKey, table); | 3572 _HashMap[_setTableEntry](table, temporaryKey, table); |
| 3566 _deleteTableEntry(table, temporaryKey); | 3573 _HashMap[_deleteTableEntry](table, temporaryKey); |
| 3567 return table; | 3574 return table; |
| 3568 } | 3575 } |
| 3569 } | 3576 } |
| 3570 return _HashMap; | 3577 return _HashMap; |
| 3571 }); | 3578 }); |
| 3572 let _HashMap = _HashMap$(dart.dynamic, dart.dynamic); | 3579 let _HashMap = _HashMap$(dart.dynamic, dart.dynamic); |
| 3573 let _IdentityHashMap$ = dart.generic(function(K, V) { | 3580 let _IdentityHashMap$ = dart.generic(function(K, V) { |
| 3574 class _IdentityHashMap extends _HashMap$(K, V) { | 3581 class _IdentityHashMap extends _HashMap$(K, V) { |
| 3575 [_computeHashCode](key) { | 3582 [_computeHashCode](key) { |
| 3576 return core.identityHashCode(key) & 0x3ffffff; | 3583 return core.identityHashCode(key) & 0x3ffffff; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3724 get isNotEmpty() { | 3731 get isNotEmpty() { |
| 3725 return !dart.notNull(this.isEmpty); | 3732 return !dart.notNull(this.isEmpty); |
| 3726 } | 3733 } |
| 3727 get keys() { | 3734 get keys() { |
| 3728 return new LinkedHashMapKeyIterable(this); | 3735 return new LinkedHashMapKeyIterable(this); |
| 3729 } | 3736 } |
| 3730 get values() { | 3737 get values() { |
| 3731 return new _internal.MappedIterable(this.keys, dart.closureWrap(((each)
=> this.get(each)).bind(this), "(K) → V")); | 3738 return new _internal.MappedIterable(this.keys, dart.closureWrap(((each)
=> this.get(each)).bind(this), "(K) → V")); |
| 3732 } | 3739 } |
| 3733 containsKey(key) { | 3740 containsKey(key) { |
| 3734 if (_isStringKey(key)) { | 3741 if (_LinkedHashMap[_isStringKey](key)) { |
| 3735 let strings = this[_strings]; | 3742 let strings = this[_strings]; |
| 3736 if (strings === null) | 3743 if (strings === null) |
| 3737 return false; | 3744 return false; |
| 3738 let cell = dart.as(_getTableEntry(strings, key), LinkedHashMapCell); | 3745 let cell = dart.as(_LinkedHashMap[_getTableEntry](strings, key), Linke
dHashMapCell); |
| 3739 return cell !== null; | 3746 return cell !== null; |
| 3740 } else if (_isNumericKey(key)) { | 3747 } else if (_LinkedHashMap[_isNumericKey](key)) { |
| 3741 let nums = this[_nums]; | 3748 let nums = this[_nums]; |
| 3742 if (nums === null) | 3749 if (nums === null) |
| 3743 return false; | 3750 return false; |
| 3744 let cell = dart.as(_getTableEntry(nums, key), LinkedHashMapCell); | 3751 let cell = dart.as(_LinkedHashMap[_getTableEntry](nums, key), LinkedHa
shMapCell); |
| 3745 return cell !== null; | 3752 return cell !== null; |
| 3746 } else { | 3753 } else { |
| 3747 return this[_containsKey](key); | 3754 return this[_containsKey](key); |
| 3748 } | 3755 } |
| 3749 } | 3756 } |
| 3750 [_containsKey](key) { | 3757 [_containsKey](key) { |
| 3751 let rest = this[_rest]; | 3758 let rest = this[_rest]; |
| 3752 if (rest === null) | 3759 if (rest === null) |
| 3753 return false; | 3760 return false; |
| 3754 let bucket = this[_getBucket](rest, key); | 3761 let bucket = this[_getBucket](rest, key); |
| 3755 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; | 3762 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; |
| 3756 } | 3763 } |
| 3757 containsValue(value) { | 3764 containsValue(value) { |
| 3758 return this.keys.any(dart.closureWrap(((each) => dart.equals(this.get(ea
ch), value)).bind(this), "(K) → bool")); | 3765 return this.keys.any(dart.closureWrap(((each) => dart.equals(this.get(ea
ch), value)).bind(this), "(K) → bool")); |
| 3759 } | 3766 } |
| 3760 addAll(other) { | 3767 addAll(other) { |
| 3761 other.forEach(((key, value) => { | 3768 other.forEach(((key, value) => { |
| 3762 this.set(key, value); | 3769 this.set(key, value); |
| 3763 }).bind(this)); | 3770 }).bind(this)); |
| 3764 } | 3771 } |
| 3765 get(key) { | 3772 get(key) { |
| 3766 if (_isStringKey(key)) { | 3773 if (_LinkedHashMap[_isStringKey](key)) { |
| 3767 let strings = this[_strings]; | 3774 let strings = this[_strings]; |
| 3768 if (strings === null) | 3775 if (strings === null) |
| 3769 return null; | 3776 return null; |
| 3770 let cell = dart.as(_getTableEntry(strings, key), LinkedHashMapCell); | 3777 let cell = dart.as(_LinkedHashMap[_getTableEntry](strings, key), Linke
dHashMapCell); |
| 3771 return dart.as(cell === null ? null : cell[_value], V); | 3778 return dart.as(cell === null ? null : cell[_value], V); |
| 3772 } else if (_isNumericKey(key)) { | 3779 } else if (_LinkedHashMap[_isNumericKey](key)) { |
| 3773 let nums = this[_nums]; | 3780 let nums = this[_nums]; |
| 3774 if (nums === null) | 3781 if (nums === null) |
| 3775 return null; | 3782 return null; |
| 3776 let cell = dart.as(_getTableEntry(nums, key), LinkedHashMapCell); | 3783 let cell = dart.as(_LinkedHashMap[_getTableEntry](nums, key), LinkedHa
shMapCell); |
| 3777 return dart.as(cell === null ? null : cell[_value], V); | 3784 return dart.as(cell === null ? null : cell[_value], V); |
| 3778 } else { | 3785 } else { |
| 3779 return this[_get](key); | 3786 return this[_get](key); |
| 3780 } | 3787 } |
| 3781 } | 3788 } |
| 3782 [_get](key) { | 3789 [_get](key) { |
| 3783 let rest = this[_rest]; | 3790 let rest = this[_rest]; |
| 3784 if (rest === null) | 3791 if (rest === null) |
| 3785 return null; | 3792 return null; |
| 3786 let bucket = this[_getBucket](rest, key); | 3793 let bucket = this[_getBucket](rest, key); |
| 3787 let index = this[_findBucketIndex](bucket, key); | 3794 let index = this[_findBucketIndex](bucket, key); |
| 3788 if (dart.notNull(index) < 0) | 3795 if (dart.notNull(index) < 0) |
| 3789 return null; | 3796 return null; |
| 3790 let cell = dart.as(bucket[index], LinkedHashMapCell); | 3797 let cell = dart.as(bucket[index], LinkedHashMapCell); |
| 3791 return dart.as(cell[_value], V); | 3798 return dart.as(cell[_value], V); |
| 3792 } | 3799 } |
| 3793 set(key, value) { | 3800 set(key, value) { |
| 3794 if (_isStringKey(key)) { | 3801 if (_LinkedHashMap[_isStringKey](key)) { |
| 3795 let strings = this[_strings]; | 3802 let strings = this[_strings]; |
| 3796 if (strings === null) | 3803 if (strings === null) |
| 3797 this[_strings] = strings = _newHashTable(); | 3804 this[_strings] = strings = _LinkedHashMap[_newHashTable](); |
| 3798 this[_addHashTableEntry](strings, key, value); | 3805 this[_addHashTableEntry](strings, key, value); |
| 3799 } else if (_isNumericKey(key)) { | 3806 } else if (_LinkedHashMap[_isNumericKey](key)) { |
| 3800 let nums = this[_nums]; | 3807 let nums = this[_nums]; |
| 3801 if (nums === null) | 3808 if (nums === null) |
| 3802 this[_nums] = nums = _newHashTable(); | 3809 this[_nums] = nums = _LinkedHashMap[_newHashTable](); |
| 3803 this[_addHashTableEntry](nums, key, value); | 3810 this[_addHashTableEntry](nums, key, value); |
| 3804 } else { | 3811 } else { |
| 3805 this[_set](key, value); | 3812 this[_set](key, value); |
| 3806 } | 3813 } |
| 3807 } | 3814 } |
| 3808 [_set](key, value) { | 3815 [_set](key, value) { |
| 3809 let rest = this[_rest]; | 3816 let rest = this[_rest]; |
| 3810 if (rest === null) | 3817 if (rest === null) |
| 3811 this[_rest] = rest = _newHashTable(); | 3818 this[_rest] = rest = _LinkedHashMap[_newHashTable](); |
| 3812 let hash = this[_computeHashCode](key); | 3819 let hash = this[_computeHashCode](key); |
| 3813 let bucket = rest[hash]; | 3820 let bucket = rest[hash]; |
| 3814 if (bucket === null) { | 3821 if (bucket === null) { |
| 3815 let cell = this[_newLinkedCell](key, value); | 3822 let cell = this[_newLinkedCell](key, value); |
| 3816 _setTableEntry(rest, hash, [cell]); | 3823 _LinkedHashMap[_setTableEntry](rest, hash, [cell]); |
| 3817 } else { | 3824 } else { |
| 3818 let index = this[_findBucketIndex](bucket, key); | 3825 let index = this[_findBucketIndex](bucket, key); |
| 3819 if (dart.notNull(index) >= 0) { | 3826 if (dart.notNull(index) >= 0) { |
| 3820 let cell = dart.as(bucket[index], LinkedHashMapCell); | 3827 let cell = dart.as(bucket[index], LinkedHashMapCell); |
| 3821 cell[_value] = value; | 3828 cell[_value] = value; |
| 3822 } else { | 3829 } else { |
| 3823 let cell = this[_newLinkedCell](key, value); | 3830 let cell = this[_newLinkedCell](key, value); |
| 3824 bucket.push(cell); | 3831 bucket.push(cell); |
| 3825 } | 3832 } |
| 3826 } | 3833 } |
| 3827 } | 3834 } |
| 3828 putIfAbsent(key, ifAbsent) { | 3835 putIfAbsent(key, ifAbsent) { |
| 3829 if (this.containsKey(key)) | 3836 if (this.containsKey(key)) |
| 3830 return this.get(key); | 3837 return this.get(key); |
| 3831 let value = ifAbsent(); | 3838 let value = ifAbsent(); |
| 3832 this.set(key, value); | 3839 this.set(key, value); |
| 3833 return value; | 3840 return value; |
| 3834 } | 3841 } |
| 3835 remove(key) { | 3842 remove(key) { |
| 3836 if (_isStringKey(key)) { | 3843 if (_LinkedHashMap[_isStringKey](key)) { |
| 3837 return this[_removeHashTableEntry](this[_strings], key); | 3844 return this[_removeHashTableEntry](this[_strings], key); |
| 3838 } else if (_isNumericKey(key)) { | 3845 } else if (_LinkedHashMap[_isNumericKey](key)) { |
| 3839 return this[_removeHashTableEntry](this[_nums], key); | 3846 return this[_removeHashTableEntry](this[_nums], key); |
| 3840 } else { | 3847 } else { |
| 3841 return this[_remove](key); | 3848 return this[_remove](key); |
| 3842 } | 3849 } |
| 3843 } | 3850 } |
| 3844 [_remove](key) { | 3851 [_remove](key) { |
| 3845 let rest = this[_rest]; | 3852 let rest = this[_rest]; |
| 3846 if (rest === null) | 3853 if (rest === null) |
| 3847 return null; | 3854 return null; |
| 3848 let bucket = this[_getBucket](rest, key); | 3855 let bucket = this[_getBucket](rest, key); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 3865 let modifications = this[_modifications]; | 3872 let modifications = this[_modifications]; |
| 3866 while (cell !== null) { | 3873 while (cell !== null) { |
| 3867 action(dart.as(cell[_key], K), dart.as(cell[_value], V)); | 3874 action(dart.as(cell[_key], K), dart.as(cell[_value], V)); |
| 3868 if (modifications !== this[_modifications]) { | 3875 if (modifications !== this[_modifications]) { |
| 3869 throw new core.ConcurrentModificationError(this); | 3876 throw new core.ConcurrentModificationError(this); |
| 3870 } | 3877 } |
| 3871 cell = cell[_next]; | 3878 cell = cell[_next]; |
| 3872 } | 3879 } |
| 3873 } | 3880 } |
| 3874 [_addHashTableEntry](table, key, value) { | 3881 [_addHashTableEntry](table, key, value) { |
| 3875 let cell = dart.as(_getTableEntry(table, key), LinkedHashMapCell); | 3882 let cell = dart.as(_LinkedHashMap[_getTableEntry](table, key), LinkedHas
hMapCell); |
| 3876 if (cell === null) { | 3883 if (cell === null) { |
| 3877 _setTableEntry(table, key, this[_newLinkedCell](key, value)); | 3884 _LinkedHashMap[_setTableEntry](table, key, this[_newLinkedCell](key, v
alue)); |
| 3878 } else { | 3885 } else { |
| 3879 cell[_value] = value; | 3886 cell[_value] = value; |
| 3880 } | 3887 } |
| 3881 } | 3888 } |
| 3882 [_removeHashTableEntry](table, key) { | 3889 [_removeHashTableEntry](table, key) { |
| 3883 if (table === null) | 3890 if (table === null) |
| 3884 return null; | 3891 return null; |
| 3885 let cell = dart.as(_getTableEntry(table, key), LinkedHashMapCell); | 3892 let cell = dart.as(_LinkedHashMap[_getTableEntry](table, key), LinkedHas
hMapCell); |
| 3886 if (cell === null) | 3893 if (cell === null) |
| 3887 return null; | 3894 return null; |
| 3888 this[_unlinkCell](cell); | 3895 this[_unlinkCell](cell); |
| 3889 _deleteTableEntry(table, key); | 3896 _LinkedHashMap[_deleteTableEntry](table, key); |
| 3890 return dart.as(cell[_value], V); | 3897 return dart.as(cell[_value], V); |
| 3891 } | 3898 } |
| 3892 [_modified]() { | 3899 [_modified]() { |
| 3893 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863
; | 3900 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863
; |
| 3894 } | 3901 } |
| 3895 [_newLinkedCell](key, value) { | 3902 [_newLinkedCell](key, value) { |
| 3896 let cell = new LinkedHashMapCell(key, value); | 3903 let cell = new LinkedHashMapCell(key, value); |
| 3897 if (this[_first] === null) { | 3904 if (this[_first] === null) { |
| 3898 this[_first] = this[_last] = cell; | 3905 this[_first] = this[_last] = cell; |
| 3899 } else { | 3906 } else { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 3916 } | 3923 } |
| 3917 if (next === null) { | 3924 if (next === null) { |
| 3918 dart.assert(dart.equals(cell, this[_last])); | 3925 dart.assert(dart.equals(cell, this[_last])); |
| 3919 this[_last] = previous; | 3926 this[_last] = previous; |
| 3920 } else { | 3927 } else { |
| 3921 next[_previous] = previous; | 3928 next[_previous] = previous; |
| 3922 } | 3929 } |
| 3923 this[_length] = dart.notNull(this[_length]) - 1; | 3930 this[_length] = dart.notNull(this[_length]) - 1; |
| 3924 this[_modified](); | 3931 this[_modified](); |
| 3925 } | 3932 } |
| 3926 static [_isStringKey$](key) { | 3933 static [_isStringKey](key) { |
| 3927 return dart.notNull(typeof key == string) && dart.notNull(!dart.equals(k
ey, '__proto__')); | 3934 return dart.notNull(typeof key == string) && dart.notNull(!dart.equals(k
ey, '__proto__')); |
| 3928 } | 3935 } |
| 3929 static [_isNumericKey$](key) { | 3936 static [_isNumericKey](key) { |
| 3930 return dart.notNull(dart.is(key, core.num)) && (key & 0x3ffffff) === key
; | 3937 return dart.notNull(dart.is(key, core.num)) && (key & 0x3ffffff) === key
; |
| 3931 } | 3938 } |
| 3932 [_computeHashCode](key) { | 3939 [_computeHashCode](key) { |
| 3933 return dart.dload(key, 'hashCode') & 0x3ffffff; | 3940 return dart.dload(key, 'hashCode') & 0x3ffffff; |
| 3934 } | 3941 } |
| 3935 static [_getTableEntry$](table, key) { | 3942 static [_getTableEntry](table, key) { |
| 3936 return table[key]; | 3943 return table[key]; |
| 3937 } | 3944 } |
| 3938 static [_setTableEntry$](table, key, value) { | 3945 static [_setTableEntry](table, key, value) { |
| 3939 dart.assert(value !== null); | 3946 dart.assert(value !== null); |
| 3940 table[key] = value; | 3947 table[key] = value; |
| 3941 } | 3948 } |
| 3942 static [_deleteTableEntry$](table, key) { | 3949 static [_deleteTableEntry](table, key) { |
| 3943 delete table[key]; | 3950 delete table[key]; |
| 3944 } | 3951 } |
| 3945 [_getBucket](table, key) { | 3952 [_getBucket](table, key) { |
| 3946 let hash = this[_computeHashCode](key); | 3953 let hash = this[_computeHashCode](key); |
| 3947 return dart.as(table[hash], core.List); | 3954 return dart.as(table[hash], core.List); |
| 3948 } | 3955 } |
| 3949 [_findBucketIndex](bucket, key) { | 3956 [_findBucketIndex](bucket, key) { |
| 3950 if (bucket === null) | 3957 if (bucket === null) |
| 3951 return -1; | 3958 return -1; |
| 3952 let length = bucket.length; | 3959 let length = bucket.length; |
| 3953 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 3960 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 3954 let cell = dart.as(bucket[i], LinkedHashMapCell); | 3961 let cell = dart.as(bucket[i], LinkedHashMapCell); |
| 3955 if (dart.equals(cell[_key], key)) | 3962 if (dart.equals(cell[_key], key)) |
| 3956 return i; | 3963 return i; |
| 3957 } | 3964 } |
| 3958 return -1; | 3965 return -1; |
| 3959 } | 3966 } |
| 3960 static [_newHashTable$]() { | 3967 static [_newHashTable]() { |
| 3961 let table = Object.create(null); | 3968 let table = Object.create(null); |
| 3962 let temporaryKey = '<non-identifier-key>'; | 3969 let temporaryKey = '<non-identifier-key>'; |
| 3963 _setTableEntry(table, temporaryKey, table); | 3970 _LinkedHashMap[_setTableEntry](table, temporaryKey, table); |
| 3964 _deleteTableEntry(table, temporaryKey); | 3971 _LinkedHashMap[_deleteTableEntry](table, temporaryKey); |
| 3965 return table; | 3972 return table; |
| 3966 } | 3973 } |
| 3967 toString() { | 3974 toString() { |
| 3968 return Maps.mapToString(this); | 3975 return Maps.mapToString(this); |
| 3969 } | 3976 } |
| 3970 } | 3977 } |
| 3971 return _LinkedHashMap; | 3978 return _LinkedHashMap; |
| 3972 }); | 3979 }); |
| 3973 let _LinkedHashMap = _LinkedHashMap$(dart.dynamic, dart.dynamic); | 3980 let _LinkedHashMap = _LinkedHashMap$(dart.dynamic, dart.dynamic); |
| 3974 let _LinkedIdentityHashMap$ = dart.generic(function(K, V) { | 3981 let _LinkedIdentityHashMap$ = dart.generic(function(K, V) { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4100 this[_cell] = this[_cell][_next]; | 4107 this[_cell] = this[_cell][_next]; |
| 4101 return true; | 4108 return true; |
| 4102 } | 4109 } |
| 4103 } | 4110 } |
| 4104 } | 4111 } |
| 4105 return LinkedHashMapKeyIterator; | 4112 return LinkedHashMapKeyIterator; |
| 4106 }); | 4113 }); |
| 4107 let LinkedHashMapKeyIterator = LinkedHashMapKeyIterator$(dart.dynamic); | 4114 let LinkedHashMapKeyIterator = LinkedHashMapKeyIterator$(dart.dynamic); |
| 4108 let _elements = Symbol('_elements'); | 4115 let _elements = Symbol('_elements'); |
| 4109 let _computeElements = Symbol('_computeElements'); | 4116 let _computeElements = Symbol('_computeElements'); |
| 4117 let _isStringElement = Symbol('_isStringElement'); |
| 4118 let _isNumericElement = Symbol('_isNumericElement'); |
| 4110 let _contains = Symbol('_contains'); | 4119 let _contains = Symbol('_contains'); |
| 4111 let _lookup = Symbol('_lookup'); | 4120 let _lookup = Symbol('_lookup'); |
| 4112 let _isStringElement$ = Symbol('_isStringElement'); | |
| 4113 let _isNumericElement$ = Symbol('_isNumericElement'); | |
| 4114 let _HashSet$ = dart.generic(function(E) { | 4121 let _HashSet$ = dart.generic(function(E) { |
| 4115 class _HashSet extends _HashSetBase$(E) { | 4122 class _HashSet extends _HashSetBase$(E) { |
| 4116 _HashSet() { | 4123 _HashSet() { |
| 4117 this[_length] = 0; | 4124 this[_length] = 0; |
| 4118 this[_strings] = null; | 4125 this[_strings] = null; |
| 4119 this[_nums] = null; | 4126 this[_nums] = null; |
| 4120 this[_rest] = null; | 4127 this[_rest] = null; |
| 4121 this[_elements] = null; | 4128 this[_elements] = null; |
| 4122 super._HashSetBase(); | 4129 super._HashSetBase(); |
| 4123 } | 4130 } |
| 4124 [_newSet]() { | 4131 [_newSet]() { |
| 4125 return new _HashSet(); | 4132 return new _HashSet(); |
| 4126 } | 4133 } |
| 4127 get iterator() { | 4134 get iterator() { |
| 4128 return new HashSetIterator(this, this[_computeElements]()); | 4135 return new HashSetIterator(this, this[_computeElements]()); |
| 4129 } | 4136 } |
| 4130 get length() { | 4137 get length() { |
| 4131 return this[_length]; | 4138 return this[_length]; |
| 4132 } | 4139 } |
| 4133 get isEmpty() { | 4140 get isEmpty() { |
| 4134 return this[_length] === 0; | 4141 return this[_length] === 0; |
| 4135 } | 4142 } |
| 4136 get isNotEmpty() { | 4143 get isNotEmpty() { |
| 4137 return !dart.notNull(this.isEmpty); | 4144 return !dart.notNull(this.isEmpty); |
| 4138 } | 4145 } |
| 4139 contains(object) { | 4146 contains(object) { |
| 4140 if (_isStringElement(object)) { | 4147 if (_HashSet[_isStringElement](object)) { |
| 4141 let strings = this[_strings]; | 4148 let strings = this[_strings]; |
| 4142 return strings === null ? false : _hasTableEntry(strings, object); | 4149 return strings === null ? false : _HashSet[_hasTableEntry](strings, ob
ject); |
| 4143 } else if (_isNumericElement(object)) { | 4150 } else if (_HashSet[_isNumericElement](object)) { |
| 4144 let nums = this[_nums]; | 4151 let nums = this[_nums]; |
| 4145 return nums === null ? false : _hasTableEntry(nums, object); | 4152 return nums === null ? false : _HashSet[_hasTableEntry](nums, object); |
| 4146 } else { | 4153 } else { |
| 4147 return this[_contains](object); | 4154 return this[_contains](object); |
| 4148 } | 4155 } |
| 4149 } | 4156 } |
| 4150 [_contains](object) { | 4157 [_contains](object) { |
| 4151 let rest = this[_rest]; | 4158 let rest = this[_rest]; |
| 4152 if (rest === null) | 4159 if (rest === null) |
| 4153 return false; | 4160 return false; |
| 4154 let bucket = this[_getBucket](rest, object); | 4161 let bucket = this[_getBucket](rest, object); |
| 4155 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; | 4162 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; |
| 4156 } | 4163 } |
| 4157 lookup(object) { | 4164 lookup(object) { |
| 4158 if (dart.notNull(_isStringElement(object)) || dart.notNull(_isNumericEle
ment(object))) { | 4165 if (dart.notNull(_HashSet[_isStringElement](object)) || dart.notNull(_Ha
shSet[_isNumericElement](object))) { |
| 4159 return dart.as(this.contains(object) ? object : null, E); | 4166 return dart.as(this.contains(object) ? object : null, E); |
| 4160 } | 4167 } |
| 4161 return this[_lookup](object); | 4168 return this[_lookup](object); |
| 4162 } | 4169 } |
| 4163 [_lookup](object) { | 4170 [_lookup](object) { |
| 4164 let rest = this[_rest]; | 4171 let rest = this[_rest]; |
| 4165 if (rest === null) | 4172 if (rest === null) |
| 4166 return null; | 4173 return null; |
| 4167 let bucket = this[_getBucket](rest, object); | 4174 let bucket = this[_getBucket](rest, object); |
| 4168 let index = this[_findBucketIndex](bucket, object); | 4175 let index = this[_findBucketIndex](bucket, object); |
| 4169 if (dart.notNull(index) < 0) | 4176 if (dart.notNull(index) < 0) |
| 4170 return null; | 4177 return null; |
| 4171 return dart.as(bucket.get(index), E); | 4178 return dart.as(bucket.get(index), E); |
| 4172 } | 4179 } |
| 4173 add(element) { | 4180 add(element) { |
| 4174 if (_isStringElement(element)) { | 4181 if (_HashSet[_isStringElement](element)) { |
| 4175 let strings = this[_strings]; | 4182 let strings = this[_strings]; |
| 4176 if (strings === null) | 4183 if (strings === null) |
| 4177 this[_strings] = strings = _newHashTable(); | 4184 this[_strings] = strings = _HashSet[_newHashTable](); |
| 4178 return this[_addHashTableEntry](strings, element); | 4185 return this[_addHashTableEntry](strings, element); |
| 4179 } else if (_isNumericElement(element)) { | 4186 } else if (_HashSet[_isNumericElement](element)) { |
| 4180 let nums = this[_nums]; | 4187 let nums = this[_nums]; |
| 4181 if (nums === null) | 4188 if (nums === null) |
| 4182 this[_nums] = nums = _newHashTable(); | 4189 this[_nums] = nums = _HashSet[_newHashTable](); |
| 4183 return this[_addHashTableEntry](nums, element); | 4190 return this[_addHashTableEntry](nums, element); |
| 4184 } else { | 4191 } else { |
| 4185 return this[_add](element); | 4192 return this[_add](element); |
| 4186 } | 4193 } |
| 4187 } | 4194 } |
| 4188 [_add](element) { | 4195 [_add](element) { |
| 4189 let rest = this[_rest]; | 4196 let rest = this[_rest]; |
| 4190 if (rest === null) | 4197 if (rest === null) |
| 4191 this[_rest] = rest = _newHashTable(); | 4198 this[_rest] = rest = _HashSet[_newHashTable](); |
| 4192 let hash = this[_computeHashCode](element); | 4199 let hash = this[_computeHashCode](element); |
| 4193 let bucket = rest[hash]; | 4200 let bucket = rest[hash]; |
| 4194 if (bucket === null) { | 4201 if (bucket === null) { |
| 4195 _setTableEntry(rest, hash, [element]); | 4202 _HashSet[_setTableEntry](rest, hash, [element]); |
| 4196 } else { | 4203 } else { |
| 4197 let index = this[_findBucketIndex](bucket, element); | 4204 let index = this[_findBucketIndex](bucket, element); |
| 4198 if (dart.notNull(index) >= 0) | 4205 if (dart.notNull(index) >= 0) |
| 4199 return false; | 4206 return false; |
| 4200 bucket.push(element); | 4207 bucket.push(element); |
| 4201 } | 4208 } |
| 4202 this[_length] = dart.notNull(this[_length]) + 1; | 4209 this[_length] = dart.notNull(this[_length]) + 1; |
| 4203 this[_elements] = null; | 4210 this[_elements] = null; |
| 4204 return true; | 4211 return true; |
| 4205 } | 4212 } |
| 4206 addAll(objects) { | 4213 addAll(objects) { |
| 4207 for (let each of objects) { | 4214 for (let each of objects) { |
| 4208 this.add(each); | 4215 this.add(each); |
| 4209 } | 4216 } |
| 4210 } | 4217 } |
| 4211 remove(object) { | 4218 remove(object) { |
| 4212 if (_isStringElement(object)) { | 4219 if (_HashSet[_isStringElement](object)) { |
| 4213 return this[_removeHashTableEntry](this[_strings], object); | 4220 return this[_removeHashTableEntry](this[_strings], object); |
| 4214 } else if (_isNumericElement(object)) { | 4221 } else if (_HashSet[_isNumericElement](object)) { |
| 4215 return this[_removeHashTableEntry](this[_nums], object); | 4222 return this[_removeHashTableEntry](this[_nums], object); |
| 4216 } else { | 4223 } else { |
| 4217 return this[_remove](object); | 4224 return this[_remove](object); |
| 4218 } | 4225 } |
| 4219 } | 4226 } |
| 4220 [_remove](object) { | 4227 [_remove](object) { |
| 4221 let rest = this[_rest]; | 4228 let rest = this[_rest]; |
| 4222 if (rest === null) | 4229 if (rest === null) |
| 4223 return false; | 4230 return false; |
| 4224 let bucket = this[_getBucket](rest, object); | 4231 let bucket = this[_getBucket](rest, object); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4272 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.not
Null(i) + 1) { | 4279 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.not
Null(i) + 1) { |
| 4273 result[index] = bucket[i]; | 4280 result[index] = bucket[i]; |
| 4274 index = dart.notNull(index) + 1; | 4281 index = dart.notNull(index) + 1; |
| 4275 } | 4282 } |
| 4276 } | 4283 } |
| 4277 } | 4284 } |
| 4278 dart.assert(index === this[_length]); | 4285 dart.assert(index === this[_length]); |
| 4279 return this[_elements] = result; | 4286 return this[_elements] = result; |
| 4280 } | 4287 } |
| 4281 [_addHashTableEntry](table, element) { | 4288 [_addHashTableEntry](table, element) { |
| 4282 if (_hasTableEntry(table, element)) | 4289 if (_HashSet[_hasTableEntry](table, element)) |
| 4283 return false; | 4290 return false; |
| 4284 _setTableEntry(table, element, 0); | 4291 _HashSet[_setTableEntry](table, element, 0); |
| 4285 this[_length] = dart.notNull(this[_length]) + 1; | 4292 this[_length] = dart.notNull(this[_length]) + 1; |
| 4286 this[_elements] = null; | 4293 this[_elements] = null; |
| 4287 return true; | 4294 return true; |
| 4288 } | 4295 } |
| 4289 [_removeHashTableEntry](table, element) { | 4296 [_removeHashTableEntry](table, element) { |
| 4290 if (dart.notNull(table !== null) && dart.notNull(_hasTableEntry(table, e
lement))) { | 4297 if (dart.notNull(table !== null) && dart.notNull(_HashSet[_hasTableEntry
](table, element))) { |
| 4291 _deleteTableEntry(table, element); | 4298 _HashSet[_deleteTableEntry](table, element); |
| 4292 this[_length] = dart.notNull(this[_length]) - 1; | 4299 this[_length] = dart.notNull(this[_length]) - 1; |
| 4293 this[_elements] = null; | 4300 this[_elements] = null; |
| 4294 return true; | 4301 return true; |
| 4295 } else { | 4302 } else { |
| 4296 return false; | 4303 return false; |
| 4297 } | 4304 } |
| 4298 } | 4305 } |
| 4299 static [_isStringElement$](element) { | 4306 static [_isStringElement](element) { |
| 4300 return dart.notNull(typeof element == string) && dart.notNull(!dart.equa
ls(element, '__proto__')); | 4307 return dart.notNull(typeof element == string) && dart.notNull(!dart.equa
ls(element, '__proto__')); |
| 4301 } | 4308 } |
| 4302 static [_isNumericElement$](element) { | 4309 static [_isNumericElement](element) { |
| 4303 return dart.notNull(dart.is(element, core.num)) && (element & 0x3ffffff)
=== element; | 4310 return dart.notNull(dart.is(element, core.num)) && (element & 0x3ffffff)
=== element; |
| 4304 } | 4311 } |
| 4305 [_computeHashCode](element) { | 4312 [_computeHashCode](element) { |
| 4306 return dart.dload(element, 'hashCode') & 0x3ffffff; | 4313 return dart.dload(element, 'hashCode') & 0x3ffffff; |
| 4307 } | 4314 } |
| 4308 static [_hasTableEntry$](table, key) { | 4315 static [_hasTableEntry](table, key) { |
| 4309 let entry = table[key]; | 4316 let entry = table[key]; |
| 4310 return entry !== null; | 4317 return entry !== null; |
| 4311 } | 4318 } |
| 4312 static [_setTableEntry$](table, key, value) { | 4319 static [_setTableEntry](table, key, value) { |
| 4313 dart.assert(value !== null); | 4320 dart.assert(value !== null); |
| 4314 table[key] = value; | 4321 table[key] = value; |
| 4315 } | 4322 } |
| 4316 static [_deleteTableEntry$](table, key) { | 4323 static [_deleteTableEntry](table, key) { |
| 4317 delete table[key]; | 4324 delete table[key]; |
| 4318 } | 4325 } |
| 4319 [_getBucket](table, element) { | 4326 [_getBucket](table, element) { |
| 4320 let hash = this[_computeHashCode](element); | 4327 let hash = this[_computeHashCode](element); |
| 4321 return dart.as(table[hash], core.List); | 4328 return dart.as(table[hash], core.List); |
| 4322 } | 4329 } |
| 4323 [_findBucketIndex](bucket, element) { | 4330 [_findBucketIndex](bucket, element) { |
| 4324 if (bucket === null) | 4331 if (bucket === null) |
| 4325 return -1; | 4332 return -1; |
| 4326 let length = bucket.length; | 4333 let length = bucket.length; |
| 4327 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 4334 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 4328 if (dart.equals(bucket[i], element)) | 4335 if (dart.equals(bucket[i], element)) |
| 4329 return i; | 4336 return i; |
| 4330 } | 4337 } |
| 4331 return -1; | 4338 return -1; |
| 4332 } | 4339 } |
| 4333 static [_newHashTable$]() { | 4340 static [_newHashTable]() { |
| 4334 let table = Object.create(null); | 4341 let table = Object.create(null); |
| 4335 let temporaryKey = '<non-identifier-key>'; | 4342 let temporaryKey = '<non-identifier-key>'; |
| 4336 _setTableEntry(table, temporaryKey, table); | 4343 _HashSet[_setTableEntry](table, temporaryKey, table); |
| 4337 _deleteTableEntry(table, temporaryKey); | 4344 _HashSet[_deleteTableEntry](table, temporaryKey); |
| 4338 return table; | 4345 return table; |
| 4339 } | 4346 } |
| 4340 } | 4347 } |
| 4341 return _HashSet; | 4348 return _HashSet; |
| 4342 }); | 4349 }); |
| 4343 let _HashSet = _HashSet$(dart.dynamic); | 4350 let _HashSet = _HashSet$(dart.dynamic); |
| 4344 let _IdentityHashSet$ = dart.generic(function(E) { | 4351 let _IdentityHashSet$ = dart.generic(function(E) { |
| 4345 class _IdentityHashSet extends _HashSet$(E) { | 4352 class _IdentityHashSet extends _HashSet$(E) { |
| 4346 [_newSet]() { | 4353 [_newSet]() { |
| 4347 return new _IdentityHashSet(); | 4354 return new _IdentityHashSet(); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4465 get length() { | 4472 get length() { |
| 4466 return this[_length]; | 4473 return this[_length]; |
| 4467 } | 4474 } |
| 4468 get isEmpty() { | 4475 get isEmpty() { |
| 4469 return this[_length] === 0; | 4476 return this[_length] === 0; |
| 4470 } | 4477 } |
| 4471 get isNotEmpty() { | 4478 get isNotEmpty() { |
| 4472 return !dart.notNull(this.isEmpty); | 4479 return !dart.notNull(this.isEmpty); |
| 4473 } | 4480 } |
| 4474 contains(object) { | 4481 contains(object) { |
| 4475 if (_isStringElement(object)) { | 4482 if (_LinkedHashSet[_isStringElement](object)) { |
| 4476 let strings = this[_strings]; | 4483 let strings = this[_strings]; |
| 4477 if (strings === null) | 4484 if (strings === null) |
| 4478 return false; | 4485 return false; |
| 4479 let cell = dart.as(_getTableEntry(strings, object), LinkedHashSetCell)
; | 4486 let cell = dart.as(_LinkedHashSet[_getTableEntry](strings, object), Li
nkedHashSetCell); |
| 4480 return cell !== null; | 4487 return cell !== null; |
| 4481 } else if (_isNumericElement(object)) { | 4488 } else if (_LinkedHashSet[_isNumericElement](object)) { |
| 4482 let nums = this[_nums]; | 4489 let nums = this[_nums]; |
| 4483 if (nums === null) | 4490 if (nums === null) |
| 4484 return false; | 4491 return false; |
| 4485 let cell = dart.as(_getTableEntry(nums, object), LinkedHashSetCell); | 4492 let cell = dart.as(_LinkedHashSet[_getTableEntry](nums, object), Linke
dHashSetCell); |
| 4486 return cell !== null; | 4493 return cell !== null; |
| 4487 } else { | 4494 } else { |
| 4488 return this[_contains](object); | 4495 return this[_contains](object); |
| 4489 } | 4496 } |
| 4490 } | 4497 } |
| 4491 [_contains](object) { | 4498 [_contains](object) { |
| 4492 let rest = this[_rest]; | 4499 let rest = this[_rest]; |
| 4493 if (rest === null) | 4500 if (rest === null) |
| 4494 return false; | 4501 return false; |
| 4495 let bucket = this[_getBucket](rest, object); | 4502 let bucket = this[_getBucket](rest, object); |
| 4496 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; | 4503 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; |
| 4497 } | 4504 } |
| 4498 lookup(object) { | 4505 lookup(object) { |
| 4499 if (dart.notNull(_isStringElement(object)) || dart.notNull(_isNumericEle
ment(object))) { | 4506 if (dart.notNull(_LinkedHashSet[_isStringElement](object)) || dart.notNu
ll(_LinkedHashSet[_isNumericElement](object))) { |
| 4500 return dart.as(this.contains(object) ? object : null, E); | 4507 return dart.as(this.contains(object) ? object : null, E); |
| 4501 } else { | 4508 } else { |
| 4502 return this[_lookup](object); | 4509 return this[_lookup](object); |
| 4503 } | 4510 } |
| 4504 } | 4511 } |
| 4505 [_lookup](object) { | 4512 [_lookup](object) { |
| 4506 let rest = this[_rest]; | 4513 let rest = this[_rest]; |
| 4507 if (rest === null) | 4514 if (rest === null) |
| 4508 return null; | 4515 return null; |
| 4509 let bucket = this[_getBucket](rest, object); | 4516 let bucket = this[_getBucket](rest, object); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 4527 if (this[_first] === null) | 4534 if (this[_first] === null) |
| 4528 throw new core.StateError("No elements"); | 4535 throw new core.StateError("No elements"); |
| 4529 return dart.as(this[_first][_element], E); | 4536 return dart.as(this[_first][_element], E); |
| 4530 } | 4537 } |
| 4531 get last() { | 4538 get last() { |
| 4532 if (this[_last] === null) | 4539 if (this[_last] === null) |
| 4533 throw new core.StateError("No elements"); | 4540 throw new core.StateError("No elements"); |
| 4534 return dart.as(this[_last][_element], E); | 4541 return dart.as(this[_last][_element], E); |
| 4535 } | 4542 } |
| 4536 add(element) { | 4543 add(element) { |
| 4537 if (_isStringElement(element)) { | 4544 if (_LinkedHashSet[_isStringElement](element)) { |
| 4538 let strings = this[_strings]; | 4545 let strings = this[_strings]; |
| 4539 if (strings === null) | 4546 if (strings === null) |
| 4540 this[_strings] = strings = _newHashTable(); | 4547 this[_strings] = strings = _LinkedHashSet[_newHashTable](); |
| 4541 return this[_addHashTableEntry](strings, element); | 4548 return this[_addHashTableEntry](strings, element); |
| 4542 } else if (_isNumericElement(element)) { | 4549 } else if (_LinkedHashSet[_isNumericElement](element)) { |
| 4543 let nums = this[_nums]; | 4550 let nums = this[_nums]; |
| 4544 if (nums === null) | 4551 if (nums === null) |
| 4545 this[_nums] = nums = _newHashTable(); | 4552 this[_nums] = nums = _LinkedHashSet[_newHashTable](); |
| 4546 return this[_addHashTableEntry](nums, element); | 4553 return this[_addHashTableEntry](nums, element); |
| 4547 } else { | 4554 } else { |
| 4548 return this[_add](element); | 4555 return this[_add](element); |
| 4549 } | 4556 } |
| 4550 } | 4557 } |
| 4551 [_add](element) { | 4558 [_add](element) { |
| 4552 let rest = this[_rest]; | 4559 let rest = this[_rest]; |
| 4553 if (rest === null) | 4560 if (rest === null) |
| 4554 this[_rest] = rest = _newHashTable(); | 4561 this[_rest] = rest = _LinkedHashSet[_newHashTable](); |
| 4555 let hash = this[_computeHashCode](element); | 4562 let hash = this[_computeHashCode](element); |
| 4556 let bucket = rest[hash]; | 4563 let bucket = rest[hash]; |
| 4557 if (bucket === null) { | 4564 if (bucket === null) { |
| 4558 let cell = this[_newLinkedCell](element); | 4565 let cell = this[_newLinkedCell](element); |
| 4559 _setTableEntry(rest, hash, [cell]); | 4566 _LinkedHashSet[_setTableEntry](rest, hash, [cell]); |
| 4560 } else { | 4567 } else { |
| 4561 let index = this[_findBucketIndex](bucket, element); | 4568 let index = this[_findBucketIndex](bucket, element); |
| 4562 if (dart.notNull(index) >= 0) | 4569 if (dart.notNull(index) >= 0) |
| 4563 return false; | 4570 return false; |
| 4564 let cell = this[_newLinkedCell](element); | 4571 let cell = this[_newLinkedCell](element); |
| 4565 bucket.push(cell); | 4572 bucket.push(cell); |
| 4566 } | 4573 } |
| 4567 return true; | 4574 return true; |
| 4568 } | 4575 } |
| 4569 remove(object) { | 4576 remove(object) { |
| 4570 if (_isStringElement(object)) { | 4577 if (_LinkedHashSet[_isStringElement](object)) { |
| 4571 return this[_removeHashTableEntry](this[_strings], object); | 4578 return this[_removeHashTableEntry](this[_strings], object); |
| 4572 } else if (_isNumericElement(object)) { | 4579 } else if (_LinkedHashSet[_isNumericElement](object)) { |
| 4573 return this[_removeHashTableEntry](this[_nums], object); | 4580 return this[_removeHashTableEntry](this[_nums], object); |
| 4574 } else { | 4581 } else { |
| 4575 return this[_remove](object); | 4582 return this[_remove](object); |
| 4576 } | 4583 } |
| 4577 } | 4584 } |
| 4578 [_remove](object) { | 4585 [_remove](object) { |
| 4579 let rest = this[_rest]; | 4586 let rest = this[_rest]; |
| 4580 if (rest === null) | 4587 if (rest === null) |
| 4581 return false; | 4588 return false; |
| 4582 let bucket = this[_getBucket](rest, object); | 4589 let bucket = this[_getBucket](rest, object); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 4609 } | 4616 } |
| 4610 } | 4617 } |
| 4611 clear() { | 4618 clear() { |
| 4612 if (dart.notNull(this[_length]) > 0) { | 4619 if (dart.notNull(this[_length]) > 0) { |
| 4613 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last
] = null; | 4620 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last
] = null; |
| 4614 this[_length] = 0; | 4621 this[_length] = 0; |
| 4615 this[_modified](); | 4622 this[_modified](); |
| 4616 } | 4623 } |
| 4617 } | 4624 } |
| 4618 [_addHashTableEntry](table, element) { | 4625 [_addHashTableEntry](table, element) { |
| 4619 let cell = dart.as(_getTableEntry(table, element), LinkedHashSetCell); | 4626 let cell = dart.as(_LinkedHashSet[_getTableEntry](table, element), Linke
dHashSetCell); |
| 4620 if (cell !== null) | 4627 if (cell !== null) |
| 4621 return false; | 4628 return false; |
| 4622 _setTableEntry(table, element, this[_newLinkedCell](element)); | 4629 _LinkedHashSet[_setTableEntry](table, element, this[_newLinkedCell](elem
ent)); |
| 4623 return true; | 4630 return true; |
| 4624 } | 4631 } |
| 4625 [_removeHashTableEntry](table, element) { | 4632 [_removeHashTableEntry](table, element) { |
| 4626 if (table === null) | 4633 if (table === null) |
| 4627 return false; | 4634 return false; |
| 4628 let cell = dart.as(_getTableEntry(table, element), LinkedHashSetCell); | 4635 let cell = dart.as(_LinkedHashSet[_getTableEntry](table, element), Linke
dHashSetCell); |
| 4629 if (cell === null) | 4636 if (cell === null) |
| 4630 return false; | 4637 return false; |
| 4631 this[_unlinkCell](cell); | 4638 this[_unlinkCell](cell); |
| 4632 _deleteTableEntry(table, element); | 4639 _LinkedHashSet[_deleteTableEntry](table, element); |
| 4633 return true; | 4640 return true; |
| 4634 } | 4641 } |
| 4635 [_modified]() { | 4642 [_modified]() { |
| 4636 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863
; | 4643 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863
; |
| 4637 } | 4644 } |
| 4638 [_newLinkedCell](element) { | 4645 [_newLinkedCell](element) { |
| 4639 let cell = new LinkedHashSetCell(element); | 4646 let cell = new LinkedHashSetCell(element); |
| 4640 if (this[_first] === null) { | 4647 if (this[_first] === null) { |
| 4641 this[_first] = this[_last] = cell; | 4648 this[_first] = this[_last] = cell; |
| 4642 } else { | 4649 } else { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 4659 } | 4666 } |
| 4660 if (next === null) { | 4667 if (next === null) { |
| 4661 dart.assert(dart.equals(cell, this[_last])); | 4668 dart.assert(dart.equals(cell, this[_last])); |
| 4662 this[_last] = previous; | 4669 this[_last] = previous; |
| 4663 } else { | 4670 } else { |
| 4664 next[_previous] = previous; | 4671 next[_previous] = previous; |
| 4665 } | 4672 } |
| 4666 this[_length] = dart.notNull(this[_length]) - 1; | 4673 this[_length] = dart.notNull(this[_length]) - 1; |
| 4667 this[_modified](); | 4674 this[_modified](); |
| 4668 } | 4675 } |
| 4669 static [_isStringElement$](element) { | 4676 static [_isStringElement](element) { |
| 4670 return dart.notNull(typeof element == string) && dart.notNull(!dart.equa
ls(element, '__proto__')); | 4677 return dart.notNull(typeof element == string) && dart.notNull(!dart.equa
ls(element, '__proto__')); |
| 4671 } | 4678 } |
| 4672 static [_isNumericElement$](element) { | 4679 static [_isNumericElement](element) { |
| 4673 return dart.notNull(dart.is(element, core.num)) && (element & 0x3ffffff)
=== element; | 4680 return dart.notNull(dart.is(element, core.num)) && (element & 0x3ffffff)
=== element; |
| 4674 } | 4681 } |
| 4675 [_computeHashCode](element) { | 4682 [_computeHashCode](element) { |
| 4676 return dart.dload(element, 'hashCode') & 0x3ffffff; | 4683 return dart.dload(element, 'hashCode') & 0x3ffffff; |
| 4677 } | 4684 } |
| 4678 static [_getTableEntry$](table, key) { | 4685 static [_getTableEntry](table, key) { |
| 4679 return table[key]; | 4686 return table[key]; |
| 4680 } | 4687 } |
| 4681 static [_setTableEntry$](table, key, value) { | 4688 static [_setTableEntry](table, key, value) { |
| 4682 dart.assert(value !== null); | 4689 dart.assert(value !== null); |
| 4683 table[key] = value; | 4690 table[key] = value; |
| 4684 } | 4691 } |
| 4685 static [_deleteTableEntry$](table, key) { | 4692 static [_deleteTableEntry](table, key) { |
| 4686 delete table[key]; | 4693 delete table[key]; |
| 4687 } | 4694 } |
| 4688 [_getBucket](table, element) { | 4695 [_getBucket](table, element) { |
| 4689 let hash = this[_computeHashCode](element); | 4696 let hash = this[_computeHashCode](element); |
| 4690 return dart.as(table[hash], core.List); | 4697 return dart.as(table[hash], core.List); |
| 4691 } | 4698 } |
| 4692 [_findBucketIndex](bucket, element) { | 4699 [_findBucketIndex](bucket, element) { |
| 4693 if (bucket === null) | 4700 if (bucket === null) |
| 4694 return -1; | 4701 return -1; |
| 4695 let length = bucket.length; | 4702 let length = bucket.length; |
| 4696 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 4703 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 4697 let cell = dart.as(bucket[i], LinkedHashSetCell); | 4704 let cell = dart.as(bucket[i], LinkedHashSetCell); |
| 4698 if (dart.equals(cell[_element], element)) | 4705 if (dart.equals(cell[_element], element)) |
| 4699 return i; | 4706 return i; |
| 4700 } | 4707 } |
| 4701 return -1; | 4708 return -1; |
| 4702 } | 4709 } |
| 4703 static [_newHashTable$]() { | 4710 static [_newHashTable]() { |
| 4704 let table = Object.create(null); | 4711 let table = Object.create(null); |
| 4705 let temporaryKey = '<non-identifier-key>'; | 4712 let temporaryKey = '<non-identifier-key>'; |
| 4706 _setTableEntry(table, temporaryKey, table); | 4713 _LinkedHashSet[_setTableEntry](table, temporaryKey, table); |
| 4707 _deleteTableEntry(table, temporaryKey); | 4714 _LinkedHashSet[_deleteTableEntry](table, temporaryKey); |
| 4708 return table; | 4715 return table; |
| 4709 } | 4716 } |
| 4710 } | 4717 } |
| 4711 return _LinkedHashSet; | 4718 return _LinkedHashSet; |
| 4712 }); | 4719 }); |
| 4713 let _LinkedHashSet = _LinkedHashSet$(dart.dynamic); | 4720 let _LinkedHashSet = _LinkedHashSet$(dart.dynamic); |
| 4714 let _LinkedIdentityHashSet$ = dart.generic(function(E) { | 4721 let _LinkedIdentityHashSet$ = dart.generic(function(E) { |
| 4715 class _LinkedIdentityHashSet extends _LinkedHashSet$(E) { | 4722 class _LinkedIdentityHashSet extends _LinkedHashSet$(E) { |
| 4716 [_newSet]() { | 4723 [_newSet]() { |
| 4717 return new _LinkedIdentityHashSet(); | 4724 return new _LinkedIdentityHashSet(); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4888 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; | 4895 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; |
| 4889 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; | 4896 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; |
| 4890 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; | 4897 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; |
| 4891 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; | 4898 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; |
| 4892 exports.HashSetIterator = HashSetIterator; | 4899 exports.HashSetIterator = HashSetIterator; |
| 4893 exports.HashSetIterator$ = HashSetIterator$; | 4900 exports.HashSetIterator$ = HashSetIterator$; |
| 4894 exports.LinkedHashSetCell = LinkedHashSetCell; | 4901 exports.LinkedHashSetCell = LinkedHashSetCell; |
| 4895 exports.LinkedHashSetIterator = LinkedHashSetIterator; | 4902 exports.LinkedHashSetIterator = LinkedHashSetIterator; |
| 4896 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; | 4903 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; |
| 4897 })(collection || (collection = {})); | 4904 })(collection || (collection = {})); |
| OLD | NEW |