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

Side by Side Diff: src/mips/lithium-mips.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 | « src/lithium-allocator.cc ('k') | src/x64/lithium-x64.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 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { 661 LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) {
662 ASSERT(!instr->HasPointerMap()); 662 ASSERT(!instr->HasPointerMap());
663 instr->set_pointer_map(new(zone()) LPointerMap(position_, zone())); 663 instr->set_pointer_map(new(zone()) LPointerMap(position_, zone()));
664 return instr; 664 return instr;
665 } 665 }
666 666
667 667
668 LUnallocated* LChunkBuilder::TempRegister() { 668 LUnallocated* LChunkBuilder::TempRegister() {
669 LUnallocated* operand = 669 LUnallocated* operand =
670 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER); 670 new(zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER);
671 operand->set_virtual_register(allocator_->GetVirtualRegister()); 671 int vreg = allocator_->GetVirtualRegister();
672 if (!allocator_->AllocationOk()) Abort("Not enough virtual registers."); 672 if (!allocator_->AllocationOk()) {
673 Abort("Out of virtual registers while trying to allocate temp register.");
674 return NULL;
675 }
676 operand->set_virtual_register(vreg);
673 return operand; 677 return operand;
674 } 678 }
675 679
676 680
677 LOperand* LChunkBuilder::FixedTemp(Register reg) { 681 LOperand* LChunkBuilder::FixedTemp(Register reg) {
678 LUnallocated* operand = ToUnallocated(reg); 682 LUnallocated* operand = ToUnallocated(reg);
679 ASSERT(operand->HasFixedPolicy()); 683 ASSERT(operand->HasFixedPolicy());
680 return operand; 684 return operand;
681 } 685 }
682 686
(...skipping 1706 matching lines...) Expand 10 before | Expand all | Expand 10 after
2389 2393
2390 2394
2391 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2395 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2392 LOperand* object = UseRegister(instr->object()); 2396 LOperand* object = UseRegister(instr->object());
2393 LOperand* index = UseRegister(instr->index()); 2397 LOperand* index = UseRegister(instr->index());
2394 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index)); 2398 return DefineAsRegister(new(zone()) LLoadFieldByIndex(object, index));
2395 } 2399 }
2396 2400
2397 2401
2398 } } // namespace v8::internal 2402 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lithium-allocator.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698