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

Unified Diff: runtime/vm/code_generator.cc

Issue 10594002: More ICData cleanups: try to use ICData instead of converting it to another intermediate representa… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 8871)
+++ runtime/vm/code_generator.cc (working copy)
@@ -956,12 +956,17 @@
}
#endif // DEBUG
- GrowableArray<intptr_t> class_ids;
- ASSERT(ic_data.num_args_tested() == args.length());
- for (intptr_t i = 0; i < args.length(); i++) {
- class_ids.Add(Class::Handle(args[i]->clazz()).id());
+ if (args.length() == 1) {
+ ic_data.AddReceiverCheck(Class::Handle(args[0]->clazz()).id(),
+ target_function);
+ } else {
+ GrowableArray<intptr_t> class_ids;
+ ASSERT(ic_data.num_args_tested() == args.length());
+ for (intptr_t i = 0; i < args.length(); i++) {
+ class_ids.Add(Class::Handle(args[i]->clazz()).id());
+ }
+ ic_data.AddCheck(class_ids, target_function);
}
- ic_data.AddCheck(class_ids, target_function);
if (FLAG_trace_ic) {
OS::Print("InlineCacheMissHandler %d call at 0x%x' "
"adding <%s> id:%d -> <%s>\n",
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698