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

Side by Side Diff: src/crankshaft/mips/lithium-codegen-mips.cc

Issue 2031493002: Revert of Provide a tagged allocation top pointer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 5123 matching lines...) Expand 10 before | Expand all | Expand 10 after
5134 if (instr->hydrogen()->IsOldSpaceAllocation()) { 5134 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5135 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5135 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5136 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); 5136 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE);
5137 } 5137 }
5138 // If the allocation folding dominator allocate triggered a GC, allocation 5138 // If the allocation folding dominator allocate triggered a GC, allocation
5139 // happend in the runtime. We have to reset the top pointer to virtually 5139 // happend in the runtime. We have to reset the top pointer to virtually
5140 // undo the allocation. 5140 // undo the allocation.
5141 ExternalReference allocation_top = 5141 ExternalReference allocation_top =
5142 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); 5142 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags);
5143 Register top_address = scratch0(); 5143 Register top_address = scratch0();
5144 __ Subu(v0, v0, Operand(kHeapObjectTag));
5144 __ li(top_address, Operand(allocation_top)); 5145 __ li(top_address, Operand(allocation_top));
5145 __ sw(v0, MemOperand(top_address)); 5146 __ sw(v0, MemOperand(top_address));
5147 __ Addu(v0, v0, Operand(kHeapObjectTag));
5146 } 5148 }
5147 } 5149 }
5148 5150
5149 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { 5151 void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
5150 DCHECK(instr->hydrogen()->IsAllocationFolded()); 5152 DCHECK(instr->hydrogen()->IsAllocationFolded());
5151 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); 5153 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator());
5152 Register result = ToRegister(instr->result()); 5154 Register result = ToRegister(instr->result());
5153 Register scratch1 = ToRegister(instr->temp1()); 5155 Register scratch1 = ToRegister(instr->temp1());
5154 Register scratch2 = ToRegister(instr->temp2()); 5156 Register scratch2 = ToRegister(instr->temp2());
5155 5157
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
5556 __ lw(result, FieldMemOperand(scratch, 5558 __ lw(result, FieldMemOperand(scratch,
5557 FixedArray::kHeaderSize - kPointerSize)); 5559 FixedArray::kHeaderSize - kPointerSize));
5558 __ bind(deferred->exit()); 5560 __ bind(deferred->exit());
5559 __ bind(&done); 5561 __ bind(&done);
5560 } 5562 }
5561 5563
5562 #undef __ 5564 #undef __
5563 5565
5564 } // namespace internal 5566 } // namespace internal
5565 } // namespace v8 5567 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-codegen-ia32.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698