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

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: 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/collection/hash_set.dart ('k') | sdk/lib/collection/linked_hash_set.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..924077c373c8b3da5039d951fb1b9131a5fca926 100644
--- a/sdk/lib/collection/linked_hash_map.dart
+++ b/sdk/lib/collection/linked_hash_map.dart
@@ -24,6 +24,15 @@ 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) {
« no previous file with comments | « sdk/lib/collection/hash_set.dart ('k') | sdk/lib/collection/linked_hash_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698