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

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: refactored liveness computation Created 8 years, 5 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 loc = Location::RegisterLocation( 615 loc = Location::RegisterLocation(
616 AllocateFreeRegister(blocked_registers)); 616 AllocateFreeRegister(blocked_registers));
617 locs->set_temp(i, loc); 617 locs->set_temp(i, loc);
618 } 618 }
619 SpillRegister(loc.reg()); 619 SpillRegister(loc.reg());
620 } 620 }
621 621
622 Location result_location = locs->out(); 622 Location result_location = locs->out();
623 if (result_location.IsUnallocated()) { 623 if (result_location.IsUnallocated()) {
624 switch (result_location.policy()) { 624 switch (result_location.policy()) {
625 case Location::kAny:
626 case Location::kPrefersRegister:
625 case Location::kRequiresRegister: 627 case Location::kRequiresRegister:
626 result_location = Location::RegisterLocation( 628 result_location = Location::RegisterLocation(
627 AllocateFreeRegister(blocked_registers)); 629 AllocateFreeRegister(blocked_registers));
628 break; 630 break;
629 case Location::kSameAsFirstInput: 631 case Location::kSameAsFirstInput:
630 result_location = locs->in(0); 632 result_location = locs->in(0);
631 break; 633 break;
632 } 634 }
633 locs->set_out(result_location); 635 locs->set_out(result_location);
634 } 636 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 return; 793 return;
792 } 794 }
793 } 795 }
794 796
795 // This move is not blocked. 797 // This move is not blocked.
796 EmitMove(index); 798 EmitMove(index);
797 } 799 }
798 800
799 801
800 } // namespace dart 802 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698