Index: src/x64/lithium-x64.cc |
=================================================================== |
--- src/x64/lithium-x64.cc (revision 10595) |
+++ src/x64/lithium-x64.cc (working copy) |
@@ -664,7 +664,7 @@ |
HInstruction* instr = HInstruction::cast(value); |
VisitInstruction(instr); |
} |
- allocator_->RecordUse(value, operand); |
+ operand->set_virtual_register(value->id()); |
return operand; |
} |
@@ -672,7 +672,7 @@ |
template<int I, int T> |
LInstruction* LChunkBuilder::Define(LTemplateInstruction<1, I, T>* instr, |
LUnallocated* result) { |
- allocator_->RecordDefinition(current_instruction_, result); |
+ result->set_virtual_register(current_instruction_->id()); |
instr->set_result(result); |
return instr; |
} |
@@ -786,21 +786,22 @@ |
LUnallocated* LChunkBuilder::TempRegister() { |
LUnallocated* operand = new LUnallocated(LUnallocated::MUST_HAVE_REGISTER); |
- allocator_->RecordTemporary(operand); |
+ operand->set_virtual_register(allocator_->GetVirtualRegister()); |
+ if (!allocator_->AllocationOk()) Abort("Not enough virtual registers."); |
return operand; |
} |
LOperand* LChunkBuilder::FixedTemp(Register reg) { |
LUnallocated* operand = ToUnallocated(reg); |
- allocator_->RecordTemporary(operand); |
+ ASSERT(operand->HasFixedPolicy()); |
return operand; |
} |
LOperand* LChunkBuilder::FixedTemp(XMMRegister reg) { |
LUnallocated* operand = ToUnallocated(reg); |
- allocator_->RecordTemporary(operand); |
+ ASSERT(operand->HasFixedPolicy()); |
return operand; |
} |