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/bit_vector.h" | 9 #include "vm/bit_vector.h" |
10 #include "vm/cha.h" | 10 #include "vm/cha.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 isolate()->object_store()->float32x4_class())), | 218 isolate()->object_store()->float32x4_class())), |
219 float64x2_class_(Class::ZoneHandle( | 219 float64x2_class_(Class::ZoneHandle( |
220 isolate()->object_store()->float64x2_class())), | 220 isolate()->object_store()->float64x2_class())), |
221 int32x4_class_(Class::ZoneHandle( | 221 int32x4_class_(Class::ZoneHandle( |
222 isolate()->object_store()->int32x4_class())), | 222 isolate()->object_store()->int32x4_class())), |
223 list_class_(Class::ZoneHandle( | 223 list_class_(Class::ZoneHandle( |
224 Library::Handle(Library::CoreLibrary()). | 224 Library::Handle(Library::CoreLibrary()). |
225 LookupClass(Symbols::List()))), | 225 LookupClass(Symbols::List()))), |
226 parallel_move_resolver_(this), | 226 parallel_move_resolver_(this), |
227 pending_deoptimization_env_(NULL), | 227 pending_deoptimization_env_(NULL), |
228 lazy_deopt_return_pc_offset_(Code::kInvalidPc), | |
229 lazy_deopt_throw_pc_offset_(Code::kInvalidPc), | |
230 deopt_id_to_ic_data_(NULL), | 228 deopt_id_to_ic_data_(NULL), |
231 edge_counters_array_(Array::ZoneHandle()), | 229 edge_counters_array_(Array::ZoneHandle()), |
232 inlined_code_intervals_(Array::ZoneHandle(Object::empty_array().raw())), | 230 inlined_code_intervals_(Array::ZoneHandle(Object::empty_array().raw())), |
233 inline_id_to_function_(inline_id_to_function), | 231 inline_id_to_function_(inline_id_to_function), |
234 inline_id_to_token_pos_(inline_id_to_token_pos), | 232 inline_id_to_token_pos_(inline_id_to_token_pos), |
235 caller_inline_id_(caller_inline_id) { | 233 caller_inline_id_(caller_inline_id) { |
236 ASSERT(flow_graph->parsed_function().function().raw() == | 234 ASSERT(flow_graph->parsed_function().function().raw() == |
237 parsed_function.function().raw()); | 235 parsed_function.function().raw()); |
238 if (!is_optimizing) { | 236 if (!is_optimizing) { |
239 const intptr_t len = thread()->deopt_id(); | 237 const intptr_t len = thread()->deopt_id(); |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 } | 1022 } |
1025 } | 1023 } |
1026 | 1024 |
1027 | 1025 |
1028 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { | 1026 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { |
1029 ASSERT(pc_descriptors_list_ != NULL); | 1027 ASSERT(pc_descriptors_list_ != NULL); |
1030 const PcDescriptors& descriptors = PcDescriptors::Handle( | 1028 const PcDescriptors& descriptors = PcDescriptors::Handle( |
1031 pc_descriptors_list_->FinalizePcDescriptors(code.PayloadStart())); | 1029 pc_descriptors_list_->FinalizePcDescriptors(code.PayloadStart())); |
1032 if (!is_optimizing_) descriptors.Verify(parsed_function_.function()); | 1030 if (!is_optimizing_) descriptors.Verify(parsed_function_.function()); |
1033 code.set_pc_descriptors(descriptors); | 1031 code.set_pc_descriptors(descriptors); |
1034 code.set_lazy_deopt_return_pc_offset(lazy_deopt_return_pc_offset_); | |
1035 code.set_lazy_deopt_throw_pc_offset(lazy_deopt_throw_pc_offset_); | |
1036 } | 1032 } |
1037 | 1033 |
1038 | 1034 |
1039 RawArray* FlowGraphCompiler::CreateDeoptInfo(Assembler* assembler) { | 1035 RawArray* FlowGraphCompiler::CreateDeoptInfo(Assembler* assembler) { |
1040 // No deopt information if we precompile (no deoptimization allowed). | 1036 // No deopt information if we precompile (no deoptimization allowed). |
1041 if (FLAG_precompiled_mode) { | 1037 if (FLAG_precompiled_mode) { |
1042 return Array::empty_array().raw(); | 1038 return Array::empty_array().raw(); |
1043 } | 1039 } |
1044 // For functions with optional arguments, all incoming arguments are copied | 1040 // For functions with optional arguments, all incoming arguments are copied |
1045 // to spill slots. The deoptimization environment does not track them. | 1041 // to spill slots. The deoptimization environment does not track them. |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1995 | 1991 |
1996 | 1992 |
1997 void FlowGraphCompiler::FrameStateClear() { | 1993 void FlowGraphCompiler::FrameStateClear() { |
1998 ASSERT(!is_optimizing()); | 1994 ASSERT(!is_optimizing()); |
1999 frame_state_.TruncateTo(0); | 1995 frame_state_.TruncateTo(0); |
2000 } | 1996 } |
2001 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) | 1997 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) |
2002 | 1998 |
2003 | 1999 |
2004 } // namespace dart | 2000 } // namespace dart |
OLD | NEW |