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

Side by Side Diff: src/x87/lithium-codegen-x87.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/x64/lithium-codegen-x64.cc ('k') | test/mjsunit/regress/regress-412206-1.js » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X87 7 #if V8_TARGET_ARCH_X87
8 8
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 5731 matching lines...) Expand 10 before | Expand all | Expand 10 after
5742 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation()); 5742 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5743 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5743 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5744 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 5744 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE);
5745 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { 5745 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5746 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5746 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5747 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); 5747 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
5748 } 5748 }
5749 5749
5750 if (instr->size()->IsConstantOperand()) { 5750 if (instr->size()->IsConstantOperand()) {
5751 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5751 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5752 if (size <= Page::kMaxRegularHeapObjectSize) { 5752 if (static_cast<uint32_t>(size) <=
5753 static_cast<uint32_t>(Page::kMaxRegularHeapObjectSize)) {
5753 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5754 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5754 } else { 5755 } else {
5755 __ jmp(deferred->entry()); 5756 __ jmp(deferred->entry());
5756 } 5757 }
5757 } else { 5758 } else {
5758 Register size = ToRegister(instr->size()); 5759 Register size = ToRegister(instr->size());
5759 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5760 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5760 } 5761 }
5761 5762
5762 __ bind(deferred->exit()); 5763 __ bind(deferred->exit());
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
6296 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6297 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6297 RecordSafepoint(Safepoint::kNoLazyDeopt); 6298 RecordSafepoint(Safepoint::kNoLazyDeopt);
6298 } 6299 }
6299 6300
6300 6301
6301 #undef __ 6302 #undef __
6302 6303
6303 } } // namespace v8::internal 6304 } } // namespace v8::internal
6304 6305
6305 #endif // V8_TARGET_ARCH_X87 6306 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | test/mjsunit/regress/regress-412206-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698