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

Side by Side Diff: src/crankshaft/arm/lithium-codegen-arm.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/compiler/memory-optimizer.cc ('k') | src/crankshaft/arm64/lithium-codegen-arm64.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 #include "src/crankshaft/arm/lithium-codegen-arm.h" 5 #include "src/crankshaft/arm/lithium-codegen-arm.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h"
(...skipping 5039 matching lines...) Expand 10 before | Expand all | Expand 10 after
5050 flags = static_cast<AllocationFlags>(flags | PRETENURE); 5050 flags = static_cast<AllocationFlags>(flags | PRETENURE);
5051 } 5051 }
5052 5052
5053 if (instr->hydrogen()->IsAllocationFoldingDominator()) { 5053 if (instr->hydrogen()->IsAllocationFoldingDominator()) {
5054 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); 5054 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR);
5055 } 5055 }
5056 DCHECK(!instr->hydrogen()->IsAllocationFolded()); 5056 DCHECK(!instr->hydrogen()->IsAllocationFolded());
5057 5057
5058 if (instr->size()->IsConstantOperand()) { 5058 if (instr->size()->IsConstantOperand()) {
5059 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5059 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5060 CHECK(size <= Page::kMaxRegularHeapObjectSize); 5060 CHECK(size <= kMaxRegularHeapObjectSize);
5061 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5061 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5062 } else { 5062 } else {
5063 Register size = ToRegister(instr->size()); 5063 Register size = ToRegister(instr->size());
5064 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5064 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5065 } 5065 }
5066 5066
5067 __ bind(deferred->exit()); 5067 __ bind(deferred->exit());
5068 5068
5069 if (instr->hydrogen()->MustPrefillWithFiller()) { 5069 if (instr->hydrogen()->MustPrefillWithFiller()) {
5070 STATIC_ASSERT(kHeapObjectTag == 1); 5070 STATIC_ASSERT(kHeapObjectTag == 1);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
5152 AllocationFlags flags = ALLOCATION_FOLDED; 5152 AllocationFlags flags = ALLOCATION_FOLDED;
5153 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 5153 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
5154 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 5154 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
5155 } 5155 }
5156 if (instr->hydrogen()->IsOldSpaceAllocation()) { 5156 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5157 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5157 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5158 flags = static_cast<AllocationFlags>(flags | PRETENURE); 5158 flags = static_cast<AllocationFlags>(flags | PRETENURE);
5159 } 5159 }
5160 if (instr->size()->IsConstantOperand()) { 5160 if (instr->size()->IsConstantOperand()) {
5161 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5161 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5162 CHECK(size <= Page::kMaxRegularHeapObjectSize); 5162 CHECK(size <= kMaxRegularHeapObjectSize);
5163 __ FastAllocate(size, result, scratch1, scratch2, flags); 5163 __ FastAllocate(size, result, scratch1, scratch2, flags);
5164 } else { 5164 } else {
5165 Register size = ToRegister(instr->size()); 5165 Register size = ToRegister(instr->size());
5166 __ FastAllocate(size, result, scratch1, scratch2, flags); 5166 __ FastAllocate(size, result, scratch1, scratch2, flags);
5167 } 5167 }
5168 } 5168 }
5169 5169
5170 5170
5171 void LCodeGen::DoTypeof(LTypeof* instr) { 5171 void LCodeGen::DoTypeof(LTypeof* instr) {
5172 DCHECK(ToRegister(instr->value()).is(r3)); 5172 DCHECK(ToRegister(instr->value()).is(r3));
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
5523 __ ldr(result, FieldMemOperand(scratch, 5523 __ ldr(result, FieldMemOperand(scratch,
5524 FixedArray::kHeaderSize - kPointerSize)); 5524 FixedArray::kHeaderSize - kPointerSize));
5525 __ bind(deferred->exit()); 5525 __ bind(deferred->exit());
5526 __ bind(&done); 5526 __ bind(&done);
5527 } 5527 }
5528 5528
5529 #undef __ 5529 #undef __
5530 5530
5531 } // namespace internal 5531 } // namespace internal
5532 } // namespace v8 5532 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/memory-optimizer.cc ('k') | src/crankshaft/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698