| 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 24 matching lines...) Expand all Loading... |
| 35 const GrowableArray<BlockEntryInstr*>& block_order, | 35 const GrowableArray<BlockEntryInstr*>& block_order, |
| 36 bool is_optimizing, | 36 bool is_optimizing, |
| 37 bool is_ssa, | 37 bool is_ssa, |
| 38 bool is_leaf) | 38 bool is_leaf) |
| 39 : assembler_(assembler), | 39 : assembler_(assembler), |
| 40 parsed_function_(parsed_function), | 40 parsed_function_(parsed_function), |
| 41 block_order_(block_order), | 41 block_order_(block_order), |
| 42 current_block_(NULL), | 42 current_block_(NULL), |
| 43 exception_handlers_list_(NULL), | 43 exception_handlers_list_(NULL), |
| 44 pc_descriptors_list_(NULL), | 44 pc_descriptors_list_(NULL), |
| 45 stackmap_builder_(NULL), | 45 stackmap_table_builder_(NULL), |
| 46 block_info_(block_order.length()), | 46 block_info_(block_order.length()), |
| 47 deopt_stubs_(), | 47 deopt_stubs_(), |
| 48 is_optimizing_(is_optimizing), | 48 is_optimizing_(is_optimizing), |
| 49 is_ssa_(is_ssa), | 49 is_ssa_(is_ssa), |
| 50 is_dart_leaf_(is_leaf), | 50 is_dart_leaf_(is_leaf), |
| 51 bool_true_(Bool::ZoneHandle(Bool::True())), | 51 bool_true_(Bool::ZoneHandle(Bool::True())), |
| 52 bool_false_(Bool::ZoneHandle(Bool::False())), | 52 bool_false_(Bool::ZoneHandle(Bool::False())), |
| 53 double_class_(Class::ZoneHandle( | 53 double_class_(Class::ZoneHandle( |
| 54 Isolate::Current()->object_store()->double_class())), | 54 Isolate::Current()->object_store()->double_class())), |
| 55 frame_register_allocator_(this, is_optimizing, is_ssa), | 55 frame_register_allocator_(this, is_optimizing, is_ssa), |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { | 225 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { |
| 226 ASSERT(pc_descriptors_list_ != NULL); | 226 ASSERT(pc_descriptors_list_ != NULL); |
| 227 const PcDescriptors& descriptors = PcDescriptors::Handle( | 227 const PcDescriptors& descriptors = PcDescriptors::Handle( |
| 228 pc_descriptors_list_->FinalizePcDescriptors(code.EntryPoint())); | 228 pc_descriptors_list_->FinalizePcDescriptors(code.EntryPoint())); |
| 229 descriptors.Verify(parsed_function_.function().is_optimizable()); | 229 descriptors.Verify(parsed_function_.function().is_optimizable()); |
| 230 code.set_pc_descriptors(descriptors); | 230 code.set_pc_descriptors(descriptors); |
| 231 } | 231 } |
| 232 | 232 |
| 233 | 233 |
| 234 void FlowGraphCompiler::FinalizeStackmaps(const Code& code) { | 234 void FlowGraphCompiler::FinalizeStackmaps(const Code& code) { |
| 235 if (stackmap_builder_ == NULL) { | 235 if (stackmap_table_builder_ == NULL) { |
| 236 // The unoptimizing compiler has no stack maps. | 236 // The unoptimizing compiler has no stack maps. |
| 237 code.set_stackmaps(Array::Handle()); | 237 code.set_stackmaps(Array::Handle()); |
| 238 } else { | 238 } else { |
| 239 // Finalize the stack map array and add it to the code object. | 239 // Finalize the stack map array and add it to the code object. |
| 240 code.set_stackmaps( | 240 code.set_stackmaps( |
| 241 Array::Handle(stackmap_builder_->FinalizeStackmaps(code))); | 241 Array::Handle(stackmap_table_builder_->FinalizeStackmaps(code))); |
| 242 } | 242 } |
| 243 } | 243 } |
| 244 | 244 |
| 245 | 245 |
| 246 void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) { | 246 void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) { |
| 247 const LocalVarDescriptors& var_descs = LocalVarDescriptors::Handle( | 247 const LocalVarDescriptors& var_descs = LocalVarDescriptors::Handle( |
| 248 parsed_function_.node_sequence()->scope()->GetVarDescriptors( | 248 parsed_function_.node_sequence()->scope()->GetVarDescriptors( |
| 249 parsed_function_.function())); | 249 parsed_function_.function())); |
| 250 code.set_var_descriptors(var_descs); | 250 code.set_var_descriptors(var_descs); |
| 251 } | 251 } |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 return; | 800 return; |
| 801 } | 801 } |
| 802 } | 802 } |
| 803 | 803 |
| 804 // This move is not blocked. | 804 // This move is not blocked. |
| 805 EmitMove(index); | 805 EmitMove(index); |
| 806 } | 806 } |
| 807 | 807 |
| 808 | 808 |
| 809 } // namespace dart | 809 } // namespace dart |
| OLD | NEW |