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

Unified Diff: runtime/lib/object_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: Improved the speed of instance-of for unoptimized code. 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 | « runtime/lib/object.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/object_patch.dart
diff --git a/runtime/lib/object_patch.dart b/runtime/lib/object_patch.dart
index 69723b38039f46b3eec4b1f5770768a6eea5b6eb..719e59220b6e268e084a99d43476689434167ba9 100644
--- a/runtime/lib/object_patch.dart
+++ b/runtime/lib/object_patch.dart
@@ -58,6 +58,11 @@ patch class Object {
bool _instanceOf(instantiator_type_arguments, type, bool negate)
native "Object_instanceOf";
+ // Group of functions for implementing fast simple instance of.
+ bool _simpleInstanceOf(type) native "Object_simpleInstanceOf";
+ bool _simpleInstanceOfTrue(type) => true;
+ bool _simpleInstanceOfFalse(type) => false;
+
bool _instanceOfDouble(bool negate) native "Object_instanceOfDouble";
bool _instanceOfNum(bool negate) native "Object_instanceOfNum";
bool _instanceOfInt(bool negate) native "Object_instanceOfInt";
« no previous file with comments | « runtime/lib/object.cc ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698