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_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/dart_entry.h" | 9 #include "vm/dart_entry.h" |
10 #include "vm/debugger.h" | 10 #include "vm/debugger.h" |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
700 locs->set_in(i, Location::RegisterLocation(reg)); | 700 locs->set_in(i, Location::RegisterLocation(reg)); |
701 } | 701 } |
702 | 702 |
703 // Inputs are consumed from the simulated frame. In case of a call argument | 703 // Inputs are consumed from the simulated frame. In case of a call argument |
704 // we leave it until the call instruction. | 704 // we leave it until the call instruction. |
705 if (!instr->IsPushArgument()) Pop(reg, instr->InputAt(i)); | 705 if (!instr->IsPushArgument()) Pop(reg, instr->InputAt(i)); |
706 } | 706 } |
707 | 707 |
708 // If this instruction is call spill everything that was not consumed by | 708 // If this instruction is call spill everything that was not consumed by |
709 // input locations. | 709 // input locations. |
710 if (locs->contains_call() || instr->IsBranch() || instr->IsGoto()) { | 710 if (locs->can_call() || instr->IsBranch() || instr->IsGoto()) { |
711 Spill(); | 711 Spill(); |
712 } | 712 } |
713 | 713 |
714 // Allocate all unallocated temp locations. | 714 // Allocate all unallocated temp locations. |
715 for (intptr_t i = 0; i < locs->temp_count(); i++) { | 715 for (intptr_t i = 0; i < locs->temp_count(); i++) { |
716 Location loc = locs->temp(i); | 716 Location loc = locs->temp(i); |
717 if (loc.IsUnallocated()) { | 717 if (loc.IsUnallocated()) { |
718 ASSERT(loc.policy() == Location::kRequiresRegister); | 718 ASSERT(loc.policy() == Location::kRequiresRegister); |
719 loc = Location::RegisterLocation( | 719 loc = Location::RegisterLocation( |
720 AllocateFreeRegister(blocked_registers)); | 720 AllocateFreeRegister(blocked_registers)); |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
897 return; | 897 return; |
898 } | 898 } |
899 } | 899 } |
900 | 900 |
901 // This move is not blocked. | 901 // This move is not blocked. |
902 EmitMove(index); | 902 EmitMove(index); |
903 } | 903 } |
904 | 904 |
905 | 905 |
906 } // namespace dart | 906 } // namespace dart |
OLD | NEW |