OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
718 LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { | 718 LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { |
719 ASSERT(!instr->HasPointerMap()); | 719 ASSERT(!instr->HasPointerMap()); |
720 instr->set_pointer_map(new(zone()) LPointerMap(position_, zone())); | 720 instr->set_pointer_map(new(zone()) LPointerMap(position_, zone())); |
721 return instr; | 721 return instr; |
722 } | 722 } |
723 | 723 |
724 | 724 |
725 LUnallocated* LChunkBuilder::TempRegister() { | 725 LUnallocated* LChunkBuilder::TempRegister() { |
726 LUnallocated* operand = | 726 LUnallocated* operand = |
727 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER); | 727 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER); |
728 operand->set_virtual_register(allocator_->GetVirtualRegister()); | 728 int vreg = allocator_->GetVirtualRegister(); |
729 if (!allocator_->AllocationOk()) { | 729 if (!allocator_->AllocationOk()) { |
730 Abort("Not enough virtual registers (temps)."); | 730 Abort("Out of virtual registers while trying to allocate temp register."); |
| 731 return NULL; |
731 } | 732 } |
| 733 operand->set_virtual_register(vreg); |
732 return operand; | 734 return operand; |
733 } | 735 } |
734 | 736 |
735 | 737 |
736 LOperand* LChunkBuilder::FixedTemp(Register reg) { | 738 LOperand* LChunkBuilder::FixedTemp(Register reg) { |
737 LUnallocated* operand = ToUnallocated(reg); | 739 LUnallocated* operand = ToUnallocated(reg); |
738 ASSERT(operand->HasFixedPolicy()); | 740 ASSERT(operand->HasFixedPolicy()); |
739 return operand; | 741 return operand; |
740 } | 742 } |
741 | 743 |
(...skipping 1870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2612 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { | 2614 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { |
2613 LOperand* object = UseRegister(instr->object()); | 2615 LOperand* object = UseRegister(instr->object()); |
2614 LOperand* index = UseTempRegister(instr->index()); | 2616 LOperand* index = UseTempRegister(instr->index()); |
2615 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); | 2617 return DefineSameAsFirst(new(zone()) LLoadFieldByIndex(object, index)); |
2616 } | 2618 } |
2617 | 2619 |
2618 | 2620 |
2619 } } // namespace v8::internal | 2621 } } // namespace v8::internal |
2620 | 2622 |
2621 #endif // V8_TARGET_ARCH_IA32 | 2623 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |