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

Unified Diff: runtime/lib/expando_patch.dart

Issue 24556002: Make VM Expando use identityHashCode instead of object's hashCode. (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
« no previous file with comments | « no previous file | tests/corelib/expando_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/expando_patch.dart
diff --git a/runtime/lib/expando_patch.dart b/runtime/lib/expando_patch.dart
index 7608861d77e2d5961baf1d8f5042f41d96a2ed9f..0c9427ca41c7ad1f83710b8ee453c6932f8f5c7f 100644
--- a/runtime/lib/expando_patch.dart
+++ b/runtime/lib/expando_patch.dart
@@ -14,7 +14,7 @@ patch class Expando<T> {
_checkType(object);
var mask = _size - 1;
- var idx = object.hashCode & mask;
+ var idx = object._identityHashCode & mask;
var wp = _data[idx];
while (wp != null) {
@@ -35,7 +35,7 @@ patch class Expando<T> {
_checkType(object);
var mask = _size - 1;
- var idx = object.hashCode & mask;
+ var idx = object._identityHashCode & mask;
var empty_idx = -1;
var wp = _data[idx];
@@ -64,7 +64,7 @@ patch class Expando<T> {
if (value == null) {
// Not entering a null value. We just needed to make sure to clear an
- // existing value if it existed.
+ // existing value if it existed.
return;
}
« no previous file with comments | « no previous file | tests/corelib/expando_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698