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

Unified Diff: vm/snapshot.h

Issue 8879063: Changes to set up the object tag bits (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 | « vm/raw_object_snapshot.cc ('k') | vm/snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/snapshot.h
===================================================================
--- vm/snapshot.h (revision 2434)
+++ vm/snapshot.h (working copy)
@@ -349,8 +349,22 @@
WriteStream::Raw<sizeof(T), T>::Write(&stream_, value);
}
- // Setup header information for an object.
- void WriteObjectHeader(SerializedHeaderType type, intptr_t id) {
+ // Write an object that is serialized as an Id (singleton, object store,
+ // or an object that was already serialized before).
+ void WriteIndexedObject(intptr_t object_id) {
+ WriteSerializationMarker(kObjectId, object_id);
+ }
+
+ // Write out object header value.
+ void WriteObjectHeader(intptr_t class_id, intptr_t tags) {
+ // Write out the class information.
+ WriteIndexedObject(class_id);
+ // Write out the tags information.
+ Write<intptr_t>(tags);
+ }
+
+ // Write serialization header information for an object.
+ void WriteSerializationMarker(SerializedHeaderType type, intptr_t id) {
uword value = 0;
value = SerializedHeaderTag::update(type, value);
value = SerializedHeaderData::update(id, value);
@@ -409,9 +423,28 @@
void WriteClassId(RawClass* cls);
- // Setup header information for an object.
- void WriteObjectHeader(SerializedHeaderType type, intptr_t value);
+ // Write an object that is serialized as an Id (singleton, object store,
+ // or an object that was already serialized before).
+ void WriteIndexedObject(intptr_t object_id) {
+ WriteSerializationMarker(kObjectId, object_id);
+ }
+ // Write out object header value.
+ void WriteObjectHeader(intptr_t class_id, intptr_t tags) {
+ // Write out the class information.
+ WriteIndexedObject(class_id);
+ // Write out the tags information.
+ Write<intptr_t>(tags);
+ }
+
+ // Write serialization header information for an object.
+ void WriteSerializationMarker(SerializedHeaderType type, intptr_t id) {
+ uword value = 0;
+ value = SerializedHeaderTag::update(type, value);
+ value = SerializedHeaderData::update(id, value);
+ Write<uword>(value);
+ }
+
// Unmark all objects that were marked as forwarded for serializing.
void UnmarkAll();
« no previous file with comments | « vm/raw_object_snapshot.cc ('k') | vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698