Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(762)

Side by Side Diff: src/arm/lithium-arm.cc

Issue 12867002: Fixed two register allocator bugs (off-by-one error/failure propagation). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed MIPS Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { 668 LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) {
669 ASSERT(!instr->HasPointerMap()); 669 ASSERT(!instr->HasPointerMap());
670 instr->set_pointer_map(new(zone()) LPointerMap(position_, zone())); 670 instr->set_pointer_map(new(zone()) LPointerMap(position_, zone()));
671 return instr; 671 return instr;
672 } 672 }
673 673
674 674
675 LUnallocated* LChunkBuilder::TempRegister() { 675 LUnallocated* LChunkBuilder::TempRegister() {
676 LUnallocated* operand = 676 LUnallocated* operand =
677 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER); 677 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER);
678 operand->set_virtual_register(allocator_->GetVirtualRegister()); 678 int vreg = allocator_->GetVirtualRegister();
679 if (!allocator_->AllocationOk()) Abort("Not enough virtual registers."); 679 if (!allocator_->AllocationOk()) {
680 Abort("Out of virtual registers while trying to allocate temp register.");
681 return NULL;
682 }
683 operand->set_virtual_register(vreg);
680 return operand; 684 return operand;
681 } 685 }
682 686
683 687
684 LOperand* LChunkBuilder::FixedTemp(Register reg) { 688 LOperand* LChunkBuilder::FixedTemp(Register reg) {
685 LUnallocated* operand = ToUnallocated(reg); 689 LUnallocated* operand = ToUnallocated(reg);
686 ASSERT(operand->HasFixedPolicy()); 690 ASSERT(operand->HasFixedPolicy());
687 return operand; 691 return operand;
688 } 692 }
689 693
(...skipping 1839 matching lines...) Expand 10 before | Expand all | Expand 10 after
2529 2533
2530 2534
2531 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2535 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2532 LOperand* object = UseRegister(instr->object()); 2536 LOperand* object = UseRegister(instr->object());
2533 LOperand* index = UseRegister(instr->index()); 2537 LOperand* index = UseRegister(instr->index());
2534 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2538 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2535 } 2539 }
2536 2540
2537 2541
2538 } } // namespace v8::internal 2542 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698