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

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: 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
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..4c06594bbf056bdb709b81c0893885a2d008b135 100644
--- a/sdk/lib/collection/hash_map.dart
+++ b/sdk/lib/collection/hash_map.dart
@@ -63,6 +63,14 @@ 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)
floitsch 2013/09/24 15:45:46 Not sure if there needs to be a new-line before th
Lasse Reichstein Nielsen 2013/09/25 09:37:05 Line seems to be needed.
+ */
+ external factory HashMap.identity();
+
+ /**
* Creates a [HashMap] that contains all key value pairs of [other].
*/
factory HashMap.from(Map<K, V> other) {

Powered by Google App Engine
This is Rietveld 408576698