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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 333773006: Removes open arrays (e.g. data[0]) from raw objects. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/raw_object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object_snapshot.cc
===================================================================
--- runtime/vm/raw_object_snapshot.cc (revision 37443)
+++ runtime/vm/raw_object_snapshot.cc (working copy)
@@ -510,7 +510,7 @@
// Write out the individual types.
intptr_t len = Smi::Value(ptr()->length_);
for (intptr_t i = 0; i < len; i++) {
- writer->WriteObjectImpl(ptr()->types_[i]);
+ writer->WriteObjectImpl(ptr()->types()[i]);
}
}
@@ -1977,7 +1977,7 @@
writer->GetObjectTags(this),
ptr()->length_,
ptr()->hash_,
- ptr()->data_);
+ ptr()->data());
}
@@ -1991,7 +1991,7 @@
writer->GetObjectTags(this),
ptr()->length_,
ptr()->hash_,
- ptr()->data_);
+ ptr()->data());
}
@@ -2391,7 +2391,7 @@
#define TYPED_DATA_WRITE(type) \
{ \
- type* data = reinterpret_cast<type*>(ptr()->data_); \
+ type* data = reinterpret_cast<type*>(ptr()->data()); \
for (intptr_t i = 0; i < len; i++) { \
writer->Write(data[i]); \
} \
@@ -2421,7 +2421,7 @@
case kTypedDataInt8ArrayCid:
case kTypedDataUint8ArrayCid:
case kTypedDataUint8ClampedArrayCid: {
- uint8_t* data = reinterpret_cast<uint8_t*>(ptr()->data_);
+ uint8_t* data = reinterpret_cast<uint8_t*>(ptr()->data());
writer->WriteBytes(data, len);
break;
}
@@ -2455,11 +2455,20 @@
}
+#define TYPED_EXT_DATA_WRITE(type) \
+ { \
+ type* data = reinterpret_cast<type*>(ptr()->data_); \
+ for (intptr_t i = 0; i < len; i++) { \
+ writer->Write(data[i]); \
+ } \
+ } \
+
+
#define EXT_TYPED_DATA_WRITE(cid, type) \
writer->WriteIndexedObject(cid); \
writer->WriteIntptrValue(RawObject::ClassIdTag::update(cid, tags)); \
writer->Write<RawObject*>(ptr()->length_); \
- TYPED_DATA_WRITE(type) \
+ TYPED_EXT_DATA_WRITE(type) \
void RawExternalTypedData::WriteTo(SnapshotWriter* writer,
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698