V8 Project
v8::internal::TwoByteStringKey Class Reference

#include <objects-inl.h>

+ Inheritance diagram for v8::internal::TwoByteStringKey:
+ Collaboration diagram for v8::internal::TwoByteStringKey:

Public Member Functions

 TwoByteStringKey (Vector< const uc16 > str, uint32_t seed)
 
virtual bool IsMatch (Object *string) OVERRIDE
 
virtual Handle< ObjectAsHandle (Isolate *isolate) OVERRIDE
 
- Public Member Functions inherited from v8::internal::SequentialStringKey< uc16 >
 SequentialStringKey (Vector< const uc16 > 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 ~HashTableKey ()
 

Additional Inherited Members

- Public Attributes inherited from v8::internal::SequentialStringKey< uc16 >
Vector< const uc16string_
 
uint32_t hash_field_
 
uint32_t seed_
 

Detailed Description

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

Constructor & Destructor Documentation

◆ TwoByteStringKey()

v8::internal::TwoByteStringKey::TwoByteStringKey ( Vector< const uc16 str,
uint32_t  seed 
)
inlineexplicit

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

574  : SequentialStringKey<uc16>(str, seed) { }

Member Function Documentation

◆ AsHandle()

Handle< Object > v8::internal::TwoByteStringKey::AsHandle ( Isolate isolate)
virtual

Implements v8::internal::HashTableKey.

Definition at line 13683 of file objects.cc.

13683  {
13684  if (hash_field_ == 0) Hash();
13685  return isolate->factory()->NewTwoByteInternalizedString(string_, hash_field_);
13686 }
virtual uint32_t Hash() OVERRIDE
Definition: objects-inl.h:504

References v8::internal::Isolate::factory(), and v8::internal::Hash().

+ Here is the call graph for this function:

◆ IsMatch()

virtual bool v8::internal::TwoByteStringKey::IsMatch ( Object string)
inlinevirtual

Implements v8::internal::HashTableKey.

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

576  {
577  return String::cast(string)->IsTwoByteEqualTo(string_);
578  }

References v8::internal::SequentialStringKey< uc16 >::string_.


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