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

Side by Side Diff: src/arm64/lithium-codegen-arm64.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/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.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 #include "src/arm64/frames-arm64.h" 5 #include "src/arm64/frames-arm64.h"
6 #include "src/arm64/lithium-codegen-arm64.h" 6 #include "src/arm64/lithium-codegen-arm64.h"
7 #include "src/arm64/lithium-gap-resolver-arm64.h" 7 #include "src/arm64/lithium-gap-resolver-arm64.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after
1550 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); 1550 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT);
1551 } 1551 }
1552 1552
1553 if (instr->hydrogen()->IsOldSpaceAllocation()) { 1553 if (instr->hydrogen()->IsOldSpaceAllocation()) {
1554 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 1554 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
1555 flags = static_cast<AllocationFlags>(flags | PRETENURE); 1555 flags = static_cast<AllocationFlags>(flags | PRETENURE);
1556 } 1556 }
1557 1557
1558 if (instr->size()->IsConstantOperand()) { 1558 if (instr->size()->IsConstantOperand()) {
1559 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 1559 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
1560 if (size <= Page::kMaxRegularHeapObjectSize) { 1560 CHECK(size <= Page::kMaxRegularHeapObjectSize);
1561 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); 1561 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags);
1562 } else {
1563 __ B(deferred->entry());
1564 }
1565 } else { 1562 } else {
1566 Register size = ToRegister32(instr->size()); 1563 Register size = ToRegister32(instr->size());
1567 __ Sxtw(size.X(), size); 1564 __ Sxtw(size.X(), size);
1568 __ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags); 1565 __ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags);
1569 } 1566 }
1570 1567
1571 __ Bind(deferred->exit()); 1568 __ Bind(deferred->exit());
1572 1569
1573 if (instr->hydrogen()->MustPrefillWithFiller()) { 1570 if (instr->hydrogen()->MustPrefillWithFiller()) {
1574 Register filler_count = temp1; 1571 Register filler_count = temp1;
(...skipping 4430 matching lines...) Expand 10 before | Expand all | Expand 10 after
6005 Handle<ScopeInfo> scope_info = instr->scope_info(); 6002 Handle<ScopeInfo> scope_info = instr->scope_info();
6006 __ Push(scope_info); 6003 __ Push(scope_info);
6007 __ Push(ToRegister(instr->function())); 6004 __ Push(ToRegister(instr->function()));
6008 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6005 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6009 RecordSafepoint(Safepoint::kNoLazyDeopt); 6006 RecordSafepoint(Safepoint::kNoLazyDeopt);
6010 } 6007 }
6011 6008
6012 6009
6013 } // namespace internal 6010 } // namespace internal
6014 } // namespace v8 6011 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698