Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: vm/flow_graph_compiler.cc

Issue 10825035: Add an explicit push-argument instruction to the IL. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « vm/flow_graph_builder.cc ('k') | vm/flow_graph_compiler_ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 // Inputs are consumed from the simulated frame. In case of a call argument
603 // we leave it until the call instruction.
604 if (!instr->IsPushArgument()) Pop(reg, instr->InputAt(i));
603 } 605 }
604 606
605 // If this instruction is call spill everything that was not consumed by 607 // If this instruction is call spill everything that was not consumed by
606 // input locations. 608 // input locations.
607 if (locs->is_call() || instr->IsBranch() || instr->IsGoto()) { 609 if (locs->is_call() || instr->IsBranch() || instr->IsGoto()) {
608 Spill(); 610 Spill();
609 } 611 }
610 612
611 // Allocate all unallocated temp locations. 613 // Allocate all unallocated temp locations.
612 for (intptr_t i = 0; i < locs->temp_count(); i++) { 614 for (intptr_t i = 0; i < locs->temp_count(); i++) {
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 return; 796 return;
795 } 797 }
796 } 798 }
797 799
798 // This move is not blocked. 800 // This move is not blocked.
799 EmitMove(index); 801 EmitMove(index);
800 } 802 }
801 803
802 804
803 } // namespace dart 805 } // namespace dart
OLDNEW
« no previous file with comments | « vm/flow_graph_builder.cc ('k') | vm/flow_graph_compiler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698