Chromium Code Reviews| 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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 592 ASSERT(loc.policy() == Location::kRequiresRegister); | 592 ASSERT(loc.policy() == Location::kRequiresRegister); |
| 593 if (!stack_.is_empty() && !blocked_temp_registers[stack_.Last()]) { | 593 if (!stack_.is_empty() && !blocked_temp_registers[stack_.Last()]) { |
| 594 reg = stack_.Last(); | 594 reg = stack_.Last(); |
| 595 blocked_registers[reg] = true; | 595 blocked_registers[reg] = true; |
| 596 } else { | 596 } else { |
| 597 reg = AllocateFreeRegister(blocked_registers); | 597 reg = AllocateFreeRegister(blocked_registers); |
| 598 } | 598 } |
| 599 locs->set_in(i, Location::RegisterLocation(reg)); | 599 locs->set_in(i, Location::RegisterLocation(reg)); |
| 600 } | 600 } |
| 601 | 601 |
| 602 Pop(reg, instr->InputAt(i)); | 602 if (!instr->IsPushArgument()) Pop(reg, instr->InputAt(i)); |
|
Kevin Millikin (Google)
2012/07/26 13:03:18
This deserves some small comment like: "Inputs are
Florian Schneider
2012/07/26 13:45:24
Done.
| |
| 603 } | 603 } |
| 604 | 604 |
| 605 // If this instruction is call spill everything that was not consumed by | 605 // If this instruction is call spill everything that was not consumed by |
| 606 // input locations. | 606 // input locations. |
| 607 if (locs->is_call() || instr->IsBranch() || instr->IsGoto()) { | 607 if (locs->is_call() || instr->IsBranch() || instr->IsGoto()) { |
| 608 Spill(); | 608 Spill(); |
| 609 } | 609 } |
| 610 | 610 |
| 611 // Allocate all unallocated temp locations. | 611 // Allocate all unallocated temp locations. |
| 612 for (intptr_t i = 0; i < locs->temp_count(); i++) { | 612 for (intptr_t i = 0; i < locs->temp_count(); i++) { |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 794 return; | 794 return; |
| 795 } | 795 } |
| 796 } | 796 } |
| 797 | 797 |
| 798 // This move is not blocked. | 798 // This move is not blocked. |
| 799 EmitMove(index); | 799 EmitMove(index); |
| 800 } | 800 } |
| 801 | 801 |
| 802 | 802 |
| 803 } // namespace dart | 803 } // namespace dart |
| OLD | NEW |