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/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/cha.h" | 9 #include "vm/cha.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 list_class_(Class::ZoneHandle( | 90 list_class_(Class::ZoneHandle( |
91 Library::Handle(Library::CoreLibrary()). | 91 Library::Handle(Library::CoreLibrary()). |
92 LookupClass(Symbols::List()))), | 92 LookupClass(Symbols::List()))), |
93 parallel_move_resolver_(this), | 93 parallel_move_resolver_(this), |
94 pending_deoptimization_env_(NULL) { | 94 pending_deoptimization_env_(NULL) { |
95 ASSERT(assembler != NULL); | 95 ASSERT(assembler != NULL); |
96 ASSERT(!list_class_.IsNull()); | 96 ASSERT(!list_class_.IsNull()); |
97 } | 97 } |
98 | 98 |
99 | 99 |
100 bool FlowGraphCompiler::HasFinally() const { | |
101 return parsed_function().function().has_finally(); | |
102 } | |
103 | |
104 | |
105 void FlowGraphCompiler::InitCompiler() { | 100 void FlowGraphCompiler::InitCompiler() { |
106 pc_descriptors_list_ = new DescriptorList(64); | 101 pc_descriptors_list_ = new DescriptorList(64); |
107 exception_handlers_list_ = new ExceptionHandlerList(); | 102 exception_handlers_list_ = new ExceptionHandlerList(); |
108 block_info_.Clear(); | 103 block_info_.Clear(); |
109 // Conservative detection of leaf routines used to remove the stack check | 104 // Conservative detection of leaf routines used to remove the stack check |
110 // on function entry. | 105 // on function entry. |
111 bool is_leaf = !parsed_function().function().IsClosureFunction() | 106 bool is_leaf = !parsed_function().function().IsClosureFunction() |
112 && is_optimizing() | 107 && is_optimizing() |
113 && !flow_graph().IsCompiledForOsr(); | 108 && !flow_graph().IsCompiledForOsr(); |
114 // Initialize block info and search optimized (non-OSR) code for calls | 109 // Initialize block info and search optimized (non-OSR) code for calls |
(...skipping 1156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 | 1266 |
1272 for (int i = 0; i < len; i++) { | 1267 for (int i = 0; i < len; i++) { |
1273 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), | 1268 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), |
1274 &Function::ZoneHandle(ic_data.GetTargetAt(i)), | 1269 &Function::ZoneHandle(ic_data.GetTargetAt(i)), |
1275 ic_data.GetCountAt(i))); | 1270 ic_data.GetCountAt(i))); |
1276 } | 1271 } |
1277 sorted->Sort(HighestCountFirst); | 1272 sorted->Sort(HighestCountFirst); |
1278 } | 1273 } |
1279 | 1274 |
1280 } // namespace dart | 1275 } // namespace dart |
OLD | NEW |