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

Side by Side Diff: src/arm/lithium-codegen-arm.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 | « no previous file | src/arm64/lithium-codegen-arm64.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/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.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 5338 matching lines...) Expand 10 before | Expand all | Expand 10 after
5349 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation()); 5349 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation());
5350 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5350 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5351 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 5351 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE);
5352 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { 5352 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5353 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); 5353 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation());
5354 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); 5354 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
5355 } 5355 }
5356 5356
5357 if (instr->size()->IsConstantOperand()) { 5357 if (instr->size()->IsConstantOperand()) {
5358 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5358 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5359 if (size <= Page::kMaxRegularHeapObjectSize) { 5359 if (static_cast<uint32_t>(size) <=
5360 static_cast<uint32_t>(Page::kMaxRegularHeapObjectSize)) {
5360 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5361 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5361 } else { 5362 } else {
5362 __ jmp(deferred->entry()); 5363 __ jmp(deferred->entry());
5363 } 5364 }
5364 } else { 5365 } else {
5365 Register size = ToRegister(instr->size()); 5366 Register size = ToRegister(instr->size());
5366 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5367 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5367 } 5368 }
5368 5369
5369 __ bind(deferred->exit()); 5370 __ bind(deferred->exit());
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
5903 __ Push(scope_info); 5904 __ Push(scope_info);
5904 __ push(ToRegister(instr->function())); 5905 __ push(ToRegister(instr->function()));
5905 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5906 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5906 RecordSafepoint(Safepoint::kNoLazyDeopt); 5907 RecordSafepoint(Safepoint::kNoLazyDeopt);
5907 } 5908 }
5908 5909
5909 5910
5910 #undef __ 5911 #undef __
5911 5912
5912 } } // namespace v8::internal 5913 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698