| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/flow_graph_inliner.h" | 5 #include "vm/flow_graph_inliner.h" |
| 6 | 6 |
| 7 #include "vm/block_scheduler.h" | 7 #include "vm/block_scheduler.h" |
| 8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
| 9 #include "vm/flags.h" | 9 #include "vm/flags.h" |
| 10 #include "vm/flow_graph.h" | 10 #include "vm/flow_graph.h" |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 const Function* target = | 355 const Function* target = |
| 356 &Function::ZoneHandle( | 356 &Function::ZoneHandle( |
| 357 instance_call->ic_data().GetTargetAt(0)); | 357 instance_call->ic_data().GetTargetAt(0)); |
| 358 inlined_info->Add(InlinedInfo( | 358 inlined_info->Add(InlinedInfo( |
| 359 caller, target, depth + 1, instance_call, "Too deep")); | 359 caller, target, depth + 1, instance_call, "Too deep")); |
| 360 } | 360 } |
| 361 } | 361 } |
| 362 } else if (current->IsStaticCall()) { | 362 } else if (current->IsStaticCall()) { |
| 363 StaticCallInstr* static_call = current->AsStaticCall(); | 363 StaticCallInstr* static_call = current->AsStaticCall(); |
| 364 if (!inline_only_recognized_methods || | 364 if (!inline_only_recognized_methods || |
| 365 static_call->function().is_recognized()) { | 365 static_call->function().IsRecognized()) { |
| 366 static_calls_.Add(StaticCallInfo(static_call, graph)); | 366 static_calls_.Add(StaticCallInfo(static_call, graph)); |
| 367 } else { | 367 } else { |
| 368 // Method not inlined because inlining too deep and method | 368 // Method not inlined because inlining too deep and method |
| 369 // not recognized. | 369 // not recognized. |
| 370 if (FLAG_print_inlining_tree) { | 370 if (FLAG_print_inlining_tree) { |
| 371 const Function* caller = &graph->parsed_function().function(); | 371 const Function* caller = &graph->parsed_function().function(); |
| 372 const Function* target = &static_call->function(); | 372 const Function* target = &static_call->function(); |
| 373 inlined_info->Add(InlinedInfo( | 373 inlined_info->Add(InlinedInfo( |
| 374 caller, target, depth + 1, static_call, "Too deep")); | 374 caller, target, depth + 1, static_call, "Too deep")); |
| 375 } | 375 } |
| (...skipping 1328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1704 OS::Print("After Inlining of %s\n", flow_graph_-> | 1704 OS::Print("After Inlining of %s\n", flow_graph_-> |
| 1705 parsed_function().function().ToFullyQualifiedCString()); | 1705 parsed_function().function().ToFullyQualifiedCString()); |
| 1706 FlowGraphPrinter printer(*flow_graph_); | 1706 FlowGraphPrinter printer(*flow_graph_); |
| 1707 printer.PrintBlocks(); | 1707 printer.PrintBlocks(); |
| 1708 } | 1708 } |
| 1709 } | 1709 } |
| 1710 } | 1710 } |
| 1711 } | 1711 } |
| 1712 | 1712 |
| 1713 } // namespace dart | 1713 } // namespace dart |
| OLD | NEW |