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

Unified Diff: runtime/vm/snapshot.cc

Issue 349293002: Omits size bits when writing RawObject tags to a snapshot. (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/snapshot.h ('k') | tests/standalone/issue14236_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
===================================================================
--- runtime/vm/snapshot.cc (revision 37600)
+++ runtime/vm/snapshot.cc (working copy)
@@ -302,7 +302,7 @@
}
// For all other internal VM classes we read the object inline.
- intptr_t tags = ReadIntptrValue();
+ intptr_t tags = ReadTags();
switch (class_id) {
#define SNAPSHOT_READ(clazz) \
case clazz::kClassId: { \
@@ -315,6 +315,7 @@
case kTypedData##clazz##Cid: \
CLASS_LIST_TYPED_DATA(SNAPSHOT_READ) {
+ tags = RawObject::ClassIdTag::update(class_id, tags);
obj_ = TypedData::ReadFrom(this, object_id, tags, kind_);
break;
}
@@ -323,6 +324,7 @@
case kExternalTypedData##clazz##Cid: \
CLASS_LIST_TYPED_DATA(SNAPSHOT_READ) {
+ tags = RawObject::ClassIdTag::update(class_id, tags);
obj_ = ExternalTypedData::ReadFrom(this, object_id, tags, kind_);
break;
}
@@ -812,7 +814,7 @@
RawObject* SnapshotReader::ReadInlinedObject(intptr_t object_id) {
// Read the class header information and lookup the class.
intptr_t class_header = ReadIntptrValue();
- intptr_t tags = ReadIntptrValue();
+ intptr_t tags = ReadTags();
if (SerializedHeaderData::decode(class_header) == kInstanceObjectId) {
// Object is regular dart instance.
Instance* result = reinterpret_cast<Instance*>(GetBackRef(object_id));
@@ -892,6 +894,7 @@
case kTypedData##clazz##Cid: \
CLASS_LIST_TYPED_DATA(SNAPSHOT_READ) {
+ tags = RawObject::ClassIdTag::update(cls_.id(), tags);
obj_ = TypedData::ReadFrom(this, object_id, tags, kind_);
break;
}
@@ -900,6 +903,7 @@
case kExternalTypedData##clazz##Cid: \
CLASS_LIST_TYPED_DATA(SNAPSHOT_READ) {
+ tags = RawObject::ClassIdTag::update(cls_.id(), tags);
obj_ = ExternalTypedData::ReadFrom(this, object_id, tags, kind_);
break;
}
@@ -1388,7 +1392,7 @@
// case.
// Write out the class and tags information.
WriteVMIsolateObject(kClassCid);
- WriteIntptrValue(GetObjectTags(cls));
+ WriteTags(GetObjectTags(cls));
// Write out the library url and class name.
RawLibrary* library = cls->ptr()->library_;
@@ -1411,7 +1415,7 @@
// Write out the class and tags information.
WriteIndexedObject(array_kind);
- WriteIntptrValue(tags);
+ WriteTags(tags);
// Write out the length field.
Write<RawObject*>(length);
@@ -1471,7 +1475,7 @@
WriteIntptrValue(SerializedHeaderData::encode(kInstanceObjectId));
// Write out the tags.
- WriteIntptrValue(tags);
+ WriteTags(tags);
// Write out the class information for this object.
WriteObjectImpl(cls);
« no previous file with comments | « runtime/vm/snapshot.h ('k') | tests/standalone/issue14236_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698