V8 Project
v8::internal::InternalizedStringKey Class Reference
+ Inheritance diagram for v8::internal::InternalizedStringKey:
+ Collaboration diagram for v8::internal::InternalizedStringKey:

Public Member Functions

 InternalizedStringKey (Handle< String > string)
 
virtual bool IsMatch (Object *string) OVERRIDE
 
virtual uint32_t Hash () OVERRIDE
 
virtual uint32_t HashForObject (Object *other) OVERRIDE
 
virtual Handle< ObjectAsHandle (Isolate *isolate) OVERRIDE
 
- Public Member Functions inherited from v8::internal::HashTableKey
virtual ~HashTableKey ()
 

Static Public Member Functions

static uint32_t StringHash (Object *obj)
 

Public Attributes

Handle< Stringstring_
 

Detailed Description

Definition at line 13703 of file objects.cc.

Constructor & Destructor Documentation

◆ InternalizedStringKey()

v8::internal::InternalizedStringKey::InternalizedStringKey ( Handle< String string)
inlineexplicit

Definition at line 13705 of file objects.cc.

13706  : string_(string) { }

Member Function Documentation

◆ AsHandle()

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

Implements v8::internal::HashTableKey.

Definition at line 13718 of file objects.cc.

13718  {
13719  // Internalize the string if possible.
13720  MaybeHandle<Map> maybe_map =
13721  isolate->factory()->InternalizedStringMapForString(string_);
13722  Handle<Map> map;
13723  if (maybe_map.ToHandle(&map)) {
13724  string_->set_map_no_write_barrier(*map);
13725  DCHECK(string_->IsInternalizedString());
13726  return string_;
13727  }
13728  // Otherwise allocate a new internalized string.
13729  return isolate->factory()->NewInternalizedStringImpl(
13730  string_, string_->length(), string_->hash_field());
13731  }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, v8::internal::HeapObject::map(), and v8::internal::HeapObject::set_map_no_write_barrier().

+ Here is the call graph for this function:

◆ Hash()

virtual uint32_t v8::internal::InternalizedStringKey::Hash ( )
inlinevirtual

Implements v8::internal::HashTableKey.

Definition at line 13712 of file objects.cc.

13712 { return string_->Hash(); }

◆ HashForObject()

virtual uint32_t v8::internal::InternalizedStringKey::HashForObject ( Object other)
inlinevirtual

Implements v8::internal::HashTableKey.

Definition at line 13714 of file objects.cc.

13714  {
13715  return String::cast(other)->Hash();
13716  }

◆ IsMatch()

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

Implements v8::internal::HashTableKey.

Definition at line 13708 of file objects.cc.

13708  {
13709  return String::cast(string)->Equals(*string_);
13710  }

◆ StringHash()

static uint32_t v8::internal::InternalizedStringKey::StringHash ( Object obj)
inlinestatic

Definition at line 13733 of file objects.cc.

13733  {
13734  return String::cast(obj)->Hash();
13735  }

Member Data Documentation

◆ string_

Handle<String> v8::internal::InternalizedStringKey::string_

Definition at line 13737 of file objects.cc.


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