Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: test/dart_codegen/expect/collection/hash_map.dart

Issue 963593002: Disable formatting and add new-lines to make tests faster. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 part of dart.collection; 1 part of dart.collection;
2 2 bool _defaultEquals(a, b) => a == b;
3 bool _defaultEquals(a, b) => a == b; 3 int _defaultHashCode(a) => DDC$RT.cast(a.hashCode, dynamic, int, "CastGeneral", """line 10, column 28 of dart:collection/hash_map.dart: """, a.hashCode is int, true);
4 int _defaultHashCode(a) => DDC$RT.cast(a.hashCode, dynamic, int, "CastGeneral", 4 typedef bool _Equality<K>(K a, K b);
5 """line 10, column 28 of dart:collection/hash_map.dart: """, 5 typedef int _Hasher<K>(K object);
6 a.hashCode is int, true); 6 abstract class HashMap<K, V> implements Map<K, V> {factory HashMap({
7 typedef bool _Equality<K>(K a, K b); 7 bool equals(K key1, K key2), int hashCode(K key), bool isValidKey(potentialKey )}
8 typedef int _Hasher<K>(K object); 8 ) {
9 abstract class HashMap<K, V> implements Map<K, V> { 9 if (isValidKey == null) {
10 factory HashMap({bool equals(K key1, K key2), int hashCode(K key), 10 if (hashCode == null) {
11 bool isValidKey(potentialKey)}) { 11 if (equals == null) {
12 if (isValidKey == null) { 12 return new _HashMap<K, V>();
13 if (hashCode == null) {
14 if (equals == null) {
15 return new _HashMap<K, V>();
16 } 13 }
17 hashCode = _defaultHashCode; 14 hashCode = _defaultHashCode;
18 } else { 15 }
19 if (identical(identityHashCode, hashCode) && 16 else {
20 identical(identical, equals)) { 17 if (identical(identityHashCode, hashCode) && identical(identical, equals)) {
21 return new _IdentityHashMap<K, V>(); 18 return new _IdentityHashMap<K, V>();
22 } 19 }
23 if (equals == null) { 20 if (equals == null) {
24 equals = _defaultEquals; 21 equals = _defaultEquals;
25 } 22 }
26 } 23 }
27 } else { 24 }
28 if (hashCode == null) { 25 else {
29 hashCode = _defaultHashCode; 26 if (hashCode == null) {
27 hashCode = _defaultHashCode;
30 } 28 }
31 if (equals == null) { 29 if (equals == null) {
32 equals = _defaultEquals; 30 equals = _defaultEquals;
33 } 31 }
34 } 32 }
35 return new _CustomHashMap<K, V>(equals, hashCode, isValidKey); 33 return new _CustomHashMap<K, V>(equals, hashCode, isValidKey);
36 } 34 }
37 factory HashMap.identity() = _IdentityHashMap<K, V>; 35 factory HashMap.identity() = _IdentityHashMap<K, V>;
38 factory HashMap.from(Map other) { 36 factory HashMap.from(Map other) {
39 HashMap<K, V> result = new HashMap<K, V>(); 37 HashMap<K, V> result = new HashMap<K, V>();
40 other.forEach((k, v) { 38 other.forEach((k, v) {
41 result[k] = DDC$RT.cast(v, dynamic, V, "CastGeneral", 39 result[k] = DDC$RT.cast(v, dynamic, V, "CastGeneral", """line 112, column 40 of dart:collection/hash_map.dart: """, v is V, false);
42 """line 112, column 40 of dart:collection/hash_map.dart: """, v is V, 40 }
43 false); 41 );
44 }); 42 return result;
45 return result;
46 } 43 }
47 factory HashMap.fromIterable(Iterable iterable, 44 factory HashMap.fromIterable(Iterable iterable, {
48 {K key(element), V value(element)}) { 45 K key(element), V value(element)}
49 HashMap<K, V> map = new HashMap<K, V>(); 46 ) {
50 Maps._fillMapWithMappedIterable(map, iterable, key, value); 47 HashMap<K, V> map = new HashMap<K, V>();
51 return map; 48 Maps._fillMapWithMappedIterable(map, iterable, key, value);
49 return map;
52 } 50 }
53 factory HashMap.fromIterables(Iterable<K> keys, Iterable<V> values) { 51 factory HashMap.fromIterables(Iterable<K> keys, Iterable<V> values) {
54 HashMap<K, V> map = new HashMap<K, V>(); 52 HashMap<K, V> map = new HashMap<K, V>();
55 Maps._fillMapWithIterables(map, keys, values); 53 Maps._fillMapWithIterables(map, keys, values);
56 return map; 54 return map;
57 } 55 }
58 } 56 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698