Chromium Code Reviews| Index: runtime/vm/object.h |
| =================================================================== |
| --- runtime/vm/object.h (revision 39255) |
| +++ runtime/vm/object.h (working copy) |
| @@ -5389,6 +5389,10 @@ |
| this->SetHash(result); |
| return result; |
| } |
| + bool HasHash() const { |
| + ASSERT(Smi::New(0) == NULL); |
| + return (raw_ptr()->hash_ != NULL); |
|
Ivan Posva
2014/08/14 20:42:12
NULL? Shouldn't that be a Smi::Value(...) != 0?
siva
2014/08/14 21:04:57
Let me change this in a CL by itself, I want to ma
|
| + } |
| static intptr_t hash_offset() { return OFFSET_OF(RawString, hash_); } |
| static intptr_t Hash(const String& str, intptr_t begin_index, intptr_t len); |
| @@ -5602,11 +5606,6 @@ |
| bool Equals(const uint8_t* characters, intptr_t len) const; |
| static intptr_t Hash(const uint8_t* characters, intptr_t len); |
| - bool HasHash() const { |
| - ASSERT(Smi::New(0) == NULL); |
| - return (raw_ptr()->hash_ != NULL); |
| - } |
| - |
| void SetLength(intptr_t value) const { |
| // This is only safe because we create a new Smi, which does not cause |
| // heap allocation. |