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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 10909169: Add support for WritableRegister policy in the register allocator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't use non-volatile EBX in a test Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_allocator.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index 7195d927cab32e51a16b3f5023a26ad459b0c66d..07aad654b101e48c4b6ee52c02e1cdb71806ec4e 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -655,7 +655,8 @@ void FlowGraphCompiler::AllocateRegistersLocally(Instruction* instr) {
if (loc.IsRegister()) {
reg = loc.reg();
} else if (loc.IsUnallocated()) {
- ASSERT(loc.policy() == Location::kRequiresRegister);
+ ASSERT((loc.policy() == Location::kRequiresRegister) ||
+ (loc.policy() == Location::kWritableRegister));
reg = AllocateFreeRegister(blocked_registers);
locs->set_in(i, Location::RegisterLocation(reg));
}
@@ -684,6 +685,7 @@ void FlowGraphCompiler::AllocateRegistersLocally(Instruction* instr) {
case Location::kAny:
case Location::kPrefersRegister:
case Location::kRequiresRegister:
+ case Location::kWritableRegister:
result_location = Location::RegisterLocation(
AllocateFreeRegister(blocked_registers));
break;
« no previous file with comments | « runtime/vm/flow_graph_allocator.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698