| 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 ASSERT(page->WasSweptPrecisely()); | 555 FindPointersToNewSpaceInRegion( |
| 556 HeapObjectIterator iterator(page, NULL); | 556 start, end, slot_callback, clear_maps); |
| 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. | |
| 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 } | |
| 570 } | 557 } |
| 571 } | 558 } |
| 572 } | 559 } |
| 573 } | 560 } |
| 574 if (callback_ != NULL) { | 561 if (callback_ != NULL) { |
| 575 (*callback_)(heap_, NULL, kStoreBufferScanningPageEvent); | 562 (*callback_)(heap_, NULL, kStoreBufferScanningPageEvent); |
| 576 } | 563 } |
| 577 } | 564 } |
| 578 } | 565 } |
| 579 | 566 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 } | 612 } |
| 626 old_buffer_is_sorted_ = false; | 613 old_buffer_is_sorted_ = false; |
| 627 old_buffer_is_filtered_ = false; | 614 old_buffer_is_filtered_ = false; |
| 628 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); | 615 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); |
| 629 ASSERT(old_top_ <= old_limit_); | 616 ASSERT(old_top_ <= old_limit_); |
| 630 } | 617 } |
| 631 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); | 618 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); |
| 632 } | 619 } |
| 633 | 620 |
| 634 } } // namespace v8::internal | 621 } } // namespace v8::internal |
| OLD | NEW |