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

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

Issue 2028633002: Provide a tagged allocation top pointer. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: WIP: adding a few tests. 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 5112 matching lines...) Expand 10 before | Expand all | Expand 10 after
5123 if (instr->hydrogen()->IsOldSpaceAllocation()) { 5123 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5124 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5124 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5125 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); 5125 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE);
5126 } 5126 }
5127 // If the allocation folding dominator allocate triggered a GC, allocation 5127 // If the allocation folding dominator allocate triggered a GC, allocation
5128 // happend in the runtime. We have to reset the top pointer to virtually 5128 // happend in the runtime. We have to reset the top pointer to virtually
5129 // undo the allocation. 5129 // undo the allocation.
5130 ExternalReference allocation_top = 5130 ExternalReference allocation_top =
5131 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); 5131 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags);
5132 Register top_address = scratch0(); 5132 Register top_address = scratch0();
5133 __ Subu(v0, v0, Operand(kHeapObjectTag));
5134 __ li(top_address, Operand(allocation_top)); 5133 __ li(top_address, Operand(allocation_top));
5135 __ sw(v0, MemOperand(top_address)); 5134 __ sw(v0, MemOperand(top_address));
5136 __ Addu(v0, v0, Operand(kHeapObjectTag));
5137 } 5135 }
5138 } 5136 }
5139 5137
5140 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { 5138 void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
5141 DCHECK(instr->hydrogen()->IsAllocationFolded()); 5139 DCHECK(instr->hydrogen()->IsAllocationFolded());
5142 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); 5140 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator());
5143 Register result = ToRegister(instr->result()); 5141 Register result = ToRegister(instr->result());
5144 Register scratch1 = ToRegister(instr->temp1()); 5142 Register scratch1 = ToRegister(instr->temp1());
5145 Register scratch2 = ToRegister(instr->temp2()); 5143 Register scratch2 = ToRegister(instr->temp2());
5146 5144
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
5547 __ lw(result, FieldMemOperand(scratch, 5545 __ lw(result, FieldMemOperand(scratch,
5548 FixedArray::kHeaderSize - kPointerSize)); 5546 FixedArray::kHeaderSize - kPointerSize));
5549 __ bind(deferred->exit()); 5547 __ bind(deferred->exit());
5550 __ bind(&done); 5548 __ bind(&done);
5551 } 5549 }
5552 5550
5553 #undef __ 5551 #undef __
5554 5552
5555 } // namespace internal 5553 } // namespace internal
5556 } // namespace v8 5554 } // 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