Chromium Code Reviews| Index: runtime/vm/flow_graph_inliner.cc |
| =================================================================== |
| --- runtime/vm/flow_graph_inliner.cc (revision 34878) |
| +++ runtime/vm/flow_graph_inliner.cc (working copy) |
| @@ -473,9 +473,9 @@ |
| inlining_call_sites_ = call_sites_temp; |
| collected_call_sites_->Clear(); |
| // Inline call sites at the current depth. |
| + InlineInstanceCalls(); |
|
srdjan
2014/04/09 18:28:43
Any reason for changing the order?
Florian Schneider
2014/04/10 08:49:25
The reason is that dispatchers are instance calls,
|
| InlineStaticCalls(); |
| InlineClosureCalls(); |
| - InlineInstanceCalls(); |
| // Increment the inlining depth. Checked before recursive inlining. |
| ++inlining_depth_; |
| } |
| @@ -712,9 +712,18 @@ |
| return false; |
| } |
| - collected_call_sites_->FindCallSites(callee_graph, |
| - inlining_depth_, |
| - &inlined_info_); |
| + if (function.IsInvokeFieldDispatcher() || |
| + function.IsNoSuchMethodDispatcher()) { |
| + // Append call sites to the currently processed list so that dispatcher |
| + // methods get inlined regardless of the current depth. |
| + inlining_call_sites_->FindCallSites(callee_graph, |
| + 0, |
| + &inlined_info_); |
| + } else { |
| + collected_call_sites_->FindCallSites(callee_graph, |
| + inlining_depth_, |
| + &inlined_info_); |
| + } |
| // Add the function to the cache. |
| if (!in_cache) { |