| 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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 FindPointersToNewSpaceInMaps(map_aligned_start, | 501 FindPointersToNewSpaceInMaps(map_aligned_start, |
| 502 map_aligned_end, | 502 map_aligned_end, |
| 503 slot_callback, | 503 slot_callback, |
| 504 clear_maps); | 504 clear_maps); |
| 505 } | 505 } |
| 506 | 506 |
| 507 | 507 |
| 508 // This function iterates over all the pointers in a paged space in the heap, | 508 // This function iterates over all the pointers in a paged space in the heap, |
| 509 // looking for pointers into new space. Within the pages there may be dead | 509 // looking for pointers into new space. Within the pages there may be dead |
| 510 // objects that have not been overwritten by free spaces or fillers because of | 510 // objects that have not been overwritten by free spaces or fillers because of |
| 511 // lazy sweeping. These dead objects may not contain pointers to new space. | 511 // concurrent sweeping. These dead objects may not contain pointers to new |
| 512 // The garbage areas that have been swept properly (these will normally be the | 512 // space. The garbage areas that have been swept properly (these will normally |
| 513 // large ones) will be marked with free space and filler map words. In | 513 // be the large ones) will be marked with free space and filler map words. In |
| 514 // addition any area that has never been used at all for object allocation must | 514 // addition any area that has never been used at all for object allocation must |
| 515 // be marked with a free space or filler. Because the free space and filler | 515 // be marked with a free space or filler. Because the free space and filler |
| 516 // maps do not move we can always recognize these even after a compaction. | 516 // maps do not move we can always recognize these even after a compaction. |
| 517 // Normal objects like FixedArrays and JSObjects should not contain references | 517 // Normal objects like FixedArrays and JSObjects should not contain references |
| 518 // to these maps. Constant pool array objects may contain references to these | 518 // to these maps. Constant pool array objects may contain references to these |
| 519 // maps, however, constant pool arrays cannot contain pointers to new space | 519 // maps, however, constant pool arrays cannot contain pointers to new space |
| 520 // objects, therefore they are skipped. The special garbage section (see | 520 // objects, therefore they are skipped. The special garbage section (see |
| 521 // comment in spaces.h) is skipped since it can contain absolutely anything. | 521 // comment in spaces.h) is skipped since it can contain absolutely anything. |
| 522 // Any objects that are allocated during iteration may or may not be visited by | 522 // Any objects that are allocated during iteration may or may not be visited by |
| 523 // the iteration, but they will not be partially visited. | 523 // the iteration, but they will not be partially visited. |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 } | 744 } |
| 745 old_buffer_is_sorted_ = false; | 745 old_buffer_is_sorted_ = false; |
| 746 old_buffer_is_filtered_ = false; | 746 old_buffer_is_filtered_ = false; |
| 747 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); | 747 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); |
| 748 ASSERT(old_top_ <= old_limit_); | 748 ASSERT(old_top_ <= old_limit_); |
| 749 } | 749 } |
| 750 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); | 750 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); |
| 751 } | 751 } |
| 752 | 752 |
| 753 } } // namespace v8::internal | 753 } } // namespace v8::internal |
| OLD | NEW |