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

Unified Diff: runtime/lib/null_patch.dart

Issue 2137673002: Sped up hashCode by removing megamorphic call to _identityHashCode. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
Index: runtime/lib/null_patch.dart
diff --git a/runtime/lib/null_patch.dart b/runtime/lib/null_patch.dart
index 61972d186647457abccdffbbc5289af6d5cdb924..047039bd0f0c9ffb4e96b19e59acf9228382a847 100644
--- a/runtime/lib/null_patch.dart
+++ b/runtime/lib/null_patch.dart
@@ -11,10 +11,8 @@ patch class Null {
}
static const _HASH_CODE = 2011; // The year Dart was announced and a prime.
- int get _identityHashCode => _HASH_CODE;
int get hashCode => _HASH_CODE;
+ int get _identityHashCode => _HASH_CODE;
- String toString() {
- return 'null';
- }
+ String toString() => 'null';
}

Powered by Google App Engine
This is Rietveld 408576698