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) { |