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

Side by Side Diff: src/crankshaft/x87/lithium-codegen-x87.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/x64/lithium-codegen-x64.cc ('k') | src/globals.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 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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 5292 matching lines...) Expand 10 before | Expand all | Expand 10 after
5303 flags = static_cast<AllocationFlags>(flags | PRETENURE); 5303 flags = static_cast<AllocationFlags>(flags | PRETENURE);
5304 } 5304 }
5305 5305
5306 if (instr->hydrogen()->IsAllocationFoldingDominator()) { 5306 if (instr->hydrogen()->IsAllocationFoldingDominator()) {
5307 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); 5307 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR);
5308 } 5308 }
5309 DCHECK(!instr->hydrogen()->IsAllocationFolded()); 5309 DCHECK(!instr->hydrogen()->IsAllocationFolded());
5310 5310
5311 if (instr->size()->IsConstantOperand()) { 5311 if (instr->size()->IsConstantOperand()) {
5312 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5312 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5313 CHECK(size <= Page::kMaxRegularHeapObjectSize); 5313 CHECK(size <= kMaxRegularHeapObjectSize);
5314 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5314 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5315 } else { 5315 } else {
5316 Register size = ToRegister(instr->size()); 5316 Register size = ToRegister(instr->size());
5317 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5317 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5318 } 5318 }
5319 5319
5320 __ bind(deferred->exit()); 5320 __ bind(deferred->exit());
5321 5321
5322 if (instr->hydrogen()->MustPrefillWithFiller()) { 5322 if (instr->hydrogen()->MustPrefillWithFiller()) {
5323 if (instr->size()->IsConstantOperand()) { 5323 if (instr->size()->IsConstantOperand()) {
(...skipping 22 matching lines...) Expand all
5346 AllocationFlags flags = ALLOCATION_FOLDED; 5346 AllocationFlags flags = ALLOCATION_FOLDED;
5347 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 5347 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
5348 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 5348 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
5349 } 5349 }
5350 if (instr->hydrogen()->IsOldSpaceAllocation()) { 5350 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5351 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5351 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5352 flags = static_cast<AllocationFlags>(flags | PRETENURE); 5352 flags = static_cast<AllocationFlags>(flags | PRETENURE);
5353 } 5353 }
5354 if (instr->size()->IsConstantOperand()) { 5354 if (instr->size()->IsConstantOperand()) {
5355 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5355 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5356 CHECK(size <= Page::kMaxRegularHeapObjectSize); 5356 CHECK(size <= kMaxRegularHeapObjectSize);
5357 __ FastAllocate(size, result, temp, flags); 5357 __ FastAllocate(size, result, temp, flags);
5358 } else { 5358 } else {
5359 Register size = ToRegister(instr->size()); 5359 Register size = ToRegister(instr->size());
5360 __ FastAllocate(size, result, temp, flags); 5360 __ FastAllocate(size, result, temp, flags);
5361 } 5361 }
5362 } 5362 }
5363 5363
5364 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { 5364 void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
5365 Register result = ToRegister(instr->result()); 5365 Register result = ToRegister(instr->result());
5366 5366
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
5768 __ bind(deferred->exit()); 5768 __ bind(deferred->exit());
5769 __ bind(&done); 5769 __ bind(&done);
5770 } 5770 }
5771 5771
5772 #undef __ 5772 #undef __
5773 5773
5774 } // namespace internal 5774 } // namespace internal
5775 } // namespace v8 5775 } // namespace v8
5776 5776
5777 #endif // V8_TARGET_ARCH_X87 5777 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698