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

Side by Side Diff: src/x87/lithium-codegen-x87.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/x64/macro-assembler-x64.cc ('k') | src/x87/macro-assembler-x87.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 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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
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 5802 matching lines...) Expand 10 before | Expand all | Expand 10 after
5813 new(zone()) DeferredAllocate(this, instr, x87_stack_); 5813 new(zone()) DeferredAllocate(this, instr, x87_stack_);
5814 5814
5815 Register result = ToRegister(instr->result()); 5815 Register result = ToRegister(instr->result());
5816 Register temp = ToRegister(instr->temp()); 5816 Register temp = ToRegister(instr->temp());
5817 5817
5818 // Allocate memory for the object. 5818 // Allocate memory for the object.
5819 AllocationFlags flags = TAG_OBJECT; 5819 AllocationFlags flags = TAG_OBJECT;
5820 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 5820 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
5821 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 5821 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
5822 } 5822 }
5823 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 5823 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5824 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5825 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5824 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5826 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 5825 flags = static_cast<AllocationFlags>(flags | PRETENURE);
5827 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5828 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5829 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
5830 } 5826 }
5831 5827
5832 if (instr->size()->IsConstantOperand()) { 5828 if (instr->size()->IsConstantOperand()) {
5833 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5829 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5834 if (size <= Page::kMaxRegularHeapObjectSize) { 5830 if (size <= Page::kMaxRegularHeapObjectSize) {
5835 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5831 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5836 } else { 5832 } else {
5837 __ jmp(deferred->entry()); 5833 __ jmp(deferred->entry());
5838 } 5834 }
5839 } else { 5835 } else {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
5882 __ push(Immediate(Smi::FromInt(size))); 5878 __ push(Immediate(Smi::FromInt(size)));
5883 } else { 5879 } else {
5884 // We should never get here at runtime => abort 5880 // We should never get here at runtime => abort
5885 __ int3(); 5881 __ int3();
5886 return; 5882 return;
5887 } 5883 }
5888 } 5884 }
5889 5885
5890 int flags = AllocateDoubleAlignFlag::encode( 5886 int flags = AllocateDoubleAlignFlag::encode(
5891 instr->hydrogen()->MustAllocateDoubleAligned()); 5887 instr->hydrogen()->MustAllocateDoubleAligned());
5892 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 5888 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5893 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5894 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5889 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5895 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); 5890 flags = AllocateTargetSpace::update(flags, OLD_SPACE);
5896 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5897 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5898 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE);
5899 } else { 5891 } else {
5900 flags = AllocateTargetSpace::update(flags, NEW_SPACE); 5892 flags = AllocateTargetSpace::update(flags, NEW_SPACE);
5901 } 5893 }
5902 __ push(Immediate(Smi::FromInt(flags))); 5894 __ push(Immediate(Smi::FromInt(flags)));
5903 5895
5904 CallRuntimeFromDeferred( 5896 CallRuntimeFromDeferred(
5905 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); 5897 Runtime::kAllocateInTargetSpace, 2, instr, instr->context());
5906 __ StoreToSafepointRegisterSlot(result, eax); 5898 __ StoreToSafepointRegisterSlot(result, eax);
5907 } 5899 }
5908 5900
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
6378 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6370 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6379 RecordSafepoint(Safepoint::kNoLazyDeopt); 6371 RecordSafepoint(Safepoint::kNoLazyDeopt);
6380 } 6372 }
6381 6373
6382 6374
6383 #undef __ 6375 #undef __
6384 6376
6385 } } // namespace v8::internal 6377 } } // namespace v8::internal
6386 6378
6387 #endif // V8_TARGET_ARCH_X87 6379 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/macro-assembler-x64.cc ('k') | src/x87/macro-assembler-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698