| 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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 // space left on the page we will keep the pointers in the store buffer and | 601 // space left on the page we will keep the pointers in the store buffer and |
| 602 // remove the flag from the page. | 602 // remove the flag from the page. |
| 603 if (some_pages_to_scan) { | 603 if (some_pages_to_scan) { |
| 604 if (callback_ != NULL) { | 604 if (callback_ != NULL) { |
| 605 (*callback_)(heap_, NULL, kStoreBufferStartScanningPagesEvent); | 605 (*callback_)(heap_, NULL, kStoreBufferStartScanningPagesEvent); |
| 606 } | 606 } |
| 607 PointerChunkIterator it; | 607 PointerChunkIterator it; |
| 608 MemoryChunk* chunk; | 608 MemoryChunk* chunk; |
| 609 while ((chunk = it.next()) != NULL) { | 609 while ((chunk = it.next()) != NULL) { |
| 610 if (chunk->scan_on_scavenge()) { | 610 if (chunk->scan_on_scavenge()) { |
| 611 chunk->set_scan_on_scavenge(false); |
| 611 if (callback_ != NULL) { | 612 if (callback_ != NULL) { |
| 612 (*callback_)(heap_, chunk, kStoreBufferScanningPageEvent); | 613 (*callback_)(heap_, chunk, kStoreBufferScanningPageEvent); |
| 613 } | 614 } |
| 614 if (chunk->owner() == heap_->lo_space()) { | 615 if (chunk->owner() == heap_->lo_space()) { |
| 615 LargePage* large_page = reinterpret_cast<LargePage*>(chunk); | 616 LargePage* large_page = reinterpret_cast<LargePage*>(chunk); |
| 616 HeapObject* array = large_page->GetObject(); | 617 HeapObject* array = large_page->GetObject(); |
| 617 ASSERT(array->IsFixedArray()); | 618 ASSERT(array->IsFixedArray()); |
| 618 Address start = array->address(); | 619 Address start = array->address(); |
| 619 Address end = start + array->Size(); | 620 Address end = start + array->Size(); |
| 620 FindPointersToNewSpaceInRegion(start, end, slot_callback); | 621 FindPointersToNewSpaceInRegion(start, end, slot_callback); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 } | 688 } |
| 688 | 689 |
| 689 | 690 |
| 690 void StoreBuffer::CheckForFullBuffer() { | 691 void StoreBuffer::CheckForFullBuffer() { |
| 691 if (old_limit_ - old_top_ < kStoreBufferSize * 2) { | 692 if (old_limit_ - old_top_ < kStoreBufferSize * 2) { |
| 692 HandleFullness(); | 693 HandleFullness(); |
| 693 } | 694 } |
| 694 } | 695 } |
| 695 | 696 |
| 696 } } // namespace v8::internal | 697 } } // namespace v8::internal |
| OLD | NEW |