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/linked_hash_map.dart

Issue 959913003: cleanup patch generation to preseve comments and remove @patch (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
3 abstract class LinkedHashMap<K, V> implements HashMap<K, V> { 3 abstract class LinkedHashMap<K, V> implements HashMap<K, V> {
4 @patch factory LinkedHashMap({bool equals(K key1, K key2), 4 factory LinkedHashMap({bool equals(K key1, K key2), int hashCode(K key),
5 int hashCode(K key), bool isValidKey(potentialKey)}) { 5 bool isValidKey(potentialKey)}) {
6 if (isValidKey == null) { 6 if (isValidKey == null) {
7 if (hashCode == null) { 7 if (hashCode == null) {
8 if (equals == null) { 8 if (equals == null) {
9 return new _LinkedHashMap<K, V>(); 9 return new _LinkedHashMap<K, V>();
10 } 10 }
11 hashCode = _defaultHashCode; 11 hashCode = _defaultHashCode;
12 } else { 12 } else {
13 if (identical(identityHashCode, hashCode) && 13 if (identical(identityHashCode, hashCode) &&
14 identical(identical, equals)) { 14 identical(identical, equals)) {
15 return new _LinkedIdentityHashMap<K, V>(); 15 return new _LinkedIdentityHashMap<K, V>();
16 } 16 }
17 if (equals == null) { 17 if (equals == null) {
18 equals = _defaultEquals; 18 equals = _defaultEquals;
19 } 19 }
20 } 20 }
21 } else { 21 } else {
22 if (hashCode == null) { 22 if (hashCode == null) {
23 hashCode = _defaultHashCode; 23 hashCode = _defaultHashCode;
24 } 24 }
25 if (equals == null) { 25 if (equals == null) {
26 equals = _defaultEquals; 26 equals = _defaultEquals;
27 } 27 }
28 } 28 }
29 return new _LinkedCustomHashMap<K, V>(equals, hashCode, isValidKey); 29 return new _LinkedCustomHashMap<K, V>(equals, hashCode, isValidKey);
30 } 30 }
31 @patch factory LinkedHashMap.identity() = _LinkedIdentityHashMap<K, V>; 31 factory LinkedHashMap.identity() = _LinkedIdentityHashMap<K, V>;
32 factory LinkedHashMap.from(Map other) { 32 factory LinkedHashMap.from(Map other) {
33 LinkedHashMap<K, V> result = new LinkedHashMap<K, V>(); 33 LinkedHashMap<K, V> result = new LinkedHashMap<K, V>();
34 other.forEach((k, v) { 34 other.forEach((k, v) {
35 result[k] = DDC$RT.cast(v, dynamic, V, "CastGeneral", 35 result[k] = DDC$RT.cast(v, dynamic, V, "CastGeneral",
36 """line 65, column 40 of dart:collection/linked_hash_map.dart: """, 36 """line 99, column 40 of dart:collection/linked_hash_map.dart: """,
37 v is V, false); 37 v is V, false);
38 }); 38 });
39 return result; 39 return result;
40 } 40 }
41 factory LinkedHashMap.fromIterable(Iterable iterable, 41 factory LinkedHashMap.fromIterable(Iterable iterable,
42 {K key(element), V value(element)}) { 42 {K key(element), V value(element)}) {
43 LinkedHashMap<K, V> map = new LinkedHashMap<K, V>(); 43 LinkedHashMap<K, V> map = new LinkedHashMap<K, V>();
44 Maps._fillMapWithMappedIterable(map, iterable, key, value); 44 Maps._fillMapWithMappedIterable(map, iterable, key, value);
45 return map; 45 return map;
46 } 46 }
47 factory LinkedHashMap.fromIterables(Iterable<K> keys, Iterable<V> values) { 47 factory LinkedHashMap.fromIterables(Iterable<K> keys, Iterable<V> values) {
48 LinkedHashMap<K, V> map = new LinkedHashMap<K, V>(); 48 LinkedHashMap<K, V> map = new LinkedHashMap<K, V>();
49 Maps._fillMapWithIterables(map, keys, values); 49 Maps._fillMapWithIterables(map, keys, values);
50 return map; 50 return map;
51 } 51 }
52 } 52 }
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/collection/hash_set.dart ('k') | test/dart_codegen/expect/collection/linked_hash_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698