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

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: 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 b2cedddd2101e909e8de72d72dce1ab328a9fe97..d85acea4fd3ef0921eca930ed620cbba33c9aacf 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
@@ -646,6 +646,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