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

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

Issue 1012023002: Merge old data and pointer space. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 5394 matching lines...) Expand 10 before | Expand all | Expand 10 after
5405 5405
5406 Register result = ToRegister(instr->result()); 5406 Register result = ToRegister(instr->result());
5407 Register scratch = ToRegister(instr->temp1()); 5407 Register scratch = ToRegister(instr->temp1());
5408 Register scratch2 = ToRegister(instr->temp2()); 5408 Register scratch2 = ToRegister(instr->temp2());
5409 5409
5410 // Allocate memory for the object. 5410 // Allocate memory for the object.
5411 AllocationFlags flags = TAG_OBJECT; 5411 AllocationFlags flags = TAG_OBJECT;
5412 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 5412 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
5413 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 5413 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
5414 } 5414 }
5415 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 5415 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5416 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5417 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5416 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5418 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 5417 flags = static_cast<AllocationFlags>(flags | PRETENURE);
5419 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5420 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5421 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
5422 } 5418 }
5423 5419
5424 if (instr->size()->IsConstantOperand()) { 5420 if (instr->size()->IsConstantOperand()) {
5425 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5421 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5426 if (size <= Page::kMaxRegularHeapObjectSize) { 5422 if (size <= Page::kMaxRegularHeapObjectSize) {
5427 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5423 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5428 } else { 5424 } else {
5429 __ jmp(deferred->entry()); 5425 __ jmp(deferred->entry());
5430 } 5426 }
5431 } else { 5427 } else {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
5473 __ Push(Smi::FromInt(size)); 5469 __ Push(Smi::FromInt(size));
5474 } else { 5470 } else {
5475 // We should never get here at runtime => abort 5471 // We should never get here at runtime => abort
5476 __ stop("invalid allocation size"); 5472 __ stop("invalid allocation size");
5477 return; 5473 return;
5478 } 5474 }
5479 } 5475 }
5480 5476
5481 int flags = AllocateDoubleAlignFlag::encode( 5477 int flags = AllocateDoubleAlignFlag::encode(
5482 instr->hydrogen()->MustAllocateDoubleAligned()); 5478 instr->hydrogen()->MustAllocateDoubleAligned());
5483 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 5479 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5484 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5485 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5480 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5486 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); 5481 flags = AllocateTargetSpace::update(flags, OLD_SPACE);
5487 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5488 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5489 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE);
5490 } else { 5482 } else {
5491 flags = AllocateTargetSpace::update(flags, NEW_SPACE); 5483 flags = AllocateTargetSpace::update(flags, NEW_SPACE);
5492 } 5484 }
5493 __ Push(Smi::FromInt(flags)); 5485 __ Push(Smi::FromInt(flags));
5494 5486
5495 CallRuntimeFromDeferred( 5487 CallRuntimeFromDeferred(
5496 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); 5488 Runtime::kAllocateInTargetSpace, 2, instr, instr->context());
5497 __ StoreToSafepointRegisterSlot(r0, result); 5489 __ StoreToSafepointRegisterSlot(r0, result);
5498 } 5490 }
5499 5491
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
5970 __ Push(scope_info); 5962 __ Push(scope_info);
5971 __ push(ToRegister(instr->function())); 5963 __ push(ToRegister(instr->function()));
5972 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5964 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5973 RecordSafepoint(Safepoint::kNoLazyDeopt); 5965 RecordSafepoint(Safepoint::kNoLazyDeopt);
5974 } 5966 }
5975 5967
5976 5968
5977 #undef __ 5969 #undef __
5978 5970
5979 } } // namespace v8::internal 5971 } } // 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