OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 } | 233 } |
234 } | 234 } |
235 | 235 |
236 | 236 |
237 void Heap::CopyBlock(Object** dst, Object** src, int byte_size) { | 237 void Heap::CopyBlock(Object** dst, Object** src, int byte_size) { |
238 ASSERT(IsAligned(byte_size, kPointerSize)); | 238 ASSERT(IsAligned(byte_size, kPointerSize)); |
239 CopyWords(dst, src, byte_size / kPointerSize); | 239 CopyWords(dst, src, byte_size / kPointerSize); |
240 } | 240 } |
241 | 241 |
242 | 242 |
243 void Heap::MoveBlock(Object** dst, Object** src, size_t byte_size) { | 243 void Heap::MoveBlock(Object** dst, Object** src, int byte_size) { |
244 ASSERT(IsAligned<size_t>(byte_size, kPointerSize)); | 244 ASSERT(IsAligned(byte_size, kPointerSize)); |
245 | 245 |
246 int size_in_words = byte_size / kPointerSize; | 246 int size_in_words = byte_size / kPointerSize; |
247 | 247 |
248 if ((dst < src) || (dst >= (src + size_in_words))) { | 248 if ((dst < src) || (dst >= (src + size_in_words))) { |
249 ASSERT((dst >= (src + size_in_words)) || | 249 ASSERT((dst >= (src + size_in_words)) || |
250 ((OffsetFrom(reinterpret_cast<Address>(src)) - | 250 ((OffsetFrom(reinterpret_cast<Address>(src)) - |
251 OffsetFrom(reinterpret_cast<Address>(dst))) >= kPointerSize)); | 251 OffsetFrom(reinterpret_cast<Address>(dst))) >= kPointerSize)); |
252 | 252 |
253 Object** end = src + size_in_words; | 253 Object** end = src + size_in_words; |
254 | 254 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 | 442 |
443 | 443 |
444 void ExternalStringTable::ShrinkNewStrings(int position) { | 444 void ExternalStringTable::ShrinkNewStrings(int position) { |
445 new_space_strings_.Rewind(position); | 445 new_space_strings_.Rewind(position); |
446 Verify(); | 446 Verify(); |
447 } | 447 } |
448 | 448 |
449 } } // namespace v8::internal | 449 } } // namespace v8::internal |
450 | 450 |
451 #endif // V8_HEAP_INL_H_ | 451 #endif // V8_HEAP_INL_H_ |
OLD | NEW |