| OLD | NEW |
| 1 part of dart.collection; | 1 part of dart.collection; |
| 2 | 2 |
| 3 bool _defaultEquals(a, b) => a == b; | 3 bool _defaultEquals(a, b) => a == b; |
| 4 int _defaultHashCode(a) => DDC$RT.cast(a.hashCode, dynamic, int, "CastGeneral", | 4 int _defaultHashCode(a) => DDC$RT.cast(a.hashCode, dynamic, int, "CastGeneral", |
| 5 """line 10, column 28 of dart:collection/hash_map.dart: """, | 5 """line 10, column 28 of dart:collection/hash_map.dart: """, |
| 6 a.hashCode is int, true); | 6 a.hashCode is int, true); |
| 7 typedef bool _Equality<K>(K a, K b); | 7 typedef bool _Equality<K>(K a, K b); |
| 8 typedef int _Hasher<K>(K object); | 8 typedef int _Hasher<K>(K object); |
| 9 abstract class HashMap<K, V> implements Map<K, V> { | 9 abstract class HashMap<K, V> implements Map<K, V> { |
| 10 @patch factory HashMap({bool equals(K key1, K key2), int hashCode(K key), | 10 factory HashMap({bool equals(K key1, K key2), int hashCode(K key), |
| 11 bool isValidKey(potentialKey)}) { | 11 bool isValidKey(potentialKey)}) { |
| 12 if (isValidKey == null) { | 12 if (isValidKey == null) { |
| 13 if (hashCode == null) { | 13 if (hashCode == null) { |
| 14 if (equals == null) { | 14 if (equals == null) { |
| 15 return new _HashMap<K, V>(); | 15 return new _HashMap<K, V>(); |
| 16 } | 16 } |
| 17 hashCode = _defaultHashCode; | 17 hashCode = _defaultHashCode; |
| 18 } else { | 18 } else { |
| 19 if (identical(identityHashCode, hashCode) && | 19 if (identical(identityHashCode, hashCode) && |
| 20 identical(identical, equals)) { | 20 identical(identical, equals)) { |
| 21 return new _IdentityHashMap<K, V>(); | 21 return new _IdentityHashMap<K, V>(); |
| 22 } | 22 } |
| 23 if (equals == null) { | 23 if (equals == null) { |
| 24 equals = _defaultEquals; | 24 equals = _defaultEquals; |
| 25 } | 25 } |
| 26 } | 26 } |
| 27 } else { | 27 } else { |
| 28 if (hashCode == null) { | 28 if (hashCode == null) { |
| 29 hashCode = _defaultHashCode; | 29 hashCode = _defaultHashCode; |
| 30 } | 30 } |
| 31 if (equals == null) { | 31 if (equals == null) { |
| 32 equals = _defaultEquals; | 32 equals = _defaultEquals; |
| 33 } | 33 } |
| 34 } | 34 } |
| 35 return new _CustomHashMap<K, V>(equals, hashCode, isValidKey); | 35 return new _CustomHashMap<K, V>(equals, hashCode, isValidKey); |
| 36 } | 36 } |
| 37 @patch factory HashMap.identity() = _IdentityHashMap<K, V>; | 37 factory HashMap.identity() = _IdentityHashMap<K, V>; |
| 38 factory HashMap.from(Map other) { | 38 factory HashMap.from(Map other) { |
| 39 HashMap<K, V> result = new HashMap<K, V>(); | 39 HashMap<K, V> result = new HashMap<K, V>(); |
| 40 other.forEach((k, v) { | 40 other.forEach((k, v) { |
| 41 result[k] = DDC$RT.cast(v, dynamic, V, "CastGeneral", | 41 result[k] = DDC$RT.cast(v, dynamic, V, "CastGeneral", |
| 42 """line 74, column 40 of dart:collection/hash_map.dart: """, v is V, | 42 """line 112, column 40 of dart:collection/hash_map.dart: """, v is V, |
| 43 false); | 43 false); |
| 44 }); | 44 }); |
| 45 return result; | 45 return result; |
| 46 } | 46 } |
| 47 factory HashMap.fromIterable(Iterable iterable, | 47 factory HashMap.fromIterable(Iterable iterable, |
| 48 {K key(element), V value(element)}) { | 48 {K key(element), V value(element)}) { |
| 49 HashMap<K, V> map = new HashMap<K, V>(); | 49 HashMap<K, V> map = new HashMap<K, V>(); |
| 50 Maps._fillMapWithMappedIterable(map, iterable, key, value); | 50 Maps._fillMapWithMappedIterable(map, iterable, key, value); |
| 51 return map; | 51 return map; |
| 52 } | 52 } |
| 53 factory HashMap.fromIterables(Iterable<K> keys, Iterable<V> values) { | 53 factory HashMap.fromIterables(Iterable<K> keys, Iterable<V> values) { |
| 54 HashMap<K, V> map = new HashMap<K, V>(); | 54 HashMap<K, V> map = new HashMap<K, V>(); |
| 55 Maps._fillMapWithIterables(map, keys, values); | 55 Maps._fillMapWithIterables(map, keys, values); |
| 56 return map; | 56 return map; |
| 57 } | 57 } |
| 58 } | 58 } |
| OLD | NEW |