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

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

Issue 24775002: Fix --gc_at_alloc (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« runtime/vm/raw_object.cc ('K') | « runtime/vm/raw_object.cc ('k') | no next file » | 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 <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 } 401 }
402 heap_->RecordData(kStoreBufferEntries, entries); 402 heap_->RecordData(kStoreBufferEntries, entries);
403 // Done iterating through old objects remembered in the store buffers. 403 // Done iterating through old objects remembered in the store buffers.
404 visitor->VisitingOldObject(NULL); 404 visitor->VisitingOldObject(NULL);
405 } 405 }
406 406
407 407
408 void Scavenger::IterateObjectIdTable(Isolate* isolate, 408 void Scavenger::IterateObjectIdTable(Isolate* isolate,
409 ScavengerVisitor* visitor) { 409 ScavengerVisitor* visitor) {
410 ObjectIdRing* ring = isolate->object_id_ring(); 410 ObjectIdRing* ring = isolate->object_id_ring();
411 ASSERT(ring != NULL); 411 if (ring == NULL) {
412 // --gc_at_alloc can get us here before the ring has been initialized.
413 ASSERT(FLAG_gc_at_alloc);
414 return;
415 }
412 ring->VisitPointers(visitor); 416 ring->VisitPointers(visitor);
413 } 417 }
414 418
415 419
416 void Scavenger::IterateRoots(Isolate* isolate, 420 void Scavenger::IterateRoots(Isolate* isolate,
417 ScavengerVisitor* visitor, 421 ScavengerVisitor* visitor,
418 bool visit_prologue_weak_persistent_handles) { 422 bool visit_prologue_weak_persistent_handles) {
419 int64_t start = OS::GetCurrentTimeMicros(); 423 int64_t start = OS::GetCurrentTimeMicros();
420 isolate->VisitObjectPointers(visitor, 424 isolate->VisitObjectPointers(visitor,
421 visit_prologue_weak_persistent_handles, 425 visit_prologue_weak_persistent_handles,
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 } 673 }
670 674
671 675
672 void Scavenger::WriteProtect(bool read_only) { 676 void Scavenger::WriteProtect(bool read_only) {
673 space_->Protect( 677 space_->Protect(
674 read_only ? VirtualMemory::kReadOnly : VirtualMemory::kReadWrite); 678 read_only ? VirtualMemory::kReadOnly : VirtualMemory::kReadWrite);
675 } 679 }
676 680
677 681
678 } // namespace dart 682 } // namespace dart
OLDNEW
« runtime/vm/raw_object.cc ('K') | « runtime/vm/raw_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698