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

Unified Diff: runtime/vm/object.cc

Issue 1168483003: Thread-local store buffers, v2 (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. Created 5 years, 6 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/isolate.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index a8d64c89febd285cd1cec996e88256aa96a89645..7aa09d38e61253480baf76438fc4513c81f61e3f 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -1717,8 +1717,8 @@ RawObject* Object::Allocate(intptr_t cls_id,
class StoreBufferUpdateVisitor : public ObjectPointerVisitor {
public:
- explicit StoreBufferUpdateVisitor(Isolate* isolate, RawObject* obj) :
- ObjectPointerVisitor(isolate), old_obj_(obj) {
+ explicit StoreBufferUpdateVisitor(Thread* thread, RawObject* obj) :
+ ObjectPointerVisitor(thread->isolate()), thread_(thread), old_obj_(obj) {
ASSERT(old_obj_->IsOldObject());
}
@@ -1727,7 +1727,7 @@ class StoreBufferUpdateVisitor : public ObjectPointerVisitor {
RawObject* raw_obj = *curr;
if (raw_obj->IsHeapObject() && raw_obj->IsNewObject()) {
old_obj_->SetRememberedBit();
- isolate()->store_buffer()->AddObject(old_obj_);
+ thread_->StoreBufferAddObject(old_obj_);
// Remembered this object. There is no need to continue searching.
return;
}
@@ -1735,6 +1735,7 @@ class StoreBufferUpdateVisitor : public ObjectPointerVisitor {
}
private:
+ Thread* thread_;
RawObject* old_obj_;
DISALLOW_COPY_AND_ASSIGN(StoreBufferUpdateVisitor);
@@ -1776,7 +1777,7 @@ RawObject* Object::Clone(const Object& orig, Heap::Space space) {
// Old original doesn't need to be remembered, so neither does the clone.
return raw_clone;
}
- StoreBufferUpdateVisitor visitor(Isolate::Current(), raw_clone);
+ StoreBufferUpdateVisitor visitor(Thread::Current(), raw_clone);
raw_clone->VisitPointers(&visitor);
return raw_clone;
}
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698