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