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

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: 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.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));
5145 __ li(top_address, Operand(allocation_top)); 5144 __ li(top_address, Operand(allocation_top));
5146 __ sw(v0, MemOperand(top_address)); 5145 __ sw(v0, MemOperand(top_address));
5147 __ Addu(v0, v0, Operand(kHeapObjectTag));
5148 } 5146 }
5149 } 5147 }
5150 5148
5151 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { 5149 void LCodeGen::DoFastAllocate(LFastAllocate* instr) {
5152 DCHECK(instr->hydrogen()->IsAllocationFolded()); 5150 DCHECK(instr->hydrogen()->IsAllocationFolded());
5153 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); 5151 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator());
5154 Register result = ToRegister(instr->result()); 5152 Register result = ToRegister(instr->result());
5155 Register scratch1 = ToRegister(instr->temp1()); 5153 Register scratch1 = ToRegister(instr->temp1());
5156 Register scratch2 = ToRegister(instr->temp2()); 5154 Register scratch2 = ToRegister(instr->temp2());
5157 5155
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
5558 __ lw(result, FieldMemOperand(scratch, 5556 __ lw(result, FieldMemOperand(scratch,
5559 FixedArray::kHeaderSize - kPointerSize)); 5557 FixedArray::kHeaderSize - kPointerSize));
5560 __ bind(deferred->exit()); 5558 __ bind(deferred->exit());
5561 __ bind(&done); 5559 __ bind(&done);
5562 } 5560 }
5563 5561
5564 #undef __ 5562 #undef __
5565 5563
5566 } // namespace internal 5564 } // namespace internal
5567 } // namespace v8 5565 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698