OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
7 | 7 |
8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "lib/error.h" | 10 #include "lib/error.h" |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 } | 603 } |
604 | 604 |
605 | 605 |
606 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { | 606 void FlowGraphCompiler::EmitInstructionPrologue(Instruction* instr) { |
607 if (!is_optimizing()) { | 607 if (!is_optimizing()) { |
608 AllocateRegistersLocally(instr); | 608 AllocateRegistersLocally(instr); |
609 } | 609 } |
610 } | 610 } |
611 | 611 |
612 | 612 |
613 void FlowGraphCompiler::EmitInstructionEpilogue(Instruction* instr) { | |
614 if (is_optimizing()) return; | |
615 Definition* defn = instr->AsDefinition(); | |
616 if ((defn != NULL) && defn->is_used()) { | |
617 __ pushq(defn->locs()->out().reg()); | |
618 } | |
619 } | |
620 | |
621 | |
622 void FlowGraphCompiler::CopyParameters() { | 613 void FlowGraphCompiler::CopyParameters() { |
623 __ Comment("Copy parameters"); | 614 __ Comment("Copy parameters"); |
624 const Function& function = parsed_function().function(); | 615 const Function& function = parsed_function().function(); |
625 const bool is_native_instance_closure = | 616 const bool is_native_instance_closure = |
626 function.is_native() && function.IsImplicitInstanceClosureFunction(); | 617 function.is_native() && function.IsImplicitInstanceClosureFunction(); |
627 LocalScope* scope = parsed_function().node_sequence()->scope(); | 618 LocalScope* scope = parsed_function().node_sequence()->scope(); |
628 const int num_fixed_params = function.num_fixed_parameters(); | 619 const int num_fixed_params = function.num_fixed_parameters(); |
629 const int num_opt_params = function.num_optional_parameters(); | 620 const int num_opt_params = function.num_optional_parameters(); |
630 int implicit_this_param_pos = is_native_instance_closure ? -1 : 0; | 621 int implicit_this_param_pos = is_native_instance_closure ? -1 : 0; |
631 ASSERT(parsed_function().first_parameter_index() == | 622 ASSERT(parsed_function().first_parameter_index() == |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1312 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { | 1303 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { |
1313 __ Exchange(mem1, mem2); | 1304 __ Exchange(mem1, mem2); |
1314 } | 1305 } |
1315 | 1306 |
1316 | 1307 |
1317 #undef __ | 1308 #undef __ |
1318 | 1309 |
1319 } // namespace dart | 1310 } // namespace dart |
1320 | 1311 |
1321 #endif // defined TARGET_ARCH_X64 | 1312 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |