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

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

Issue 2026643004: Don't overload FreeListElement for become. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "vm/dart.h" 7 #include "vm/dart.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/lockers.h" 10 #include "vm/lockers.h"
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 StoreBufferBlock* pending = isolate->store_buffer()->Blocks(); 457 StoreBufferBlock* pending = isolate->store_buffer()->Blocks();
458 intptr_t total_count = 0; 458 intptr_t total_count = 0;
459 while (pending != NULL) { 459 while (pending != NULL) {
460 StoreBufferBlock* next = pending->next(); 460 StoreBufferBlock* next = pending->next();
461 // Generated code appends to store buffers; tell MemorySanitizer. 461 // Generated code appends to store buffers; tell MemorySanitizer.
462 MSAN_UNPOISON(pending, sizeof(*pending)); 462 MSAN_UNPOISON(pending, sizeof(*pending));
463 intptr_t count = pending->Count(); 463 intptr_t count = pending->Count();
464 total_count += count; 464 total_count += count;
465 while (!pending->IsEmpty()) { 465 while (!pending->IsEmpty()) {
466 RawObject* raw_object = pending->Pop(); 466 RawObject* raw_object = pending->Pop();
467 if (raw_object->IsFreeListElement()) { 467 if (raw_object->IsForwardingCorpse()) {
468 // TODO(rmacnak): Forwarding corpse from become. Probably we should also 468 // A source object in a become was a remembered object, but we do
469 // visit the store buffer blocks during become, and mark any forwardees 469 // not visit the store buffer during become to remove it.
470 // as remembered if their forwarders are remembered to satisfy the
471 // following assert.
472 continue; 470 continue;
473 } 471 }
474 ASSERT(raw_object->IsRemembered()); 472 ASSERT(raw_object->IsRemembered());
475 raw_object->ClearRememberedBit(); 473 raw_object->ClearRememberedBit();
476 visitor->VisitingOldObject(raw_object); 474 visitor->VisitingOldObject(raw_object);
477 raw_object->VisitPointers(visitor); 475 raw_object->VisitPointers(visitor);
478 } 476 }
479 pending->Reset(); 477 pending->Reset();
480 // Return the emptied block for recycling (no need to check threshold). 478 // Return the emptied block for recycling (no need to check threshold).
481 isolate->store_buffer()->PushBlock(pending, StoreBuffer::kIgnoreThreshold); 479 isolate->store_buffer()->PushBlock(pending, StoreBuffer::kIgnoreThreshold);
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 } 884 }
887 885
888 886
889 void Scavenger::FreeExternal(intptr_t size) { 887 void Scavenger::FreeExternal(intptr_t size) {
890 ASSERT(size >= 0); 888 ASSERT(size >= 0);
891 external_size_ -= size; 889 external_size_ -= size;
892 ASSERT(external_size_ >= 0); 890 ASSERT(external_size_ >= 0);
893 } 891 }
894 892
895 } // namespace dart 893 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698