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

Side by Side Diff: src/arm64/lithium-codegen-arm64.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/arm/macro-assembler-arm.cc ('k') | src/arm64/macro-assembler-arm64.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 #include "src/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.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 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1545 Register result = ToRegister(instr->result()); 1545 Register result = ToRegister(instr->result());
1546 Register temp1 = ToRegister(instr->temp1()); 1546 Register temp1 = ToRegister(instr->temp1());
1547 Register temp2 = ToRegister(instr->temp2()); 1547 Register temp2 = ToRegister(instr->temp2());
1548 1548
1549 // Allocate memory for the object. 1549 // Allocate memory for the object.
1550 AllocationFlags flags = TAG_OBJECT; 1550 AllocationFlags flags = TAG_OBJECT;
1551 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 1551 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
1552 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 1552 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
1553 } 1553 }
1554 1554
1555 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 1555 if (instr->hydrogen()->IsOldSpaceAllocation()) {
1556 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
1557 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 1556 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
1558 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 1557 flags = static_cast<AllocationFlags>(flags | PRETENURE);
1559 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
1560 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
1561 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
1562 } 1558 }
1563 1559
1564 if (instr->size()->IsConstantOperand()) { 1560 if (instr->size()->IsConstantOperand()) {
1565 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 1561 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
1566 if (size <= Page::kMaxRegularHeapObjectSize) { 1562 if (size <= Page::kMaxRegularHeapObjectSize) {
1567 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); 1563 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags);
1568 } else { 1564 } else {
1569 __ B(deferred->entry()); 1565 __ B(deferred->entry());
1570 } 1566 }
1571 } else { 1567 } else {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 PushSafepointRegistersScope scope(this); 1602 PushSafepointRegistersScope scope(this);
1607 // We're in a SafepointRegistersScope so we can use any scratch registers. 1603 // We're in a SafepointRegistersScope so we can use any scratch registers.
1608 Register size = x0; 1604 Register size = x0;
1609 if (instr->size()->IsConstantOperand()) { 1605 if (instr->size()->IsConstantOperand()) {
1610 __ Mov(size, ToSmi(LConstantOperand::cast(instr->size()))); 1606 __ Mov(size, ToSmi(LConstantOperand::cast(instr->size())));
1611 } else { 1607 } else {
1612 __ SmiTag(size, ToRegister32(instr->size()).X()); 1608 __ SmiTag(size, ToRegister32(instr->size()).X());
1613 } 1609 }
1614 int flags = AllocateDoubleAlignFlag::encode( 1610 int flags = AllocateDoubleAlignFlag::encode(
1615 instr->hydrogen()->MustAllocateDoubleAligned()); 1611 instr->hydrogen()->MustAllocateDoubleAligned());
1616 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 1612 if (instr->hydrogen()->IsOldSpaceAllocation()) {
1617 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
1618 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 1613 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
1619 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); 1614 flags = AllocateTargetSpace::update(flags, OLD_SPACE);
1620 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
1621 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
1622 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE);
1623 } else { 1615 } else {
1624 flags = AllocateTargetSpace::update(flags, NEW_SPACE); 1616 flags = AllocateTargetSpace::update(flags, NEW_SPACE);
1625 } 1617 }
1626 __ Mov(x10, Smi::FromInt(flags)); 1618 __ Mov(x10, Smi::FromInt(flags));
1627 __ Push(size, x10); 1619 __ Push(size, x10);
1628 1620
1629 CallRuntimeFromDeferred( 1621 CallRuntimeFromDeferred(
1630 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); 1622 Runtime::kAllocateInTargetSpace, 2, instr, instr->context());
1631 __ StoreToSafepointRegisterSlot(x0, ToRegister(instr->result())); 1623 __ StoreToSafepointRegisterSlot(x0, ToRegister(instr->result()));
1632 } 1624 }
(...skipping 4397 matching lines...) Expand 10 before | Expand all | Expand 10 after
6030 Handle<ScopeInfo> scope_info = instr->scope_info(); 6022 Handle<ScopeInfo> scope_info = instr->scope_info();
6031 __ Push(scope_info); 6023 __ Push(scope_info);
6032 __ Push(ToRegister(instr->function())); 6024 __ Push(ToRegister(instr->function()));
6033 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6025 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6034 RecordSafepoint(Safepoint::kNoLazyDeopt); 6026 RecordSafepoint(Safepoint::kNoLazyDeopt);
6035 } 6027 }
6036 6028
6037 6029
6038 6030
6039 } } // namespace v8::internal 6031 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698