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

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
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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698