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

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,8 @@
}
// For all other internal VM classes we read the object inline.
- intptr_t tags = ReadIntptrValue();
+ intptr_t tags = ReadTags();
+ tags = RawObject::ClassIdTag::update(class_id, tags);
siva 2014/06/23 21:45:53 Is it necessary to or in the class_id here? I thin
zra 2014/06/23 22:17:50 The class id is taken from tags in TypedData::Read
switch (class_id) {
#define SNAPSHOT_READ(clazz) \
case clazz::kClassId: { \
@@ -812,7 +813,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));
@@ -880,6 +881,7 @@
ASSERT((class_header & kSmiTagMask) != kSmiTag);
cls_ = LookupInternalClass(class_header);
ASSERT(!cls_.IsNull());
+ tags = RawObject::ClassIdTag::update(cls_.id(), tags);
siva 2014/06/23 21:45:53 Ditto comment about oring in the class_id
zra 2014/06/23 22:17:50 Same as above.
switch (cls_.id()) {
#define SNAPSHOT_READ(clazz) \
case clazz::kClassId: { \
@@ -1388,7 +1390,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 +1413,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 +1473,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