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

Unified Diff: runtime/vm/gc_marker.cc

Issue 14307013: - Remember the fact that an object has been added to the (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_test.cc ('k') | runtime/vm/hash_set.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/gc_marker.cc
===================================================================
--- runtime/vm/gc_marker.cc (revision 22392)
+++ runtime/vm/gc_marker.cc (working copy)
@@ -175,6 +175,7 @@
ASSERT(!raw_obj->IsMarked());
RawClass* raw_class = isolate()->class_table()->At(raw_obj->GetClassId());
raw_obj->SetMarkBit();
+ raw_obj->ClearRememberedBit();
if (raw_obj->IsWatched()) {
std::pair<DelaySet::iterator, DelaySet::iterator> ret;
// Visit all elements with a key equal to raw_obj.
@@ -201,10 +202,11 @@
// Skip over new objects, but verify consistency of heap while at it.
if (raw_obj->IsNewObject()) {
// TODO(iposva): Add consistency check.
- if (visiting_old_object_ != NULL) {
+ if ((visiting_old_object_ != NULL) &&
+ !visiting_old_object_->IsRemembered()) {
ASSERT(p != NULL);
- isolate()->store_buffer()->AddPointer(
- reinterpret_cast<uword>(visiting_old_object_));
+ visiting_old_object_->SetRememberedBit();
+ isolate()->store_buffer()->AddObjectGC(visiting_old_object_);
}
return;
}
@@ -263,7 +265,6 @@
}
// The store buffers will be rebuilt as part of marking, reset them now.
isolate->store_buffer()->Reset();
- isolate->store_buffer_block()->Reset();
}
« no previous file with comments | « runtime/vm/assembler_test.cc ('k') | runtime/vm/hash_set.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698