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

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

Issue 2455593002: Revert "Merge more Kernel infrastructure from kernel_sdk SDK fork." (Closed)
Patch Set: 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
8 @patch class HashMap<K, V> { 5 @patch class HashMap<K, V> {
9 @patch factory HashMap({ bool equals(K key1, K key2), 6 @patch factory HashMap({ bool equals(K key1, K key2),
10 int hashCode(K key), 7 int hashCode(K key),
11 bool isValidKey(potentialKey) }) { 8 bool isValidKey(potentialKey) }) {
12 if (isValidKey == null) { 9 if (isValidKey == null) {
13 if (hashCode == null) { 10 if (hashCode == null) {
14 if (equals == null) { 11 if (equals == null) {
15 return new _HashMap<K, V>(); 12 return new _HashMap<K, V>();
16 } 13 }
17 hashCode = _defaultHashCode; 14 hashCode = _defaultHashCode;
18 } else { 15 } else {
19 if (identical(identityHashCode, hashCode) && 16 if (identical(identityHashCode, hashCode) &&
20 identical(identical, equals)) { 17 identical(identical, equals)) {
21 return new _IdentityHashMap<K, V>(); 18 return new _IdentityHashMap<K, V>();
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 if (equals == null) { 969 if (equals == null) {
973 equals = _defaultEquals; 970 equals = _defaultEquals;
974 } 971 }
975 } 972 }
976 return new _CompactLinkedCustomHashSet<E>(equals, hashCode, isValidKey); 973 return new _CompactLinkedCustomHashSet<E>(equals, hashCode, isValidKey);
977 } 974 }
978 975
979 @patch factory LinkedHashSet.identity() = 976 @patch factory LinkedHashSet.identity() =
980 _CompactLinkedIdentityHashSet<E>; 977 _CompactLinkedIdentityHashSet<E>;
981 } 978 }
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