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

Side by Side Diff: runtime/vm/flow_graph_compiler.cc

Issue 10800037: New linear scan allocator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address Kevin's comments 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 | « runtime/vm/flow_graph_allocator.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('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 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 loc = Location::RegisterLocation( 616 loc = Location::RegisterLocation(
617 AllocateFreeRegister(blocked_registers)); 617 AllocateFreeRegister(blocked_registers));
618 locs->set_temp(i, loc); 618 locs->set_temp(i, loc);
619 } 619 }
620 SpillRegister(loc.reg()); 620 SpillRegister(loc.reg());
621 } 621 }
622 622
623 Location result_location = locs->out(); 623 Location result_location = locs->out();
624 if (result_location.IsUnallocated()) { 624 if (result_location.IsUnallocated()) {
625 switch (result_location.policy()) { 625 switch (result_location.policy()) {
626 case Location::kAny:
627 case Location::kPrefersRegister:
626 case Location::kRequiresRegister: 628 case Location::kRequiresRegister:
627 result_location = Location::RegisterLocation( 629 result_location = Location::RegisterLocation(
628 AllocateFreeRegister(blocked_registers)); 630 AllocateFreeRegister(blocked_registers));
629 break; 631 break;
630 case Location::kSameAsFirstInput: 632 case Location::kSameAsFirstInput:
631 result_location = locs->in(0); 633 result_location = locs->in(0);
632 break; 634 break;
633 } 635 }
634 locs->set_out(result_location); 636 locs->set_out(result_location);
635 } 637 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 return; 794 return;
793 } 795 }
794 } 796 }
795 797
796 // This move is not blocked. 798 // This move is not blocked.
797 EmitMove(index); 799 EmitMove(index);
798 } 800 }
799 801
800 802
801 } // namespace dart 803 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_allocator.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698