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

Unified Diff: sdk/lib/collection/hash_map.dart

Issue 24267023: Update implementations to use Object.identityHashCode for identity map/set (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Add tests. Fix few bugs now that it can run. Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/lib/collection_patch.dart ('k') | sdk/lib/collection/hash_set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/hash_map.dart
diff --git a/sdk/lib/collection/hash_map.dart b/sdk/lib/collection/hash_map.dart
index bcca966bba5504920f033b4be915596118f83024..775904639b62906d198174ac1d22d3f3b00c267e 100644
--- a/sdk/lib/collection/hash_map.dart
+++ b/sdk/lib/collection/hash_map.dart
@@ -63,6 +63,15 @@ abstract class HashMap<K, V> implements Map<K, V> {
bool isValidKey(potentialKey)});
/**
+ * Creates an unordered identity-based map.
+ *
+ * Effectively a shorthand for:
+ *
+ * new HashMap(equals: identical, hashCode: identityHashCodeOf)
+ */
+ external factory HashMap.identity();
+
+ /**
* Creates a [HashMap] that contains all key value pairs of [other].
*/
factory HashMap.from(Map<K, V> other) {
« no previous file with comments | « sdk/lib/_internal/lib/collection_patch.dart ('k') | sdk/lib/collection/hash_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698