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

Unified Diff: runtime/lib/integers.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/integers.dart
diff --git a/runtime/lib/integers.dart b/runtime/lib/integers.dart
index b86b71cad6a0da13b8183e16be9c577272fcac29..0c5b11985bad5dd6648392883097aec8ee5f26cc 100644
--- a/runtime/lib/integers.dart
+++ b/runtime/lib/integers.dart
@@ -408,8 +408,8 @@ class _Smi extends _IntegerImplementation implements int {
throw new UnsupportedError(
"_Smi can only be allocated by the VM");
}
- int get _identityHashCode => this;
int get hashCode => this;
+ int get _identityHashCode => this;
int operator ~() native "Smi_bitNegate";
int get bitLength native "Smi_bitLength";
@@ -608,8 +608,8 @@ class _Mint extends _IntegerImplementation implements int {
throw new UnsupportedError(
"_Mint can only be allocated by the VM");
}
- int get _identityHashCode => this;
int get hashCode => this;
+ int get _identityHashCode => this;
int operator ~() native "Mint_bitNegate";
int get bitLength native "Mint_bitLength";

Powered by Google App Engine
This is Rietveld 408576698