| 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 <algorithm> | 5 #include <algorithm> |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #include "src/counters.h" | 9 #include "src/counters.h" |
| 10 #include "src/heap/store-buffer-inl.h" | 10 #include "src/heap/store-buffer-inl.h" |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 } | 373 } |
| 374 } | 374 } |
| 375 } | 375 } |
| 376 old_top_ = new_top; | 376 old_top_ = new_top; |
| 377 ClearFilteringHashSets(); | 377 ClearFilteringHashSets(); |
| 378 | 378 |
| 379 // Don't scan on scavenge dead large objects. | 379 // Don't scan on scavenge dead large objects. |
| 380 LargeObjectIterator it(heap_->lo_space()); | 380 LargeObjectIterator it(heap_->lo_space()); |
| 381 for (HeapObject* object = it.Next(); object != NULL; object = it.Next()) { | 381 for (HeapObject* object = it.Next(); object != NULL; object = it.Next()) { |
| 382 MemoryChunk* chunk = MemoryChunk::FromAddress(object->address()); | 382 MemoryChunk* chunk = MemoryChunk::FromAddress(object->address()); |
| 383 if (chunk->scan_on_scavenge() && !Marking::MarkBitFrom(object).Get()) { | 383 if (chunk->scan_on_scavenge() && |
| 384 Marking::IsWhite(Marking::MarkBitFrom(object))) { |
| 384 chunk->set_scan_on_scavenge(false); | 385 chunk->set_scan_on_scavenge(false); |
| 385 } | 386 } |
| 386 } | 387 } |
| 387 } | 388 } |
| 388 | 389 |
| 389 | 390 |
| 390 void StoreBuffer::VerifyValidStoreBufferEntries() { | 391 void StoreBuffer::VerifyValidStoreBufferEntries() { |
| 391 for (Address* current = old_start_; current < old_top_; current++) { | 392 for (Address* current = old_start_; current < old_top_; current++) { |
| 392 Object** slot = reinterpret_cast<Object**>(*current); | 393 Object** slot = reinterpret_cast<Object**>(*current); |
| 393 Object* object = *slot; | 394 Object* object = *slot; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 } | 565 } |
| 565 old_buffer_is_sorted_ = false; | 566 old_buffer_is_sorted_ = false; |
| 566 old_buffer_is_filtered_ = false; | 567 old_buffer_is_filtered_ = false; |
| 567 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); | 568 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); |
| 568 DCHECK(old_top_ <= old_limit_); | 569 DCHECK(old_top_ <= old_limit_); |
| 569 } | 570 } |
| 570 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); | 571 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); |
| 571 } | 572 } |
| 572 } | 573 } |
| 573 } // namespace v8::internal | 574 } // namespace v8::internal |
| OLD | NEW |