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

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

Issue 1090053003: - Avoid inconsistency of for example IterateObjects vs VisitObjects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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
« no previous file with comments | « runtime/vm/object_test.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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 VerifiedMemory::Accept(to_->start(), to_->end() - to_->start()); 492 VerifiedMemory::Accept(to_->start(), to_->end() - to_->start());
493 #if defined(DEBUG) 493 #if defined(DEBUG)
494 // We can only safely verify the store buffers from old space if there is no 494 // We can only safely verify the store buffers from old space if there is no
495 // concurrent old space task. At the same time we prevent new tasks from 495 // concurrent old space task. At the same time we prevent new tasks from
496 // being spawned. 496 // being spawned.
497 { 497 {
498 PageSpace* page_space = heap_->old_space(); 498 PageSpace* page_space = heap_->old_space();
499 MonitorLocker ml(page_space->tasks_lock()); 499 MonitorLocker ml(page_space->tasks_lock());
500 if (page_space->tasks() == 0) { 500 if (page_space->tasks() == 0) {
501 VerifyStoreBufferPointerVisitor verify_store_buffer_visitor(isolate, to_); 501 VerifyStoreBufferPointerVisitor verify_store_buffer_visitor(isolate, to_);
502 heap_->IterateOldPointers(&verify_store_buffer_visitor); 502 heap_->old_space()->VisitObjectPointers(&verify_store_buffer_visitor);
503 } 503 }
504 } 504 }
505 #endif // defined(DEBUG) 505 #endif // defined(DEBUG)
506 from_->Delete(); 506 from_->Delete();
507 from_ = NULL; 507 from_ = NULL;
508 if (invoke_api_callbacks && (isolate->gc_epilogue_callback() != NULL)) { 508 if (invoke_api_callbacks && (isolate->gc_epilogue_callback() != NULL)) {
509 (isolate->gc_epilogue_callback())(); 509 (isolate->gc_epilogue_callback())();
510 } 510 }
511 } 511 }
512 512
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 } 900 }
901 901
902 902
903 void Scavenger::FreeExternal(intptr_t size) { 903 void Scavenger::FreeExternal(intptr_t size) {
904 ASSERT(size >= 0); 904 ASSERT(size >= 0);
905 external_size_ -= size; 905 external_size_ -= size;
906 ASSERT(external_size_ >= 0); 906 ASSERT(external_size_ >= 0);
907 } 907 }
908 908
909 } // namespace dart 909 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698