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

Side by Side Diff: src/x64/lithium-codegen-x64.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/ppc/lithium-codegen-ppc.cc ('k') | src/x87/lithium-codegen-x87.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_X64 5 #if V8_TARGET_ARCH_X64
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/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 5354 matching lines...) Expand 10 before | Expand all | Expand 10 after
5365 if (instr->hydrogen()->MustAllocateDoubleAligned()) { 5365 if (instr->hydrogen()->MustAllocateDoubleAligned()) {
5366 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 5366 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
5367 } 5367 }
5368 if (instr->hydrogen()->IsOldSpaceAllocation()) { 5368 if (instr->hydrogen()->IsOldSpaceAllocation()) {
5369 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5369 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5370 flags = static_cast<AllocationFlags>(flags | PRETENURE); 5370 flags = static_cast<AllocationFlags>(flags | PRETENURE);
5371 } 5371 }
5372 5372
5373 if (instr->size()->IsConstantOperand()) { 5373 if (instr->size()->IsConstantOperand()) {
5374 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5374 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5375 if (size <= Page::kMaxRegularHeapObjectSize) { 5375 CHECK(size <= Page::kMaxRegularHeapObjectSize);
5376 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5376 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5377 } else {
5378 __ jmp(deferred->entry());
5379 }
5380 } else { 5377 } else {
5381 Register size = ToRegister(instr->size()); 5378 Register size = ToRegister(instr->size());
5382 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5379 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5383 } 5380 }
5384 5381
5385 __ bind(deferred->exit()); 5382 __ bind(deferred->exit());
5386 5383
5387 if (instr->hydrogen()->MustPrefillWithFiller()) { 5384 if (instr->hydrogen()->MustPrefillWithFiller()) {
5388 if (instr->size()->IsConstantOperand()) { 5385 if (instr->size()->IsConstantOperand()) {
5389 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5386 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
5908 RecordSafepoint(Safepoint::kNoLazyDeopt); 5905 RecordSafepoint(Safepoint::kNoLazyDeopt);
5909 } 5906 }
5910 5907
5911 5908
5912 #undef __ 5909 #undef __
5913 5910
5914 } // namespace internal 5911 } // namespace internal
5915 } // namespace v8 5912 } // namespace v8
5916 5913
5917 #endif // V8_TARGET_ARCH_X64 5914 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ppc/lithium-codegen-ppc.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698