| Index: src/x64/lithium-x64.cc
|
| diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc
|
| index e35a381faacd932d223a4a64d1d45a317e491007..967bfa997d2f0231927d203e836c0edd0cf27e6e 100644
|
| --- a/src/x64/lithium-x64.cc
|
| +++ b/src/x64/lithium-x64.cc
|
| @@ -665,8 +665,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;
|
| }
|
|
|
|
|