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

Side by Side Diff: src/mips64/lithium-codegen-mips64.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/mips/lithium-codegen-mips.cc ('k') | src/x64/lithium-codegen-x64.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 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 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/hydrogen-osr.h" 9 #include "src/hydrogen-osr.h"
10 #include "src/ic/ic.h" 10 #include "src/ic/ic.h"
(...skipping 5346 matching lines...) Expand 10 before | Expand all | Expand 10 after
5357 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 5357 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) {
5358 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation()); 5358 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5359 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5359 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5360 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 5360 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE);
5361 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { 5361 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5362 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5362 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5363 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); 5363 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
5364 } 5364 }
5365 if (instr->size()->IsConstantOperand()) { 5365 if (instr->size()->IsConstantOperand()) {
5366 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5366 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5367 if (size <= Page::kMaxRegularHeapObjectSize) { 5367 if (static_cast<uint32_t>(size) <=
5368 static_cast<uint32_t>(Page::kMaxRegularHeapObjectSize)) {
5368 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5369 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5369 } else { 5370 } else {
5370 __ jmp(deferred->entry()); 5371 __ jmp(deferred->entry());
5371 } 5372 }
5372 } else { 5373 } else {
5373 Register size = ToRegister(instr->size()); 5374 Register size = ToRegister(instr->size());
5374 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5375 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5375 } 5376 }
5376 5377
5377 __ bind(deferred->exit()); 5378 __ bind(deferred->exit());
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after
5955 __ li(at, scope_info); 5956 __ li(at, scope_info);
5956 __ Push(at, ToRegister(instr->function())); 5957 __ Push(at, ToRegister(instr->function()));
5957 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5958 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5958 RecordSafepoint(Safepoint::kNoLazyDeopt); 5959 RecordSafepoint(Safepoint::kNoLazyDeopt);
5959 } 5960 }
5960 5961
5961 5962
5962 #undef __ 5963 #undef __
5963 5964
5964 } } // namespace v8::internal 5965 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698