| 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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 DeoptInfoBuilder builder(incoming_arg_count); | 461 DeoptInfoBuilder builder(incoming_arg_count); |
| 462 | 462 |
| 463 const Array& array = | 463 const Array& array = |
| 464 Array::Handle(Array::New(DeoptTable::SizeFor(deopt_infos_.length()), | 464 Array::Handle(Array::New(DeoptTable::SizeFor(deopt_infos_.length()), |
| 465 Heap::kOld)); | 465 Heap::kOld)); |
| 466 Smi& offset = Smi::Handle(); | 466 Smi& offset = Smi::Handle(); |
| 467 DeoptInfo& info = DeoptInfo::Handle(); | 467 DeoptInfo& info = DeoptInfo::Handle(); |
| 468 Smi& reason = Smi::Handle(); | 468 Smi& reason = Smi::Handle(); |
| 469 for (intptr_t i = 0; i < deopt_infos_.length(); i++) { | 469 for (intptr_t i = 0; i < deopt_infos_.length(); i++) { |
| 470 offset = Smi::New(deopt_infos_[i]->pc_offset()); | 470 offset = Smi::New(deopt_infos_[i]->pc_offset()); |
| 471 info = deopt_infos_[i]->CreateDeoptInfo(this, &builder); | 471 info = deopt_infos_[i]->CreateDeoptInfo(this, &builder, array); |
| 472 reason = Smi::New(deopt_infos_[i]->reason()); | 472 reason = Smi::New(deopt_infos_[i]->reason()); |
| 473 DeoptTable::SetEntry(array, i, offset, info, reason); | 473 DeoptTable::SetEntry(array, i, offset, info, reason); |
| 474 } | 474 } |
| 475 code.set_deopt_info_array(array); | 475 code.set_deopt_info_array(array); |
| 476 const Array& object_array = | 476 const Array& object_array = |
| 477 Array::Handle(Array::MakeArray(builder.object_table())); | 477 Array::Handle(Array::MakeArray(builder.object_table())); |
| 478 ASSERT(code.object_table() == Array::null()); | 478 ASSERT(code.object_table() == Array::null()); |
| 479 code.set_object_table(object_array); | 479 code.set_object_table(object_array); |
| 480 } | 480 } |
| 481 | 481 |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1109 | 1109 |
| 1110 for (int i = 0; i < len; i++) { | 1110 for (int i = 0; i < len; i++) { |
| 1111 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), | 1111 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), |
| 1112 &Function::ZoneHandle(ic_data.GetTargetAt(i)), | 1112 &Function::ZoneHandle(ic_data.GetTargetAt(i)), |
| 1113 ic_data.GetCountAt(i))); | 1113 ic_data.GetCountAt(i))); |
| 1114 } | 1114 } |
| 1115 sorted->Sort(HighestCountFirst); | 1115 sorted->Sort(HighestCountFirst); |
| 1116 } | 1116 } |
| 1117 | 1117 |
| 1118 } // namespace dart | 1118 } // namespace dart |
| OLD | NEW |