| 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 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 710 code.set_pc_descriptors(descriptors); | 710 code.set_pc_descriptors(descriptors); |
| 711 } | 711 } |
| 712 | 712 |
| 713 | 713 |
| 714 void FlowGraphCompiler::FinalizeDeoptInfo(const Code& code) { | 714 void FlowGraphCompiler::FinalizeDeoptInfo(const Code& code) { |
| 715 // For functions with optional arguments, all incoming arguments are copied | 715 // For functions with optional arguments, all incoming arguments are copied |
| 716 // to spill slots. The deoptimization environment does not track them. | 716 // to spill slots. The deoptimization environment does not track them. |
| 717 const Function& function = parsed_function().function(); | 717 const Function& function = parsed_function().function(); |
| 718 const intptr_t incoming_arg_count = | 718 const intptr_t incoming_arg_count = |
| 719 function.HasOptionalParameters() ? 0 : function.num_fixed_parameters(); | 719 function.HasOptionalParameters() ? 0 : function.num_fixed_parameters(); |
| 720 DeoptInfoBuilder builder(incoming_arg_count); | 720 DeoptInfoBuilder builder(isolate(), incoming_arg_count); |
| 721 | 721 |
| 722 const Array& array = | 722 const Array& array = |
| 723 Array::Handle(Array::New(DeoptTable::SizeFor(deopt_infos_.length()), | 723 Array::Handle(Array::New(DeoptTable::SizeFor(deopt_infos_.length()), |
| 724 Heap::kOld)); | 724 Heap::kOld)); |
| 725 Smi& offset = Smi::Handle(); | 725 Smi& offset = Smi::Handle(); |
| 726 DeoptInfo& info = DeoptInfo::Handle(); | 726 DeoptInfo& info = DeoptInfo::Handle(); |
| 727 Smi& reason = Smi::Handle(); | 727 Smi& reason = Smi::Handle(); |
| 728 for (intptr_t i = 0; i < deopt_infos_.length(); i++) { | 728 for (intptr_t i = 0; i < deopt_infos_.length(); i++) { |
| 729 offset = Smi::New(deopt_infos_[i]->pc_offset()); | 729 offset = Smi::New(deopt_infos_[i]->pc_offset()); |
| 730 info = deopt_infos_[i]->CreateDeoptInfo(this, &builder, array); | 730 info = deopt_infos_[i]->CreateDeoptInfo(this, &builder, array); |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1305 | 1305 |
| 1306 for (int i = 0; i < len; i++) { | 1306 for (int i = 0; i < len; i++) { |
| 1307 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), | 1307 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), |
| 1308 &Function::ZoneHandle(ic_data.GetTargetAt(i)), | 1308 &Function::ZoneHandle(ic_data.GetTargetAt(i)), |
| 1309 ic_data.GetCountAt(i))); | 1309 ic_data.GetCountAt(i))); |
| 1310 } | 1310 } |
| 1311 sorted->Sort(HighestCountFirst); | 1311 sorted->Sort(HighestCountFirst); |
| 1312 } | 1312 } |
| 1313 | 1313 |
| 1314 } // namespace dart | 1314 } // namespace dart |
| OLD | NEW |