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

Side by Side Diff: src/ppc/lithium-codegen-ppc.cc

Issue 1406593002: Do not allow large object allocation from optimized code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/mips64/lithium-codegen-mips64.cc ('k') | src/x64/lithium-codegen-x64.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 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/base/bits.h" 5 #include "src/base/bits.h"
6 #include "src/code-factory.h" 6 #include "src/code-factory.h"
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/hydrogen-osr.h" 8 #include "src/hydrogen-osr.h"
9 #include "src/ic/ic.h" 9 #include "src/ic/ic.h"
10 #include "src/ic/stub-cache.h" 10 #include "src/ic/stub-cache.h"
(...skipping 5580 matching lines...) Expand 10 before | Expand all | Expand 10 after
5591 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 5591 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
5592 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 5592 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
5593 } 5593 }
5594 if (instr->hydrogen()->IsOldSpaceAllocation()) { 5594 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5595 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5595 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5596 flags = static_cast<AllocationFlags>(flags | PRETENURE); 5596 flags = static_cast<AllocationFlags>(flags | PRETENURE);
5597 } 5597 }
5598 5598
5599 if (instr->size()->IsConstantOperand()) { 5599 if (instr->size()->IsConstantOperand()) {
5600 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5600 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5601 if (size <= Page::kMaxRegularHeapObjectSize) { 5601 CHECK(size <= Page::kMaxRegularHeapObjectSize);
5602 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5602 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5603 } else {
5604 __ b(deferred->entry());
5605 }
5606 } else { 5603 } else {
5607 Register size = ToRegister(instr->size()); 5604 Register size = ToRegister(instr->size());
5608 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5605 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5609 } 5606 }
5610 5607
5611 __ bind(deferred->exit()); 5608 __ bind(deferred->exit());
5612 5609
5613 if (instr->hydrogen()->MustPrefillWithFiller()) { 5610 if (instr->hydrogen()->MustPrefillWithFiller()) {
5614 if (instr->size()->IsConstantOperand()) { 5611 if (instr->size()->IsConstantOperand()) {
5615 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5612 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
6123 __ Push(scope_info); 6120 __ Push(scope_info);
6124 __ push(ToRegister(instr->function())); 6121 __ push(ToRegister(instr->function()));
6125 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6122 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6126 RecordSafepoint(Safepoint::kNoLazyDeopt); 6123 RecordSafepoint(Safepoint::kNoLazyDeopt);
6127 } 6124 }
6128 6125
6129 6126
6130 #undef __ 6127 #undef __
6131 } // namespace internal 6128 } // namespace internal
6132 } // namespace v8 6129 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698