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

Side by Side Diff: src/x87/assembler-x87.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/x64/assembler-x64.cc ('k') | test/cctest/heap/test-alloc.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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions 5 // modification, are permitted provided that the following conditions
6 // are met: 6 // are met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after
2045 void Assembler::GrowBuffer() { 2045 void Assembler::GrowBuffer() {
2046 DCHECK(buffer_overflow()); 2046 DCHECK(buffer_overflow());
2047 if (!own_buffer_) FATAL("external code buffer is too small"); 2047 if (!own_buffer_) FATAL("external code buffer is too small");
2048 2048
2049 // Compute new buffer size. 2049 // Compute new buffer size.
2050 CodeDesc desc; // the new buffer 2050 CodeDesc desc; // the new buffer
2051 desc.buffer_size = 2 * buffer_size_; 2051 desc.buffer_size = 2 * buffer_size_;
2052 2052
2053 // Some internal data structures overflow for very large buffers, 2053 // Some internal data structures overflow for very large buffers,
2054 // they must ensure that kMaximalBufferSize is not too large. 2054 // they must ensure that kMaximalBufferSize is not too large.
2055 if ((desc.buffer_size > kMaximalBufferSize) || 2055 if (desc.buffer_size > kMaximalBufferSize ||
2056 (desc.buffer_size > isolate()->heap()->MaxOldGenerationSize())) { 2056 static_cast<size_t>(desc.buffer_size) >
2057 isolate()->heap()->MaxOldGenerationSize()) {
2057 V8::FatalProcessOutOfMemory("Assembler::GrowBuffer"); 2058 V8::FatalProcessOutOfMemory("Assembler::GrowBuffer");
2058 } 2059 }
2059 2060
2060 // Set up new buffer. 2061 // Set up new buffer.
2061 desc.buffer = NewArray<byte>(desc.buffer_size); 2062 desc.buffer = NewArray<byte>(desc.buffer_size);
2062 desc.origin = this; 2063 desc.origin = this;
2063 desc.instr_size = pc_offset(); 2064 desc.instr_size = pc_offset();
2064 desc.reloc_size = (buffer_ + buffer_size_) - (reloc_info_writer.pos()); 2065 desc.reloc_size = (buffer_ + buffer_size_) - (reloc_info_writer.pos());
2065 2066
2066 // Clear the buffer in debug mode. Use 'int3' instructions to make 2067 // Clear the buffer in debug mode. Use 'int3' instructions to make
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
2196 return; 2197 return;
2197 } 2198 }
2198 RelocInfo rinfo(isolate(), pc_, rmode, data, NULL); 2199 RelocInfo rinfo(isolate(), pc_, rmode, data, NULL);
2199 reloc_info_writer.Write(&rinfo); 2200 reloc_info_writer.Write(&rinfo);
2200 } 2201 }
2201 2202
2202 } // namespace internal 2203 } // namespace internal
2203 } // namespace v8 2204 } // namespace v8
2204 2205
2205 #endif // V8_TARGET_ARCH_X87 2206 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x64/assembler-x64.cc ('k') | test/cctest/heap/test-alloc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698