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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 110703004: VM: Generalize using propagated cids for to >1 arguments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 31017)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -110,10 +110,6 @@
intptr_t cid = call->PushArgumentAt(i)->value()->Type()->ToCid();
class_ids.Add(cid);
}
- // TODO(srdjan): Test for number of arguments checked greater than 1.
- if (class_ids.length() != 1) {
- return false;
- }
if (class_ids[0] != kDynamicCid) {
ArgumentsDescriptor args_desc(
Array::Handle(ArgumentsDescriptor::New(call->ArgumentCount(),
@@ -138,7 +134,12 @@
Object::empty_array(), // Dummy argument descriptor.
call->deopt_id(),
class_ids.length()));
- ic_data.AddReceiverCheck(class_ids[0], function);
+ if (class_ids.length() > 1) {
+ ic_data.AddCheck(class_ids, function);
+ } else {
+ ASSERT(class_ids.length() == 1);
+ ic_data.AddReceiverCheck(class_ids[0], function);
+ }
call->set_ic_data(&ic_data);
return true;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698