Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(68)

Side by Side Diff: runtime/vm/scavenger.cc

Issue 1965823002: Initial isolate reload support (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 StoreBufferBlock* pending = isolate->store_buffer()->Blocks(); 518 StoreBufferBlock* pending = isolate->store_buffer()->Blocks();
519 intptr_t total_count = 0; 519 intptr_t total_count = 0;
520 while (pending != NULL) { 520 while (pending != NULL) {
521 StoreBufferBlock* next = pending->next(); 521 StoreBufferBlock* next = pending->next();
522 // Generated code appends to store buffers; tell MemorySanitizer. 522 // Generated code appends to store buffers; tell MemorySanitizer.
523 MSAN_UNPOISON(pending, sizeof(*pending)); 523 MSAN_UNPOISON(pending, sizeof(*pending));
524 intptr_t count = pending->Count(); 524 intptr_t count = pending->Count();
525 total_count += count; 525 total_count += count;
526 while (!pending->IsEmpty()) { 526 while (!pending->IsEmpty()) {
527 RawObject* raw_object = pending->Pop(); 527 RawObject* raw_object = pending->Pop();
528 if (raw_object->IsFreeListElement()) {
529 // TODO(rmacnak): Forwarding corpse from become. Probably we should also
530 // visit the store buffer blocks during become, and mark any forwardees
531 // as remembered if their forwarders are remembered to satisfy the
532 // following assert.
533 continue;
534 }
528 ASSERT(raw_object->IsRemembered()); 535 ASSERT(raw_object->IsRemembered());
529 raw_object->ClearRememberedBit(); 536 raw_object->ClearRememberedBit();
530 visitor->VisitingOldObject(raw_object); 537 visitor->VisitingOldObject(raw_object);
531 raw_object->VisitPointers(visitor); 538 raw_object->VisitPointers(visitor);
532 } 539 }
533 pending->Reset(); 540 pending->Reset();
534 // Return the emptied block for recycling (no need to check threshold). 541 // Return the emptied block for recycling (no need to check threshold).
535 isolate->store_buffer()->PushBlock(pending, StoreBuffer::kIgnoreThreshold); 542 isolate->store_buffer()->PushBlock(pending, StoreBuffer::kIgnoreThreshold);
536 pending = next; 543 pending = next;
537 } 544 }
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 } 877 }
871 878
872 879
873 void Scavenger::FreeExternal(intptr_t size) { 880 void Scavenger::FreeExternal(intptr_t size) {
874 ASSERT(size >= 0); 881 ASSERT(size >= 0);
875 external_size_ -= size; 882 external_size_ -= size;
876 ASSERT(external_size_ >= 0); 883 ASSERT(external_size_ >= 0);
877 } 884 }
878 885
879 } // namespace dart 886 } // namespace dart
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/runtime_entry.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698