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 { ...@@ -15,15 +15,14 @@ namespace internal {
class SerializerReference { class SerializerReference {
private: private:
enum SpecialValueType { enum SpecialValueType {
kSpecialValue, kInvalidValue,
kAttachedReference, kAttachedReference,
kOffHeapBackingStore, kOffHeapBackingStore,
kBuiltinReference, kBuiltinReference,
}; };
static const int kSpecialValueSpace = LAST_SPACE + 1; static const int kSpecialValueSpace = LAST_SPACE + 1;
static const int kInvalidValue = 0; STATIC_ASSERT(kSpecialValueSpace < (1 << kSpaceTagSize));
static const int kDummyValue = 1;
SerializerReference(SpecialValueType type, uint32_t value) SerializerReference(SpecialValueType type, uint32_t value)
: bitfield_(SpaceBits::encode(kSpecialValueSpace) | : bitfield_(SpaceBits::encode(kSpecialValueSpace) |
...@@ -31,7 +30,7 @@ class SerializerReference { ...@@ -31,7 +30,7 @@ class SerializerReference {
value_(value) {} value_(value) {}
public: public:
SerializerReference() : SerializerReference(kSpecialValue, kInvalidValue) {} SerializerReference() : SerializerReference(kInvalidValue, 0) {}
SerializerReference(uint32_t space, uint32_t chunk_index, SerializerReference(uint32_t space, uint32_t chunk_index,
uint32_t chunk_offset) uint32_t chunk_offset)
...@@ -67,14 +66,9 @@ class SerializerReference { ...@@ -67,14 +66,9 @@ class SerializerReference {
return SerializerReference(kBuiltinReference, index); return SerializerReference(kBuiltinReference, index);
} }
static SerializerReference DummyReference() {
return SerializerReference(kSpecialValue, kDummyValue);
}
bool is_valid() const { bool is_valid() const {
return SpaceBits::decode(bitfield_) != kSpecialValueSpace || return SpaceBits::decode(bitfield_) != kSpecialValueSpace ||
SpecialValueTypeBits::decode(bitfield_) != kSpecialValue || SpecialValueTypeBits::decode(bitfield_) != kInvalidValue;
value_ != kInvalidValue;
} }
bool is_back_reference() const { 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