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

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

Issue 2028633002: Provide a tagged allocation top pointer. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update 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. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h"
(...skipping 5327 matching lines...) Expand 10 before | Expand all | Expand 10 after
5338 if (instr->hydrogen()->IsOldSpaceAllocation()) { 5338 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5339 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5339 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5340 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); 5340 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE);
5341 } 5341 }
5342 // If the allocation folding dominator allocate triggered a GC, allocation 5342 // If the allocation folding dominator allocate triggered a GC, allocation
5343 // happend in the runtime. We have to reset the top pointer to virtually 5343 // happend in the runtime. We have to reset the top pointer to virtually
5344 // undo the allocation. 5344 // undo the allocation.
5345 ExternalReference allocation_top = 5345 ExternalReference allocation_top =
5346 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); 5346 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags);
5347 Register top_address = scratch0(); 5347 Register top_address = scratch0();
5348 __ Dsubu(v0, v0, Operand(kHeapObjectTag));
5349 __ li(top_address, Operand(allocation_top)); 5348 __ li(top_address, Operand(allocation_top));
5350 __ sd(v0, MemOperand(top_address)); 5349 __ sd(v0, MemOperand(top_address));
5351 __ Daddu(v0, v0, Operand(kHeapObjectTag));
5352 } 5350 }
5353 } 5351 }
5354 5352
5355 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { 5353 void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
5356 DCHECK(instr->hydrogen()->IsAllocationFolded()); 5354 DCHECK(instr->hydrogen()->IsAllocationFolded());
5357 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); 5355 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator());
5358 Register result = ToRegister(instr->result()); 5356 Register result = ToRegister(instr->result());
5359 Register scratch1 = ToRegister(instr->temp1()); 5357 Register scratch1 = ToRegister(instr->temp1());
5360 Register scratch2 = ToRegister(instr->temp2()); 5358 Register scratch2 = ToRegister(instr->temp2());
5361 5359
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
5761 __ ld(result, FieldMemOperand(scratch, 5759 __ ld(result, FieldMemOperand(scratch,
5762 FixedArray::kHeaderSize - kPointerSize)); 5760 FixedArray::kHeaderSize - kPointerSize));
5763 __ bind(deferred->exit()); 5761 __ bind(deferred->exit());
5764 __ bind(&done); 5762 __ bind(&done);
5765 } 5763 }
5766 5764
5767 #undef __ 5765 #undef __
5768 5766
5769 } // namespace internal 5767 } // namespace internal
5770 } // namespace v8 5768 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698