| 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 const Array& object_array = | 460 const Array& object_array = |
| 461 Array::Handle(Array::MakeArray(builder.object_table())); | 461 Array::Handle(Array::MakeArray(builder.object_table())); |
| 462 ASSERT(code.object_table() == Array::null()); | 462 ASSERT(code.object_table() == Array::null()); |
| 463 code.set_object_table(object_array); | 463 code.set_object_table(object_array); |
| 464 } | 464 } |
| 465 | 465 |
| 466 | 466 |
| 467 void FlowGraphCompiler::FinalizeStackmaps(const Code& code) { | 467 void FlowGraphCompiler::FinalizeStackmaps(const Code& code) { |
| 468 if (stackmap_table_builder_ == NULL) { | 468 if (stackmap_table_builder_ == NULL) { |
| 469 // The unoptimizing compiler has no stack maps. | 469 // The unoptimizing compiler has no stack maps. |
| 470 code.set_stackmaps(Array::Handle()); | 470 code.set_stackmaps(Object::null_array()); |
| 471 } else { | 471 } else { |
| 472 // Finalize the stack map array and add it to the code object. | 472 // Finalize the stack map array and add it to the code object. |
| 473 ASSERT(is_optimizing()); | 473 ASSERT(is_optimizing()); |
| 474 code.set_stackmaps( | 474 code.set_stackmaps( |
| 475 Array::Handle(stackmap_table_builder_->FinalizeStackmaps(code))); | 475 Array::Handle(stackmap_table_builder_->FinalizeStackmaps(code))); |
| 476 } | 476 } |
| 477 } | 477 } |
| 478 | 478 |
| 479 | 479 |
| 480 void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) { | 480 void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) { |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1088 | 1088 |
| 1089 for (int i = 0; i < len; i++) { | 1089 for (int i = 0; i < len; i++) { |
| 1090 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), | 1090 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), |
| 1091 &Function::ZoneHandle(ic_data.GetTargetAt(i)), | 1091 &Function::ZoneHandle(ic_data.GetTargetAt(i)), |
| 1092 ic_data.GetCountAt(i))); | 1092 ic_data.GetCountAt(i))); |
| 1093 } | 1093 } |
| 1094 sorted->Sort(HighestCountFirst); | 1094 sorted->Sort(HighestCountFirst); |
| 1095 } | 1095 } |
| 1096 | 1096 |
| 1097 } // namespace dart | 1097 } // namespace dart |
| OLD | NEW |