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

Unified Diff: vm/object.h

Issue 9007032: Use StorePointer instead of direct assignments of objects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/object.h
===================================================================
--- vm/object.h (revision 2672)
+++ vm/object.h (working copy)
@@ -2214,7 +2214,7 @@
}
void SetField(const Field& field, const Object& value) const {
- *FieldAddr(field) = value.raw();
+ StorePointer(FieldAddr(field), value.raw());
}
RawType* GetType() const;
@@ -2265,7 +2265,7 @@
+ sizeof(RawObject));
}
void SetFieldAtOffset(intptr_t offset, const Object& value) const {
- *FieldAddrAtOffset(offset) = value.raw();
+ StorePointer(FieldAddrAtOffset(offset), value.raw());
}
bool IsValidFieldOffset(int offset) const;
@@ -2994,7 +2994,7 @@
}
void SetAt(intptr_t index, const Object& value) const {
// TODO(iposva): Add storing NoGCScope.
- *ObjectAddr(index) = value.raw();
+ StorePointer(ObjectAddr(index), value.raw());
}
virtual RawAbstractTypeArguments* GetTypeArguments() const {
@@ -3164,7 +3164,7 @@
// TODO(iposva): Remove smrck support once mapping to arbitrary is available.
RawInteger* smrck() const { return raw_ptr()->smrck_; }
void set_smrck(const Integer& smrck) const {
- raw_ptr()->smrck_ = smrck.raw();
+ StorePointer(&raw_ptr()->smrck_, smrck.raw());
}
static intptr_t smrck_offset() { return OFFSET_OF(RawClosure, smrck_); }
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698