| 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 } | 9 } |
| 10 get [core.$length]() { | 10 get [core.$length]() { |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 let _Equality$ = dart.generic(function(K) { | 28 let _Equality$ = dart.generic(function(K) { |
| 29 let _Equality = dart.typedef('_Equality', () => dart.functionType(core.bool,
[K, K])); | 29 let _Equality = dart.typedef('_Equality', () => dart.functionType(core.bool,
[K, K])); |
| 30 return _Equality; | 30 return _Equality; |
| 31 }); | 31 }); |
| 32 let _Equality = _Equality$(); | 32 let _Equality = _Equality$(); |
| 33 let _Hasher$ = dart.generic(function(K) { | 33 let _Hasher$ = dart.generic(function(K) { |
| 34 let _Hasher = dart.typedef('_Hasher', () => dart.functionType(core.int, [K])
); | 34 let _Hasher = dart.typedef('_Hasher', () => dart.functionType(core.int, [K])
); |
| 35 return _Hasher; | 35 return _Hasher; |
| 36 }); | 36 }); |
| 37 let _Hasher = _Hasher$(); | 37 let _Hasher = _Hasher$(); |
| 38 let _fillMapWithMappedIterable = Symbol('_fillMapWithMappedIterable'); | |
| 39 let _fillMapWithIterables = Symbol('_fillMapWithIterables'); | |
| 40 let HashMap$ = dart.generic(function(K, V) { | 38 let HashMap$ = dart.generic(function(K, V) { |
| 41 class HashMap extends core.Object { | 39 class HashMap extends core.Object { |
| 42 HashMap(opts) { | 40 HashMap(opts) { |
| 43 let equals = opts && 'equals' in opts ? opts.equals : null; | 41 let equals = opts && 'equals' in opts ? opts.equals : null; |
| 44 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; | 42 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; |
| 45 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; | 43 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; |
| 46 if (isValidKey == null) { | 44 if (isValidKey == null) { |
| 47 if (hashCode == null) { | 45 if (hashCode == null) { |
| 48 if (equals == null) { | 46 if (equals == null) { |
| 49 return new (_HashMap$(K, V))(); | 47 return new (_HashMap$(K, V))(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 74 let result = new (HashMap$(K, V))(); | 72 let result = new (HashMap$(K, V))(); |
| 75 other.forEach((k, v) => { | 73 other.forEach((k, v) => { |
| 76 result.set(k, dart.as(v, V)); | 74 result.set(k, dart.as(v, V)); |
| 77 }); | 75 }); |
| 78 return result; | 76 return result; |
| 79 } | 77 } |
| 80 fromIterable(iterable, opts) { | 78 fromIterable(iterable, opts) { |
| 81 let key = opts && 'key' in opts ? opts.key : null; | 79 let key = opts && 'key' in opts ? opts.key : null; |
| 82 let value = opts && 'value' in opts ? opts.value : null; | 80 let value = opts && 'value' in opts ? opts.value : null; |
| 83 let map = new (HashMap$(K, V))(); | 81 let map = new (HashMap$(K, V))(); |
| 84 Maps[_fillMapWithMappedIterable](map, iterable, key, value); | 82 Maps._fillMapWithMappedIterable(map, iterable, key, value); |
| 85 return map; | 83 return map; |
| 86 } | 84 } |
| 87 fromIterables(keys, values) { | 85 fromIterables(keys, values) { |
| 88 let map = new (HashMap$(K, V))(); | 86 let map = new (HashMap$(K, V))(); |
| 89 Maps[_fillMapWithIterables](map, keys, values); | 87 Maps._fillMapWithIterables(map, keys, values); |
| 90 return map; | 88 return map; |
| 91 } | 89 } |
| 92 } | 90 } |
| 93 HashMap[dart.implements] = () => [core.Map$(K, V)]; | 91 HashMap[dart.implements] = () => [core.Map$(K, V)]; |
| 94 dart.defineNamedConstructor(HashMap, 'identity'); | 92 dart.defineNamedConstructor(HashMap, 'identity'); |
| 95 dart.defineNamedConstructor(HashMap, 'from'); | 93 dart.defineNamedConstructor(HashMap, 'from'); |
| 96 dart.defineNamedConstructor(HashMap, 'fromIterable'); | 94 dart.defineNamedConstructor(HashMap, 'fromIterable'); |
| 97 dart.defineNamedConstructor(HashMap, 'fromIterables'); | 95 dart.defineNamedConstructor(HashMap, 'fromIterables'); |
| 98 return HashMap; | 96 return HashMap; |
| 99 }); | 97 }); |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 643 throw new core.RangeError.index(index, this, "index", null, elementIndex
); | 641 throw new core.RangeError.index(index, this, "index", null, elementIndex
); |
| 644 } | 642 } |
| 645 toString() { | 643 toString() { |
| 646 return IterableBase.iterableToShortString(this, '(', ')'); | 644 return IterableBase.iterableToShortString(this, '(', ')'); |
| 647 } | 645 } |
| 648 } | 646 } |
| 649 IterableMixin[dart.implements] = () => [core.Iterable$(E)]; | 647 IterableMixin[dart.implements] = () => [core.Iterable$(E)]; |
| 650 return IterableMixin; | 648 return IterableMixin; |
| 651 }); | 649 }); |
| 652 let IterableMixin = IterableMixin$(); | 650 let IterableMixin = IterableMixin$(); |
| 653 let _isToStringVisiting = Symbol('_isToStringVisiting'); | |
| 654 let _toStringVisiting = Symbol('_toStringVisiting'); | |
| 655 let _iterablePartsToStrings = Symbol('_iterablePartsToStrings'); | |
| 656 let IterableBase$ = dart.generic(function(E) { | 651 let IterableBase$ = dart.generic(function(E) { |
| 657 class IterableBase extends core.Object { | 652 class IterableBase extends core.Object { |
| 658 IterableBase() { | 653 IterableBase() { |
| 659 } | 654 } |
| 660 [core.$map](f) { | 655 [core.$map](f) { |
| 661 return new (_internal.MappedIterable$(E, dart.dynamic))(this, f); | 656 return new (_internal.MappedIterable$(E, dart.dynamic))(this, f); |
| 662 } | 657 } |
| 663 [core.$where](f) { | 658 [core.$where](f) { |
| 664 return new (_internal.WhereIterable$(E))(this, f); | 659 return new (_internal.WhereIterable$(E))(this, f); |
| 665 } | 660 } |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 844 throw new core.RangeError.index(index, this, "index", null, elementIndex
); | 839 throw new core.RangeError.index(index, this, "index", null, elementIndex
); |
| 845 } | 840 } |
| 846 toString() { | 841 toString() { |
| 847 return IterableBase.iterableToShortString(this, '(', ')'); | 842 return IterableBase.iterableToShortString(this, '(', ')'); |
| 848 } | 843 } |
| 849 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { | 844 static iterableToShortString(iterable, leftDelimiter, rightDelimiter) { |
| 850 if (leftDelimiter === void 0) | 845 if (leftDelimiter === void 0) |
| 851 leftDelimiter = '('; | 846 leftDelimiter = '('; |
| 852 if (rightDelimiter === void 0) | 847 if (rightDelimiter === void 0) |
| 853 rightDelimiter = ')'; | 848 rightDelimiter = ')'; |
| 854 if (IterableBase[_isToStringVisiting](iterable)) { | 849 if (IterableBase._isToStringVisiting(iterable)) { |
| 855 if (leftDelimiter == "(" && rightDelimiter == ")") { | 850 if (leftDelimiter == "(" && rightDelimiter == ")") { |
| 856 return "(...)"; | 851 return "(...)"; |
| 857 } | 852 } |
| 858 return `${leftDelimiter}...${rightDelimiter}`; | 853 return `${leftDelimiter}...${rightDelimiter}`; |
| 859 } | 854 } |
| 860 let parts = []; | 855 let parts = []; |
| 861 IterableBase[_toStringVisiting][core.$add](iterable); | 856 IterableBase._toStringVisiting[core.$add](iterable); |
| 862 try { | 857 try { |
| 863 IterableBase[_iterablePartsToStrings](iterable, parts); | 858 IterableBase._iterablePartsToStrings(iterable, parts); |
| 864 } finally { | 859 } finally { |
| 865 dart.assert(core.identical(IterableBase[_toStringVisiting][core.$last]
, iterable)); | 860 dart.assert(core.identical(IterableBase._toStringVisiting[core.$last],
iterable)); |
| 866 IterableBase[_toStringVisiting][core.$removeLast](); | 861 IterableBase._toStringVisiting[core.$removeLast](); |
| 867 } | 862 } |
| 868 return dart.toString((() => { | 863 return dart.toString((() => { |
| 869 let _ = new core.StringBuffer(leftDelimiter); | 864 let _ = new core.StringBuffer(leftDelimiter); |
| 870 _.writeAll(parts, ", "); | 865 _.writeAll(parts, ", "); |
| 871 _.write(rightDelimiter); | 866 _.write(rightDelimiter); |
| 872 return _; | 867 return _; |
| 873 })()); | 868 })()); |
| 874 } | 869 } |
| 875 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { | 870 static iterableToFullString(iterable, leftDelimiter, rightDelimiter) { |
| 876 if (leftDelimiter === void 0) | 871 if (leftDelimiter === void 0) |
| 877 leftDelimiter = '('; | 872 leftDelimiter = '('; |
| 878 if (rightDelimiter === void 0) | 873 if (rightDelimiter === void 0) |
| 879 rightDelimiter = ')'; | 874 rightDelimiter = ')'; |
| 880 if (IterableBase[_isToStringVisiting](iterable)) { | 875 if (IterableBase._isToStringVisiting(iterable)) { |
| 881 return `${leftDelimiter}...${rightDelimiter}`; | 876 return `${leftDelimiter}...${rightDelimiter}`; |
| 882 } | 877 } |
| 883 let buffer = new core.StringBuffer(leftDelimiter); | 878 let buffer = new core.StringBuffer(leftDelimiter); |
| 884 IterableBase[_toStringVisiting][core.$add](iterable); | 879 IterableBase._toStringVisiting[core.$add](iterable); |
| 885 try { | 880 try { |
| 886 buffer.writeAll(iterable, ", "); | 881 buffer.writeAll(iterable, ", "); |
| 887 } finally { | 882 } finally { |
| 888 dart.assert(core.identical(IterableBase[_toStringVisiting][core.$last]
, iterable)); | 883 dart.assert(core.identical(IterableBase._toStringVisiting[core.$last],
iterable)); |
| 889 IterableBase[_toStringVisiting][core.$removeLast](); | 884 IterableBase._toStringVisiting[core.$removeLast](); |
| 890 } | 885 } |
| 891 buffer.write(rightDelimiter); | 886 buffer.write(rightDelimiter); |
| 892 return dart.toString(buffer); | 887 return dart.toString(buffer); |
| 893 } | 888 } |
| 894 static [_isToStringVisiting](o) { | 889 static _isToStringVisiting(o) { |
| 895 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase[_toStringVis
iting][core.$length]); i = dart.notNull(i) + 1) { | 890 for (let i = 0; dart.notNull(i) < dart.notNull(IterableBase._toStringVis
iting[core.$length]); i = dart.notNull(i) + 1) { |
| 896 if (core.identical(o, IterableBase[_toStringVisiting][core.$get](i))) | 891 if (core.identical(o, IterableBase._toStringVisiting[core.$get](i))) |
| 897 return true; | 892 return true; |
| 898 } | 893 } |
| 899 return false; | 894 return false; |
| 900 } | 895 } |
| 901 static [_iterablePartsToStrings](iterable, parts) { | 896 static _iterablePartsToStrings(iterable, parts) { |
| 902 let LENGTH_LIMIT = 80; | 897 let LENGTH_LIMIT = 80; |
| 903 let HEAD_COUNT = 3; | 898 let HEAD_COUNT = 3; |
| 904 let TAIL_COUNT = 2; | 899 let TAIL_COUNT = 2; |
| 905 let MAX_COUNT = 100; | 900 let MAX_COUNT = 100; |
| 906 let OVERHEAD = 2; | 901 let OVERHEAD = 2; |
| 907 let ELLIPSIS_SIZE = 3; | 902 let ELLIPSIS_SIZE = 3; |
| 908 let length = 0; | 903 let length = 0; |
| 909 let count = 0; | 904 let count = 0; |
| 910 let it = iterable[core.$iterator]; | 905 let it = iterable[core.$iterator]; |
| 911 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull
(count) < dart.notNull(HEAD_COUNT)) { | 906 while (dart.notNull(length) < dart.notNull(LENGTH_LIMIT) || dart.notNull
(count) < dart.notNull(HEAD_COUNT)) { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 } | 967 } |
| 973 if (elision != null) { | 968 if (elision != null) { |
| 974 parts[core.$add](elision); | 969 parts[core.$add](elision); |
| 975 } | 970 } |
| 976 parts[core.$add](penultimateString); | 971 parts[core.$add](penultimateString); |
| 977 parts[core.$add](ultimateString); | 972 parts[core.$add](ultimateString); |
| 978 } | 973 } |
| 979 } | 974 } |
| 980 IterableBase[dart.implements] = () => [core.Iterable$(E)]; | 975 IterableBase[dart.implements] = () => [core.Iterable$(E)]; |
| 981 dart.defineLazyProperties(IterableBase, { | 976 dart.defineLazyProperties(IterableBase, { |
| 982 get [_toStringVisiting]() { | 977 get _toStringVisiting() { |
| 983 return []; | 978 return []; |
| 984 } | 979 } |
| 985 }); | 980 }); |
| 986 return IterableBase; | 981 return IterableBase; |
| 987 }); | 982 }); |
| 988 let IterableBase = IterableBase$(); | 983 let IterableBase = IterableBase$(); |
| 989 let _NOT_MOVED_YET = Symbol('_NOT_MOVED_YET'); | |
| 990 let _iterator = Symbol('_iterator'); | 984 let _iterator = Symbol('_iterator'); |
| 991 let _state = Symbol('_state'); | 985 let _state = Symbol('_state'); |
| 992 let _move = Symbol('_move'); | 986 let _move = Symbol('_move'); |
| 993 let _HAS_NEXT_AND_NEXT_IN_CURRENT = Symbol('_HAS_NEXT_AND_NEXT_IN_CURRENT'); | |
| 994 let _NO_NEXT = Symbol('_NO_NEXT'); | |
| 995 let HasNextIterator$ = dart.generic(function(E) { | 987 let HasNextIterator$ = dart.generic(function(E) { |
| 996 class HasNextIterator extends core.Object { | 988 class HasNextIterator extends core.Object { |
| 997 HasNextIterator(iterator) { | 989 HasNextIterator(iterator) { |
| 998 this[_iterator] = iterator; | 990 this[_iterator] = iterator; |
| 999 this[_state] = HasNextIterator[_NOT_MOVED_YET]; | 991 this[_state] = HasNextIterator._NOT_MOVED_YET; |
| 1000 } | 992 } |
| 1001 get hasNext() { | 993 get hasNext() { |
| 1002 if (this[_state] == HasNextIterator[_NOT_MOVED_YET]) | 994 if (this[_state] == HasNextIterator._NOT_MOVED_YET) |
| 1003 this[_move](); | 995 this[_move](); |
| 1004 return this[_state] == HasNextIterator[_HAS_NEXT_AND_NEXT_IN_CURRENT]; | 996 return this[_state] == HasNextIterator._HAS_NEXT_AND_NEXT_IN_CURRENT; |
| 1005 } | 997 } |
| 1006 next() { | 998 next() { |
| 1007 if (!dart.notNull(this.hasNext)) | 999 if (!dart.notNull(this.hasNext)) |
| 1008 throw new core.StateError("No more elements"); | 1000 throw new core.StateError("No more elements"); |
| 1009 dart.assert(this[_state] == HasNextIterator[_HAS_NEXT_AND_NEXT_IN_CURREN
T]); | 1001 dart.assert(this[_state] == HasNextIterator._HAS_NEXT_AND_NEXT_IN_CURREN
T); |
| 1010 let result = dart.as(this[_iterator].current, E); | 1002 let result = dart.as(this[_iterator].current, E); |
| 1011 this[_move](); | 1003 this[_move](); |
| 1012 return result; | 1004 return result; |
| 1013 } | 1005 } |
| 1014 [_move]() { | 1006 [_move]() { |
| 1015 if (this[_iterator].moveNext()) { | 1007 if (this[_iterator].moveNext()) { |
| 1016 this[_state] = HasNextIterator[_HAS_NEXT_AND_NEXT_IN_CURRENT]; | 1008 this[_state] = HasNextIterator._HAS_NEXT_AND_NEXT_IN_CURRENT; |
| 1017 } else { | 1009 } else { |
| 1018 this[_state] = HasNextIterator[_NO_NEXT]; | 1010 this[_state] = HasNextIterator._NO_NEXT; |
| 1019 } | 1011 } |
| 1020 } | 1012 } |
| 1021 } | 1013 } |
| 1022 HasNextIterator._HAS_NEXT_AND_NEXT_IN_CURRENT = 0; | 1014 HasNextIterator._HAS_NEXT_AND_NEXT_IN_CURRENT = 0; |
| 1023 HasNextIterator._NO_NEXT = 1; | 1015 HasNextIterator._NO_NEXT = 1; |
| 1024 HasNextIterator._NOT_MOVED_YET = 2; | 1016 HasNextIterator._NOT_MOVED_YET = 2; |
| 1025 return HasNextIterator; | 1017 return HasNextIterator; |
| 1026 }); | 1018 }); |
| 1027 let HasNextIterator = HasNextIterator$(); | 1019 let HasNextIterator = HasNextIterator$(); |
| 1028 let _literal = Symbol('_literal'); | |
| 1029 let _empty = Symbol('_empty'); | |
| 1030 let LinkedHashMap$ = dart.generic(function(K, V) { | 1020 let LinkedHashMap$ = dart.generic(function(K, V) { |
| 1031 class LinkedHashMap extends core.Object { | 1021 class LinkedHashMap extends core.Object { |
| 1032 LinkedHashMap(opts) { | 1022 LinkedHashMap(opts) { |
| 1033 let equals = opts && 'equals' in opts ? opts.equals : null; | 1023 let equals = opts && 'equals' in opts ? opts.equals : null; |
| 1034 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; | 1024 let hashCode = opts && 'hashCode' in opts ? opts.hashCode : null; |
| 1035 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; | 1025 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; |
| 1036 if (isValidKey == null) { | 1026 if (isValidKey == null) { |
| 1037 if (hashCode == null) { | 1027 if (hashCode == null) { |
| 1038 if (equals == null) { | 1028 if (equals == null) { |
| 1039 return new (_LinkedHashMap$(K, V))(); | 1029 return new (_LinkedHashMap$(K, V))(); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1064 let result = new (LinkedHashMap$(K, V))(); | 1054 let result = new (LinkedHashMap$(K, V))(); |
| 1065 other.forEach((k, v) => { | 1055 other.forEach((k, v) => { |
| 1066 result.set(k, dart.as(v, V)); | 1056 result.set(k, dart.as(v, V)); |
| 1067 }); | 1057 }); |
| 1068 return result; | 1058 return result; |
| 1069 } | 1059 } |
| 1070 fromIterable(iterable, opts) { | 1060 fromIterable(iterable, opts) { |
| 1071 let key = opts && 'key' in opts ? opts.key : null; | 1061 let key = opts && 'key' in opts ? opts.key : null; |
| 1072 let value = opts && 'value' in opts ? opts.value : null; | 1062 let value = opts && 'value' in opts ? opts.value : null; |
| 1073 let map = new (LinkedHashMap$(K, V))(); | 1063 let map = new (LinkedHashMap$(K, V))(); |
| 1074 Maps[_fillMapWithMappedIterable](map, iterable, key, value); | 1064 Maps._fillMapWithMappedIterable(map, iterable, key, value); |
| 1075 return map; | 1065 return map; |
| 1076 } | 1066 } |
| 1077 fromIterables(keys, values) { | 1067 fromIterables(keys, values) { |
| 1078 let map = new (LinkedHashMap$(K, V))(); | 1068 let map = new (LinkedHashMap$(K, V))(); |
| 1079 Maps[_fillMapWithIterables](map, keys, values); | 1069 Maps._fillMapWithIterables(map, keys, values); |
| 1080 return map; | 1070 return map; |
| 1081 } | 1071 } |
| 1082 [_literal](keyValuePairs) { | 1072 _literal(keyValuePairs) { |
| 1083 return dart.as(_js_helper.fillLiteralMap(keyValuePairs, new (_LinkedHash
Map$(K, V))()), LinkedHashMap$(K, V)); | 1073 return dart.as(_js_helper.fillLiteralMap(keyValuePairs, new (_LinkedHash
Map$(K, V))()), LinkedHashMap$(K, V)); |
| 1084 } | 1074 } |
| 1085 [_empty]() { | 1075 _empty() { |
| 1086 return new (_LinkedHashMap$(K, V))(); | 1076 return new (_LinkedHashMap$(K, V))(); |
| 1087 } | 1077 } |
| 1088 } | 1078 } |
| 1089 LinkedHashMap[dart.implements] = () => [HashMap$(K, V)]; | 1079 LinkedHashMap[dart.implements] = () => [HashMap$(K, V)]; |
| 1090 dart.defineNamedConstructor(LinkedHashMap, 'identity'); | 1080 dart.defineNamedConstructor(LinkedHashMap, 'identity'); |
| 1091 dart.defineNamedConstructor(LinkedHashMap, 'from'); | 1081 dart.defineNamedConstructor(LinkedHashMap, 'from'); |
| 1092 dart.defineNamedConstructor(LinkedHashMap, 'fromIterable'); | 1082 dart.defineNamedConstructor(LinkedHashMap, 'fromIterable'); |
| 1093 dart.defineNamedConstructor(LinkedHashMap, 'fromIterables'); | 1083 dart.defineNamedConstructor(LinkedHashMap, 'fromIterables'); |
| 1094 dart.defineNamedConstructor(LinkedHashMap, _literal); | 1084 dart.defineNamedConstructor(LinkedHashMap, '_literal'); |
| 1095 dart.defineNamedConstructor(LinkedHashMap, _empty); | 1085 dart.defineNamedConstructor(LinkedHashMap, '_empty'); |
| 1096 return LinkedHashMap; | 1086 return LinkedHashMap; |
| 1097 }); | 1087 }); |
| 1098 let LinkedHashMap = LinkedHashMap$(); | 1088 let LinkedHashMap = LinkedHashMap$(); |
| 1099 let __CastType10$ = dart.generic(function(K) { | 1089 let __CastType10$ = dart.generic(function(K) { |
| 1100 let __CastType10 = dart.typedef('__CastType10', () => dart.functionType(core
.int, [K])); | 1090 let __CastType10 = dart.typedef('__CastType10', () => dart.functionType(core
.int, [K])); |
| 1101 return __CastType10; | 1091 return __CastType10; |
| 1102 }); | 1092 }); |
| 1103 let __CastType10 = __CastType10$(); | 1093 let __CastType10 = __CastType10$(); |
| 1104 let __CastType12$ = dart.generic(function(K) { | 1094 let __CastType12$ = dart.generic(function(K) { |
| 1105 let __CastType12 = dart.typedef('__CastType12', () => dart.functionType(core
.bool, [K, K])); | 1095 let __CastType12 = dart.typedef('__CastType12', () => dart.functionType(core
.bool, [K, K])); |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1336 this[_list][_insertAfter](this, entry); | 1326 this[_list][_insertAfter](this, entry); |
| 1337 } | 1327 } |
| 1338 insertBefore(entry) { | 1328 insertBefore(entry) { |
| 1339 this[_list][_insertAfter](this[_previous], entry); | 1329 this[_list][_insertAfter](this[_previous], entry); |
| 1340 } | 1330 } |
| 1341 } | 1331 } |
| 1342 LinkedListEntry[dart.implements] = () => [_LinkedListLink]; | 1332 LinkedListEntry[dart.implements] = () => [_LinkedListLink]; |
| 1343 return LinkedListEntry; | 1333 return LinkedListEntry; |
| 1344 }); | 1334 }); |
| 1345 let LinkedListEntry = LinkedListEntry$(); | 1335 let LinkedListEntry = LinkedListEntry$(); |
| 1346 let _filter = Symbol('_filter'); | |
| 1347 let ListMixin$ = dart.generic(function(E) { | 1336 let ListMixin$ = dart.generic(function(E) { |
| 1348 class ListMixin extends core.Object { | 1337 class ListMixin extends core.Object { |
| 1349 get [core.$iterator]() { | 1338 get [core.$iterator]() { |
| 1350 return new (_internal.ListIterator$(E))(this); | 1339 return new (_internal.ListIterator$(E))(this); |
| 1351 } | 1340 } |
| 1352 [core.$elementAt](index) { | 1341 [core.$elementAt](index) { |
| 1353 return this[core.$get](index); | 1342 return this[core.$get](index); |
| 1354 } | 1343 } |
| 1355 [core.$forEach](action) { | 1344 [core.$forEach](action) { |
| 1356 let length = this[core.$length]; | 1345 let length = this[core.$length]; |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1564 if (dart.equals(this[core.$get](i), element)) { | 1553 if (dart.equals(this[core.$get](i), element)) { |
| 1565 this[core.$setRange](i, dart.notNull(this[core.$length]) - 1, this,
dart.notNull(i) + 1); | 1554 this[core.$setRange](i, dart.notNull(this[core.$length]) - 1, this,
dart.notNull(i) + 1); |
| 1566 let o = this; | 1555 let o = this; |
| 1567 o[core.$length] = dart.notNull(o[core.$length]) - 1; | 1556 o[core.$length] = dart.notNull(o[core.$length]) - 1; |
| 1568 return true; | 1557 return true; |
| 1569 } | 1558 } |
| 1570 } | 1559 } |
| 1571 return false; | 1560 return false; |
| 1572 } | 1561 } |
| 1573 [core.$removeWhere](test) { | 1562 [core.$removeWhere](test) { |
| 1574 ListMixin[_filter](this, test, false); | 1563 ListMixin._filter(this, test, false); |
| 1575 } | 1564 } |
| 1576 [core.$retainWhere](test) { | 1565 [core.$retainWhere](test) { |
| 1577 ListMixin[_filter](this, test, true); | 1566 ListMixin._filter(this, test, true); |
| 1578 } | 1567 } |
| 1579 static [_filter](source, test, retainMatching) { | 1568 static _filter(source, test, retainMatching) { |
| 1580 let retained = []; | 1569 let retained = []; |
| 1581 let length = source[core.$length]; | 1570 let length = source[core.$length]; |
| 1582 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1571 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 1583 let element = source[core.$get](i); | 1572 let element = source[core.$get](i); |
| 1584 if (dart.dcall(test, element) == retainMatching) { | 1573 if (dart.dcall(test, element) == retainMatching) { |
| 1585 retained[core.$add](element); | 1574 retained[core.$add](element); |
| 1586 } | 1575 } |
| 1587 if (length != source[core.$length]) { | 1576 if (length != source[core.$length]) { |
| 1588 throw new core.ConcurrentModificationError(source); | 1577 throw new core.ConcurrentModificationError(source); |
| 1589 } | 1578 } |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2008 } | 1997 } |
| 2009 MapView[dart.implements] = () => [core.Map$(K, V)]; | 1998 MapView[dart.implements] = () => [core.Map$(K, V)]; |
| 2010 return MapView; | 1999 return MapView; |
| 2011 }); | 2000 }); |
| 2012 let MapView = MapView$(); | 2001 let MapView = MapView$(); |
| 2013 let UnmodifiableMapView$ = dart.generic(function(K, V) { | 2002 let UnmodifiableMapView$ = dart.generic(function(K, V) { |
| 2014 class UnmodifiableMapView extends dart.mixin(MapView$(K, V), _UnmodifiableMa
pMixin$(K, V)) {} | 2003 class UnmodifiableMapView extends dart.mixin(MapView$(K, V), _UnmodifiableMa
pMixin$(K, V)) {} |
| 2015 return UnmodifiableMapView; | 2004 return UnmodifiableMapView; |
| 2016 }); | 2005 }); |
| 2017 let UnmodifiableMapView = UnmodifiableMapView$(); | 2006 let UnmodifiableMapView = UnmodifiableMapView$(); |
| 2018 let _id = Symbol('_id'); | |
| 2019 class Maps extends core.Object { | 2007 class Maps extends core.Object { |
| 2020 static containsValue(map, value) { | 2008 static containsValue(map, value) { |
| 2021 for (let v of map.values) { | 2009 for (let v of map.values) { |
| 2022 if (dart.equals(value, v)) { | 2010 if (dart.equals(value, v)) { |
| 2023 return true; | 2011 return true; |
| 2024 } | 2012 } |
| 2025 } | 2013 } |
| 2026 return false; | 2014 return false; |
| 2027 } | 2015 } |
| 2028 static containsKey(map, key) { | 2016 static containsKey(map, key) { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 2057 static length(map) { | 2045 static length(map) { |
| 2058 return map.keys[core.$length]; | 2046 return map.keys[core.$length]; |
| 2059 } | 2047 } |
| 2060 static isEmpty(map) { | 2048 static isEmpty(map) { |
| 2061 return map.keys[core.$isEmpty]; | 2049 return map.keys[core.$isEmpty]; |
| 2062 } | 2050 } |
| 2063 static isNotEmpty(map) { | 2051 static isNotEmpty(map) { |
| 2064 return map.keys[core.$isNotEmpty]; | 2052 return map.keys[core.$isNotEmpty]; |
| 2065 } | 2053 } |
| 2066 static mapToString(m) { | 2054 static mapToString(m) { |
| 2067 if (IterableBase[_isToStringVisiting](m)) { | 2055 if (IterableBase._isToStringVisiting(m)) { |
| 2068 return '{...}'; | 2056 return '{...}'; |
| 2069 } | 2057 } |
| 2070 let result = new core.StringBuffer(); | 2058 let result = new core.StringBuffer(); |
| 2071 try { | 2059 try { |
| 2072 IterableBase[_toStringVisiting][core.$add](m); | 2060 IterableBase._toStringVisiting[core.$add](m); |
| 2073 result.write('{'); | 2061 result.write('{'); |
| 2074 let first = true; | 2062 let first = true; |
| 2075 m.forEach((k, v) => { | 2063 m.forEach((k, v) => { |
| 2076 if (!dart.notNull(first)) { | 2064 if (!dart.notNull(first)) { |
| 2077 result.write(', '); | 2065 result.write(', '); |
| 2078 } | 2066 } |
| 2079 first = false; | 2067 first = false; |
| 2080 result.write(k); | 2068 result.write(k); |
| 2081 result.write(': '); | 2069 result.write(': '); |
| 2082 result.write(v); | 2070 result.write(v); |
| 2083 }); | 2071 }); |
| 2084 result.write('}'); | 2072 result.write('}'); |
| 2085 } finally { | 2073 } finally { |
| 2086 dart.assert(core.identical(IterableBase[_toStringVisiting][core.$last],
m)); | 2074 dart.assert(core.identical(IterableBase._toStringVisiting[core.$last], m
)); |
| 2087 IterableBase[_toStringVisiting][core.$removeLast](); | 2075 IterableBase._toStringVisiting[core.$removeLast](); |
| 2088 } | 2076 } |
| 2089 return dart.toString(result); | 2077 return dart.toString(result); |
| 2090 } | 2078 } |
| 2091 static [_id](x) { | 2079 static _id(x) { |
| 2092 return x; | 2080 return x; |
| 2093 } | 2081 } |
| 2094 static [_fillMapWithMappedIterable](map, iterable, key, value) { | 2082 static _fillMapWithMappedIterable(map, iterable, key, value) { |
| 2095 if (key == null) | 2083 if (key == null) |
| 2096 key = Maps[_id]; | 2084 key = Maps._id; |
| 2097 if (value == null) | 2085 if (value == null) |
| 2098 value = Maps[_id]; | 2086 value = Maps._id; |
| 2099 for (let element of iterable) { | 2087 for (let element of iterable) { |
| 2100 map.set(dart.dcall(key, element), dart.dcall(value, element)); | 2088 map.set(dart.dcall(key, element), dart.dcall(value, element)); |
| 2101 } | 2089 } |
| 2102 } | 2090 } |
| 2103 static [_fillMapWithIterables](map, keys, values) { | 2091 static _fillMapWithIterables(map, keys, values) { |
| 2104 let keyIterator = keys[core.$iterator]; | 2092 let keyIterator = keys[core.$iterator]; |
| 2105 let valueIterator = values[core.$iterator]; | 2093 let valueIterator = values[core.$iterator]; |
| 2106 let hasNextKey = keyIterator.moveNext(); | 2094 let hasNextKey = keyIterator.moveNext(); |
| 2107 let hasNextValue = valueIterator.moveNext(); | 2095 let hasNextValue = valueIterator.moveNext(); |
| 2108 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { | 2096 while (dart.notNull(hasNextKey) && dart.notNull(hasNextValue)) { |
| 2109 map.set(keyIterator.current, valueIterator.current); | 2097 map.set(keyIterator.current, valueIterator.current); |
| 2110 hasNextKey = keyIterator.moveNext(); | 2098 hasNextKey = keyIterator.moveNext(); |
| 2111 hasNextValue = valueIterator.moveNext(); | 2099 hasNextValue = valueIterator.moveNext(); |
| 2112 } | 2100 } |
| 2113 if (dart.notNull(hasNextKey) || dart.notNull(hasNextValue)) { | 2101 if (dart.notNull(hasNextKey) || dart.notNull(hasNextValue)) { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2194 } | 2182 } |
| 2195 get element() { | 2183 get element() { |
| 2196 throw _internal.IterableElementError.noElement(); | 2184 throw _internal.IterableElementError.noElement(); |
| 2197 } | 2185 } |
| 2198 } | 2186 } |
| 2199 return _DoubleLinkedQueueEntrySentinel; | 2187 return _DoubleLinkedQueueEntrySentinel; |
| 2200 }); | 2188 }); |
| 2201 let _DoubleLinkedQueueEntrySentinel = _DoubleLinkedQueueEntrySentinel$(); | 2189 let _DoubleLinkedQueueEntrySentinel = _DoubleLinkedQueueEntrySentinel$(); |
| 2202 let _sentinel = Symbol('_sentinel'); | 2190 let _sentinel = Symbol('_sentinel'); |
| 2203 let _elementCount = Symbol('_elementCount'); | 2191 let _elementCount = Symbol('_elementCount'); |
| 2192 let _filter = Symbol('_filter'); |
| 2204 let DoubleLinkedQueue$ = dart.generic(function(E) { | 2193 let DoubleLinkedQueue$ = dart.generic(function(E) { |
| 2205 class DoubleLinkedQueue extends IterableBase$(E) { | 2194 class DoubleLinkedQueue extends IterableBase$(E) { |
| 2206 DoubleLinkedQueue() { | 2195 DoubleLinkedQueue() { |
| 2207 this[_sentinel] = null; | 2196 this[_sentinel] = null; |
| 2208 this[_elementCount] = 0; | 2197 this[_elementCount] = 0; |
| 2209 super.IterableBase(); | 2198 super.IterableBase(); |
| 2210 this[_sentinel] = new (_DoubleLinkedQueueEntrySentinel$(E))(); | 2199 this[_sentinel] = new (_DoubleLinkedQueueEntrySentinel$(E))(); |
| 2211 } | 2200 } |
| 2212 from(elements) { | 2201 from(elements) { |
| 2213 let list = new (DoubleLinkedQueue$(E))(); | 2202 let list = new (DoubleLinkedQueue$(E))(); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2344 return this[_current]; | 2333 return this[_current]; |
| 2345 } | 2334 } |
| 2346 } | 2335 } |
| 2347 _DoubleLinkedQueueIterator[dart.implements] = () => [core.Iterator$(E)]; | 2336 _DoubleLinkedQueueIterator[dart.implements] = () => [core.Iterator$(E)]; |
| 2348 return _DoubleLinkedQueueIterator; | 2337 return _DoubleLinkedQueueIterator; |
| 2349 }); | 2338 }); |
| 2350 let _DoubleLinkedQueueIterator = _DoubleLinkedQueueIterator$(); | 2339 let _DoubleLinkedQueueIterator = _DoubleLinkedQueueIterator$(); |
| 2351 let _head = Symbol('_head'); | 2340 let _head = Symbol('_head'); |
| 2352 let _tail = Symbol('_tail'); | 2341 let _tail = Symbol('_tail'); |
| 2353 let _table = Symbol('_table'); | 2342 let _table = Symbol('_table'); |
| 2354 let _INITIAL_CAPACITY = Symbol('_INITIAL_CAPACITY'); | |
| 2355 let _isPowerOf2 = Symbol('_isPowerOf2'); | |
| 2356 let _nextPowerOf2 = Symbol('_nextPowerOf2'); | |
| 2357 let _checkModification = Symbol('_checkModification'); | 2343 let _checkModification = Symbol('_checkModification'); |
| 2358 let _writeToList = Symbol('_writeToList'); | 2344 let _writeToList = Symbol('_writeToList'); |
| 2359 let _add = Symbol('_add'); | 2345 let _add = Symbol('_add'); |
| 2360 let _preGrow = Symbol('_preGrow'); | 2346 let _preGrow = Symbol('_preGrow'); |
| 2361 let _remove = Symbol('_remove'); | 2347 let _remove = Symbol('_remove'); |
| 2362 let _filterWhere = Symbol('_filterWhere'); | 2348 let _filterWhere = Symbol('_filterWhere'); |
| 2363 let _grow = Symbol('_grow'); | 2349 let _grow = Symbol('_grow'); |
| 2364 let ListQueue$ = dart.generic(function(E) { | 2350 let ListQueue$ = dart.generic(function(E) { |
| 2365 class ListQueue extends IterableBase$(E) { | 2351 class ListQueue extends IterableBase$(E) { |
| 2366 ListQueue(initialCapacity) { | 2352 ListQueue(initialCapacity) { |
| 2367 if (initialCapacity === void 0) | 2353 if (initialCapacity === void 0) |
| 2368 initialCapacity = null; | 2354 initialCapacity = null; |
| 2369 this[_head] = 0; | 2355 this[_head] = 0; |
| 2370 this[_tail] = 0; | 2356 this[_tail] = 0; |
| 2371 this[_table] = null; | 2357 this[_table] = null; |
| 2372 this[_modificationCount] = 0; | 2358 this[_modificationCount] = 0; |
| 2373 super.IterableBase(); | 2359 super.IterableBase(); |
| 2374 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN
ull(ListQueue[_INITIAL_CAPACITY])) { | 2360 if (initialCapacity == null || dart.notNull(initialCapacity) < dart.notN
ull(ListQueue._INITIAL_CAPACITY)) { |
| 2375 initialCapacity = ListQueue[_INITIAL_CAPACITY]; | 2361 initialCapacity = ListQueue._INITIAL_CAPACITY; |
| 2376 } else if (!dart.notNull(ListQueue[_isPowerOf2](initialCapacity))) { | 2362 } else if (!dart.notNull(ListQueue._isPowerOf2(initialCapacity))) { |
| 2377 initialCapacity = ListQueue[_nextPowerOf2](initialCapacity); | 2363 initialCapacity = ListQueue._nextPowerOf2(initialCapacity); |
| 2378 } | 2364 } |
| 2379 dart.assert(ListQueue[_isPowerOf2](initialCapacity)); | 2365 dart.assert(ListQueue._isPowerOf2(initialCapacity)); |
| 2380 this[_table] = new (core.List$(E))(initialCapacity); | 2366 this[_table] = new (core.List$(E))(initialCapacity); |
| 2381 } | 2367 } |
| 2382 from(elements) { | 2368 from(elements) { |
| 2383 if (dart.is(elements, core.List)) { | 2369 if (dart.is(elements, core.List)) { |
| 2384 let length = elements[core.$length]; | 2370 let length = elements[core.$length]; |
| 2385 let queue = new (ListQueue$(E))(dart.notNull(length) + 1); | 2371 let queue = new (ListQueue$(E))(dart.notNull(length) + 1); |
| 2386 dart.assert(dart.notNull(queue[_table][core.$length]) > dart.notNull(l
ength)); | 2372 dart.assert(dart.notNull(queue[_table][core.$length]) > dart.notNull(l
ength)); |
| 2387 let sourceList = elements; | 2373 let sourceList = elements; |
| 2388 queue[_table][core.$setRange](0, length, dart.as(sourceList, core.Iter
able$(E)), 0); | 2374 queue[_table][core.$setRange](0, length, dart.as(sourceList, core.Iter
able$(E)), 0); |
| 2389 queue[_tail] = length; | 2375 queue[_tail] = length; |
| 2390 return queue; | 2376 return queue; |
| 2391 } else { | 2377 } else { |
| 2392 let capacity = ListQueue[_INITIAL_CAPACITY]; | 2378 let capacity = ListQueue._INITIAL_CAPACITY; |
| 2393 if (dart.is(elements, _internal.EfficientLength)) { | 2379 if (dart.is(elements, _internal.EfficientLength)) { |
| 2394 capacity = elements[core.$length]; | 2380 capacity = elements[core.$length]; |
| 2395 } | 2381 } |
| 2396 let result = new (ListQueue$(E))(capacity); | 2382 let result = new (ListQueue$(E))(capacity); |
| 2397 for (let element of dart.as(elements, core.Iterable$(E))) { | 2383 for (let element of dart.as(elements, core.Iterable$(E))) { |
| 2398 result.addLast(element); | 2384 result.addLast(element); |
| 2399 } | 2385 } |
| 2400 return result; | 2386 return result; |
| 2401 } | 2387 } |
| 2402 } | 2388 } |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2545 } | 2531 } |
| 2546 removeLast() { | 2532 removeLast() { |
| 2547 if (this[_head] == this[_tail]) | 2533 if (this[_head] == this[_tail]) |
| 2548 throw _internal.IterableElementError.noElement(); | 2534 throw _internal.IterableElementError.noElement(); |
| 2549 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; | 2535 this[_modificationCount] = dart.notNull(this[_modificationCount]) + 1; |
| 2550 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table][
core.$length]) - 1; | 2536 this[_tail] = dart.notNull(this[_tail]) - 1 & dart.notNull(this[_table][
core.$length]) - 1; |
| 2551 let result = this[_table][core.$get](this[_tail]); | 2537 let result = this[_table][core.$get](this[_tail]); |
| 2552 this[_table][core.$set](this[_tail], null); | 2538 this[_table][core.$set](this[_tail], null); |
| 2553 return result; | 2539 return result; |
| 2554 } | 2540 } |
| 2555 static [_isPowerOf2](number) { | 2541 static _isPowerOf2(number) { |
| 2556 return (dart.notNull(number) & dart.notNull(number) - 1) == 0; | 2542 return (dart.notNull(number) & dart.notNull(number) - 1) == 0; |
| 2557 } | 2543 } |
| 2558 static [_nextPowerOf2](number) { | 2544 static _nextPowerOf2(number) { |
| 2559 dart.assert(dart.notNull(number) > 0); | 2545 dart.assert(dart.notNull(number) > 0); |
| 2560 number = (dart.notNull(number) << 1) - 1; | 2546 number = (dart.notNull(number) << 1) - 1; |
| 2561 for (;;) { | 2547 for (;;) { |
| 2562 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1; | 2548 let nextNumber = dart.notNull(number) & dart.notNull(number) - 1; |
| 2563 if (nextNumber == 0) | 2549 if (nextNumber == 0) |
| 2564 return number; | 2550 return number; |
| 2565 number = nextNumber; | 2551 number = nextNumber; |
| 2566 } | 2552 } |
| 2567 } | 2553 } |
| 2568 [_checkModification](expectedModificationCount) { | 2554 [_checkModification](expectedModificationCount) { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2621 } else { | 2607 } else { |
| 2622 let firstPartSize = dart.notNull(this[_table][core.$length]) - dart.no
tNull(this[_head]); | 2608 let firstPartSize = dart.notNull(this[_table][core.$length]) - dart.no
tNull(this[_head]); |
| 2623 target[core.$setRange](0, firstPartSize, this[_table], this[_head]); | 2609 target[core.$setRange](0, firstPartSize, this[_table], this[_head]); |
| 2624 target[core.$setRange](firstPartSize, dart.notNull(firstPartSize) + da
rt.notNull(this[_tail]), this[_table], 0); | 2610 target[core.$setRange](firstPartSize, dart.notNull(firstPartSize) + da
rt.notNull(this[_tail]), this[_table], 0); |
| 2625 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); | 2611 return dart.notNull(this[_tail]) + dart.notNull(firstPartSize); |
| 2626 } | 2612 } |
| 2627 } | 2613 } |
| 2628 [_preGrow](newElementCount) { | 2614 [_preGrow](newElementCount) { |
| 2629 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this[core.$len
gth])); | 2615 dart.assert(dart.notNull(newElementCount) >= dart.notNull(this[core.$len
gth])); |
| 2630 newElementCount = dart.notNull(newElementCount) + (dart.notNull(newEleme
ntCount) >> 1); | 2616 newElementCount = dart.notNull(newElementCount) + (dart.notNull(newEleme
ntCount) >> 1); |
| 2631 let newCapacity = ListQueue[_nextPowerOf2](newElementCount); | 2617 let newCapacity = ListQueue._nextPowerOf2(newElementCount); |
| 2632 let newTable = new (core.List$(E))(newCapacity); | 2618 let newTable = new (core.List$(E))(newCapacity); |
| 2633 this[_tail] = this[_writeToList](newTable); | 2619 this[_tail] = this[_writeToList](newTable); |
| 2634 this[_table] = newTable; | 2620 this[_table] = newTable; |
| 2635 this[_head] = 0; | 2621 this[_head] = 0; |
| 2636 } | 2622 } |
| 2637 } | 2623 } |
| 2638 ListQueue[dart.implements] = () => [Queue$(E)]; | 2624 ListQueue[dart.implements] = () => [Queue$(E)]; |
| 2639 dart.defineNamedConstructor(ListQueue, 'from'); | 2625 dart.defineNamedConstructor(ListQueue, 'from'); |
| 2640 ListQueue._INITIAL_CAPACITY = 8; | 2626 ListQueue._INITIAL_CAPACITY = 8; |
| 2641 return ListQueue; | 2627 return ListQueue; |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2852 class _TypeTest extends core.Object { | 2838 class _TypeTest extends core.Object { |
| 2853 test(v) { | 2839 test(v) { |
| 2854 return dart.is(v, T); | 2840 return dart.is(v, T); |
| 2855 } | 2841 } |
| 2856 } | 2842 } |
| 2857 return _TypeTest; | 2843 return _TypeTest; |
| 2858 }); | 2844 }); |
| 2859 let _TypeTest = _TypeTest$(); | 2845 let _TypeTest = _TypeTest$(); |
| 2860 let _comparator = Symbol('_comparator'); | 2846 let _comparator = Symbol('_comparator'); |
| 2861 let _validKey = Symbol('_validKey'); | 2847 let _validKey = Symbol('_validKey'); |
| 2862 let _internal$ = Symbol('_internal'); | |
| 2863 let SplayTreeMap$ = dart.generic(function(K, V) { | 2848 let SplayTreeMap$ = dart.generic(function(K, V) { |
| 2864 class SplayTreeMap extends _SplayTree$(K) { | 2849 class SplayTreeMap extends _SplayTree$(K) { |
| 2865 SplayTreeMap(compare, isValidKey) { | 2850 SplayTreeMap(compare, isValidKey) { |
| 2866 if (compare === void 0) | 2851 if (compare === void 0) |
| 2867 compare = null; | 2852 compare = null; |
| 2868 if (isValidKey === void 0) | 2853 if (isValidKey === void 0) |
| 2869 isValidKey = null; | 2854 isValidKey = null; |
| 2870 this[_comparator] = dart.as(compare == null ? dart.bind(core.Comparable,
'compare') : compare, core.Comparator$(K)); | 2855 this[_comparator] = dart.as(compare == null ? dart.bind(core.Comparable,
'compare') : compare, core.Comparator$(K)); |
| 2871 this[_validKey] = dart.as(isValidKey != null ? isValidKey : v => dart.is
(v, K), _Predicate); | 2856 this[_validKey] = dart.as(isValidKey != null ? isValidKey : v => dart.is
(v, K), _Predicate); |
| 2872 super._SplayTree(); | 2857 super._SplayTree(); |
| 2873 } | 2858 } |
| 2874 from(other, compare, isValidKey) { | 2859 from(other, compare, isValidKey) { |
| 2875 if (compare === void 0) | 2860 if (compare === void 0) |
| 2876 compare = null; | 2861 compare = null; |
| 2877 if (isValidKey === void 0) | 2862 if (isValidKey === void 0) |
| 2878 isValidKey = null; | 2863 isValidKey = null; |
| 2879 let result = new (SplayTreeMap$(K, V))(); | 2864 let result = new (SplayTreeMap$(K, V))(); |
| 2880 other.forEach((k, v) => { | 2865 other.forEach((k, v) => { |
| 2881 result.set(k, dart.as(v, V)); | 2866 result.set(k, dart.as(v, V)); |
| 2882 }); | 2867 }); |
| 2883 return result; | 2868 return result; |
| 2884 } | 2869 } |
| 2885 fromIterable(iterable, opts) { | 2870 fromIterable(iterable, opts) { |
| 2886 let key = opts && 'key' in opts ? opts.key : null; | 2871 let key = opts && 'key' in opts ? opts.key : null; |
| 2887 let value = opts && 'value' in opts ? opts.value : null; | 2872 let value = opts && 'value' in opts ? opts.value : null; |
| 2888 let compare = opts && 'compare' in opts ? opts.compare : null; | 2873 let compare = opts && 'compare' in opts ? opts.compare : null; |
| 2889 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; | 2874 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; |
| 2890 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); | 2875 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); |
| 2891 Maps[_fillMapWithMappedIterable](map, iterable, key, value); | 2876 Maps._fillMapWithMappedIterable(map, iterable, key, value); |
| 2892 return map; | 2877 return map; |
| 2893 } | 2878 } |
| 2894 fromIterables(keys, values, compare, isValidKey) { | 2879 fromIterables(keys, values, compare, isValidKey) { |
| 2895 if (compare === void 0) | 2880 if (compare === void 0) |
| 2896 compare = null; | 2881 compare = null; |
| 2897 if (isValidKey === void 0) | 2882 if (isValidKey === void 0) |
| 2898 isValidKey = null; | 2883 isValidKey = null; |
| 2899 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); | 2884 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); |
| 2900 Maps[_fillMapWithIterables](map, keys, values); | 2885 Maps._fillMapWithIterables(map, keys, values); |
| 2901 return map; | 2886 return map; |
| 2902 } | 2887 } |
| 2903 [_compare](key1, key2) { | 2888 [_compare](key1, key2) { |
| 2904 return this[_comparator](key1, key2); | 2889 return this[_comparator](key1, key2); |
| 2905 } | 2890 } |
| 2906 [_internal$]() { | 2891 _internal() { |
| 2907 this[_comparator] = null; | 2892 this[_comparator] = null; |
| 2908 this[_validKey] = null; | 2893 this[_validKey] = null; |
| 2909 super._SplayTree(); | 2894 super._SplayTree(); |
| 2910 } | 2895 } |
| 2911 get(key) { | 2896 get(key) { |
| 2912 if (key == null) | 2897 if (key == null) |
| 2913 throw new core.ArgumentError(key); | 2898 throw new core.ArgumentError(key); |
| 2914 if (!dart.notNull(dart.dcall(this[_validKey], key))) | 2899 if (!dart.notNull(dart.dcall(this[_validKey], key))) |
| 2915 return null; | 2900 return null; |
| 2916 if (this[_root] != null) { | 2901 if (this[_root] != null) { |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3057 while (node.left != null) { | 3042 while (node.left != null) { |
| 3058 node = node.left; | 3043 node = node.left; |
| 3059 } | 3044 } |
| 3060 return node.key; | 3045 return node.key; |
| 3061 } | 3046 } |
| 3062 } | 3047 } |
| 3063 SplayTreeMap[dart.implements] = () => [core.Map$(K, V)]; | 3048 SplayTreeMap[dart.implements] = () => [core.Map$(K, V)]; |
| 3064 dart.defineNamedConstructor(SplayTreeMap, 'from'); | 3049 dart.defineNamedConstructor(SplayTreeMap, 'from'); |
| 3065 dart.defineNamedConstructor(SplayTreeMap, 'fromIterable'); | 3050 dart.defineNamedConstructor(SplayTreeMap, 'fromIterable'); |
| 3066 dart.defineNamedConstructor(SplayTreeMap, 'fromIterables'); | 3051 dart.defineNamedConstructor(SplayTreeMap, 'fromIterables'); |
| 3067 dart.defineNamedConstructor(SplayTreeMap, _internal$); | 3052 dart.defineNamedConstructor(SplayTreeMap, '_internal'); |
| 3068 return SplayTreeMap; | 3053 return SplayTreeMap; |
| 3069 }); | 3054 }); |
| 3070 let SplayTreeMap = SplayTreeMap$(); | 3055 let SplayTreeMap = SplayTreeMap$(); |
| 3071 let _workList = Symbol('_workList'); | 3056 let _workList = Symbol('_workList'); |
| 3072 let _tree = Symbol('_tree'); | 3057 let _tree = Symbol('_tree'); |
| 3073 let _currentNode = Symbol('_currentNode'); | 3058 let _currentNode = Symbol('_currentNode'); |
| 3074 let _findLeftMostDescendent = Symbol('_findLeftMostDescendent'); | 3059 let _findLeftMostDescendent = Symbol('_findLeftMostDescendent'); |
| 3075 let _getValue = Symbol('_getValue'); | 3060 let _getValue = Symbol('_getValue'); |
| 3076 let _rebuildWorkList = Symbol('_rebuildWorkList'); | 3061 let _rebuildWorkList = Symbol('_rebuildWorkList'); |
| 3077 let _SplayTreeIterator$ = dart.generic(function(T) { | 3062 let _SplayTreeIterator$ = dart.generic(function(T) { |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3395 let __CastType20 = __CastType20$(); | 3380 let __CastType20 = __CastType20$(); |
| 3396 let __CastType23 = dart.typedef('__CastType23', () => dart.functionType(core.b
ool, [dart.dynamic])); | 3381 let __CastType23 = dart.typedef('__CastType23', () => dart.functionType(core.b
ool, [dart.dynamic])); |
| 3397 let __CastType25$ = dart.generic(function(E) { | 3382 let __CastType25$ = dart.generic(function(E) { |
| 3398 let __CastType25 = dart.typedef('__CastType25', () => dart.functionType(core
.int, [E, E])); | 3383 let __CastType25 = dart.typedef('__CastType25', () => dart.functionType(core
.int, [E, E])); |
| 3399 return __CastType25; | 3384 return __CastType25; |
| 3400 }); | 3385 }); |
| 3401 let __CastType25 = __CastType25$(); | 3386 let __CastType25 = __CastType25$(); |
| 3402 let _strings = Symbol('_strings'); | 3387 let _strings = Symbol('_strings'); |
| 3403 let _nums = Symbol('_nums'); | 3388 let _nums = Symbol('_nums'); |
| 3404 let _rest = Symbol('_rest'); | 3389 let _rest = Symbol('_rest'); |
| 3405 let _isStringKey = Symbol('_isStringKey'); | |
| 3406 let _hasTableEntry = Symbol('_hasTableEntry'); | |
| 3407 let _isNumericKey = Symbol('_isNumericKey'); | |
| 3408 let _containsKey = Symbol('_containsKey'); | 3390 let _containsKey = Symbol('_containsKey'); |
| 3409 let _getBucket = Symbol('_getBucket'); | 3391 let _getBucket = Symbol('_getBucket'); |
| 3410 let _findBucketIndex = Symbol('_findBucketIndex'); | 3392 let _findBucketIndex = Symbol('_findBucketIndex'); |
| 3411 let _computeKeys = Symbol('_computeKeys'); | 3393 let _computeKeys = Symbol('_computeKeys'); |
| 3412 let _getTableEntry = Symbol('_getTableEntry'); | |
| 3413 let _get = Symbol('_get'); | 3394 let _get = Symbol('_get'); |
| 3414 let _newHashTable = Symbol('_newHashTable'); | |
| 3415 let _addHashTableEntry = Symbol('_addHashTableEntry'); | 3395 let _addHashTableEntry = Symbol('_addHashTableEntry'); |
| 3416 let _set = Symbol('_set'); | 3396 let _set = Symbol('_set'); |
| 3417 let _computeHashCode = Symbol('_computeHashCode'); | 3397 let _computeHashCode = Symbol('_computeHashCode'); |
| 3418 let _setTableEntry = Symbol('_setTableEntry'); | |
| 3419 let _removeHashTableEntry = Symbol('_removeHashTableEntry'); | 3398 let _removeHashTableEntry = Symbol('_removeHashTableEntry'); |
| 3420 let _deleteTableEntry = Symbol('_deleteTableEntry'); | |
| 3421 let _HashMap$ = dart.generic(function(K, V) { | 3399 let _HashMap$ = dart.generic(function(K, V) { |
| 3422 class _HashMap extends core.Object { | 3400 class _HashMap extends core.Object { |
| 3423 _HashMap() { | 3401 _HashMap() { |
| 3424 this[_length] = 0; | 3402 this[_length] = 0; |
| 3425 this[_strings] = null; | 3403 this[_strings] = null; |
| 3426 this[_nums] = null; | 3404 this[_nums] = null; |
| 3427 this[_rest] = null; | 3405 this[_rest] = null; |
| 3428 this[_keys] = null; | 3406 this[_keys] = null; |
| 3429 } | 3407 } |
| 3430 get length() { | 3408 get length() { |
| 3431 return this[_length]; | 3409 return this[_length]; |
| 3432 } | 3410 } |
| 3433 get isEmpty() { | 3411 get isEmpty() { |
| 3434 return this[_length] == 0; | 3412 return this[_length] == 0; |
| 3435 } | 3413 } |
| 3436 get isNotEmpty() { | 3414 get isNotEmpty() { |
| 3437 return !dart.notNull(this.isEmpty); | 3415 return !dart.notNull(this.isEmpty); |
| 3438 } | 3416 } |
| 3439 get keys() { | 3417 get keys() { |
| 3440 return new (HashMapKeyIterable$(K))(this); | 3418 return new (HashMapKeyIterable$(K))(this); |
| 3441 } | 3419 } |
| 3442 get values() { | 3420 get values() { |
| 3443 return new (_internal.MappedIterable$(K, V))(this.keys, (each => this.ge
t(each)).bind(this)); | 3421 return new (_internal.MappedIterable$(K, V))(this.keys, (each => this.ge
t(each)).bind(this)); |
| 3444 } | 3422 } |
| 3445 containsKey(key) { | 3423 containsKey(key) { |
| 3446 if (_HashMap[_isStringKey](key)) { | 3424 if (_HashMap._isStringKey(key)) { |
| 3447 let strings = this[_strings]; | 3425 let strings = this[_strings]; |
| 3448 return strings == null ? false : _HashMap[_hasTableEntry](strings, key
); | 3426 return strings == null ? false : _HashMap._hasTableEntry(strings, key)
; |
| 3449 } else if (_HashMap[_isNumericKey](key)) { | 3427 } else if (_HashMap._isNumericKey(key)) { |
| 3450 let nums = this[_nums]; | 3428 let nums = this[_nums]; |
| 3451 return nums == null ? false : _HashMap[_hasTableEntry](nums, key); | 3429 return nums == null ? false : _HashMap._hasTableEntry(nums, key); |
| 3452 } else { | 3430 } else { |
| 3453 return this[_containsKey](key); | 3431 return this[_containsKey](key); |
| 3454 } | 3432 } |
| 3455 } | 3433 } |
| 3456 [_containsKey](key) { | 3434 [_containsKey](key) { |
| 3457 let rest = this[_rest]; | 3435 let rest = this[_rest]; |
| 3458 if (rest == null) | 3436 if (rest == null) |
| 3459 return false; | 3437 return false; |
| 3460 let bucket = this[_getBucket](rest, key); | 3438 let bucket = this[_getBucket](rest, key); |
| 3461 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; | 3439 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; |
| 3462 } | 3440 } |
| 3463 containsValue(value) { | 3441 containsValue(value) { |
| 3464 return this[_computeKeys]()[core.$any]((each => dart.equals(this.get(eac
h), value)).bind(this)); | 3442 return this[_computeKeys]()[core.$any]((each => dart.equals(this.get(eac
h), value)).bind(this)); |
| 3465 } | 3443 } |
| 3466 addAll(other) { | 3444 addAll(other) { |
| 3467 other.forEach(((key, value) => { | 3445 other.forEach(((key, value) => { |
| 3468 this.set(key, value); | 3446 this.set(key, value); |
| 3469 }).bind(this)); | 3447 }).bind(this)); |
| 3470 } | 3448 } |
| 3471 get(key) { | 3449 get(key) { |
| 3472 if (_HashMap[_isStringKey](key)) { | 3450 if (_HashMap._isStringKey(key)) { |
| 3473 let strings = this[_strings]; | 3451 let strings = this[_strings]; |
| 3474 return dart.as(strings == null ? null : _HashMap[_getTableEntry](strin
gs, key), V); | 3452 return dart.as(strings == null ? null : _HashMap._getTableEntry(string
s, key), V); |
| 3475 } else if (_HashMap[_isNumericKey](key)) { | 3453 } else if (_HashMap._isNumericKey(key)) { |
| 3476 let nums = this[_nums]; | 3454 let nums = this[_nums]; |
| 3477 return dart.as(nums == null ? null : _HashMap[_getTableEntry](nums, ke
y), V); | 3455 return dart.as(nums == null ? null : _HashMap._getTableEntry(nums, key
), V); |
| 3478 } else { | 3456 } else { |
| 3479 return this[_get](key); | 3457 return this[_get](key); |
| 3480 } | 3458 } |
| 3481 } | 3459 } |
| 3482 [_get](key) { | 3460 [_get](key) { |
| 3483 let rest = this[_rest]; | 3461 let rest = this[_rest]; |
| 3484 if (rest == null) | 3462 if (rest == null) |
| 3485 return null; | 3463 return null; |
| 3486 let bucket = this[_getBucket](rest, key); | 3464 let bucket = this[_getBucket](rest, key); |
| 3487 let index = this[_findBucketIndex](bucket, key); | 3465 let index = this[_findBucketIndex](bucket, key); |
| 3488 return dart.as(dart.notNull(index) < 0 ? null : bucket[dart.notNull(inde
x) + 1], V); | 3466 return dart.as(dart.notNull(index) < 0 ? null : bucket[dart.notNull(inde
x) + 1], V); |
| 3489 } | 3467 } |
| 3490 set(key, value) { | 3468 set(key, value) { |
| 3491 if (_HashMap[_isStringKey](key)) { | 3469 if (_HashMap._isStringKey(key)) { |
| 3492 let strings = this[_strings]; | 3470 let strings = this[_strings]; |
| 3493 if (strings == null) | 3471 if (strings == null) |
| 3494 this[_strings] = strings = _HashMap[_newHashTable](); | 3472 this[_strings] = strings = _HashMap._newHashTable(); |
| 3495 this[_addHashTableEntry](strings, key, value); | 3473 this[_addHashTableEntry](strings, key, value); |
| 3496 } else if (_HashMap[_isNumericKey](key)) { | 3474 } else if (_HashMap._isNumericKey(key)) { |
| 3497 let nums = this[_nums]; | 3475 let nums = this[_nums]; |
| 3498 if (nums == null) | 3476 if (nums == null) |
| 3499 this[_nums] = nums = _HashMap[_newHashTable](); | 3477 this[_nums] = nums = _HashMap._newHashTable(); |
| 3500 this[_addHashTableEntry](nums, key, value); | 3478 this[_addHashTableEntry](nums, key, value); |
| 3501 } else { | 3479 } else { |
| 3502 this[_set](key, value); | 3480 this[_set](key, value); |
| 3503 } | 3481 } |
| 3504 } | 3482 } |
| 3505 [_set](key, value) { | 3483 [_set](key, value) { |
| 3506 let rest = this[_rest]; | 3484 let rest = this[_rest]; |
| 3507 if (rest == null) | 3485 if (rest == null) |
| 3508 this[_rest] = rest = _HashMap[_newHashTable](); | 3486 this[_rest] = rest = _HashMap._newHashTable(); |
| 3509 let hash = this[_computeHashCode](key); | 3487 let hash = this[_computeHashCode](key); |
| 3510 let bucket = rest[hash]; | 3488 let bucket = rest[hash]; |
| 3511 if (bucket == null) { | 3489 if (bucket == null) { |
| 3512 _HashMap[_setTableEntry](rest, hash, [key, value]); | 3490 _HashMap._setTableEntry(rest, hash, [key, value]); |
| 3513 this[_length] = dart.notNull(this[_length]) + 1; | 3491 this[_length] = dart.notNull(this[_length]) + 1; |
| 3514 this[_keys] = null; | 3492 this[_keys] = null; |
| 3515 } else { | 3493 } else { |
| 3516 let index = this[_findBucketIndex](bucket, key); | 3494 let index = this[_findBucketIndex](bucket, key); |
| 3517 if (dart.notNull(index) >= 0) { | 3495 if (dart.notNull(index) >= 0) { |
| 3518 bucket[dart.notNull(index) + 1] = value; | 3496 bucket[dart.notNull(index) + 1] = value; |
| 3519 } else { | 3497 } else { |
| 3520 bucket.push(key, value); | 3498 bucket.push(key, value); |
| 3521 this[_length] = dart.notNull(this[_length]) + 1; | 3499 this[_length] = dart.notNull(this[_length]) + 1; |
| 3522 this[_keys] = null; | 3500 this[_keys] = null; |
| 3523 } | 3501 } |
| 3524 } | 3502 } |
| 3525 } | 3503 } |
| 3526 putIfAbsent(key, ifAbsent) { | 3504 putIfAbsent(key, ifAbsent) { |
| 3527 if (this.containsKey(key)) | 3505 if (this.containsKey(key)) |
| 3528 return this.get(key); | 3506 return this.get(key); |
| 3529 let value = ifAbsent(); | 3507 let value = ifAbsent(); |
| 3530 this.set(key, value); | 3508 this.set(key, value); |
| 3531 return value; | 3509 return value; |
| 3532 } | 3510 } |
| 3533 remove(key) { | 3511 remove(key) { |
| 3534 if (_HashMap[_isStringKey](key)) { | 3512 if (_HashMap._isStringKey(key)) { |
| 3535 return this[_removeHashTableEntry](this[_strings], key); | 3513 return this[_removeHashTableEntry](this[_strings], key); |
| 3536 } else if (_HashMap[_isNumericKey](key)) { | 3514 } else if (_HashMap._isNumericKey(key)) { |
| 3537 return this[_removeHashTableEntry](this[_nums], key); | 3515 return this[_removeHashTableEntry](this[_nums], key); |
| 3538 } else { | 3516 } else { |
| 3539 return this[_remove](key); | 3517 return this[_remove](key); |
| 3540 } | 3518 } |
| 3541 } | 3519 } |
| 3542 [_remove](key) { | 3520 [_remove](key) { |
| 3543 let rest = this[_rest]; | 3521 let rest = this[_rest]; |
| 3544 if (rest == null) | 3522 if (rest == null) |
| 3545 return null; | 3523 return null; |
| 3546 let bucket = this[_getBucket](rest, key); | 3524 let bucket = this[_getBucket](rest, key); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3604 let key = bucket[i]; | 3582 let key = bucket[i]; |
| 3605 result[index] = key; | 3583 result[index] = key; |
| 3606 index = dart.notNull(index) + 1; | 3584 index = dart.notNull(index) + 1; |
| 3607 } | 3585 } |
| 3608 } | 3586 } |
| 3609 } | 3587 } |
| 3610 dart.assert(index == this[_length]); | 3588 dart.assert(index == this[_length]); |
| 3611 return this[_keys] = result; | 3589 return this[_keys] = result; |
| 3612 } | 3590 } |
| 3613 [_addHashTableEntry](table, key, value) { | 3591 [_addHashTableEntry](table, key, value) { |
| 3614 if (!dart.notNull(_HashMap[_hasTableEntry](table, key))) { | 3592 if (!dart.notNull(_HashMap._hasTableEntry(table, key))) { |
| 3615 this[_length] = dart.notNull(this[_length]) + 1; | 3593 this[_length] = dart.notNull(this[_length]) + 1; |
| 3616 this[_keys] = null; | 3594 this[_keys] = null; |
| 3617 } | 3595 } |
| 3618 _HashMap[_setTableEntry](table, key, value); | 3596 _HashMap._setTableEntry(table, key, value); |
| 3619 } | 3597 } |
| 3620 [_removeHashTableEntry](table, key) { | 3598 [_removeHashTableEntry](table, key) { |
| 3621 if (dart.notNull(table != null) && dart.notNull(_HashMap[_hasTableEntry]
(table, key))) { | 3599 if (dart.notNull(table != null) && dart.notNull(_HashMap._hasTableEntry(
table, key))) { |
| 3622 let value = dart.as(_HashMap[_getTableEntry](table, key), V); | 3600 let value = dart.as(_HashMap._getTableEntry(table, key), V); |
| 3623 _HashMap[_deleteTableEntry](table, key); | 3601 _HashMap._deleteTableEntry(table, key); |
| 3624 this[_length] = dart.notNull(this[_length]) - 1; | 3602 this[_length] = dart.notNull(this[_length]) - 1; |
| 3625 this[_keys] = null; | 3603 this[_keys] = null; |
| 3626 return value; | 3604 return value; |
| 3627 } else { | 3605 } else { |
| 3628 return null; | 3606 return null; |
| 3629 } | 3607 } |
| 3630 } | 3608 } |
| 3631 static [_isStringKey](key) { | 3609 static _isStringKey(key) { |
| 3632 return typeof key == 'string' && dart.notNull(!dart.equals(key, '__proto
__')); | 3610 return typeof key == 'string' && dart.notNull(!dart.equals(key, '__proto
__')); |
| 3633 } | 3611 } |
| 3634 static [_isNumericKey](key) { | 3612 static _isNumericKey(key) { |
| 3635 return dart.is(key, core.num) && (key & 0x3ffffff) === key; | 3613 return dart.is(key, core.num) && (key & 0x3ffffff) === key; |
| 3636 } | 3614 } |
| 3637 [_computeHashCode](key) { | 3615 [_computeHashCode](key) { |
| 3638 return dart.hashCode(key) & 0x3ffffff; | 3616 return dart.hashCode(key) & 0x3ffffff; |
| 3639 } | 3617 } |
| 3640 static [_hasTableEntry](table, key) { | 3618 static _hasTableEntry(table, key) { |
| 3641 let entry = table[key]; | 3619 let entry = table[key]; |
| 3642 return entry != null; | 3620 return entry != null; |
| 3643 } | 3621 } |
| 3644 static [_getTableEntry](table, key) { | 3622 static _getTableEntry(table, key) { |
| 3645 let entry = table[key]; | 3623 let entry = table[key]; |
| 3646 return entry === table ? null : entry; | 3624 return entry === table ? null : entry; |
| 3647 } | 3625 } |
| 3648 static [_setTableEntry](table, key, value) { | 3626 static _setTableEntry(table, key, value) { |
| 3649 if (value == null) { | 3627 if (value == null) { |
| 3650 table[key] = table; | 3628 table[key] = table; |
| 3651 } else { | 3629 } else { |
| 3652 table[key] = value; | 3630 table[key] = value; |
| 3653 } | 3631 } |
| 3654 } | 3632 } |
| 3655 static [_deleteTableEntry](table, key) { | 3633 static _deleteTableEntry(table, key) { |
| 3656 delete table[key]; | 3634 delete table[key]; |
| 3657 } | 3635 } |
| 3658 [_getBucket](table, key) { | 3636 [_getBucket](table, key) { |
| 3659 let hash = this[_computeHashCode](key); | 3637 let hash = this[_computeHashCode](key); |
| 3660 return dart.as(table[hash], core.List); | 3638 return dart.as(table[hash], core.List); |
| 3661 } | 3639 } |
| 3662 [_findBucketIndex](bucket, key) { | 3640 [_findBucketIndex](bucket, key) { |
| 3663 if (bucket == null) | 3641 if (bucket == null) |
| 3664 return -1; | 3642 return -1; |
| 3665 let length = bucket.length; | 3643 let length = bucket.length; |
| 3666 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { | 3644 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 2) { |
| 3667 if (dart.equals(bucket[i], key)) | 3645 if (dart.equals(bucket[i], key)) |
| 3668 return i; | 3646 return i; |
| 3669 } | 3647 } |
| 3670 return -1; | 3648 return -1; |
| 3671 } | 3649 } |
| 3672 static [_newHashTable]() { | 3650 static _newHashTable() { |
| 3673 let table = Object.create(null); | 3651 let table = Object.create(null); |
| 3674 let temporaryKey = '<non-identifier-key>'; | 3652 let temporaryKey = '<non-identifier-key>'; |
| 3675 _HashMap[_setTableEntry](table, temporaryKey, table); | 3653 _HashMap._setTableEntry(table, temporaryKey, table); |
| 3676 _HashMap[_deleteTableEntry](table, temporaryKey); | 3654 _HashMap._deleteTableEntry(table, temporaryKey); |
| 3677 return table; | 3655 return table; |
| 3678 } | 3656 } |
| 3679 } | 3657 } |
| 3680 _HashMap[dart.implements] = () => [HashMap$(K, V)]; | 3658 _HashMap[dart.implements] = () => [HashMap$(K, V)]; |
| 3681 return _HashMap; | 3659 return _HashMap; |
| 3682 }); | 3660 }); |
| 3683 let _HashMap = _HashMap$(); | 3661 let _HashMap = _HashMap$(); |
| 3684 let _IdentityHashMap$ = dart.generic(function(K, V) { | 3662 let _IdentityHashMap$ = dart.generic(function(K, V) { |
| 3685 class _IdentityHashMap extends _HashMap$(K, V) { | 3663 class _IdentityHashMap extends _HashMap$(K, V) { |
| 3686 [_computeHashCode](key) { | 3664 [_computeHashCode](key) { |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3837 get isNotEmpty() { | 3815 get isNotEmpty() { |
| 3838 return !dart.notNull(this.isEmpty); | 3816 return !dart.notNull(this.isEmpty); |
| 3839 } | 3817 } |
| 3840 get keys() { | 3818 get keys() { |
| 3841 return new (LinkedHashMapKeyIterable$(K))(this); | 3819 return new (LinkedHashMapKeyIterable$(K))(this); |
| 3842 } | 3820 } |
| 3843 get values() { | 3821 get values() { |
| 3844 return new (_internal.MappedIterable$(K, V))(this.keys, (each => this.ge
t(each)).bind(this)); | 3822 return new (_internal.MappedIterable$(K, V))(this.keys, (each => this.ge
t(each)).bind(this)); |
| 3845 } | 3823 } |
| 3846 containsKey(key) { | 3824 containsKey(key) { |
| 3847 if (_LinkedHashMap[_isStringKey](key)) { | 3825 if (_LinkedHashMap._isStringKey(key)) { |
| 3848 let strings = this[_strings]; | 3826 let strings = this[_strings]; |
| 3849 if (strings == null) | 3827 if (strings == null) |
| 3850 return false; | 3828 return false; |
| 3851 let cell = dart.as(_LinkedHashMap[_getTableEntry](strings, key), Linke
dHashMapCell); | 3829 let cell = dart.as(_LinkedHashMap._getTableEntry(strings, key), Linked
HashMapCell); |
| 3852 return cell != null; | 3830 return cell != null; |
| 3853 } else if (_LinkedHashMap[_isNumericKey](key)) { | 3831 } else if (_LinkedHashMap._isNumericKey(key)) { |
| 3854 let nums = this[_nums]; | 3832 let nums = this[_nums]; |
| 3855 if (nums == null) | 3833 if (nums == null) |
| 3856 return false; | 3834 return false; |
| 3857 let cell = dart.as(_LinkedHashMap[_getTableEntry](nums, key), LinkedHa
shMapCell); | 3835 let cell = dart.as(_LinkedHashMap._getTableEntry(nums, key), LinkedHas
hMapCell); |
| 3858 return cell != null; | 3836 return cell != null; |
| 3859 } else { | 3837 } else { |
| 3860 return this[_containsKey](key); | 3838 return this[_containsKey](key); |
| 3861 } | 3839 } |
| 3862 } | 3840 } |
| 3863 [_containsKey](key) { | 3841 [_containsKey](key) { |
| 3864 let rest = this[_rest]; | 3842 let rest = this[_rest]; |
| 3865 if (rest == null) | 3843 if (rest == null) |
| 3866 return false; | 3844 return false; |
| 3867 let bucket = this[_getBucket](rest, key); | 3845 let bucket = this[_getBucket](rest, key); |
| 3868 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; | 3846 return dart.notNull(this[_findBucketIndex](bucket, key)) >= 0; |
| 3869 } | 3847 } |
| 3870 containsValue(value) { | 3848 containsValue(value) { |
| 3871 return this.keys[core.$any]((each => dart.equals(this.get(each), value))
.bind(this)); | 3849 return this.keys[core.$any]((each => dart.equals(this.get(each), value))
.bind(this)); |
| 3872 } | 3850 } |
| 3873 addAll(other) { | 3851 addAll(other) { |
| 3874 other.forEach(((key, value) => { | 3852 other.forEach(((key, value) => { |
| 3875 this.set(key, value); | 3853 this.set(key, value); |
| 3876 }).bind(this)); | 3854 }).bind(this)); |
| 3877 } | 3855 } |
| 3878 get(key) { | 3856 get(key) { |
| 3879 if (_LinkedHashMap[_isStringKey](key)) { | 3857 if (_LinkedHashMap._isStringKey(key)) { |
| 3880 let strings = this[_strings]; | 3858 let strings = this[_strings]; |
| 3881 if (strings == null) | 3859 if (strings == null) |
| 3882 return null; | 3860 return null; |
| 3883 let cell = dart.as(_LinkedHashMap[_getTableEntry](strings, key), Linke
dHashMapCell); | 3861 let cell = dart.as(_LinkedHashMap._getTableEntry(strings, key), Linked
HashMapCell); |
| 3884 return dart.as(cell == null ? null : cell[_value], V); | 3862 return dart.as(cell == null ? null : cell[_value], V); |
| 3885 } else if (_LinkedHashMap[_isNumericKey](key)) { | 3863 } else if (_LinkedHashMap._isNumericKey(key)) { |
| 3886 let nums = this[_nums]; | 3864 let nums = this[_nums]; |
| 3887 if (nums == null) | 3865 if (nums == null) |
| 3888 return null; | 3866 return null; |
| 3889 let cell = dart.as(_LinkedHashMap[_getTableEntry](nums, key), LinkedHa
shMapCell); | 3867 let cell = dart.as(_LinkedHashMap._getTableEntry(nums, key), LinkedHas
hMapCell); |
| 3890 return dart.as(cell == null ? null : cell[_value], V); | 3868 return dart.as(cell == null ? null : cell[_value], V); |
| 3891 } else { | 3869 } else { |
| 3892 return this[_get](key); | 3870 return this[_get](key); |
| 3893 } | 3871 } |
| 3894 } | 3872 } |
| 3895 [_get](key) { | 3873 [_get](key) { |
| 3896 let rest = this[_rest]; | 3874 let rest = this[_rest]; |
| 3897 if (rest == null) | 3875 if (rest == null) |
| 3898 return null; | 3876 return null; |
| 3899 let bucket = this[_getBucket](rest, key); | 3877 let bucket = this[_getBucket](rest, key); |
| 3900 let index = this[_findBucketIndex](bucket, key); | 3878 let index = this[_findBucketIndex](bucket, key); |
| 3901 if (dart.notNull(index) < 0) | 3879 if (dart.notNull(index) < 0) |
| 3902 return null; | 3880 return null; |
| 3903 let cell = dart.as(bucket[index], LinkedHashMapCell); | 3881 let cell = dart.as(bucket[index], LinkedHashMapCell); |
| 3904 return dart.as(cell[_value], V); | 3882 return dart.as(cell[_value], V); |
| 3905 } | 3883 } |
| 3906 set(key, value) { | 3884 set(key, value) { |
| 3907 if (_LinkedHashMap[_isStringKey](key)) { | 3885 if (_LinkedHashMap._isStringKey(key)) { |
| 3908 let strings = this[_strings]; | 3886 let strings = this[_strings]; |
| 3909 if (strings == null) | 3887 if (strings == null) |
| 3910 this[_strings] = strings = _LinkedHashMap[_newHashTable](); | 3888 this[_strings] = strings = _LinkedHashMap._newHashTable(); |
| 3911 this[_addHashTableEntry](strings, key, value); | 3889 this[_addHashTableEntry](strings, key, value); |
| 3912 } else if (_LinkedHashMap[_isNumericKey](key)) { | 3890 } else if (_LinkedHashMap._isNumericKey(key)) { |
| 3913 let nums = this[_nums]; | 3891 let nums = this[_nums]; |
| 3914 if (nums == null) | 3892 if (nums == null) |
| 3915 this[_nums] = nums = _LinkedHashMap[_newHashTable](); | 3893 this[_nums] = nums = _LinkedHashMap._newHashTable(); |
| 3916 this[_addHashTableEntry](nums, key, value); | 3894 this[_addHashTableEntry](nums, key, value); |
| 3917 } else { | 3895 } else { |
| 3918 this[_set](key, value); | 3896 this[_set](key, value); |
| 3919 } | 3897 } |
| 3920 } | 3898 } |
| 3921 [_set](key, value) { | 3899 [_set](key, value) { |
| 3922 let rest = this[_rest]; | 3900 let rest = this[_rest]; |
| 3923 if (rest == null) | 3901 if (rest == null) |
| 3924 this[_rest] = rest = _LinkedHashMap[_newHashTable](); | 3902 this[_rest] = rest = _LinkedHashMap._newHashTable(); |
| 3925 let hash = this[_computeHashCode](key); | 3903 let hash = this[_computeHashCode](key); |
| 3926 let bucket = rest[hash]; | 3904 let bucket = rest[hash]; |
| 3927 if (bucket == null) { | 3905 if (bucket == null) { |
| 3928 let cell = this[_newLinkedCell](key, value); | 3906 let cell = this[_newLinkedCell](key, value); |
| 3929 _LinkedHashMap[_setTableEntry](rest, hash, [cell]); | 3907 _LinkedHashMap._setTableEntry(rest, hash, [cell]); |
| 3930 } else { | 3908 } else { |
| 3931 let index = this[_findBucketIndex](bucket, key); | 3909 let index = this[_findBucketIndex](bucket, key); |
| 3932 if (dart.notNull(index) >= 0) { | 3910 if (dart.notNull(index) >= 0) { |
| 3933 let cell = dart.as(bucket[index], LinkedHashMapCell); | 3911 let cell = dart.as(bucket[index], LinkedHashMapCell); |
| 3934 cell[_value] = value; | 3912 cell[_value] = value; |
| 3935 } else { | 3913 } else { |
| 3936 let cell = this[_newLinkedCell](key, value); | 3914 let cell = this[_newLinkedCell](key, value); |
| 3937 bucket.push(cell); | 3915 bucket.push(cell); |
| 3938 } | 3916 } |
| 3939 } | 3917 } |
| 3940 } | 3918 } |
| 3941 putIfAbsent(key, ifAbsent) { | 3919 putIfAbsent(key, ifAbsent) { |
| 3942 if (this.containsKey(key)) | 3920 if (this.containsKey(key)) |
| 3943 return this.get(key); | 3921 return this.get(key); |
| 3944 let value = ifAbsent(); | 3922 let value = ifAbsent(); |
| 3945 this.set(key, value); | 3923 this.set(key, value); |
| 3946 return value; | 3924 return value; |
| 3947 } | 3925 } |
| 3948 remove(key) { | 3926 remove(key) { |
| 3949 if (_LinkedHashMap[_isStringKey](key)) { | 3927 if (_LinkedHashMap._isStringKey(key)) { |
| 3950 return this[_removeHashTableEntry](this[_strings], key); | 3928 return this[_removeHashTableEntry](this[_strings], key); |
| 3951 } else if (_LinkedHashMap[_isNumericKey](key)) { | 3929 } else if (_LinkedHashMap._isNumericKey(key)) { |
| 3952 return this[_removeHashTableEntry](this[_nums], key); | 3930 return this[_removeHashTableEntry](this[_nums], key); |
| 3953 } else { | 3931 } else { |
| 3954 return this[_remove](key); | 3932 return this[_remove](key); |
| 3955 } | 3933 } |
| 3956 } | 3934 } |
| 3957 [_remove](key) { | 3935 [_remove](key) { |
| 3958 let rest = this[_rest]; | 3936 let rest = this[_rest]; |
| 3959 if (rest == null) | 3937 if (rest == null) |
| 3960 return null; | 3938 return null; |
| 3961 let bucket = this[_getBucket](rest, key); | 3939 let bucket = this[_getBucket](rest, key); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 3978 let modifications = this[_modifications]; | 3956 let modifications = this[_modifications]; |
| 3979 while (cell != null) { | 3957 while (cell != null) { |
| 3980 action(dart.as(cell[_key], K), dart.as(cell[_value], V)); | 3958 action(dart.as(cell[_key], K), dart.as(cell[_value], V)); |
| 3981 if (modifications != this[_modifications]) { | 3959 if (modifications != this[_modifications]) { |
| 3982 throw new core.ConcurrentModificationError(this); | 3960 throw new core.ConcurrentModificationError(this); |
| 3983 } | 3961 } |
| 3984 cell = cell[_next]; | 3962 cell = cell[_next]; |
| 3985 } | 3963 } |
| 3986 } | 3964 } |
| 3987 [_addHashTableEntry](table, key, value) { | 3965 [_addHashTableEntry](table, key, value) { |
| 3988 let cell = dart.as(_LinkedHashMap[_getTableEntry](table, key), LinkedHas
hMapCell); | 3966 let cell = dart.as(_LinkedHashMap._getTableEntry(table, key), LinkedHash
MapCell); |
| 3989 if (cell == null) { | 3967 if (cell == null) { |
| 3990 _LinkedHashMap[_setTableEntry](table, key, this[_newLinkedCell](key, v
alue)); | 3968 _LinkedHashMap._setTableEntry(table, key, this[_newLinkedCell](key, va
lue)); |
| 3991 } else { | 3969 } else { |
| 3992 cell[_value] = value; | 3970 cell[_value] = value; |
| 3993 } | 3971 } |
| 3994 } | 3972 } |
| 3995 [_removeHashTableEntry](table, key) { | 3973 [_removeHashTableEntry](table, key) { |
| 3996 if (table == null) | 3974 if (table == null) |
| 3997 return null; | 3975 return null; |
| 3998 let cell = dart.as(_LinkedHashMap[_getTableEntry](table, key), LinkedHas
hMapCell); | 3976 let cell = dart.as(_LinkedHashMap._getTableEntry(table, key), LinkedHash
MapCell); |
| 3999 if (cell == null) | 3977 if (cell == null) |
| 4000 return null; | 3978 return null; |
| 4001 this[_unlinkCell](cell); | 3979 this[_unlinkCell](cell); |
| 4002 _LinkedHashMap[_deleteTableEntry](table, key); | 3980 _LinkedHashMap._deleteTableEntry(table, key); |
| 4003 return dart.as(cell[_value], V); | 3981 return dart.as(cell[_value], V); |
| 4004 } | 3982 } |
| 4005 [_modified]() { | 3983 [_modified]() { |
| 4006 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863
; | 3984 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863
; |
| 4007 } | 3985 } |
| 4008 [_newLinkedCell](key, value) { | 3986 [_newLinkedCell](key, value) { |
| 4009 let cell = new LinkedHashMapCell(key, value); | 3987 let cell = new LinkedHashMapCell(key, value); |
| 4010 if (this[_first] == null) { | 3988 if (this[_first] == null) { |
| 4011 this[_first] = this[_last] = cell; | 3989 this[_first] = this[_last] = cell; |
| 4012 } else { | 3990 } else { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 4029 } | 4007 } |
| 4030 if (next == null) { | 4008 if (next == null) { |
| 4031 dart.assert(dart.equals(cell, this[_last])); | 4009 dart.assert(dart.equals(cell, this[_last])); |
| 4032 this[_last] = previous; | 4010 this[_last] = previous; |
| 4033 } else { | 4011 } else { |
| 4034 next[_previous] = previous; | 4012 next[_previous] = previous; |
| 4035 } | 4013 } |
| 4036 this[_length] = dart.notNull(this[_length]) - 1; | 4014 this[_length] = dart.notNull(this[_length]) - 1; |
| 4037 this[_modified](); | 4015 this[_modified](); |
| 4038 } | 4016 } |
| 4039 static [_isStringKey](key) { | 4017 static _isStringKey(key) { |
| 4040 return typeof key == 'string' && dart.notNull(!dart.equals(key, '__proto
__')); | 4018 return typeof key == 'string' && dart.notNull(!dart.equals(key, '__proto
__')); |
| 4041 } | 4019 } |
| 4042 static [_isNumericKey](key) { | 4020 static _isNumericKey(key) { |
| 4043 return dart.is(key, core.num) && (key & 0x3ffffff) === key; | 4021 return dart.is(key, core.num) && (key & 0x3ffffff) === key; |
| 4044 } | 4022 } |
| 4045 [_computeHashCode](key) { | 4023 [_computeHashCode](key) { |
| 4046 return dart.hashCode(key) & 0x3ffffff; | 4024 return dart.hashCode(key) & 0x3ffffff; |
| 4047 } | 4025 } |
| 4048 static [_getTableEntry](table, key) { | 4026 static _getTableEntry(table, key) { |
| 4049 return table[key]; | 4027 return table[key]; |
| 4050 } | 4028 } |
| 4051 static [_setTableEntry](table, key, value) { | 4029 static _setTableEntry(table, key, value) { |
| 4052 dart.assert(value != null); | 4030 dart.assert(value != null); |
| 4053 table[key] = value; | 4031 table[key] = value; |
| 4054 } | 4032 } |
| 4055 static [_deleteTableEntry](table, key) { | 4033 static _deleteTableEntry(table, key) { |
| 4056 delete table[key]; | 4034 delete table[key]; |
| 4057 } | 4035 } |
| 4058 [_getBucket](table, key) { | 4036 [_getBucket](table, key) { |
| 4059 let hash = this[_computeHashCode](key); | 4037 let hash = this[_computeHashCode](key); |
| 4060 return dart.as(table[hash], core.List); | 4038 return dart.as(table[hash], core.List); |
| 4061 } | 4039 } |
| 4062 [_findBucketIndex](bucket, key) { | 4040 [_findBucketIndex](bucket, key) { |
| 4063 if (bucket == null) | 4041 if (bucket == null) |
| 4064 return -1; | 4042 return -1; |
| 4065 let length = bucket.length; | 4043 let length = bucket.length; |
| 4066 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 4044 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 4067 let cell = dart.as(bucket[i], LinkedHashMapCell); | 4045 let cell = dart.as(bucket[i], LinkedHashMapCell); |
| 4068 if (dart.equals(cell[_key], key)) | 4046 if (dart.equals(cell[_key], key)) |
| 4069 return i; | 4047 return i; |
| 4070 } | 4048 } |
| 4071 return -1; | 4049 return -1; |
| 4072 } | 4050 } |
| 4073 static [_newHashTable]() { | 4051 static _newHashTable() { |
| 4074 let table = Object.create(null); | 4052 let table = Object.create(null); |
| 4075 let temporaryKey = '<non-identifier-key>'; | 4053 let temporaryKey = '<non-identifier-key>'; |
| 4076 _LinkedHashMap[_setTableEntry](table, temporaryKey, table); | 4054 _LinkedHashMap._setTableEntry(table, temporaryKey, table); |
| 4077 _LinkedHashMap[_deleteTableEntry](table, temporaryKey); | 4055 _LinkedHashMap._deleteTableEntry(table, temporaryKey); |
| 4078 return table; | 4056 return table; |
| 4079 } | 4057 } |
| 4080 toString() { | 4058 toString() { |
| 4081 return Maps.mapToString(this); | 4059 return Maps.mapToString(this); |
| 4082 } | 4060 } |
| 4083 } | 4061 } |
| 4084 _LinkedHashMap[dart.implements] = () => [LinkedHashMap$(K, V), _js_helper.In
ternalMap]; | 4062 _LinkedHashMap[dart.implements] = () => [LinkedHashMap$(K, V), _js_helper.In
ternalMap]; |
| 4085 return _LinkedHashMap; | 4063 return _LinkedHashMap; |
| 4086 }); | 4064 }); |
| 4087 let _LinkedHashMap = _LinkedHashMap$(); | 4065 let _LinkedHashMap = _LinkedHashMap$(); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4216 return true; | 4194 return true; |
| 4217 } | 4195 } |
| 4218 } | 4196 } |
| 4219 } | 4197 } |
| 4220 LinkedHashMapKeyIterator[dart.implements] = () => [core.Iterator$(E)]; | 4198 LinkedHashMapKeyIterator[dart.implements] = () => [core.Iterator$(E)]; |
| 4221 return LinkedHashMapKeyIterator; | 4199 return LinkedHashMapKeyIterator; |
| 4222 }); | 4200 }); |
| 4223 let LinkedHashMapKeyIterator = LinkedHashMapKeyIterator$(); | 4201 let LinkedHashMapKeyIterator = LinkedHashMapKeyIterator$(); |
| 4224 let _elements = Symbol('_elements'); | 4202 let _elements = Symbol('_elements'); |
| 4225 let _computeElements = Symbol('_computeElements'); | 4203 let _computeElements = Symbol('_computeElements'); |
| 4226 let _isStringElement = Symbol('_isStringElement'); | |
| 4227 let _isNumericElement = Symbol('_isNumericElement'); | |
| 4228 let _contains = Symbol('_contains'); | 4204 let _contains = Symbol('_contains'); |
| 4229 let _lookup = Symbol('_lookup'); | 4205 let _lookup = Symbol('_lookup'); |
| 4230 let _HashSet$ = dart.generic(function(E) { | 4206 let _HashSet$ = dart.generic(function(E) { |
| 4231 class _HashSet extends _HashSetBase$(E) { | 4207 class _HashSet extends _HashSetBase$(E) { |
| 4232 _HashSet() { | 4208 _HashSet() { |
| 4233 this[_length] = 0; | 4209 this[_length] = 0; |
| 4234 this[_strings] = null; | 4210 this[_strings] = null; |
| 4235 this[_nums] = null; | 4211 this[_nums] = null; |
| 4236 this[_rest] = null; | 4212 this[_rest] = null; |
| 4237 this[_elements] = null; | 4213 this[_elements] = null; |
| 4238 } | 4214 } |
| 4239 [_newSet]() { | 4215 [_newSet]() { |
| 4240 return new (_HashSet$(E))(); | 4216 return new (_HashSet$(E))(); |
| 4241 } | 4217 } |
| 4242 get [core.$iterator]() { | 4218 get [core.$iterator]() { |
| 4243 return new (HashSetIterator$(E))(this, this[_computeElements]()); | 4219 return new (HashSetIterator$(E))(this, this[_computeElements]()); |
| 4244 } | 4220 } |
| 4245 get [core.$length]() { | 4221 get [core.$length]() { |
| 4246 return this[_length]; | 4222 return this[_length]; |
| 4247 } | 4223 } |
| 4248 get [core.$isEmpty]() { | 4224 get [core.$isEmpty]() { |
| 4249 return this[_length] == 0; | 4225 return this[_length] == 0; |
| 4250 } | 4226 } |
| 4251 get [core.$isNotEmpty]() { | 4227 get [core.$isNotEmpty]() { |
| 4252 return !dart.notNull(this[core.$isEmpty]); | 4228 return !dart.notNull(this[core.$isEmpty]); |
| 4253 } | 4229 } |
| 4254 [core.$contains](object) { | 4230 [core.$contains](object) { |
| 4255 if (_HashSet[_isStringElement](object)) { | 4231 if (_HashSet._isStringElement(object)) { |
| 4256 let strings = this[_strings]; | 4232 let strings = this[_strings]; |
| 4257 return strings == null ? false : _HashSet[_hasTableEntry](strings, obj
ect); | 4233 return strings == null ? false : _HashSet._hasTableEntry(strings, obje
ct); |
| 4258 } else if (_HashSet[_isNumericElement](object)) { | 4234 } else if (_HashSet._isNumericElement(object)) { |
| 4259 let nums = this[_nums]; | 4235 let nums = this[_nums]; |
| 4260 return nums == null ? false : _HashSet[_hasTableEntry](nums, object); | 4236 return nums == null ? false : _HashSet._hasTableEntry(nums, object); |
| 4261 } else { | 4237 } else { |
| 4262 return this[_contains](object); | 4238 return this[_contains](object); |
| 4263 } | 4239 } |
| 4264 } | 4240 } |
| 4265 [_contains](object) { | 4241 [_contains](object) { |
| 4266 let rest = this[_rest]; | 4242 let rest = this[_rest]; |
| 4267 if (rest == null) | 4243 if (rest == null) |
| 4268 return false; | 4244 return false; |
| 4269 let bucket = this[_getBucket](rest, object); | 4245 let bucket = this[_getBucket](rest, object); |
| 4270 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; | 4246 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; |
| 4271 } | 4247 } |
| 4272 lookup(object) { | 4248 lookup(object) { |
| 4273 if (dart.notNull(_HashSet[_isStringElement](object)) || dart.notNull(_Ha
shSet[_isNumericElement](object))) { | 4249 if (dart.notNull(_HashSet._isStringElement(object)) || dart.notNull(_Has
hSet._isNumericElement(object))) { |
| 4274 return dart.as(this[core.$contains](object) ? object : null, E); | 4250 return dart.as(this[core.$contains](object) ? object : null, E); |
| 4275 } | 4251 } |
| 4276 return this[_lookup](object); | 4252 return this[_lookup](object); |
| 4277 } | 4253 } |
| 4278 [_lookup](object) { | 4254 [_lookup](object) { |
| 4279 let rest = this[_rest]; | 4255 let rest = this[_rest]; |
| 4280 if (rest == null) | 4256 if (rest == null) |
| 4281 return null; | 4257 return null; |
| 4282 let bucket = this[_getBucket](rest, object); | 4258 let bucket = this[_getBucket](rest, object); |
| 4283 let index = this[_findBucketIndex](bucket, object); | 4259 let index = this[_findBucketIndex](bucket, object); |
| 4284 if (dart.notNull(index) < 0) | 4260 if (dart.notNull(index) < 0) |
| 4285 return null; | 4261 return null; |
| 4286 return dart.as(bucket[core.$get](index), E); | 4262 return dart.as(bucket[core.$get](index), E); |
| 4287 } | 4263 } |
| 4288 add(element) { | 4264 add(element) { |
| 4289 if (_HashSet[_isStringElement](element)) { | 4265 if (_HashSet._isStringElement(element)) { |
| 4290 let strings = this[_strings]; | 4266 let strings = this[_strings]; |
| 4291 if (strings == null) | 4267 if (strings == null) |
| 4292 this[_strings] = strings = _HashSet[_newHashTable](); | 4268 this[_strings] = strings = _HashSet._newHashTable(); |
| 4293 return this[_addHashTableEntry](strings, element); | 4269 return this[_addHashTableEntry](strings, element); |
| 4294 } else if (_HashSet[_isNumericElement](element)) { | 4270 } else if (_HashSet._isNumericElement(element)) { |
| 4295 let nums = this[_nums]; | 4271 let nums = this[_nums]; |
| 4296 if (nums == null) | 4272 if (nums == null) |
| 4297 this[_nums] = nums = _HashSet[_newHashTable](); | 4273 this[_nums] = nums = _HashSet._newHashTable(); |
| 4298 return this[_addHashTableEntry](nums, element); | 4274 return this[_addHashTableEntry](nums, element); |
| 4299 } else { | 4275 } else { |
| 4300 return this[_add](element); | 4276 return this[_add](element); |
| 4301 } | 4277 } |
| 4302 } | 4278 } |
| 4303 [_add](element) { | 4279 [_add](element) { |
| 4304 let rest = this[_rest]; | 4280 let rest = this[_rest]; |
| 4305 if (rest == null) | 4281 if (rest == null) |
| 4306 this[_rest] = rest = _HashSet[_newHashTable](); | 4282 this[_rest] = rest = _HashSet._newHashTable(); |
| 4307 let hash = this[_computeHashCode](element); | 4283 let hash = this[_computeHashCode](element); |
| 4308 let bucket = rest[hash]; | 4284 let bucket = rest[hash]; |
| 4309 if (bucket == null) { | 4285 if (bucket == null) { |
| 4310 _HashSet[_setTableEntry](rest, hash, [element]); | 4286 _HashSet._setTableEntry(rest, hash, [element]); |
| 4311 } else { | 4287 } else { |
| 4312 let index = this[_findBucketIndex](bucket, element); | 4288 let index = this[_findBucketIndex](bucket, element); |
| 4313 if (dart.notNull(index) >= 0) | 4289 if (dart.notNull(index) >= 0) |
| 4314 return false; | 4290 return false; |
| 4315 bucket.push(element); | 4291 bucket.push(element); |
| 4316 } | 4292 } |
| 4317 this[_length] = dart.notNull(this[_length]) + 1; | 4293 this[_length] = dart.notNull(this[_length]) + 1; |
| 4318 this[_elements] = null; | 4294 this[_elements] = null; |
| 4319 return true; | 4295 return true; |
| 4320 } | 4296 } |
| 4321 addAll(objects) { | 4297 addAll(objects) { |
| 4322 for (let each of objects) { | 4298 for (let each of objects) { |
| 4323 this.add(each); | 4299 this.add(each); |
| 4324 } | 4300 } |
| 4325 } | 4301 } |
| 4326 remove(object) { | 4302 remove(object) { |
| 4327 if (_HashSet[_isStringElement](object)) { | 4303 if (_HashSet._isStringElement(object)) { |
| 4328 return this[_removeHashTableEntry](this[_strings], object); | 4304 return this[_removeHashTableEntry](this[_strings], object); |
| 4329 } else if (_HashSet[_isNumericElement](object)) { | 4305 } else if (_HashSet._isNumericElement(object)) { |
| 4330 return this[_removeHashTableEntry](this[_nums], object); | 4306 return this[_removeHashTableEntry](this[_nums], object); |
| 4331 } else { | 4307 } else { |
| 4332 return this[_remove](object); | 4308 return this[_remove](object); |
| 4333 } | 4309 } |
| 4334 } | 4310 } |
| 4335 [_remove](object) { | 4311 [_remove](object) { |
| 4336 let rest = this[_rest]; | 4312 let rest = this[_rest]; |
| 4337 if (rest == null) | 4313 if (rest == null) |
| 4338 return false; | 4314 return false; |
| 4339 let bucket = this[_getBucket](rest, object); | 4315 let bucket = this[_getBucket](rest, object); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4387 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.not
Null(i) + 1) { | 4363 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.not
Null(i) + 1) { |
| 4388 result[index] = bucket[i]; | 4364 result[index] = bucket[i]; |
| 4389 index = dart.notNull(index) + 1; | 4365 index = dart.notNull(index) + 1; |
| 4390 } | 4366 } |
| 4391 } | 4367 } |
| 4392 } | 4368 } |
| 4393 dart.assert(index == this[_length]); | 4369 dart.assert(index == this[_length]); |
| 4394 return this[_elements] = result; | 4370 return this[_elements] = result; |
| 4395 } | 4371 } |
| 4396 [_addHashTableEntry](table, element) { | 4372 [_addHashTableEntry](table, element) { |
| 4397 if (_HashSet[_hasTableEntry](table, element)) | 4373 if (_HashSet._hasTableEntry(table, element)) |
| 4398 return false; | 4374 return false; |
| 4399 _HashSet[_setTableEntry](table, element, 0); | 4375 _HashSet._setTableEntry(table, element, 0); |
| 4400 this[_length] = dart.notNull(this[_length]) + 1; | 4376 this[_length] = dart.notNull(this[_length]) + 1; |
| 4401 this[_elements] = null; | 4377 this[_elements] = null; |
| 4402 return true; | 4378 return true; |
| 4403 } | 4379 } |
| 4404 [_removeHashTableEntry](table, element) { | 4380 [_removeHashTableEntry](table, element) { |
| 4405 if (dart.notNull(table != null) && dart.notNull(_HashSet[_hasTableEntry]
(table, element))) { | 4381 if (dart.notNull(table != null) && dart.notNull(_HashSet._hasTableEntry(
table, element))) { |
| 4406 _HashSet[_deleteTableEntry](table, element); | 4382 _HashSet._deleteTableEntry(table, element); |
| 4407 this[_length] = dart.notNull(this[_length]) - 1; | 4383 this[_length] = dart.notNull(this[_length]) - 1; |
| 4408 this[_elements] = null; | 4384 this[_elements] = null; |
| 4409 return true; | 4385 return true; |
| 4410 } else { | 4386 } else { |
| 4411 return false; | 4387 return false; |
| 4412 } | 4388 } |
| 4413 } | 4389 } |
| 4414 static [_isStringElement](element) { | 4390 static _isStringElement(element) { |
| 4415 return typeof element == 'string' && dart.notNull(!dart.equals(element,
'__proto__')); | 4391 return typeof element == 'string' && dart.notNull(!dart.equals(element,
'__proto__')); |
| 4416 } | 4392 } |
| 4417 static [_isNumericElement](element) { | 4393 static _isNumericElement(element) { |
| 4418 return dart.is(element, core.num) && (element & 0x3ffffff) === element; | 4394 return dart.is(element, core.num) && (element & 0x3ffffff) === element; |
| 4419 } | 4395 } |
| 4420 [_computeHashCode](element) { | 4396 [_computeHashCode](element) { |
| 4421 return dart.hashCode(element) & 0x3ffffff; | 4397 return dart.hashCode(element) & 0x3ffffff; |
| 4422 } | 4398 } |
| 4423 static [_hasTableEntry](table, key) { | 4399 static _hasTableEntry(table, key) { |
| 4424 let entry = table[key]; | 4400 let entry = table[key]; |
| 4425 return entry != null; | 4401 return entry != null; |
| 4426 } | 4402 } |
| 4427 static [_setTableEntry](table, key, value) { | 4403 static _setTableEntry(table, key, value) { |
| 4428 dart.assert(value != null); | 4404 dart.assert(value != null); |
| 4429 table[key] = value; | 4405 table[key] = value; |
| 4430 } | 4406 } |
| 4431 static [_deleteTableEntry](table, key) { | 4407 static _deleteTableEntry(table, key) { |
| 4432 delete table[key]; | 4408 delete table[key]; |
| 4433 } | 4409 } |
| 4434 [_getBucket](table, element) { | 4410 [_getBucket](table, element) { |
| 4435 let hash = this[_computeHashCode](element); | 4411 let hash = this[_computeHashCode](element); |
| 4436 return dart.as(table[hash], core.List); | 4412 return dart.as(table[hash], core.List); |
| 4437 } | 4413 } |
| 4438 [_findBucketIndex](bucket, element) { | 4414 [_findBucketIndex](bucket, element) { |
| 4439 if (bucket == null) | 4415 if (bucket == null) |
| 4440 return -1; | 4416 return -1; |
| 4441 let length = bucket.length; | 4417 let length = bucket.length; |
| 4442 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 4418 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 4443 if (dart.equals(bucket[i], element)) | 4419 if (dart.equals(bucket[i], element)) |
| 4444 return i; | 4420 return i; |
| 4445 } | 4421 } |
| 4446 return -1; | 4422 return -1; |
| 4447 } | 4423 } |
| 4448 static [_newHashTable]() { | 4424 static _newHashTable() { |
| 4449 let table = Object.create(null); | 4425 let table = Object.create(null); |
| 4450 let temporaryKey = '<non-identifier-key>'; | 4426 let temporaryKey = '<non-identifier-key>'; |
| 4451 _HashSet[_setTableEntry](table, temporaryKey, table); | 4427 _HashSet._setTableEntry(table, temporaryKey, table); |
| 4452 _HashSet[_deleteTableEntry](table, temporaryKey); | 4428 _HashSet._deleteTableEntry(table, temporaryKey); |
| 4453 return table; | 4429 return table; |
| 4454 } | 4430 } |
| 4455 } | 4431 } |
| 4456 _HashSet[dart.implements] = () => [HashSet$(E)]; | 4432 _HashSet[dart.implements] = () => [HashSet$(E)]; |
| 4457 return _HashSet; | 4433 return _HashSet; |
| 4458 }); | 4434 }); |
| 4459 let _HashSet = _HashSet$(); | 4435 let _HashSet = _HashSet$(); |
| 4460 let _IdentityHashSet$ = dart.generic(function(E) { | 4436 let _IdentityHashSet$ = dart.generic(function(E) { |
| 4461 class _IdentityHashSet extends _HashSet$(E) { | 4437 class _IdentityHashSet extends _HashSet$(E) { |
| 4462 [_newSet]() { | 4438 [_newSet]() { |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4581 get [core.$length]() { | 4557 get [core.$length]() { |
| 4582 return this[_length]; | 4558 return this[_length]; |
| 4583 } | 4559 } |
| 4584 get [core.$isEmpty]() { | 4560 get [core.$isEmpty]() { |
| 4585 return this[_length] == 0; | 4561 return this[_length] == 0; |
| 4586 } | 4562 } |
| 4587 get [core.$isNotEmpty]() { | 4563 get [core.$isNotEmpty]() { |
| 4588 return !dart.notNull(this[core.$isEmpty]); | 4564 return !dart.notNull(this[core.$isEmpty]); |
| 4589 } | 4565 } |
| 4590 [core.$contains](object) { | 4566 [core.$contains](object) { |
| 4591 if (_LinkedHashSet[_isStringElement](object)) { | 4567 if (_LinkedHashSet._isStringElement(object)) { |
| 4592 let strings = this[_strings]; | 4568 let strings = this[_strings]; |
| 4593 if (strings == null) | 4569 if (strings == null) |
| 4594 return false; | 4570 return false; |
| 4595 let cell = dart.as(_LinkedHashSet[_getTableEntry](strings, object), Li
nkedHashSetCell); | 4571 let cell = dart.as(_LinkedHashSet._getTableEntry(strings, object), Lin
kedHashSetCell); |
| 4596 return cell != null; | 4572 return cell != null; |
| 4597 } else if (_LinkedHashSet[_isNumericElement](object)) { | 4573 } else if (_LinkedHashSet._isNumericElement(object)) { |
| 4598 let nums = this[_nums]; | 4574 let nums = this[_nums]; |
| 4599 if (nums == null) | 4575 if (nums == null) |
| 4600 return false; | 4576 return false; |
| 4601 let cell = dart.as(_LinkedHashSet[_getTableEntry](nums, object), Linke
dHashSetCell); | 4577 let cell = dart.as(_LinkedHashSet._getTableEntry(nums, object), Linked
HashSetCell); |
| 4602 return cell != null; | 4578 return cell != null; |
| 4603 } else { | 4579 } else { |
| 4604 return this[_contains](object); | 4580 return this[_contains](object); |
| 4605 } | 4581 } |
| 4606 } | 4582 } |
| 4607 [_contains](object) { | 4583 [_contains](object) { |
| 4608 let rest = this[_rest]; | 4584 let rest = this[_rest]; |
| 4609 if (rest == null) | 4585 if (rest == null) |
| 4610 return false; | 4586 return false; |
| 4611 let bucket = this[_getBucket](rest, object); | 4587 let bucket = this[_getBucket](rest, object); |
| 4612 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; | 4588 return dart.notNull(this[_findBucketIndex](bucket, object)) >= 0; |
| 4613 } | 4589 } |
| 4614 lookup(object) { | 4590 lookup(object) { |
| 4615 if (dart.notNull(_LinkedHashSet[_isStringElement](object)) || dart.notNu
ll(_LinkedHashSet[_isNumericElement](object))) { | 4591 if (dart.notNull(_LinkedHashSet._isStringElement(object)) || dart.notNul
l(_LinkedHashSet._isNumericElement(object))) { |
| 4616 return dart.as(this[core.$contains](object) ? object : null, E); | 4592 return dart.as(this[core.$contains](object) ? object : null, E); |
| 4617 } else { | 4593 } else { |
| 4618 return this[_lookup](object); | 4594 return this[_lookup](object); |
| 4619 } | 4595 } |
| 4620 } | 4596 } |
| 4621 [_lookup](object) { | 4597 [_lookup](object) { |
| 4622 let rest = this[_rest]; | 4598 let rest = this[_rest]; |
| 4623 if (rest == null) | 4599 if (rest == null) |
| 4624 return null; | 4600 return null; |
| 4625 let bucket = this[_getBucket](rest, object); | 4601 let bucket = this[_getBucket](rest, object); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 4643 if (this[_first] == null) | 4619 if (this[_first] == null) |
| 4644 throw new core.StateError("No elements"); | 4620 throw new core.StateError("No elements"); |
| 4645 return dart.as(this[_first][_element], E); | 4621 return dart.as(this[_first][_element], E); |
| 4646 } | 4622 } |
| 4647 get [core.$last]() { | 4623 get [core.$last]() { |
| 4648 if (this[_last] == null) | 4624 if (this[_last] == null) |
| 4649 throw new core.StateError("No elements"); | 4625 throw new core.StateError("No elements"); |
| 4650 return dart.as(this[_last][_element], E); | 4626 return dart.as(this[_last][_element], E); |
| 4651 } | 4627 } |
| 4652 add(element) { | 4628 add(element) { |
| 4653 if (_LinkedHashSet[_isStringElement](element)) { | 4629 if (_LinkedHashSet._isStringElement(element)) { |
| 4654 let strings = this[_strings]; | 4630 let strings = this[_strings]; |
| 4655 if (strings == null) | 4631 if (strings == null) |
| 4656 this[_strings] = strings = _LinkedHashSet[_newHashTable](); | 4632 this[_strings] = strings = _LinkedHashSet._newHashTable(); |
| 4657 return this[_addHashTableEntry](strings, element); | 4633 return this[_addHashTableEntry](strings, element); |
| 4658 } else if (_LinkedHashSet[_isNumericElement](element)) { | 4634 } else if (_LinkedHashSet._isNumericElement(element)) { |
| 4659 let nums = this[_nums]; | 4635 let nums = this[_nums]; |
| 4660 if (nums == null) | 4636 if (nums == null) |
| 4661 this[_nums] = nums = _LinkedHashSet[_newHashTable](); | 4637 this[_nums] = nums = _LinkedHashSet._newHashTable(); |
| 4662 return this[_addHashTableEntry](nums, element); | 4638 return this[_addHashTableEntry](nums, element); |
| 4663 } else { | 4639 } else { |
| 4664 return this[_add](element); | 4640 return this[_add](element); |
| 4665 } | 4641 } |
| 4666 } | 4642 } |
| 4667 [_add](element) { | 4643 [_add](element) { |
| 4668 let rest = this[_rest]; | 4644 let rest = this[_rest]; |
| 4669 if (rest == null) | 4645 if (rest == null) |
| 4670 this[_rest] = rest = _LinkedHashSet[_newHashTable](); | 4646 this[_rest] = rest = _LinkedHashSet._newHashTable(); |
| 4671 let hash = this[_computeHashCode](element); | 4647 let hash = this[_computeHashCode](element); |
| 4672 let bucket = rest[hash]; | 4648 let bucket = rest[hash]; |
| 4673 if (bucket == null) { | 4649 if (bucket == null) { |
| 4674 let cell = this[_newLinkedCell](element); | 4650 let cell = this[_newLinkedCell](element); |
| 4675 _LinkedHashSet[_setTableEntry](rest, hash, [cell]); | 4651 _LinkedHashSet._setTableEntry(rest, hash, [cell]); |
| 4676 } else { | 4652 } else { |
| 4677 let index = this[_findBucketIndex](bucket, element); | 4653 let index = this[_findBucketIndex](bucket, element); |
| 4678 if (dart.notNull(index) >= 0) | 4654 if (dart.notNull(index) >= 0) |
| 4679 return false; | 4655 return false; |
| 4680 let cell = this[_newLinkedCell](element); | 4656 let cell = this[_newLinkedCell](element); |
| 4681 bucket.push(cell); | 4657 bucket.push(cell); |
| 4682 } | 4658 } |
| 4683 return true; | 4659 return true; |
| 4684 } | 4660 } |
| 4685 remove(object) { | 4661 remove(object) { |
| 4686 if (_LinkedHashSet[_isStringElement](object)) { | 4662 if (_LinkedHashSet._isStringElement(object)) { |
| 4687 return this[_removeHashTableEntry](this[_strings], object); | 4663 return this[_removeHashTableEntry](this[_strings], object); |
| 4688 } else if (_LinkedHashSet[_isNumericElement](object)) { | 4664 } else if (_LinkedHashSet._isNumericElement(object)) { |
| 4689 return this[_removeHashTableEntry](this[_nums], object); | 4665 return this[_removeHashTableEntry](this[_nums], object); |
| 4690 } else { | 4666 } else { |
| 4691 return this[_remove](object); | 4667 return this[_remove](object); |
| 4692 } | 4668 } |
| 4693 } | 4669 } |
| 4694 [_remove](object) { | 4670 [_remove](object) { |
| 4695 let rest = this[_rest]; | 4671 let rest = this[_rest]; |
| 4696 if (rest == null) | 4672 if (rest == null) |
| 4697 return false; | 4673 return false; |
| 4698 let bucket = this[_getBucket](rest, object); | 4674 let bucket = this[_getBucket](rest, object); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 4725 } | 4701 } |
| 4726 } | 4702 } |
| 4727 clear() { | 4703 clear() { |
| 4728 if (dart.notNull(this[_length]) > 0) { | 4704 if (dart.notNull(this[_length]) > 0) { |
| 4729 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last
] = null; | 4705 this[_strings] = this[_nums] = this[_rest] = this[_first] = this[_last
] = null; |
| 4730 this[_length] = 0; | 4706 this[_length] = 0; |
| 4731 this[_modified](); | 4707 this[_modified](); |
| 4732 } | 4708 } |
| 4733 } | 4709 } |
| 4734 [_addHashTableEntry](table, element) { | 4710 [_addHashTableEntry](table, element) { |
| 4735 let cell = dart.as(_LinkedHashSet[_getTableEntry](table, element), Linke
dHashSetCell); | 4711 let cell = dart.as(_LinkedHashSet._getTableEntry(table, element), Linked
HashSetCell); |
| 4736 if (cell != null) | 4712 if (cell != null) |
| 4737 return false; | 4713 return false; |
| 4738 _LinkedHashSet[_setTableEntry](table, element, this[_newLinkedCell](elem
ent)); | 4714 _LinkedHashSet._setTableEntry(table, element, this[_newLinkedCell](eleme
nt)); |
| 4739 return true; | 4715 return true; |
| 4740 } | 4716 } |
| 4741 [_removeHashTableEntry](table, element) { | 4717 [_removeHashTableEntry](table, element) { |
| 4742 if (table == null) | 4718 if (table == null) |
| 4743 return false; | 4719 return false; |
| 4744 let cell = dart.as(_LinkedHashSet[_getTableEntry](table, element), Linke
dHashSetCell); | 4720 let cell = dart.as(_LinkedHashSet._getTableEntry(table, element), Linked
HashSetCell); |
| 4745 if (cell == null) | 4721 if (cell == null) |
| 4746 return false; | 4722 return false; |
| 4747 this[_unlinkCell](cell); | 4723 this[_unlinkCell](cell); |
| 4748 _LinkedHashSet[_deleteTableEntry](table, element); | 4724 _LinkedHashSet._deleteTableEntry(table, element); |
| 4749 return true; | 4725 return true; |
| 4750 } | 4726 } |
| 4751 [_modified]() { | 4727 [_modified]() { |
| 4752 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863
; | 4728 this[_modifications] = dart.notNull(this[_modifications]) + 1 & 67108863
; |
| 4753 } | 4729 } |
| 4754 [_newLinkedCell](element) { | 4730 [_newLinkedCell](element) { |
| 4755 let cell = new LinkedHashSetCell(element); | 4731 let cell = new LinkedHashSetCell(element); |
| 4756 if (this[_first] == null) { | 4732 if (this[_first] == null) { |
| 4757 this[_first] = this[_last] = cell; | 4733 this[_first] = this[_last] = cell; |
| 4758 } else { | 4734 } else { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 4775 } | 4751 } |
| 4776 if (next == null) { | 4752 if (next == null) { |
| 4777 dart.assert(dart.equals(cell, this[_last])); | 4753 dart.assert(dart.equals(cell, this[_last])); |
| 4778 this[_last] = previous; | 4754 this[_last] = previous; |
| 4779 } else { | 4755 } else { |
| 4780 next[_previous] = previous; | 4756 next[_previous] = previous; |
| 4781 } | 4757 } |
| 4782 this[_length] = dart.notNull(this[_length]) - 1; | 4758 this[_length] = dart.notNull(this[_length]) - 1; |
| 4783 this[_modified](); | 4759 this[_modified](); |
| 4784 } | 4760 } |
| 4785 static [_isStringElement](element) { | 4761 static _isStringElement(element) { |
| 4786 return typeof element == 'string' && dart.notNull(!dart.equals(element,
'__proto__')); | 4762 return typeof element == 'string' && dart.notNull(!dart.equals(element,
'__proto__')); |
| 4787 } | 4763 } |
| 4788 static [_isNumericElement](element) { | 4764 static _isNumericElement(element) { |
| 4789 return dart.is(element, core.num) && (element & 0x3ffffff) === element; | 4765 return dart.is(element, core.num) && (element & 0x3ffffff) === element; |
| 4790 } | 4766 } |
| 4791 [_computeHashCode](element) { | 4767 [_computeHashCode](element) { |
| 4792 return dart.hashCode(element) & 0x3ffffff; | 4768 return dart.hashCode(element) & 0x3ffffff; |
| 4793 } | 4769 } |
| 4794 static [_getTableEntry](table, key) { | 4770 static _getTableEntry(table, key) { |
| 4795 return table[key]; | 4771 return table[key]; |
| 4796 } | 4772 } |
| 4797 static [_setTableEntry](table, key, value) { | 4773 static _setTableEntry(table, key, value) { |
| 4798 dart.assert(value != null); | 4774 dart.assert(value != null); |
| 4799 table[key] = value; | 4775 table[key] = value; |
| 4800 } | 4776 } |
| 4801 static [_deleteTableEntry](table, key) { | 4777 static _deleteTableEntry(table, key) { |
| 4802 delete table[key]; | 4778 delete table[key]; |
| 4803 } | 4779 } |
| 4804 [_getBucket](table, element) { | 4780 [_getBucket](table, element) { |
| 4805 let hash = this[_computeHashCode](element); | 4781 let hash = this[_computeHashCode](element); |
| 4806 return dart.as(table[hash], core.List); | 4782 return dart.as(table[hash], core.List); |
| 4807 } | 4783 } |
| 4808 [_findBucketIndex](bucket, element) { | 4784 [_findBucketIndex](bucket, element) { |
| 4809 if (bucket == null) | 4785 if (bucket == null) |
| 4810 return -1; | 4786 return -1; |
| 4811 let length = bucket.length; | 4787 let length = bucket.length; |
| 4812 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 4788 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
| 4813 let cell = dart.as(bucket[i], LinkedHashSetCell); | 4789 let cell = dart.as(bucket[i], LinkedHashSetCell); |
| 4814 if (dart.equals(cell[_element], element)) | 4790 if (dart.equals(cell[_element], element)) |
| 4815 return i; | 4791 return i; |
| 4816 } | 4792 } |
| 4817 return -1; | 4793 return -1; |
| 4818 } | 4794 } |
| 4819 static [_newHashTable]() { | 4795 static _newHashTable() { |
| 4820 let table = Object.create(null); | 4796 let table = Object.create(null); |
| 4821 let temporaryKey = '<non-identifier-key>'; | 4797 let temporaryKey = '<non-identifier-key>'; |
| 4822 _LinkedHashSet[_setTableEntry](table, temporaryKey, table); | 4798 _LinkedHashSet._setTableEntry(table, temporaryKey, table); |
| 4823 _LinkedHashSet[_deleteTableEntry](table, temporaryKey); | 4799 _LinkedHashSet._deleteTableEntry(table, temporaryKey); |
| 4824 return table; | 4800 return table; |
| 4825 } | 4801 } |
| 4826 } | 4802 } |
| 4827 _LinkedHashSet[dart.implements] = () => [LinkedHashSet$(E)]; | 4803 _LinkedHashSet[dart.implements] = () => [LinkedHashSet$(E)]; |
| 4828 return _LinkedHashSet; | 4804 return _LinkedHashSet; |
| 4829 }); | 4805 }); |
| 4830 let _LinkedHashSet = _LinkedHashSet$(); | 4806 let _LinkedHashSet = _LinkedHashSet$(); |
| 4831 let _LinkedIdentityHashSet$ = dart.generic(function(E) { | 4807 let _LinkedIdentityHashSet$ = dart.generic(function(E) { |
| 4832 class _LinkedIdentityHashSet extends _LinkedHashSet$(E) { | 4808 class _LinkedIdentityHashSet extends _LinkedHashSet$(E) { |
| 4833 [_newSet]() { | 4809 [_newSet]() { |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5007 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; | 4983 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; |
| 5008 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; | 4984 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; |
| 5009 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; | 4985 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; |
| 5010 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; | 4986 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; |
| 5011 exports.HashSetIterator$ = HashSetIterator$; | 4987 exports.HashSetIterator$ = HashSetIterator$; |
| 5012 exports.HashSetIterator = HashSetIterator; | 4988 exports.HashSetIterator = HashSetIterator; |
| 5013 exports.LinkedHashSetCell = LinkedHashSetCell; | 4989 exports.LinkedHashSetCell = LinkedHashSetCell; |
| 5014 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; | 4990 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; |
| 5015 exports.LinkedHashSetIterator = LinkedHashSetIterator; | 4991 exports.LinkedHashSetIterator = LinkedHashSetIterator; |
| 5016 })(collection || (collection = {})); | 4992 })(collection || (collection = {})); |
| OLD | NEW |