OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 return ((type & kIsIndirectStringMask) == kIsIndirectStringTag) | 352 return ((type & kIsIndirectStringMask) == kIsIndirectStringTag) |
353 ? OLD_POINTER_SPACE | 353 ? OLD_POINTER_SPACE |
354 : OLD_DATA_SPACE; | 354 : OLD_DATA_SPACE; |
355 } else { | 355 } else { |
356 return (type <= LAST_DATA_TYPE) ? OLD_DATA_SPACE : OLD_POINTER_SPACE; | 356 return (type <= LAST_DATA_TYPE) ? OLD_DATA_SPACE : OLD_POINTER_SPACE; |
357 } | 357 } |
358 } | 358 } |
359 | 359 |
360 | 360 |
361 void Heap::CopyBlock(Address dst, Address src, int byte_size) { | 361 void Heap::CopyBlock(Address dst, Address src, int byte_size) { |
362 ASSERT(IsAligned(byte_size, kPointerSize)); | |
363 CopyWords(reinterpret_cast<Object**>(dst), | 362 CopyWords(reinterpret_cast<Object**>(dst), |
364 reinterpret_cast<Object**>(src), | 363 reinterpret_cast<Object**>(src), |
365 byte_size / kPointerSize); | 364 byte_size / kPointerSize); |
366 } | 365 } |
367 | 366 |
368 | 367 |
369 void Heap::MoveBlock(Address dst, Address src, int byte_size) { | 368 void Heap::MoveBlock(Address dst, Address src, int byte_size) { |
370 ASSERT(IsAligned(byte_size, kPointerSize)); | 369 ASSERT(IsAligned(byte_size, kPointerSize)); |
371 | 370 |
372 int size_in_words = byte_size / kPointerSize; | 371 int size_in_words = byte_size / kPointerSize; |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
584 | 583 |
585 void ExternalStringTable::AddOldString(String* string) { | 584 void ExternalStringTable::AddOldString(String* string) { |
586 ASSERT(string->IsExternalString()); | 585 ASSERT(string->IsExternalString()); |
587 ASSERT(!heap_->InNewSpace(string)); | 586 ASSERT(!heap_->InNewSpace(string)); |
588 old_space_strings_.Add(string); | 587 old_space_strings_.Add(string); |
589 } | 588 } |
590 | 589 |
591 | 590 |
592 void ExternalStringTable::ShrinkNewStrings(int position) { | 591 void ExternalStringTable::ShrinkNewStrings(int position) { |
593 new_space_strings_.Rewind(position); | 592 new_space_strings_.Rewind(position); |
594 Verify(); | 593 if (FLAG_verify_heap) { |
| 594 Verify(); |
| 595 } |
595 } | 596 } |
596 | 597 |
597 | 598 |
598 void Heap::ClearInstanceofCache() { | 599 void Heap::ClearInstanceofCache() { |
599 set_instanceof_cache_function(the_hole_value()); | 600 set_instanceof_cache_function(the_hole_value()); |
600 } | 601 } |
601 | 602 |
602 | 603 |
603 Object* Heap::ToBoolean(bool condition) { | 604 Object* Heap::ToBoolean(bool condition) { |
604 return condition ? true_value() : false_value(); | 605 return condition ? true_value() : false_value(); |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
675 | 676 |
676 | 677 |
677 Heap* _inline_get_heap_() { | 678 Heap* _inline_get_heap_() { |
678 return HEAP; | 679 return HEAP; |
679 } | 680 } |
680 | 681 |
681 | 682 |
682 } } // namespace v8::internal | 683 } } // namespace v8::internal |
683 | 684 |
684 #endif // V8_HEAP_INL_H_ | 685 #endif // V8_HEAP_INL_H_ |
OLD | NEW |