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/linked_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/linked_hash_map.dart
diff --git a/sdk/lib/collection/linked_hash_map.dart b/sdk/lib/collection/linked_hash_map.dart
index 34744d023591963b2b982bdac1db269c07735a9f..ef63bcc3720ceb2b4c041c2438be44ff8fbaf50f 100644
--- a/sdk/lib/collection/linked_hash_map.dart
+++ b/sdk/lib/collection/linked_hash_map.dart
@@ -24,6 +24,14 @@ abstract class LinkedHashMap<K, V> implements HashMap<K, V> {
bool isValidKey(potentialKey) });
/**
+ * Creates an insertion-ordered identity-based map.
+ *
+ * Effectively a shorthand for:
+ * new LinkedHashMap(equals: identical, hashCode: identityHashCodeOf)
+ */
+ external factory LinkedHashMap.identity();
+
+ /**
* Creates a [LinkedHashMap] that contains all key value pairs of [other].
*/
factory LinkedHashMap.from(Map<K, V> other) {

Powered by Google App Engine
This is Rietveld 408576698