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

Side by Side Diff: src/x64/lithium-codegen-x64.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/mips64/lithium-codegen-mips64.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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
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 5314 matching lines...) Expand 10 before | Expand all | Expand 10 after
5325 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation()); 5325 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5326 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5326 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5327 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 5327 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE);
5328 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { 5328 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5329 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5329 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5330 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); 5330 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
5331 } 5331 }
5332 5332
5333 if (instr->size()->IsConstantOperand()) { 5333 if (instr->size()->IsConstantOperand()) {
5334 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5334 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5335 if (size <= Page::kMaxRegularHeapObjectSize) { 5335 if (static_cast<uint32_t>(size) <=
5336 static_cast<uint32_t>(Page::kMaxRegularHeapObjectSize)) {
5336 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5337 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5337 } else { 5338 } else {
5338 __ jmp(deferred->entry()); 5339 __ jmp(deferred->entry());
5339 } 5340 }
5340 } else { 5341 } else {
5341 Register size = ToRegister(instr->size()); 5342 Register size = ToRegister(instr->size());
5342 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5343 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5343 } 5344 }
5344 5345
5345 __ bind(deferred->exit()); 5346 __ bind(deferred->exit());
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
5880 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5881 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5881 RecordSafepoint(Safepoint::kNoLazyDeopt); 5882 RecordSafepoint(Safepoint::kNoLazyDeopt);
5882 } 5883 }
5883 5884
5884 5885
5885 #undef __ 5886 #undef __
5886 5887
5887 } } // namespace v8::internal 5888 } } // namespace v8::internal
5888 5889
5889 #endif // V8_TARGET_ARCH_X64 5890 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips64/lithium-codegen-mips64.cc ('k') | src/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698