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

Unified Diff: runtime/vm/object.cc

Issue 12089049: Do not add smis to the store buffer when cloning objects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 7 years, 11 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 | « no previous file | 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
===================================================================
--- runtime/vm/object.cc (revision 17755)
+++ runtime/vm/object.cc (working copy)
@@ -1300,14 +1300,15 @@
}
-class StoreBufferObjectPointerVisitor : public ObjectPointerVisitor {
+class StoreBufferUpdateVisitor : public ObjectPointerVisitor {
public:
- explicit StoreBufferObjectPointerVisitor(Isolate* isolate) :
- ObjectPointerVisitor(isolate) {
- }
+ explicit StoreBufferUpdateVisitor(Isolate* isolate) :
+ ObjectPointerVisitor(isolate) { }
+
void VisitPointers(RawObject** first, RawObject** last) {
for (RawObject** curr = first; curr <= last; ++curr) {
- if ((*curr)->IsNewObject()) {
+ RawObject* raw_obj = *curr;
+ if (raw_obj->IsHeapObject() && raw_obj->IsNewObject()) {
uword ptr = reinterpret_cast<uword>(curr);
isolate()->store_buffer()->AddPointer(ptr);
}
@@ -1315,7 +1316,7 @@
}
private:
- DISALLOW_COPY_AND_ASSIGN(StoreBufferObjectPointerVisitor);
+ DISALLOW_COPY_AND_ASSIGN(StoreBufferUpdateVisitor);
};
@@ -1337,7 +1338,7 @@
NoGCScope no_gc;
memmove(raw_obj->ptr(), src.raw()->ptr(), size);
if (space == Heap::kOld) {
- StoreBufferObjectPointerVisitor visitor(Isolate::Current());
+ StoreBufferUpdateVisitor visitor(Isolate::Current());
raw_obj->VisitPointers(&visitor);
}
return raw_obj;
« no previous file with comments | « no previous file | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698