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

Unified Diff: runtime/vm/object.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
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 22083)
+++ runtime/vm/object.cc (working copy)
@@ -1260,6 +1260,7 @@
RawObject* raw_obj = *curr;
if (raw_obj->IsHeapObject() && raw_obj->IsNewObject()) {
uword ptr = reinterpret_cast<uword>(old_obj_);
+ old_obj_->SetRememberedBit();
isolate()->store_buffer()->AddPointer(ptr);
// Remembered this object. There is no need to continue searching.
return;
@@ -1291,7 +1292,7 @@
RawObject* raw_obj = Object::Allocate(cls.id(), size, space);
NoGCScope no_gc;
memmove(raw_obj->ptr(), src.raw()->ptr(), size);
- if (space == Heap::kOld) {
+ if ((space == Heap::kOld) && !raw_obj->IsRemembered()) {
StoreBufferUpdateVisitor visitor(Isolate::Current(), raw_obj);
raw_obj->VisitPointers(&visitor);
}
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object.h » ('j') | runtime/vm/raw_object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698