| 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/aot_optimizer.h" | 7 #include "vm/aot_optimizer.h" |
| 8 #include "vm/block_scheduler.h" | 8 #include "vm/block_scheduler.h" |
| 9 #include "vm/branch_optimizer.h" | 9 #include "vm/branch_optimizer.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 | 641 |
| 642 // Do not rely on function type feedback or presence of code to determine | 642 // Do not rely on function type feedback or presence of code to determine |
| 643 // if a function was compiled. | 643 // if a function was compiled. |
| 644 if (!FLAG_precompiled_mode && !function.was_compiled()) { | 644 if (!FLAG_precompiled_mode && !function.was_compiled()) { |
| 645 TRACE_INLINING(THR_Print(" Bailout: not compiled yet\n")); | 645 TRACE_INLINING(THR_Print(" Bailout: not compiled yet\n")); |
| 646 PRINT_INLINING_TREE("Not compiled", | 646 PRINT_INLINING_TREE("Not compiled", |
| 647 &call_data->caller, &function, call_data->call); | 647 &call_data->caller, &function, call_data->call); |
| 648 return false; | 648 return false; |
| 649 } | 649 } |
| 650 | 650 |
| 651 // Type feedback may have been cleared for this function (ClearICDataArray), |
| 652 // but we need it for inlining. |
| 653 if (!FLAG_precompiled_mode && (function.ic_data_array() == Array::null())) { |
| 654 TRACE_INLINING(THR_Print(" Bailout: type feedback cleared\n")); |
| 655 PRINT_INLINING_TREE("Not compiled", |
| 656 &call_data->caller, &function, call_data->call); |
| 657 return false; |
| 658 } |
| 659 |
| 651 // Abort if this function has deoptimized too much. | 660 // Abort if this function has deoptimized too much. |
| 652 if (function.deoptimization_counter() >= | 661 if (function.deoptimization_counter() >= |
| 653 FLAG_max_deoptimization_counter_threshold) { | 662 FLAG_max_deoptimization_counter_threshold) { |
| 654 function.set_is_inlinable(false); | 663 function.set_is_inlinable(false); |
| 655 TRACE_INLINING(THR_Print(" Bailout: deoptimization threshold\n")); | 664 TRACE_INLINING(THR_Print(" Bailout: deoptimization threshold\n")); |
| 656 PRINT_INLINING_TREE("Deoptimization threshold exceeded", | 665 PRINT_INLINING_TREE("Deoptimization threshold exceeded", |
| 657 &call_data->caller, &function, call_data->call); | 666 &call_data->caller, &function, call_data->call); |
| 658 return false; | 667 return false; |
| 659 } | 668 } |
| 660 | 669 |
| (...skipping 2427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3088 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last); | 3097 return InlineDoubleOp(flow_graph, Token::kMUL, call, entry, last); |
| 3089 case MethodRecognizer::kDoubleDiv: | 3098 case MethodRecognizer::kDoubleDiv: |
| 3090 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last); | 3099 return InlineDoubleOp(flow_graph, Token::kDIV, call, entry, last); |
| 3091 default: | 3100 default: |
| 3092 return false; | 3101 return false; |
| 3093 } | 3102 } |
| 3094 } | 3103 } |
| 3095 | 3104 |
| 3096 | 3105 |
| 3097 } // namespace dart | 3106 } // namespace dart |
| OLD | NEW |