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

Unified Diff: runtime/vm/snapshot.h

Issue 1174173007: Expand the class id to 32 bits and size field to 16 bits on 64-bit platforms. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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_snapshot.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.h
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index 13c2ecdce0fe0ddd66cec19e13201ac3d398ee77..d6241ae60eb5e234c00760f75283375b9f7fe131 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -195,6 +195,12 @@ class BaseReader {
return static_cast<intptr_t>(value);
}
+ classid_t ReadClassIDValue() {
+ uint32_t value = Read<uint32_t>();
+ return static_cast<classid_t>(value);
+ }
+ COMPILE_ASSERT(sizeof(uint32_t) >= sizeof(classid_t));
+
void ReadBytes(uint8_t* addr, intptr_t len) {
stream_.ReadBytes(addr, len);
}
@@ -511,6 +517,11 @@ class BaseWriter : public StackResource {
Write<int64_t>(value);
}
+ void WriteClassIDValue(classid_t value) {
+ Write<uint32_t>(value);
+ }
+ COMPILE_ASSERT(sizeof(uint32_t) >= sizeof(classid_t));
+
// Write an object that is serialized as an Id (singleton in object store,
// or an object that was already serialized before).
void WriteIndexedObject(intptr_t object_id) {
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698