V8 Project
|
#include <objects.h>
Public Member Functions | |
StringHasher (int length, uint32_t seed) | |
INLINE (static uint32_t AddCharacterCore(uint32_t running_hash, uint16_t c)) | |
INLINE (static uint32_t GetHashCore(uint32_t running_hash)) | |
Static Public Member Functions | |
template<typename schar > | |
static uint32_t | HashSequentialString (const schar *chars, int length, uint32_t seed) |
static uint32_t | ComputeUtf8Hash (Vector< const char > chars, uint32_t seed, int *utf16_length_out) |
static uint32_t | MakeArrayIndexHash (uint32_t value, int length) |
Static Public Attributes | |
static const int | kZeroHash = 27 |
Protected Member Functions | |
uint32_t | GetHashField () |
bool | has_trivial_hash () |
template<typename Char > | |
void | AddCharacters (const Char *chars, int len) |
Private Member Functions | |
void | AddCharacter (uint16_t c) |
bool | UpdateIndex (uint16_t c) |
DISALLOW_COPY_AND_ASSIGN (StringHasher) | |
Private Attributes | |
int | length_ |
uint32_t | raw_running_hash_ |
uint32_t | array_index_ |
bool | is_array_index_ |
bool | is_first_char_ |
Definition at line 6478 of file objects-inl.h.
References DCHECK, and raw_running_hash_.
|
inlineprivate |
Definition at line 6512 of file objects-inl.h.
References raw_running_hash_.
Referenced by AddCharacters(), and ComputeUtf8Hash().
|
inlineprotected |
Definition at line 6543 of file objects-inl.h.
References AddCharacter(), DCHECK, is_array_index_, and UpdateIndex().
Referenced by HashSequentialString(), v8::internal::IteratingStringHasher::VisitOneByteString(), and v8::internal::IteratingStringHasher::VisitTwoByteString().
|
static |
Definition at line 8956 of file objects.cc.
References AddCharacter(), DCHECK, GetHashField(), HashSequentialString(), is_array_index_, v8::internal::String::kMaxArrayIndexSize, v8::internal::String::kMaxHashCalcLength, unibrow::Utf16::kMaxNonSurrogateCharCode, unibrow::Utf8::kMaxOneByteChar, unibrow::Utf16::LeadSurrogate(), v8::internal::Vector< T >::length(), length_, v8::internal::Vector< T >::start(), unibrow::Utf16::TrailSurrogate(), UpdateIndex(), and unibrow::Utf8::ValueOf().
Referenced by v8::internal::Utf8StringKey::Hash().
|
private |
|
protected |
Definition at line 8943 of file objects.cc.
References array_index_, is_array_index_, v8::internal::Name::kHashShift, v8::internal::Name::kIsNotArrayIndexMask, v8::internal::String::kMaxHashCalcLength, length_, MakeArrayIndexHash(), and raw_running_hash_.
Referenced by ComputeUtf8Hash(), v8::internal::IteratingStringHasher::Hash(), and HashSequentialString().
|
inlineprotected |
Definition at line 6488 of file objects-inl.h.
References v8::internal::String::kMaxHashCalcLength, and length_.
Referenced by v8::internal::IteratingStringHasher::Hash(), and HashSequentialString().
|
inlinestatic |
Definition at line 6563 of file objects-inl.h.
References AddCharacters(), GetHashField(), and has_trivial_hash().
Referenced by ComputeUtf8Hash(), v8::internal::NativeObjectsExplorer::FindOrAddGroupInfo(), v8::internal::HeapObjectsMap::GenerateId(), v8::internal::StringsStorage::GetEntry(), v8::internal::SeqOneByteSubStringKey::Hash(), v8::internal::HeapSnapshotJSONSerializer::INLINE(), and v8::internal::TwoCharHashTableKey::TwoCharHashTableKey().
v8::internal::StringHasher::INLINE | ( | static uint32_t | AddCharacterCoreuint32_t running_hash, uint16_t c | ) |
v8::internal::StringHasher::INLINE | ( | static uint32_t | GetHashCoreuint32_t running_hash | ) |
Definition at line 8925 of file objects.cc.
References DCHECK, v8::internal::String::kArrayIndexValueBits, v8::internal::String::kContainsCachedArrayIndexMask, v8::internal::Name::kIsNotArrayIndexMask, v8::internal::String::kMaxArrayIndexSize, v8::internal::String::kMaxCachedArrayIndexLength, v8::internal::BitFieldBase< T, shift, size, U >::kShift, and v8::internal::TenToThe().
Referenced by GetHashField(), and v8::internal::RUNTIME_FUNCTION().
|
inlineprivate |
Definition at line 6519 of file objects-inl.h.
References array_index_, DCHECK, is_array_index_, is_first_char_, and length_.
Referenced by AddCharacters(), and ComputeUtf8Hash().
|
private |
Definition at line 8388 of file objects.h.
Referenced by GetHashField(), and UpdateIndex().
|
private |
Definition at line 8389 of file objects.h.
Referenced by AddCharacters(), ComputeUtf8Hash(), GetHashField(), and UpdateIndex().
|
private |
Definition at line 8390 of file objects.h.
Referenced by UpdateIndex().
|
static |
Definition at line 8363 of file objects.h.
Referenced by v8::internal::TwoCharHashTableKey::TwoCharHashTableKey().
|
private |
Definition at line 8386 of file objects.h.
Referenced by ComputeUtf8Hash(), GetHashField(), has_trivial_hash(), and UpdateIndex().
|
private |
Definition at line 8387 of file objects.h.
Referenced by AddCharacter(), GetHashField(), and StringHasher().