| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/scavenger.h" | 5 #include "vm/scavenger.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 void Scavenger::IterateStoreBuffers(Isolate* isolate, | 517 void Scavenger::IterateStoreBuffers(Isolate* isolate, |
| 518 ScavengerVisitor* visitor) { | 518 ScavengerVisitor* visitor) { |
| 519 StoreBuffer* buffer = isolate->store_buffer(); | 519 StoreBuffer* buffer = isolate->store_buffer(); |
| 520 heap_->RecordData(kStoreBufferEntries, buffer->Count()); | 520 heap_->RecordData(kStoreBufferEntries, buffer->Count()); |
| 521 | 521 |
| 522 // Iterating through the store buffers. | 522 // Iterating through the store buffers. |
| 523 // Grab the deduplication sets out of the store buffer. | 523 // Grab the deduplication sets out of the store buffer. |
| 524 StoreBufferBlock* pending = isolate->store_buffer()->Blocks(); | 524 StoreBufferBlock* pending = isolate->store_buffer()->Blocks(); |
| 525 while (pending != NULL) { | 525 while (pending != NULL) { |
| 526 StoreBufferBlock* next = pending->next(); | 526 StoreBufferBlock* next = pending->next(); |
| 527 // Generated code appends to store buffers; tell MemorySanitizer. |
| 528 MSAN_UNPOISON(pending, sizeof(*pending)); |
| 527 intptr_t count = pending->Count(); | 529 intptr_t count = pending->Count(); |
| 528 for (intptr_t i = 0; i < count; i++) { | 530 for (intptr_t i = 0; i < count; i++) { |
| 529 RawObject* raw_object = pending->At(i); | 531 RawObject* raw_object = pending->At(i); |
| 530 ASSERT(raw_object->IsRemembered()); | 532 ASSERT(raw_object->IsRemembered()); |
| 531 raw_object->ClearRememberedBit(); | 533 raw_object->ClearRememberedBit(); |
| 532 visitor->VisitingOldObject(raw_object); | 534 visitor->VisitingOldObject(raw_object); |
| 533 raw_object->VisitPointers(visitor); | 535 raw_object->VisitPointers(visitor); |
| 534 } | 536 } |
| 535 delete pending; | 537 delete pending; |
| 536 pending = next; | 538 pending = next; |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 } | 898 } |
| 897 | 899 |
| 898 | 900 |
| 899 void Scavenger::FreeExternal(intptr_t size) { | 901 void Scavenger::FreeExternal(intptr_t size) { |
| 900 ASSERT(size >= 0); | 902 ASSERT(size >= 0); |
| 901 external_size_ -= size; | 903 external_size_ -= size; |
| 902 ASSERT(external_size_ >= 0); | 904 ASSERT(external_size_ >= 0); |
| 903 } | 905 } |
| 904 | 906 |
| 905 } // namespace dart | 907 } // namespace dart |
| OLD | NEW |