Index: runtime/vm/snapshot.h |
=================================================================== |
--- runtime/vm/snapshot.h (revision 37464) |
+++ runtime/vm/snapshot.h (working copy) |
@@ -88,8 +88,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, |
@@ -174,13 +174,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); |
@@ -402,12 +395,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); |
} |
@@ -419,7 +406,7 @@ |
intptr_t value = 0; |
value = SerializedHeaderTag::update(kObjectId, value); |
value = SerializedHeaderData::update(object_id, value); |
- WriteIntptrValue(value); |
+ Write<int32_t>(value); |
Ivan Posva
2014/06/26 09:02:04
Can't we just have a Write32 instead of having to
zra
2014/07/01 20:37:01
I can make this name change in a separate CL.
|
} |
// Write a VM Isolateobject that is serialized as an Id. |
@@ -428,7 +415,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. |
@@ -437,7 +424,7 @@ |
intptr_t value = 0; |
value = SerializedHeaderTag::update(kInlined, value); |
value = SerializedHeaderData::update(id, value); |
- WriteIntptrValue(value); |
+ Write<int32_t>(value); |
} |
// Write out a buffer of bytes. |