Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/store-buffer.h" | 5 #include "src/store-buffer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 545 FindPointersToNewSpaceInRegion(start, end, slot_callback, clear_maps); | 545 FindPointersToNewSpaceInRegion(start, end, slot_callback, clear_maps); |
| 546 } else { | 546 } else { |
| 547 Page* page = reinterpret_cast<Page*>(chunk); | 547 Page* page = reinterpret_cast<Page*>(chunk); |
| 548 PagedSpace* owner = reinterpret_cast<PagedSpace*>(page->owner()); | 548 PagedSpace* owner = reinterpret_cast<PagedSpace*>(page->owner()); |
| 549 Address start = page->area_start(); | 549 Address start = page->area_start(); |
| 550 Address end = page->area_end(); | 550 Address end = page->area_end(); |
| 551 if (owner == heap_->map_space()) { | 551 if (owner == heap_->map_space()) { |
| 552 FindPointersToNewSpaceInMapsRegion( | 552 FindPointersToNewSpaceInMapsRegion( |
| 553 start, end, slot_callback, clear_maps); | 553 start, end, slot_callback, clear_maps); |
| 554 } else { | 554 } else { |
| 555 FindPointersToNewSpaceInRegion( | 555 ASSERT(page->WasSweptPrecisely()); |
| 556 start, end, slot_callback, clear_maps); | 556 HeapObjectIterator iterator(page, NULL); |
| 557 for (HeapObject* heap_object = iterator.Next(); | |
| 558 heap_object != NULL; | |
| 559 heap_object = iterator.Next()) { | |
| 560 // We skip filler, free space, and constant pool objects. | |
|
rmcilroy
2014/07/02 12:39:07
Could you add back the old comment here please:
/
| |
| 561 if (!heap_object->IsFiller() && | |
| 562 !heap_object->IsConstantPoolArray()) { | |
| 563 FindPointersToNewSpaceInRegion( | |
| 564 heap_object->address() + HeapObject::kHeaderSize, | |
| 565 heap_object->address() + heap_object->Size(), | |
| 566 slot_callback, | |
| 567 clear_maps); | |
| 568 } | |
| 569 } | |
| 557 } | 570 } |
| 558 } | 571 } |
| 559 } | 572 } |
| 560 } | 573 } |
| 561 if (callback_ != NULL) { | 574 if (callback_ != NULL) { |
| 562 (*callback_)(heap_, NULL, kStoreBufferScanningPageEvent); | 575 (*callback_)(heap_, NULL, kStoreBufferScanningPageEvent); |
| 563 } | 576 } |
| 564 } | 577 } |
| 565 } | 578 } |
| 566 | 579 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 612 } | 625 } |
| 613 old_buffer_is_sorted_ = false; | 626 old_buffer_is_sorted_ = false; |
| 614 old_buffer_is_filtered_ = false; | 627 old_buffer_is_filtered_ = false; |
| 615 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); | 628 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); |
| 616 ASSERT(old_top_ <= old_limit_); | 629 ASSERT(old_top_ <= old_limit_); |
| 617 } | 630 } |
| 618 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); | 631 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); |
| 619 } | 632 } |
| 620 | 633 |
| 621 } } // namespace v8::internal | 634 } } // namespace v8::internal |
| OLD | NEW |