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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 5231 matching lines...) Expand 10 before | Expand all | Expand 10 after
5242 AllocationFlags allocation_flags = NO_ALLOCATION_FLAGS; 5242 AllocationFlags allocation_flags = NO_ALLOCATION_FLAGS;
5243 if (instr->hydrogen()->IsOldSpaceAllocation()) { 5243 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5244 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5244 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5245 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); 5245 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE);
5246 } 5246 }
5247 // If the allocation folding dominator allocate triggered a GC, allocation 5247 // If the allocation folding dominator allocate triggered a GC, allocation
5248 // happend in the runtime. We have to reset the top pointer to virtually 5248 // happend in the runtime. We have to reset the top pointer to virtually
5249 // undo the allocation. 5249 // undo the allocation.
5250 ExternalReference allocation_top = 5250 ExternalReference allocation_top =
5251 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); 5251 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags);
5252 __ subp(rax, Immediate(kHeapObjectTag));
5253 __ Store(allocation_top, rax); 5252 __ Store(allocation_top, rax);
5254 __ addp(rax, Immediate(kHeapObjectTag));
5255 } 5253 }
5256 } 5254 }
5257 5255
5258 5256
5259 void LCodeGen::DoTypeof(LTypeof* instr) { 5257 void LCodeGen::DoTypeof(LTypeof* instr) {
5260 DCHECK(ToRegister(instr->context()).is(rsi)); 5258 DCHECK(ToRegister(instr->context()).is(rsi));
5261 DCHECK(ToRegister(instr->value()).is(rbx)); 5259 DCHECK(ToRegister(instr->value()).is(rbx));
5262 Label end, do_call; 5260 Label end, do_call;
5263 Register value_register = ToRegister(instr->value()); 5261 Register value_register = ToRegister(instr->value());
5264 __ JumpIfNotSmi(value_register, &do_call); 5262 __ JumpIfNotSmi(value_register, &do_call);
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
5614 __ bind(deferred->exit()); 5612 __ bind(deferred->exit());
5615 __ bind(&done); 5613 __ bind(&done);
5616 } 5614 }
5617 5615
5618 #undef __ 5616 #undef __
5619 5617
5620 } // namespace internal 5618 } // namespace internal
5621 } // namespace v8 5619 } // namespace v8
5622 5620
5623 #endif // V8_TARGET_ARCH_X64 5621 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698