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