V8 Project
v8::internal::SequentialStringKey< Char > Class Template Reference

#include <objects-inl.h>

+ Inheritance diagram for v8::internal::SequentialStringKey< Char >:
+ Collaboration diagram for v8::internal::SequentialStringKey< Char >:

Public Member Functions

 SequentialStringKey (Vector< const Char > string, uint32_t seed)
 
virtual uint32_t Hash () OVERRIDE
 
virtual uint32_t HashForObject (Object *other) OVERRIDE
 
- Public Member Functions inherited from v8::internal::HashTableKey
virtual bool IsMatch (Object *other)=0
 
virtual MUST_USE_RESULT Handle< ObjectAsHandle (Isolate *isolate)=0
 
virtual ~HashTableKey ()
 

Public Attributes

Vector< const Char > string_
 
uint32_t hash_field_
 
uint32_t seed_
 

Detailed Description

template<typename Char>
class v8::internal::SequentialStringKey< Char >

Definition at line 499 of file objects-inl.h.

Constructor & Destructor Documentation

◆ SequentialStringKey()

template<typename Char >
v8::internal::SequentialStringKey< Char >::SequentialStringKey ( Vector< const Char >  string,
uint32_t  seed 
)
inlineexplicit

Definition at line 501 of file objects-inl.h.

502  : string_(string), hash_field_(0), seed_(seed) { }
Vector< const Char > string_
Definition: objects-inl.h:519

Member Function Documentation

◆ Hash()

template<typename Char >
virtual uint32_t v8::internal::SequentialStringKey< Char >::Hash ( )
inlinevirtual

Implements v8::internal::HashTableKey.

Definition at line 504 of file objects-inl.h.

504  {
505  hash_field_ = StringHasher::HashSequentialString<Char>(string_.start(),
506  string_.length(),
507  seed_);
508 
510  DCHECK(result != 0); // Ensure that the hash value of 0 is never computed.
511  return result;
512  }
static const int kHashShift
Definition: objects.h:8499
T * start() const
Definition: vector.h:47
int length() const
Definition: vector.h:41
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, v8::internal::SequentialStringKey< Char >::hash_field_, v8::internal::Name::kHashShift, v8::internal::Vector< T >::length(), v8::internal::SequentialStringKey< Char >::seed_, v8::internal::Vector< T >::start(), and v8::internal::SequentialStringKey< Char >::string_.

+ Here is the call graph for this function:

◆ HashForObject()

template<typename Char >
virtual uint32_t v8::internal::SequentialStringKey< Char >::HashForObject ( Object other)
inlinevirtual

Implements v8::internal::HashTableKey.

Definition at line 515 of file objects-inl.h.

515  {
516  return String::cast(other)->Hash();
517  }

Member Data Documentation

◆ hash_field_

template<typename Char >
uint32_t v8::internal::SequentialStringKey< Char >::hash_field_

Definition at line 520 of file objects-inl.h.

Referenced by v8::internal::SequentialStringKey< Char >::Hash().

◆ seed_

template<typename Char >
uint32_t v8::internal::SequentialStringKey< Char >::seed_

Definition at line 521 of file objects-inl.h.

Referenced by v8::internal::SequentialStringKey< Char >::Hash().

◆ string_

template<typename Char >
Vector<const Char> v8::internal::SequentialStringKey< Char >::string_

Definition at line 519 of file objects-inl.h.

Referenced by v8::internal::SequentialStringKey< Char >::Hash().


The documentation for this class was generated from the following file: