Index: src/mips/lithium-mips.cc |
diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc |
index 7a2cd7851d0c8d73a5880eb180bab0ee26671fc0..7d15b2270b5eaacbeb646761a791f4de3e9c4690 100644 |
--- a/src/mips/lithium-mips.cc |
+++ b/src/mips/lithium-mips.cc |
@@ -657,8 +657,12 @@ LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { |
LUnallocated* LChunkBuilder::TempRegister() { |
LUnallocated* operand = |
new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER); |
- operand->set_virtual_register(allocator_->GetVirtualRegister()); |
- if (!allocator_->AllocationOk()) Abort("Not enough virtual registers."); |
+ int vreg = allocator_->GetVirtualRegister(); |
+ if (!allocator_->AllocationOk()) { |
+ Abort("Out of virtual registers while trying to allocate temp register."); |
+ return NULL; |
+ } |
+ operand->set_virtual_register(vreg); |
return operand; |
} |