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

Side by Side Diff: src/arm64/lithium-codegen-arm64.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/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 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 Register result = ToRegister(instr->result()); 1570 Register result = ToRegister(instr->result());
1571 Register temp1 = ToRegister(instr->temp1()); 1571 Register temp1 = ToRegister(instr->temp1());
1572 Register temp2 = ToRegister(instr->temp2()); 1572 Register temp2 = ToRegister(instr->temp2());
1573 1573
1574 // Allocate memory for the object. 1574 // Allocate memory for the object.
1575 AllocationFlags flags = TAG_OBJECT; 1575 AllocationFlags flags = TAG_OBJECT;
1576 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 1576 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
1577 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 1577 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
1578 } 1578 }
1579 1579
1580 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 1580 if (instr->hydrogen()->IsOldSpaceAllocation()) {
1581 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
1582 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 1581 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
1583 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 1582 flags = static_cast<AllocationFlags>(flags | PRETENURE);
1584 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
1585 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
1586 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
1587 } 1583 }
1588 1584
1589 if (instr->size()->IsConstantOperand()) { 1585 if (instr->size()->IsConstantOperand()) {
1590 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 1586 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
1591 if (size <= Page::kMaxRegularHeapObjectSize) { 1587 if (size <= Page::kMaxRegularHeapObjectSize) {
1592 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); 1588 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags);
1593 } else { 1589 } else {
1594 __ B(deferred->entry()); 1590 __ B(deferred->entry());
1595 } 1591 }
1596 } else { 1592 } else {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1631 PushSafepointRegistersScope scope(this); 1627 PushSafepointRegistersScope scope(this);
1632 // We're in a SafepointRegistersScope so we can use any scratch registers. 1628 // We're in a SafepointRegistersScope so we can use any scratch registers.
1633 Register size = x0; 1629 Register size = x0;
1634 if (instr->size()->IsConstantOperand()) { 1630 if (instr->size()->IsConstantOperand()) {
1635 __ Mov(size, ToSmi(LConstantOperand::cast(instr->size()))); 1631 __ Mov(size, ToSmi(LConstantOperand::cast(instr->size())));
1636 } else { 1632 } else {
1637 __ SmiTag(size, ToRegister32(instr->size()).X()); 1633 __ SmiTag(size, ToRegister32(instr->size()).X());
1638 } 1634 }
1639 int flags = AllocateDoubleAlignFlag::encode( 1635 int flags = AllocateDoubleAlignFlag::encode(
1640 instr->hydrogen()->MustAllocateDoubleAligned()); 1636 instr->hydrogen()->MustAllocateDoubleAligned());
1641 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 1637 if (instr->hydrogen()->IsOldSpaceAllocation()) {
1642 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
1643 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 1638 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
1644 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); 1639 flags = AllocateTargetSpace::update(flags, OLD_SPACE);
1645 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
1646 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
1647 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE);
1648 } else { 1640 } else {
1649 flags = AllocateTargetSpace::update(flags, NEW_SPACE); 1641 flags = AllocateTargetSpace::update(flags, NEW_SPACE);
1650 } 1642 }
1651 __ Mov(x10, Smi::FromInt(flags)); 1643 __ Mov(x10, Smi::FromInt(flags));
1652 __ Push(size, x10); 1644 __ Push(size, x10);
1653 1645
1654 CallRuntimeFromDeferred( 1646 CallRuntimeFromDeferred(
1655 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); 1647 Runtime::kAllocateInTargetSpace, 2, instr, instr->context());
1656 __ StoreToSafepointRegisterSlot(x0, ToRegister(instr->result())); 1648 __ StoreToSafepointRegisterSlot(x0, ToRegister(instr->result()));
1657 } 1649 }
(...skipping 4444 matching lines...) Expand 10 before | Expand all | Expand 10 after
6102 Handle<ScopeInfo> scope_info = instr->scope_info(); 6094 Handle<ScopeInfo> scope_info = instr->scope_info();
6103 __ Push(scope_info); 6095 __ Push(scope_info);
6104 __ Push(ToRegister(instr->function())); 6096 __ Push(ToRegister(instr->function()));
6105 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6097 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6106 RecordSafepoint(Safepoint::kNoLazyDeopt); 6098 RecordSafepoint(Safepoint::kNoLazyDeopt);
6107 } 6099 }
6108 6100
6109 6101
6110 6102
6111 } } // namespace v8::internal 6103 } } // 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