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

Unified Diff: pkg/compiler/lib/src/dart_types.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/constants/expressions.dart ('k') | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/dart_types.dart
diff --git a/pkg/compiler/lib/src/dart_types.dart b/pkg/compiler/lib/src/dart_types.dart
index 6efca512b8fd8c67b7f7c32232debc613a49e842..79fea05c72785fa79fbd2e0a72cfb9f9fe3d5f2c 100644
--- a/pkg/compiler/lib/src/dart_types.dart
+++ b/pkg/compiler/lib/src/dart_types.dart
@@ -298,6 +298,8 @@ class VoidType extends DartType {
}
String toString() => name;
+
+ int get hashCode => 6007;
}
class MalformedType extends DartType {
@@ -323,8 +325,8 @@ class MalformedType extends DartType {
*/
final List<DartType> typeArguments;
- final int hashCode = (nextHash++) & 0x3fffffff;
- static int nextHash = 43765;
+ final int hashCode = _nextHash = (_nextHash + 1).toUnsigned(30);
+ static int _nextHash = 43765;
MalformedType(this.element, this.userProvidedBadType,
[this.typeArguments = null]);
« no previous file with comments | « pkg/compiler/lib/src/constants/expressions.dart ('k') | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698