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

Unified Diff: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart

Issue 2154583002: dart2js: get:hashCode methods to avoid Object.hashCode (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: xxx Created 4 years, 5 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 | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index c829cfd74655a11fe37caefce20ccfdd4d189631..d5492f1a3d1446b582e61d0f3d53f4d2d1626282 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -88,9 +88,9 @@ abstract class TypeInformation {
/// change.
bool isStable = false;
- // TypeInformations are unique.
- static int staticHashCode = 0;
- final int hashCode = staticHashCode++;
+ // TypeInformations are unique. Store an arbitrary identity hash code.
+ static int _staticHashCode = 0;
+ final int hashCode = _staticHashCode = (_staticHashCode + 1).toUnsigned(30);
bool get isConcrete => false;
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698