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

Side by Side Diff: src/arm/lithium-codegen-arm.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/api.cc ('k') | src/arm/macro-assembler-arm.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 #include "src/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.h"
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 5360 matching lines...) Expand 10 before | Expand all | Expand 10 after
5371 5371
5372 Register result = ToRegister(instr->result()); 5372 Register result = ToRegister(instr->result());
5373 Register scratch = ToRegister(instr->temp1()); 5373 Register scratch = ToRegister(instr->temp1());
5374 Register scratch2 = ToRegister(instr->temp2()); 5374 Register scratch2 = ToRegister(instr->temp2());
5375 5375
5376 // Allocate memory for the object. 5376 // Allocate memory for the object.
5377 AllocationFlags flags = TAG_OBJECT; 5377 AllocationFlags flags = TAG_OBJECT;
5378 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 5378 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
5379 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 5379 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
5380 } 5380 }
5381 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 5381 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5382 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5383 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5382 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5384 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 5383 flags = static_cast<AllocationFlags>(flags | PRETENURE);
5385 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5386 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5387 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
5388 } 5384 }
5389 5385
5390 if (instr->size()->IsConstantOperand()) { 5386 if (instr->size()->IsConstantOperand()) {
5391 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5387 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5392 if (size <= Page::kMaxRegularHeapObjectSize) { 5388 if (size <= Page::kMaxRegularHeapObjectSize) {
5393 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5389 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5394 } else { 5390 } else {
5395 __ jmp(deferred->entry()); 5391 __ jmp(deferred->entry());
5396 } 5392 }
5397 } else { 5393 } else {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
5439 __ Push(Smi::FromInt(size)); 5435 __ Push(Smi::FromInt(size));
5440 } else { 5436 } else {
5441 // We should never get here at runtime => abort 5437 // We should never get here at runtime => abort
5442 __ stop("invalid allocation size"); 5438 __ stop("invalid allocation size");
5443 return; 5439 return;
5444 } 5440 }
5445 } 5441 }
5446 5442
5447 int flags = AllocateDoubleAlignFlag::encode( 5443 int flags = AllocateDoubleAlignFlag::encode(
5448 instr->hydrogen()->MustAllocateDoubleAligned()); 5444 instr->hydrogen()->MustAllocateDoubleAligned());
5449 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 5445 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5450 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5451 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5446 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5452 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); 5447 flags = AllocateTargetSpace::update(flags, OLD_SPACE);
5453 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5454 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5455 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE);
5456 } else { 5448 } else {
5457 flags = AllocateTargetSpace::update(flags, NEW_SPACE); 5449 flags = AllocateTargetSpace::update(flags, NEW_SPACE);
5458 } 5450 }
5459 __ Push(Smi::FromInt(flags)); 5451 __ Push(Smi::FromInt(flags));
5460 5452
5461 CallRuntimeFromDeferred( 5453 CallRuntimeFromDeferred(
5462 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); 5454 Runtime::kAllocateInTargetSpace, 2, instr, instr->context());
5463 __ StoreToSafepointRegisterSlot(r0, result); 5455 __ StoreToSafepointRegisterSlot(r0, result);
5464 } 5456 }
5465 5457
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
5936 __ Push(scope_info); 5928 __ Push(scope_info);
5937 __ push(ToRegister(instr->function())); 5929 __ push(ToRegister(instr->function()));
5938 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5930 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5939 RecordSafepoint(Safepoint::kNoLazyDeopt); 5931 RecordSafepoint(Safepoint::kNoLazyDeopt);
5940 } 5932 }
5941 5933
5942 5934
5943 #undef __ 5935 #undef __
5944 5936
5945 } } // namespace v8::internal 5937 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698