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

Unified Diff: runtime/vm/object.cc

Issue 484693003: Improve polymorphic inlining of int/int double/double operations. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased and addressed comments Created 6 years, 4 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/vm/method_recognizer.h ('k') | runtime/vm/stub_code.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 39445)
+++ runtime/vm/object.cc (working copy)
@@ -11351,11 +11351,15 @@
ASSERT(!target.IsNull());
if (NumArgsTested() > 0) {
// Create a fake cid entry, so that we can store the target.
- GrowableArray<intptr_t> class_ids(NumArgsTested());
- for (intptr_t i = 0; i < NumArgsTested(); i++) {
- class_ids.Add(kObjectCid);
+ if (NumArgsTested() == 1) {
+ AddReceiverCheck(kObjectCid, target, 1);
+ } else {
+ GrowableArray<intptr_t> class_ids(NumArgsTested());
+ for (intptr_t i = 0; i < NumArgsTested(); i++) {
+ class_ids.Add(kObjectCid);
+ }
+ AddCheck(class_ids, target);
}
- AddCheck(class_ids, target);
return;
}
ASSERT(NumArgsTested() >= 0);
« no previous file with comments | « runtime/vm/method_recognizer.h ('k') | runtime/vm/stub_code.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698