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 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
689 | 689 |
690 | 690 |
691 void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) { | 691 void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) { |
692 const LocalVarDescriptors& var_descs = LocalVarDescriptors::Handle( | 692 const LocalVarDescriptors& var_descs = LocalVarDescriptors::Handle( |
693 parsed_function_.node_sequence()->scope()->GetVarDescriptors( | 693 parsed_function_.node_sequence()->scope()->GetVarDescriptors( |
694 parsed_function_.function())); | 694 parsed_function_.function())); |
695 code.set_var_descriptors(var_descs); | 695 code.set_var_descriptors(var_descs); |
696 } | 696 } |
697 | 697 |
698 | 698 |
699 void FlowGraphCompiler::FinalizeComments(const Code& code) { | |
700 code.set_comments(assembler()->GetCodeComments()); | |
701 } | |
702 | |
703 | |
704 void FlowGraphCompiler::FinalizeStaticCallTargetsTable(const Code& code) { | 699 void FlowGraphCompiler::FinalizeStaticCallTargetsTable(const Code& code) { |
705 ASSERT(code.static_calls_target_table() == Array::null()); | 700 ASSERT(code.static_calls_target_table() == Array::null()); |
706 code.set_static_calls_target_table( | 701 code.set_static_calls_target_table( |
707 Array::Handle(Array::MakeArray(static_calls_target_table_))); | 702 Array::Handle(Array::MakeArray(static_calls_target_table_))); |
708 } | 703 } |
709 | 704 |
710 | 705 |
711 // Returns 'true' if code generation for this function is complete, i.e., | 706 // Returns 'true' if code generation for this function is complete, i.e., |
712 // no fall-through to regular code is needed. | 707 // no fall-through to regular code is needed. |
713 void FlowGraphCompiler::TryIntrinsify() { | 708 void FlowGraphCompiler::TryIntrinsify() { |
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1286 | 1281 |
1287 for (int i = 0; i < len; i++) { | 1282 for (int i = 0; i < len; i++) { |
1288 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), | 1283 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), |
1289 &Function::ZoneHandle(ic_data.GetTargetAt(i)), | 1284 &Function::ZoneHandle(ic_data.GetTargetAt(i)), |
1290 ic_data.GetCountAt(i))); | 1285 ic_data.GetCountAt(i))); |
1291 } | 1286 } |
1292 sorted->Sort(HighestCountFirst); | 1287 sorted->Sort(HighestCountFirst); |
1293 } | 1288 } |
1294 | 1289 |
1295 } // namespace dart | 1290 } // namespace dart |
OLD | NEW |