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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart

Issue 17569004: Implement hashCode on objects stored in a set or used as map keys. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased on CL 17588005. Created 7 years, 6 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: dart/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
index 76b9efce76cb64030ce662e8dfbd59f6055bff35..3adbd635aca1e16a64f64099bddb8779c2070077 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/runtime_types.dart
@@ -826,6 +826,8 @@ class Substitution {
class TypeCheck {
final ClassElement cls;
final Substitution substitution;
+ final int hashCode = (nextHash++) & 0x3fffffff;
+ static int nextHash = 49;
TypeCheck(this.cls, this.substitution);
}

Powered by Google App Engine
This is Rietveld 408576698