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

Unified Diff: runtime/lib/object_patch.dart

Issue 13190014: Optimizes 'as' operation in similar way as 'instanceof': collect type feedback in unoptimized mode… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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
===================================================================
--- runtime/lib/object_patch.dart (revision 20744)
+++ runtime/lib/object_patch.dart (working copy)
@@ -41,13 +41,17 @@
invocation.namedArguments);
}
+ /* patch */ Type get runtimeType native "Object_runtimeType";
+
// Call this function instead of inlining instanceof, thus collecting
// type feedback and reducing code size of unoptimized code.
- _instanceOf(instantiator,
- instantiator_type_arguments,
- type,
- bool negate)
+ bool _instanceOf(instantiator,
+ instantiator_type_arguments,
+ type,
+ bool negate)
native "Object_instanceOf";
- /* patch */ Type get runtimeType native "Object_runtimeType";
+ // 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