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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/ssa/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: Merged with TOT 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/ssa/types.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/ssa/types.dart b/dart/sdk/lib/_internal/compiler/implementation/ssa/types.dart
index 38cc81253bc036dd348448bbf265c91e368f19f3..fd8d66058ae0b8dee096e862189c13abd526d705 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/ssa/types.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/ssa/types.dart
@@ -533,12 +533,14 @@ class HBoundedType extends HType {
return isIndexablePrimitive(compiler);
}
- bool operator ==(HType other) {
+ bool operator ==(other) {
if (other is !HBoundedType) return false;
HBoundedType bounded = other;
return mask == bounded.mask;
}
+ int get hashCode => mask.hashCode;
+
String toString() {
return 'BoundedType(mask=$mask)';
}

Powered by Google App Engine
This is Rietveld 408576698