| Index: runtime/vm/raw_object_snapshot.cc
|
| ===================================================================
|
| --- runtime/vm/raw_object_snapshot.cc (revision 37317)
|
| +++ 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]);
|
| }
|
| }
|
|
|
| @@ -1981,7 +1981,7 @@
|
| writer->GetObjectTags(this),
|
| ptr()->length_,
|
| ptr()->hash_,
|
| - ptr()->data_);
|
| + ptr()->data());
|
| }
|
|
|
|
|
| @@ -1995,7 +1995,7 @@
|
| writer->GetObjectTags(this),
|
| ptr()->length_,
|
| ptr()->hash_,
|
| - ptr()->data_);
|
| + ptr()->data());
|
| }
|
|
|
|
|
| @@ -2395,7 +2395,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]); \
|
| } \
|
| @@ -2425,7 +2425,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;
|
| }
|
| @@ -2459,11 +2459,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,
|
|
|