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

Side by Side Diff: src/x64/assembler-x64.cc

Issue 2490523003: [heap] Use size_t for heap and space counters. (Closed)
Patch Set: more fixes Created 4 years, 1 month 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
« no previous file with comments | « src/objects-debug.cc ('k') | src/x87/assembler-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 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/x64/assembler-x64.h" 5 #include "src/x64/assembler-x64.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #if V8_TARGET_ARCH_X64 9 #if V8_TARGET_ARCH_X64
10 10
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 void Assembler::GrowBuffer() { 395 void Assembler::GrowBuffer() {
396 DCHECK(buffer_overflow()); 396 DCHECK(buffer_overflow());
397 if (!own_buffer_) FATAL("external code buffer is too small"); 397 if (!own_buffer_) FATAL("external code buffer is too small");
398 398
399 // Compute new buffer size. 399 // Compute new buffer size.
400 CodeDesc desc; // the new buffer 400 CodeDesc desc; // the new buffer
401 desc.buffer_size = 2 * buffer_size_; 401 desc.buffer_size = 2 * buffer_size_;
402 402
403 // Some internal data structures overflow for very large buffers, 403 // Some internal data structures overflow for very large buffers,
404 // they must ensure that kMaximalBufferSize is not too large. 404 // they must ensure that kMaximalBufferSize is not too large.
405 if ((desc.buffer_size > kMaximalBufferSize) || 405 if (desc.buffer_size > kMaximalBufferSize ||
406 (desc.buffer_size > isolate()->heap()->MaxOldGenerationSize())) { 406 static_cast<size_t>(desc.buffer_size) >
407 isolate()->heap()->MaxOldGenerationSize()) {
407 V8::FatalProcessOutOfMemory("Assembler::GrowBuffer"); 408 V8::FatalProcessOutOfMemory("Assembler::GrowBuffer");
408 } 409 }
409 410
410 // Set up new buffer. 411 // Set up new buffer.
411 desc.buffer = NewArray<byte>(desc.buffer_size); 412 desc.buffer = NewArray<byte>(desc.buffer_size);
412 desc.origin = this; 413 desc.origin = this;
413 desc.instr_size = pc_offset(); 414 desc.instr_size = pc_offset();
414 desc.reloc_size = 415 desc.reloc_size =
415 static_cast<int>((buffer_ + buffer_size_) - (reloc_info_writer.pos())); 416 static_cast<int>((buffer_ + buffer_size_) - (reloc_info_writer.pos()));
416 417
(...skipping 4338 matching lines...) Expand 10 before | Expand all | Expand 10 after
4755 4756
4756 bool RelocInfo::IsInConstantPool() { 4757 bool RelocInfo::IsInConstantPool() {
4757 return false; 4758 return false;
4758 } 4759 }
4759 4760
4760 4761
4761 } // namespace internal 4762 } // namespace internal
4762 } // namespace v8 4763 } // namespace v8
4763 4764
4764 #endif // V8_TARGET_ARCH_X64 4765 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | src/x87/assembler-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698