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

Unified Diff: runtime/lib/object_patch.dart

Issue 1222863003: Make frequent type checks (instanceof) faster by adding dedicated instanceof methods; improves dart… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: flag Created 5 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 52d7546a82d4e178b4ab752e3c8a11c835b0bad2..be42a57f618209d5770db07284128ffdb230745a 100644
--- a/runtime/lib/object_patch.dart
+++ b/runtime/lib/object_patch.dart
@@ -59,6 +59,12 @@ patch class Object {
bool negate)
native "Object_instanceOf";
+ bool _instanceOfDouble(bool negate) native "Object_instanceOfDouble";
+ bool _instanceOfNum(bool negate) native "Object_instanceOfNum";
+ bool _instanceOfInt(bool negate) native "Object_instanceOfInt";
+ bool _instanceOfSmi(bool negate) native "Object_instanceOfSmi";
+ bool _instanceOfString(bool negate) native "Object_instanceOfString";
+
// Call this function instead of inlining 'as', thus collecting type
// feedback. Returns receiver.
_as(instantiator, instantiator_type_arguments, type) native "Object_as";
« 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