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

Side by Side Diff: src/crankshaft/x64/lithium-codegen-x64.cc

Issue 2311203002: Move kMaxRegularHeapObjectSize into globals (Closed)
Patch Set: Saving the file helps... Created 4 years, 3 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/crankshaft/s390/lithium-codegen-s390.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/crankshaft/x64/lithium-codegen-x64.h" 7 #include "src/crankshaft/x64/lithium-codegen-x64.h"
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 5087 matching lines...) Expand 10 before | Expand all | Expand 10 after
5098 flags = static_cast<AllocationFlags>(flags | PRETENURE); 5098 flags = static_cast<AllocationFlags>(flags | PRETENURE);
5099 } 5099 }
5100 5100
5101 if (instr->hydrogen()->IsAllocationFoldingDominator()) { 5101 if (instr->hydrogen()->IsAllocationFoldingDominator()) {
5102 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); 5102 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR);
5103 } 5103 }
5104 DCHECK(!instr->hydrogen()->IsAllocationFolded()); 5104 DCHECK(!instr->hydrogen()->IsAllocationFolded());
5105 5105
5106 if (instr->size()->IsConstantOperand()) { 5106 if (instr->size()->IsConstantOperand()) {
5107 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5107 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5108 CHECK(size <= Page::kMaxRegularHeapObjectSize); 5108 CHECK(size <= kMaxRegularHeapObjectSize);
5109 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5109 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5110 } else { 5110 } else {
5111 Register size = ToRegister(instr->size()); 5111 Register size = ToRegister(instr->size());
5112 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5112 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5113 } 5113 }
5114 5114
5115 __ bind(deferred->exit()); 5115 __ bind(deferred->exit());
5116 5116
5117 if (instr->hydrogen()->MustPrefillWithFiller()) { 5117 if (instr->hydrogen()->MustPrefillWithFiller()) {
5118 if (instr->size()->IsConstantOperand()) { 5118 if (instr->size()->IsConstantOperand()) {
(...skipping 22 matching lines...) Expand all
5141 AllocationFlags flags = ALLOCATION_FOLDED; 5141 AllocationFlags flags = ALLOCATION_FOLDED;
5142 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 5142 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
5143 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 5143 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
5144 } 5144 }
5145 if (instr->hydrogen()->IsOldSpaceAllocation()) { 5145 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5146 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5146 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5147 flags = static_cast<AllocationFlags>(flags | PRETENURE); 5147 flags = static_cast<AllocationFlags>(flags | PRETENURE);
5148 } 5148 }
5149 if (instr->size()->IsConstantOperand()) { 5149 if (instr->size()->IsConstantOperand()) {
5150 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5150 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5151 CHECK(size <= Page::kMaxRegularHeapObjectSize); 5151 CHECK(size <= kMaxRegularHeapObjectSize);
5152 __ FastAllocate(size, result, temp, flags); 5152 __ FastAllocate(size, result, temp, flags);
5153 } else { 5153 } else {
5154 Register size = ToRegister(instr->size()); 5154 Register size = ToRegister(instr->size());
5155 __ FastAllocate(size, result, temp, flags); 5155 __ FastAllocate(size, result, temp, flags);
5156 } 5156 }
5157 } 5157 }
5158 5158
5159 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { 5159 void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
5160 Register result = ToRegister(instr->result()); 5160 Register result = ToRegister(instr->result());
5161 5161
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
5564 __ bind(deferred->exit()); 5564 __ bind(deferred->exit());
5565 __ bind(&done); 5565 __ bind(&done);
5566 } 5566 }
5567 5567
5568 #undef __ 5568 #undef __
5569 5569
5570 } // namespace internal 5570 } // namespace internal
5571 } // namespace v8 5571 } // namespace v8
5572 5572
5573 #endif // V8_TARGET_ARCH_X64 5573 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/crankshaft/s390/lithium-codegen-s390.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698