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 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 TRACE_INLINING(OS::Print(" Bailout: inside try-block\n")); | 570 TRACE_INLINING(OS::Print(" Bailout: inside try-block\n")); |
571 PRINT_INLINING_TREE("Inside try-block", | 571 PRINT_INLINING_TREE("Inside try-block", |
572 &call_data->caller, &function, call_data->call); | 572 &call_data->caller, &function, call_data->call); |
573 return false; | 573 return false; |
574 } | 574 } |
575 | 575 |
576 // Make a handle for the unoptimized code so that it is not disconnected | 576 // Make a handle for the unoptimized code so that it is not disconnected |
577 // from the function while we are trying to inline it. | 577 // from the function while we are trying to inline it. |
578 const Code& unoptimized_code = Code::Handle(function.unoptimized_code()); | 578 const Code& unoptimized_code = Code::Handle(function.unoptimized_code()); |
579 // Abort if the inlinable bit on the function is low. | 579 // Abort if the inlinable bit on the function is low. |
580 if (!function.IsInlineable()) { | 580 if (!function.CanBeInlined()) { |
581 TRACE_INLINING(OS::Print(" Bailout: not inlinable\n")); | 581 TRACE_INLINING(OS::Print(" Bailout: not inlinable\n")); |
582 PRINT_INLINING_TREE("Not inlinable", | 582 PRINT_INLINING_TREE("Not inlinable", |
583 &call_data->caller, &function, call_data->call); | 583 &call_data->caller, &function, call_data->call); |
584 return false; | 584 return false; |
585 } | 585 } |
586 | 586 |
587 // Abort if this function has deoptimized too much. | 587 // Abort if this function has deoptimized too much. |
588 if (function.deoptimization_counter() >= | 588 if (function.deoptimization_counter() >= |
589 FLAG_deoptimization_counter_threshold) { | 589 FLAG_deoptimization_counter_threshold) { |
590 function.set_is_inlinable(false); | 590 function.set_is_inlinable(false); |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1703 OS::Print("After Inlining of %s\n", flow_graph_-> | 1703 OS::Print("After Inlining of %s\n", flow_graph_-> |
1704 parsed_function().function().ToFullyQualifiedCString()); | 1704 parsed_function().function().ToFullyQualifiedCString()); |
1705 FlowGraphPrinter printer(*flow_graph_); | 1705 FlowGraphPrinter printer(*flow_graph_); |
1706 printer.PrintBlocks(); | 1706 printer.PrintBlocks(); |
1707 } | 1707 } |
1708 } | 1708 } |
1709 } | 1709 } |
1710 } | 1710 } |
1711 | 1711 |
1712 } // namespace dart | 1712 } // namespace dart |
OLD | NEW |