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

Unified Diff: runtime/lib/collection_patch.dart

Issue 22561003: Convert null-marker in HashMap.forEach. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | « no previous file | tests/language/hash_map_null_key_foreach_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/collection_patch.dart
diff --git a/runtime/lib/collection_patch.dart b/runtime/lib/collection_patch.dart
index 415982ca77d1f89b656cfe696495f4fa3cde9bd0..66efd3a44d2040f8e8e71aee51b10a4b78fa52be 100644
--- a/runtime/lib/collection_patch.dart
+++ b/runtime/lib/collection_patch.dart
@@ -94,7 +94,7 @@ patch class HashMap<K, V> {
for (int offset = 0; offset < table.length; offset += entrySize) {
Object entry = table[offset];
if (!_hashTable._isFree(entry)) {
- K key = entry;
+ K key = identical(entry, _NULL) ? null : entry;
V value = _hashTable._value(offset);
action(key, value);
_hashTable._checkModification(modificationCount);
« no previous file with comments | « no previous file | tests/language/hash_map_null_key_foreach_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698