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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.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/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 5300 matching lines...) Expand 10 before | Expand all | Expand 10 after
5311 } 5311 }
5312 5312
5313 if (instr->hydrogen()->IsAllocationFoldingDominator()) { 5313 if (instr->hydrogen()->IsAllocationFoldingDominator()) {
5314 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); 5314 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR);
5315 } 5315 }
5316 5316
5317 DCHECK(!instr->hydrogen()->IsAllocationFolded()); 5317 DCHECK(!instr->hydrogen()->IsAllocationFolded());
5318 5318
5319 if (instr->size()->IsConstantOperand()) { 5319 if (instr->size()->IsConstantOperand()) {
5320 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5320 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5321 CHECK(size <= Page::kMaxRegularHeapObjectSize); 5321 CHECK(size <= kMaxRegularHeapObjectSize);
5322 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5322 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5323 } else { 5323 } else {
5324 Register size = ToRegister(instr->size()); 5324 Register size = ToRegister(instr->size());
5325 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5325 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5326 } 5326 }
5327 5327
5328 __ bind(deferred->exit()); 5328 __ bind(deferred->exit());
5329 5329
5330 if (instr->hydrogen()->MustPrefillWithFiller()) { 5330 if (instr->hydrogen()->MustPrefillWithFiller()) {
5331 if (instr->size()->IsConstantOperand()) { 5331 if (instr->size()->IsConstantOperand()) {
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
5417 AllocationFlags flags = ALLOCATION_FOLDED; 5417 AllocationFlags flags = ALLOCATION_FOLDED;
5418 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 5418 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
5419 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 5419 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
5420 } 5420 }
5421 if (instr->hydrogen()->IsOldSpaceAllocation()) { 5421 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5422 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5422 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5423 flags = static_cast<AllocationFlags>(flags | PRETENURE); 5423 flags = static_cast<AllocationFlags>(flags | PRETENURE);
5424 } 5424 }
5425 if (instr->size()->IsConstantOperand()) { 5425 if (instr->size()->IsConstantOperand()) {
5426 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5426 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5427 CHECK(size <= Page::kMaxRegularHeapObjectSize); 5427 CHECK(size <= kMaxRegularHeapObjectSize);
5428 __ FastAllocate(size, result, scratch1, scratch2, flags); 5428 __ FastAllocate(size, result, scratch1, scratch2, flags);
5429 } else { 5429 } else {
5430 Register size = ToRegister(instr->size()); 5430 Register size = ToRegister(instr->size());
5431 __ FastAllocate(size, result, scratch1, scratch2, flags); 5431 __ FastAllocate(size, result, scratch1, scratch2, flags);
5432 } 5432 }
5433 } 5433 }
5434 5434
5435 5435
5436 void LCodeGen::DoTypeof(LTypeof* instr) { 5436 void LCodeGen::DoTypeof(LTypeof* instr) {
5437 DCHECK(ToRegister(instr->value()).is(r6)); 5437 DCHECK(ToRegister(instr->value()).is(r6));
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
5776 __ LoadP(result, 5776 __ LoadP(result,
5777 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5777 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5778 __ bind(deferred->exit()); 5778 __ bind(deferred->exit());
5779 __ bind(&done); 5779 __ bind(&done);
5780 } 5780 }
5781 5781
5782 #undef __ 5782 #undef __
5783 5783
5784 } // namespace internal 5784 } // namespace internal
5785 } // namespace v8 5785 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-codegen-mips64.cc ('k') | src/crankshaft/s390/lithium-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698