Chromium Code Reviews| Index: src/arm/lithium-arm.cc |
| =================================================================== |
| --- src/arm/lithium-arm.cc (revision 10595) |
| +++ src/arm/lithium-arm.cc (working copy) |
| @@ -671,7 +671,7 @@ |
| HInstruction* instr = HInstruction::cast(value); |
| VisitInstruction(instr); |
| } |
| - allocator_->RecordUse(value, operand); |
| + operand->set_virtual_register(value->id()); |
| return operand; |
| } |
| @@ -679,7 +679,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; |
| } |
| @@ -791,21 +791,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."); |
|
Sven Panne
2012/02/03 09:01:20
I am a little bit concerned about this 'Abort' (an
fschneider
2012/02/03 09:17:41
Abort in this case is doing exactly that, namely b
Sven Panne
2012/02/03 09:46:50
Ooops, I've missed the Abort method in LChunkBuild
|
| return operand; |
| } |
| LOperand* LChunkBuilder::FixedTemp(Register reg) { |
| LUnallocated* operand = ToUnallocated(reg); |
| - allocator_->RecordTemporary(operand); |
| + ASSERT(operand->HasFixedPolicy()); |
| return operand; |
| } |
| LOperand* LChunkBuilder::FixedTemp(DoubleRegister reg) { |
| LUnallocated* operand = ToUnallocated(reg); |
| - allocator_->RecordTemporary(operand); |
| + ASSERT(operand->HasFixedPolicy()); |
| return operand; |
| } |