Commit 74fbfa1f authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[snapshot] remove dummy reference

R=jgruber@chromium.org

Change-Id: Ia874ff087fd4cd56e829e0c0d2b19586dc5b5040
Reviewed-on: https://chromium-review.googlesource.com/1125848Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54208}
parent 8956128a
......@@ -15,15 +15,14 @@ namespace internal {
class SerializerReference {
private:
enum SpecialValueType {
kSpecialValue,
kInvalidValue,
kAttachedReference,
kOffHeapBackingStore,
kBuiltinReference,
};
static const int kSpecialValueSpace = LAST_SPACE + 1;
static const int kInvalidValue = 0;
static const int kDummyValue = 1;
STATIC_ASSERT(kSpecialValueSpace < (1 << kSpaceTagSize));
SerializerReference(SpecialValueType type, uint32_t value)
: bitfield_(SpaceBits::encode(kSpecialValueSpace) |
......@@ -31,7 +30,7 @@ class SerializerReference {
value_(value) {}
public:
SerializerReference() : SerializerReference(kSpecialValue, kInvalidValue) {}
SerializerReference() : SerializerReference(kInvalidValue, 0) {}
SerializerReference(uint32_t space, uint32_t chunk_index,
uint32_t chunk_offset)
......@@ -67,14 +66,9 @@ class SerializerReference {
return SerializerReference(kBuiltinReference, index);
}
static SerializerReference DummyReference() {
return SerializerReference(kSpecialValue, kDummyValue);
}
bool is_valid() const {
return SpaceBits::decode(bitfield_) != kSpecialValueSpace ||
SpecialValueTypeBits::decode(bitfield_) != kSpecialValue ||
value_ != kInvalidValue;
SpecialValueTypeBits::decode(bitfield_) != kInvalidValue;
}
bool is_back_reference() const {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment