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

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

Issue 637923004: Never call MacroAssembler::Allocate() with incorrect size. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Test updated Created 6 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 | Annotate | Revision Log
« 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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arm64/lithium-codegen-arm64.h" 7 #include "src/arm64/lithium-codegen-arm64.h"
8 #include "src/arm64/lithium-gap-resolver-arm64.h" 8 #include "src/arm64/lithium-gap-resolver-arm64.h"
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 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation()); 1563 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
1564 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 1564 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
1565 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 1565 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE);
1566 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { 1566 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
1567 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 1567 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
1568 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); 1568 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
1569 } 1569 }
1570 1570
1571 if (instr->size()->IsConstantOperand()) { 1571 if (instr->size()->IsConstantOperand()) {
1572 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 1572 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
1573 if (size <= Page::kMaxRegularHeapObjectSize) { 1573 if (static_cast<uint32_t>(size) <=
1574 static_cast<uint32_t>(Page::kMaxRegularHeapObjectSize)) {
1574 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags); 1575 __ Allocate(size, result, temp1, temp2, deferred->entry(), flags);
1575 } else { 1576 } else {
1576 __ B(deferred->entry()); 1577 __ B(deferred->entry());
1577 } 1578 }
1578 } else { 1579 } else {
1579 Register size = ToRegister32(instr->size()); 1580 Register size = ToRegister32(instr->size());
1580 __ Sxtw(size.X(), size); 1581 __ Sxtw(size.X(), size);
1581 __ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags); 1582 __ Allocate(size.X(), result, temp1, temp2, deferred->entry(), flags);
1582 } 1583 }
1583 1584
(...skipping 4455 matching lines...) Expand 10 before | Expand all | Expand 10 after
6039 Handle<ScopeInfo> scope_info = instr->scope_info(); 6040 Handle<ScopeInfo> scope_info = instr->scope_info();
6040 __ Push(scope_info); 6041 __ Push(scope_info);
6041 __ Push(ToRegister(instr->function())); 6042 __ Push(ToRegister(instr->function()));
6042 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6043 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6043 RecordSafepoint(Safepoint::kNoLazyDeopt); 6044 RecordSafepoint(Safepoint::kNoLazyDeopt);
6044 } 6045 }
6045 6046
6046 6047
6047 6048
6048 } } // namespace v8::internal 6049 } } // namespace v8::internal
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