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

Side by Side Diff: src/crankshaft/ia32/lithium-codegen-ia32.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/hydrogen-instructions.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.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 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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.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 4808 matching lines...) Expand 10 before | Expand all | Expand 10 after
4819 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 4819 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
4820 flags = static_cast<AllocationFlags>(flags | PRETENURE); 4820 flags = static_cast<AllocationFlags>(flags | PRETENURE);
4821 } 4821 }
4822 if (instr->hydrogen()->IsAllocationFoldingDominator()) { 4822 if (instr->hydrogen()->IsAllocationFoldingDominator()) {
4823 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); 4823 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR);
4824 } 4824 }
4825 DCHECK(!instr->hydrogen()->IsAllocationFolded()); 4825 DCHECK(!instr->hydrogen()->IsAllocationFolded());
4826 4826
4827 if (instr->size()->IsConstantOperand()) { 4827 if (instr->size()->IsConstantOperand()) {
4828 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 4828 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
4829 CHECK(size <= Page::kMaxRegularHeapObjectSize); 4829 CHECK(size <= kMaxRegularHeapObjectSize);
4830 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 4830 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
4831 } else { 4831 } else {
4832 Register size = ToRegister(instr->size()); 4832 Register size = ToRegister(instr->size());
4833 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 4833 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
4834 } 4834 }
4835 4835
4836 __ bind(deferred->exit()); 4836 __ bind(deferred->exit());
4837 4837
4838 if (instr->hydrogen()->MustPrefillWithFiller()) { 4838 if (instr->hydrogen()->MustPrefillWithFiller()) {
4839 if (instr->size()->IsConstantOperand()) { 4839 if (instr->size()->IsConstantOperand()) {
(...skipping 22 matching lines...) Expand all
4862 AllocationFlags flags = ALLOCATION_FOLDED; 4862 AllocationFlags flags = ALLOCATION_FOLDED;
4863 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 4863 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
4864 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 4864 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
4865 } 4865 }
4866 if (instr->hydrogen()->IsOldSpaceAllocation()) { 4866 if (instr->hydrogen()->IsOldSpaceAllocation()) {
4867 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 4867 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
4868 flags = static_cast<AllocationFlags>(flags | PRETENURE); 4868 flags = static_cast<AllocationFlags>(flags | PRETENURE);
4869 } 4869 }
4870 if (instr->size()->IsConstantOperand()) { 4870 if (instr->size()->IsConstantOperand()) {
4871 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 4871 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
4872 CHECK(size <= Page::kMaxRegularHeapObjectSize); 4872 CHECK(size <= kMaxRegularHeapObjectSize);
4873 __ FastAllocate(size, result, temp, flags); 4873 __ FastAllocate(size, result, temp, flags);
4874 } else { 4874 } else {
4875 Register size = ToRegister(instr->size()); 4875 Register size = ToRegister(instr->size());
4876 __ FastAllocate(size, result, temp, flags); 4876 __ FastAllocate(size, result, temp, flags);
4877 } 4877 }
4878 } 4878 }
4879 4879
4880 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { 4880 void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
4881 Register result = ToRegister(instr->result()); 4881 Register result = ToRegister(instr->result());
4882 4882
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
5281 __ bind(deferred->exit()); 5281 __ bind(deferred->exit());
5282 __ bind(&done); 5282 __ bind(&done);
5283 } 5283 }
5284 5284
5285 #undef __ 5285 #undef __
5286 5286
5287 } // namespace internal 5287 } // namespace internal
5288 } // namespace v8 5288 } // namespace v8
5289 5289
5290 #endif // V8_TARGET_ARCH_IA32 5290 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-instructions.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698