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/hash_set.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_map.dart ('k') | sdk/lib/collection/linked_hash_map.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/collection/hash_set.dart
diff --git a/sdk/lib/collection/hash_set.dart b/sdk/lib/collection/hash_set.dart
index f1241a84e45e190b20f9ad2a65b43ae27a380dd0..b60653ad1ca5ca7b089bd3d64e77cf63b87303f7 100644
--- a/sdk/lib/collection/hash_set.dart
+++ b/sdk/lib/collection/hash_set.dart
@@ -110,6 +110,15 @@ class HashSet<E> implements Set<E> {
bool isValidKey(potentialKey) });
/**
+ * Creates an unordered identity-based set.
+ *
+ * Effectively a shorthand for:
+ *
+ * new HashSet(equals: identical, hashCode: identityHashCodeOf)
+ */
+ external factory HashSet.identity();
+
+ /**
* Create a hash set containing the elements of [iterable].
*
* Creates a hash set as by `new HashSet<E>()` and adds each element of
« no previous file with comments | « sdk/lib/collection/hash_map.dart ('k') | sdk/lib/collection/linked_hash_map.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698