| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/globals.h" // Needed here to get TARGET_ARCH_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/debugger.h" | 10 #include "vm/debugger.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 | 70 |
| 71 bool FlowGraphCompiler::IsLeaf() const { | 71 bool FlowGraphCompiler::IsLeaf() const { |
| 72 return is_dart_leaf_ && | 72 return is_dart_leaf_ && |
| 73 !parsed_function_.function().IsClosureFunction() && | 73 !parsed_function_.function().IsClosureFunction() && |
| 74 (parsed_function().copied_parameter_count() == 0); | 74 (parsed_function().copied_parameter_count() == 0); |
| 75 } | 75 } |
| 76 | 76 |
| 77 | 77 |
| 78 void FlowGraphCompiler::InitCompiler() { | 78 void FlowGraphCompiler::InitCompiler() { |
| 79 pc_descriptors_list_ = new DescriptorList(); | 79 pc_descriptors_list_ = new DescriptorList(64); |
| 80 exception_handlers_list_ = new ExceptionHandlerList(); | 80 exception_handlers_list_ = new ExceptionHandlerList(); |
| 81 block_info_.Clear(); | 81 block_info_.Clear(); |
| 82 for (int i = 0; i < block_order_.length(); ++i) { | 82 for (int i = 0; i < block_order_.length(); ++i) { |
| 83 block_info_.Add(new BlockInfo()); | 83 block_info_.Add(new BlockInfo()); |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 | 86 |
| 87 | 87 |
| 88 bool FlowGraphCompiler::CanOptimize() { | 88 bool FlowGraphCompiler::CanOptimize() { |
| 89 return !FLAG_report_usage_count && | 89 return !FLAG_report_usage_count && |
| (...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 return; | 792 return; |
| 793 } | 793 } |
| 794 } | 794 } |
| 795 | 795 |
| 796 // This move is not blocked. | 796 // This move is not blocked. |
| 797 EmitMove(index); | 797 EmitMove(index); |
| 798 } | 798 } |
| 799 | 799 |
| 800 | 800 |
| 801 } // namespace dart | 801 } // namespace dart |
| OLD | NEW |