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

Unified Diff: runtime/vm/gc_marker.cc

Issue 804673003: Update tag bits atomically (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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 | « no previous file | runtime/vm/object.cc » ('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 42376)
+++ runtime/vm/gc_marker.cc (working copy)
@@ -158,7 +158,7 @@
ASSERT(raw_key->IsWatched());
} else {
ASSERT(!raw_key->IsWatched());
- raw_key->SetWatchedBit();
+ raw_key->SetWatchedBitUnsynchronized();
}
delay_set_.insert(std::make_pair(raw_key, raw_weak));
}
@@ -187,9 +187,11 @@
// Mark the object and push it on the marking stack.
ASSERT(!raw_obj->IsMarked());
- raw_obj->SetMarkBit();
- raw_obj->ClearRememberedBit();
- if (raw_obj->IsWatched()) {
+ const bool is_watched = raw_obj->IsWatched();
+ raw_obj->SetMarkBitUnsynchronized();
+ raw_obj->ClearRememberedBitUnsynchronized();
+ raw_obj->ClearWatchedBitUnsynchronized();
+ if (is_watched) {
std::pair<DelaySet::iterator, DelaySet::iterator> ret;
// Visit all elements with a key equal to raw_obj.
ret = delay_set_.equal_range(raw_obj);
@@ -201,7 +203,6 @@
it != temp_copy.end(); ++it) {
it->second->VisitPointers(this);
}
- raw_obj->ClearWatchedBit();
}
marking_stack_->Push(raw_obj);
}
@@ -223,7 +224,7 @@
if ((visiting_old_object_ != NULL) &&
!visiting_old_object_->IsRemembered()) {
ASSERT(p != NULL);
- visiting_old_object_->SetRememberedBit();
+ visiting_old_object_->SetRememberedBitUnsynchronized();
isolate()->store_buffer()->AddObjectGC(visiting_old_object_);
}
return;
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698