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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 1051233002: Reland "Merge old data and pointer space." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/snapshot/serialize.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
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 5356 matching lines...) Expand 10 before | Expand all | Expand 10 after
5367 new(zone()) DeferredAllocate(this, instr); 5367 new(zone()) DeferredAllocate(this, instr);
5368 5368
5369 Register result = ToRegister(instr->result()); 5369 Register result = ToRegister(instr->result());
5370 Register temp = ToRegister(instr->temp()); 5370 Register temp = ToRegister(instr->temp());
5371 5371
5372 // Allocate memory for the object. 5372 // Allocate memory for the object.
5373 AllocationFlags flags = TAG_OBJECT; 5373 AllocationFlags flags = TAG_OBJECT;
5374 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 5374 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
5375 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 5375 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
5376 } 5376 }
5377 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 5377 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5378 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5379 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5378 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5380 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 5379 flags = static_cast<AllocationFlags>(flags | PRETENURE);
5381 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5382 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5383 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
5384 } 5380 }
5385 5381
5386 if (instr->size()->IsConstantOperand()) { 5382 if (instr->size()->IsConstantOperand()) {
5387 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5383 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5388 if (size <= Page::kMaxRegularHeapObjectSize) { 5384 if (size <= Page::kMaxRegularHeapObjectSize) {
5389 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5385 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5390 } else { 5386 } else {
5391 __ jmp(deferred->entry()); 5387 __ jmp(deferred->entry());
5392 } 5388 }
5393 } else { 5389 } else {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
5429 Register size = ToRegister(instr->size()); 5425 Register size = ToRegister(instr->size());
5430 DCHECK(!size.is(result)); 5426 DCHECK(!size.is(result));
5431 __ Integer32ToSmi(size, size); 5427 __ Integer32ToSmi(size, size);
5432 __ Push(size); 5428 __ Push(size);
5433 } else { 5429 } else {
5434 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5430 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5435 __ Push(Smi::FromInt(size)); 5431 __ Push(Smi::FromInt(size));
5436 } 5432 }
5437 5433
5438 int flags = 0; 5434 int flags = 0;
5439 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 5435 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5440 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5441 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5436 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5442 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); 5437 flags = AllocateTargetSpace::update(flags, OLD_SPACE);
5443 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5444 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5445 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE);
5446 } else { 5438 } else {
5447 flags = AllocateTargetSpace::update(flags, NEW_SPACE); 5439 flags = AllocateTargetSpace::update(flags, NEW_SPACE);
5448 } 5440 }
5449 __ Push(Smi::FromInt(flags)); 5441 __ Push(Smi::FromInt(flags));
5450 5442
5451 CallRuntimeFromDeferred( 5443 CallRuntimeFromDeferred(
5452 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); 5444 Runtime::kAllocateInTargetSpace, 2, instr, instr->context());
5453 __ StoreToSafepointRegisterSlot(result, rax); 5445 __ StoreToSafepointRegisterSlot(result, rax);
5454 } 5446 }
5455 5447
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
5933 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5925 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5934 RecordSafepoint(Safepoint::kNoLazyDeopt); 5926 RecordSafepoint(Safepoint::kNoLazyDeopt);
5935 } 5927 }
5936 5928
5937 5929
5938 #undef __ 5930 #undef __
5939 5931
5940 } } // namespace v8::internal 5932 } } // namespace v8::internal
5941 5933
5942 #endif // V8_TARGET_ARCH_X64 5934 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/snapshot/serialize.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698