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