Index: runtime/vm/snapshot.h |
=================================================================== |
--- runtime/vm/snapshot.h (revision 40039) |
+++ runtime/vm/snapshot.h (working copy) |
@@ -93,8 +93,8 @@ |
kObjectId = 0x3, |
}; |
static const int8_t kHeaderTagBits = 2; |
-static const int8_t kObjectIdBits = (kBitsPerWord - (kHeaderTagBits + 1)); |
-static const intptr_t kMaxObjectId = (kUwordMax >> (kHeaderTagBits + 1)); |
+static const int8_t kObjectIdBits = (kBitsPerInt32 - (kHeaderTagBits + 1)); |
+static const intptr_t kMaxObjectId = (kMaxUint32 >> (kHeaderTagBits + 1)); |
class SerializedHeaderTag : public BitField<enum SerializedHeaderType, |
@@ -187,13 +187,6 @@ |
return ReadStream::Raw<sizeof(T), T>::Read(&stream_); |
} |
- // Reads an intptr_t type value. |
- intptr_t ReadIntptrValue() { |
- int64_t value = Read<int64_t>(); |
- ASSERT((value <= kIntptrMax) && (value >= kIntptrMin)); |
- return static_cast<intptr_t>(value); |
- } |
- |
intptr_t ReadRawPointerValue() { |
int64_t value = Read<int64_t>(); |
return static_cast<intptr_t>(value); |
@@ -440,12 +433,6 @@ |
WriteStream::Raw<sizeof(T), T>::Write(&stream_, value); |
} |
- // Writes an intptr_t type value out. |
- void WriteIntptrValue(intptr_t value) { |
- ASSERT((value >= kMinInt32) && (value <= kMaxInt32)); |
- Write<int64_t>(value); |
- } |
- |
void WriteRawPointerValue(intptr_t value) { |
Write<int64_t>(value); |
} |
@@ -457,7 +444,7 @@ |
intptr_t value = 0; |
value = SerializedHeaderTag::update(kObjectId, value); |
value = SerializedHeaderData::update(object_id, value); |
- WriteIntptrValue(value); |
+ Write<int32_t>(value); |
} |
// Write a VM Isolateobject that is serialized as an Id. |
@@ -466,7 +453,7 @@ |
intptr_t value = 0; |
value = SerializedHeaderTag::update(kObjectId, value); |
value = SerializedHeaderData::update(object_id, value); |
- WriteIntptrValue(-value); // Write as a negative value. |
+ Write<int32_t>(-value); // Write as a negative value. |
} |
// Write serialization header information for an object. |
@@ -475,7 +462,7 @@ |
intptr_t value = 0; |
value = SerializedHeaderTag::update(kInlined, value); |
value = SerializedHeaderData::update(id, value); |
- WriteIntptrValue(value); |
+ Write<int32_t>(value); |
} |
void WriteTags(intptr_t tags) { |