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

Side by Side Diff: runtime/lib/collection_patch.dart

Issue 2451623006: Reland "Merge more Kernel infrastructure from kernel_sdk SDK fork." (Closed)
Patch Set: Fix Created 4 years, 1 month 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
« no previous file with comments | « runtime/bin/stdio_patch.dart ('k') | runtime/lib/collection_sources.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:typed_data';
6 import 'dart:_internal' as internal;
7
5 @patch class HashMap<K, V> { 8 @patch class HashMap<K, V> {
6 @patch factory HashMap({ bool equals(K key1, K key2), 9 @patch factory HashMap({ bool equals(K key1, K key2),
7 int hashCode(K key), 10 int hashCode(K key),
8 bool isValidKey(potentialKey) }) { 11 bool isValidKey(potentialKey) }) {
9 if (isValidKey == null) { 12 if (isValidKey == null) {
10 if (hashCode == null) { 13 if (hashCode == null) {
11 if (equals == null) { 14 if (equals == null) {
12 return new _HashMap<K, V>(); 15 return new _HashMap<K, V>();
13 } 16 }
14 hashCode = _defaultHashCode; 17 hashCode = _defaultHashCode;
15 } else { 18 } else {
16 if (identical(identityHashCode, hashCode) && 19 if (identical(identityHashCode, hashCode) &&
17 identical(identical, equals)) { 20 identical(identical, equals)) {
18 return new _IdentityHashMap<K, V>(); 21 return new _IdentityHashMap<K, V>();
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 if (equals == null) { 972 if (equals == null) {
970 equals = _defaultEquals; 973 equals = _defaultEquals;
971 } 974 }
972 } 975 }
973 return new _CompactLinkedCustomHashSet<E>(equals, hashCode, isValidKey); 976 return new _CompactLinkedCustomHashSet<E>(equals, hashCode, isValidKey);
974 } 977 }
975 978
976 @patch factory LinkedHashSet.identity() = 979 @patch factory LinkedHashSet.identity() =
977 _CompactLinkedIdentityHashSet<E>; 980 _CompactLinkedIdentityHashSet<E>;
978 } 981 }
OLDNEW
« no previous file with comments | « runtime/bin/stdio_patch.dart ('k') | runtime/lib/collection_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698