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

Unified Diff: runtime/lib/bool_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/bool_patch.dart
diff --git a/runtime/lib/bool_patch.dart b/runtime/lib/bool_patch.dart
index 274b1539757a09ffc899f3af755b8750c27f20d3..bbcbdb40264636641272b9d4c42ecf0c61cfd6f3 100644
--- a/runtime/lib/bool_patch.dart
+++ b/runtime/lib/bool_patch.dart
@@ -10,8 +10,6 @@ patch class bool {
{bool defaultValue: false})
native "Bool_fromEnvironment";
- int get _identityHashCode {
- return this ? 1231 : 1237;
- }
- int get hashCode => _identityHashCode;
+ int get hashCode => this ? 1231 : 1237;
+ int get _identityHashCode => this ? 1231 : 1237;
}
« no previous file with comments | « runtime/lib/bigint.dart ('k') | runtime/lib/double.dart » ('j') | runtime/lib/double.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698