v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::OrderedHashMap Class Reference

#include <ordered-hash-table.h>

Inheritance diagram for v8::internal::OrderedHashMap:
Collaboration diagram for v8::internal::OrderedHashMap:

Public Member Functions

void SetEntry (InternalIndex entry, Tagged< Object > key, Tagged< Object > value)
 
Tagged< ObjectValueAt (InternalIndex entry)
 
- Public Member Functions inherited from v8::internal::OrderedHashTable< OrderedHashMap, 2 >
InternalIndex FindEntry (Isolate *isolate, Tagged< Object > key)
 
int NumberOfElements () const
 
int NumberOfDeletedElements () const
 
int UsedCapacity () const
 
int Capacity ()
 
int NumberOfBuckets () const
 
InternalIndex::Range IterateEntries ()
 
Tagged< ObjectKeyAt (InternalIndex entry)
 
bool ToKey (ReadOnlyRoots roots, InternalIndex entry, Tagged< Object > *out_key)
 
bool IsObsolete ()
 
Tagged< OrderedHashMapNextTable ()
 
int RemovedIndexAt (int index)
 
- Public Member Functions inherited from v8::internal::FixedArray
void MoveElements (Isolate *isolate, int dst_index, int src_index, int len, WriteBarrierMode mode)
 
void CopyElements (Isolate *isolate, int dst_index, Tagged< FixedArray > src, int src_index, int len, WriteBarrierMode mode)
 
V8_EXPORT_PRIVATE void RightTrim (Isolate *isolate, int new_capacity)
 
void FillWithHoles (int from, int to)
 
bool is_the_hole (Isolate *isolate, int index)
 
void set_the_hole (Isolate *isolate, int index)
 
void set_the_hole (ReadOnlyRoots ro_roots, int index)
 
template<template< typename > typename HandleType>
requires ( std::is_convertible_v<HandleType<FixedArray>, DirectHandle<FixedArray>>)
HandleType< FixedArraySetAndGrow (Isolate *isolate, HandleType< FixedArray > array, int index, DirectHandle< Object > value)
 
- Public Member Functions inherited from v8::internal::TaggedArrayBase< FixedArray, TaggedArrayShape >
Tagged< ElementTget (int index) const
 
Tagged< ElementTget (int index, RelaxedLoadTag) const
 
Tagged< ElementTget (int index, AcquireLoadTag) const
 
Tagged< ElementTget (int index, SeqCstAccessTag) const
 
void set (int index, Tagged< ElementT > value, WriteBarrierMode mode=kDefaultMode)
 
void set (int index, Tagged< Smi > value)
 
void set (int index, Tagged< ElementT > value, RelaxedStoreTag, WriteBarrierMode mode=kDefaultMode)
 
void set (int index, Tagged< Smi > value, RelaxedStoreTag)
 
void set (int index, Tagged< ElementT > value, ReleaseStoreTag, WriteBarrierMode mode=kDefaultMode)
 
void set (int index, Tagged< Smi > value, ReleaseStoreTag)
 
void set (int index, Tagged< ElementT > value, SeqCstAccessTag, WriteBarrierMode mode=kDefaultMode)
 
void set (int index, Tagged< Smi > value, SeqCstAccessTag)
 
Tagged< ElementTswap (int index, Tagged< ElementT > value, SeqCstAccessTag, WriteBarrierMode mode=kDefaultMode)
 
Tagged< ElementTcompare_and_swap (int index, Tagged< ElementT > expected, Tagged< ElementT > value, SeqCstAccessTag, WriteBarrierMode mode=kDefaultMode)
 
void RightTrim (Isolate *isolate, int new_capacity)
 
int AllocatedSize () const
 
SlotType RawFieldOfFirstElement () const
 
SlotType RawFieldOfElementAt (int index) const
 
Handle< DAllocate (IsolateT *isolate, int capacity, std::optional< DisallowGarbageCollection > *no_gc_out, AllocationType allocation)
 

Static Public Member Functions

static MaybeHandle< OrderedHashMapAdd (Isolate *isolate, Handle< OrderedHashMap > table, DirectHandle< Object > key, DirectHandle< Object > value)
 
template<typename IsolateT >
static MaybeHandle< OrderedHashMapAllocate (IsolateT *isolate, int capacity, AllocationType allocation=AllocationType::kYoung)
 
static MaybeHandle< OrderedHashMapAllocateEmpty (Isolate *isolate, AllocationType allocation=AllocationType::kReadOnly)
 
template<template< typename > typename HandleType>
requires (std::is_convertible_v<HandleType<OrderedHashMap>, DirectHandle<OrderedHashMap>>)
static HandleType< OrderedHashMap >::MaybeType Rehash (Isolate *isolate, HandleType< OrderedHashMap > table)
 
template<template< typename > typename HandleType>
requires (std::is_convertible_v<HandleType<OrderedHashMap>, DirectHandle<OrderedHashMap>>)
static HandleType< OrderedHashMap >::MaybeType Rehash (Isolate *isolate, HandleType< OrderedHashMap > table, int new_capacity)
 
static Address GetHash (Isolate *isolate, Address raw_key)
 
static Tagged< HeapObjectGetEmpty (ReadOnlyRoots ro_roots)
 
static Handle< MapGetMap (RootsTable &roots)
 
static bool Is (DirectHandle< HeapObject > table)
 
- Static Public Member Functions inherited from v8::internal::OrderedHashTable< OrderedHashMap, 2 >
static HandleType< OrderedHashMap >::MaybeType EnsureCapacityForAdding (Isolate *isolate, HandleType< OrderedHashMap > table)
 
static HandleType< OrderedHashMapShrink (Isolate *isolate, HandleType< OrderedHashMap > table)
 
static Handle< OrderedHashMapClear (Isolate *isolate, Handle< OrderedHashMap > table)
 
static bool HasKey (Isolate *isolate, Tagged< OrderedHashMap > table, Tagged< Object > key)
 
static bool IsKey (ReadOnlyRoots roots, Tagged< Object > k)
 
static bool Delete (Isolate *isolate, Tagged< OrderedHashMap > table, Tagged< Object > key)
 
static constexpr int PrefixIndex ()
 
static constexpr int NumberOfElementsIndex ()
 
static constexpr int NextTableIndex ()
 
static constexpr int NumberOfDeletedElementsIndex ()
 
static constexpr int NumberOfBucketsIndex ()
 
static constexpr int HashTableStartIndex ()
 
static constexpr int RemovedHolesIndex ()
 
static constexpr int NumberOfElementsOffset ()
 
static constexpr int NextTableOffset ()
 
static constexpr int NumberOfDeletedElementsOffset ()
 
static constexpr int NumberOfBucketsOffset ()
 
static constexpr int HashTableStartOffset ()
 
static constexpr int MaxCapacity ()
 
- Static Public Member Functions inherited from v8::internal::FixedArray
template<class IsolateT >
static Handle< FixedArrayNew (IsolateT *isolate, int capacity, AllocationType allocation=AllocationType::kYoung)
 
template<template< typename > typename HandleType>
requires ( std::is_convertible_v<HandleType<FixedArray>, DirectHandle<FixedArray>>)
static V8_EXPORT_PRIVATE HandleType< FixedArraySetAndGrow (Isolate *isolate, HandleType< FixedArray > array, int index, DirectHandle< Object > value)
 
template<template< typename > typename HandleType>
requires ( std::is_convertible_v<HandleType<FixedArray>, DirectHandle<FixedArray>>)
static HandleType< FixedArrayRightTrimOrEmpty (Isolate *isolate, HandleType< FixedArray > array, int new_length)
 
- Static Public Member Functions inherited from v8::internal::TaggedArrayBase< FixedArray, TaggedArrayShape >
static void MoveElements (Isolate *isolate, Tagged< FixedArray > dst, int dst_index, Tagged< FixedArray > src, int src_index, int len, WriteBarrierMode mode=kDefaultMode)
 
static void CopyElements (Isolate *isolate, Tagged< FixedArray > dst, int dst_index, Tagged< FixedArray > src, int src_index, int len, WriteBarrierMode mode=kDefaultMode)
 
static constexpr int SizeFor (int capacity)
 
static constexpr int OffsetOfElementAt (int index)
 

Static Public Attributes

static const int kValueOffset = 1
 
static const int kPrefixSize = 0
 
- Static Public Attributes inherited from v8::internal::OrderedHashTable< OrderedHashMap, 2 >
static const int kEntrySize
 
static const int kEntrySizeWithoutChain
 
static const int kChainOffset
 
static const int kNotFound
 
static const int kInitialCapacity
 
static const int kLoadFactor
 
static const int kClearedTableSentinel
 
- Static Public Attributes inherited from v8::internal::FixedArray
static constexpr int kMaxLength = FixedArray::kMaxCapacity
 
static constexpr int kMaxRegularLength = FixedArray::kMaxRegularCapacity
 
- Static Public Attributes inherited from v8::internal::TaggedArrayBase< FixedArray, TaggedArrayShape >
static constexpr bool kElementsAreMaybeObject
 
static constexpr int kElementSize
 
static constexpr int kMaxCapacity
 
static constexpr int kMaxRegularCapacity
 

Private Types

using Base = OrderedHashTable<OrderedHashMap, 2>
 

Additional Inherited Members

- Public Types inherited from v8::internal::TaggedArrayBase< FixedArray, TaggedArrayShape >
using Header
 
using Shape
 
- Protected Member Functions inherited from v8::internal::OrderedHashTable< OrderedHashMap, 2 >
int HashToEntryRaw (int hash)
 
int NextChainEntryRaw (int entry)
 
int EntryToIndexRaw (int entry)
 
int EntryToIndex (InternalIndex entry)
 
int HashToBucket (int hash)
 
void SetNumberOfBuckets (int num)
 
void SetNumberOfElements (int num)
 
void SetNumberOfDeletedElements (int num)
 
void SetNextTable (Tagged< OrderedHashMap > next_table)
 
void SetRemovedIndexAt (int index, int removed_index)
 
- Protected Member Functions inherited from v8::internal::TaggedArrayBase< FixedArray, TaggedArrayShape >
bool IsInBounds (int index) const
 
bool IsCowArray () const
 
 FLEXIBLE_ARRAY_MEMBER (ElementMemberT, objects)
 
- Static Protected Member Functions inherited from v8::internal::OrderedHashTable< OrderedHashMap, 2 >
static MaybeHandle< OrderedHashMapAllocate (Isolate *isolate, int capacity, AllocationType allocation=AllocationType::kYoung)
 
static MaybeHandle< OrderedHashMapAllocateEmpty (Isolate *isolate, AllocationType allocation, RootIndex root_ndex)
 
static HandleType< OrderedHashMap >::MaybeType Rehash (Isolate *isolate, HandleType< OrderedHashMap > table)
 
static HandleType< OrderedHashMap >::MaybeType Rehash (Isolate *isolate, HandleType< OrderedHashMap > table, int new_capacity)
 
- Static Protected Member Functions inherited from v8::internal::TaggedArrayBase< FixedArray, TaggedArrayShape >
static Handle< FixedArrayAllocate (IsolateT *isolate, int capacity, std::optional< DisallowGarbageCollection > *no_gc_out, AllocationType allocation=AllocationType::kYoung)
 
static constexpr int NewCapacityForIndex (int index, int old_capacity)
 

Detailed Description

Definition at line 321 of file ordered-hash-table.h.

Member Typedef Documentation

◆ Base

Member Function Documentation

◆ Add()

MaybeHandle< OrderedHashMap > v8::internal::OrderedHashMap::Add ( Isolate * isolate,
Handle< OrderedHashMap > table,
DirectHandle< Object > key,
DirectHandle< Object > value )
static

Definition at line 450 of file ordered-hash-table.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Allocate()

template<typename IsolateT >
template V8_EXPORT_PRIVATE MaybeHandle< OrderedHashMap > v8::internal::OrderedHashMap::Allocate ( IsolateT * isolate,
int capacity,
AllocationType allocation = AllocationType::kYoung )
static

Definition at line 610 of file ordered-hash-table.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AllocateEmpty()

MaybeHandle< OrderedHashMap > v8::internal::OrderedHashMap::AllocateEmpty ( Isolate * isolate,
AllocationType allocation = AllocationType::kReadOnly )
static

Definition at line 632 of file ordered-hash-table.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetEmpty()

Tagged< HeapObject > v8::internal::OrderedHashMap::GetEmpty ( ReadOnlyRoots ro_roots)
static

Definition at line 270 of file ordered-hash-table.cc.

◆ GetHash()

Address v8::internal::OrderedHashMap::GetHash ( Isolate * isolate,
Address raw_key )
static

Definition at line 439 of file ordered-hash-table.cc.

Here is the call graph for this function:

◆ GetMap()

Handle< Map > v8::internal::OrderedHashMap::GetMap ( RootsTable & roots)
inlinestatic

Definition at line 64 of file ordered-hash-table-inl.h.

◆ Is()

bool v8::internal::OrderedHashMap::Is ( DirectHandle< HeapObject > table)
inlinestatic

Definition at line 160 of file ordered-hash-table-inl.h.

◆ Rehash() [1/2]

template<template< typename > typename HandleType>
requires (std::is_convertible_v<HandleType<OrderedHashMap>, DirectHandle<OrderedHashMap>>)
HandleType< OrderedHashMap >::MaybeType v8::internal::OrderedHashMap::Rehash ( Isolate * isolate,
HandleType< OrderedHashMap > table )
static

Definition at line 368 of file ordered-hash-table.cc.

Here is the caller graph for this function:

◆ Rehash() [2/2]

template<template< typename > typename HandleType>
requires (std::is_convertible_v<HandleType<OrderedHashMap>, DirectHandle<OrderedHashMap>>)
HandleType< OrderedHashMap >::MaybeType v8::internal::OrderedHashMap::Rehash ( Isolate * isolate,
HandleType< OrderedHashMap > table,
int new_capacity )
static

Definition at line 375 of file ordered-hash-table.cc.

◆ SetEntry()

void v8::internal::OrderedHashMap::SetEntry ( InternalIndex entry,
Tagged< Object > key,
Tagged< Object > value )

Definition at line 493 of file ordered-hash-table.cc.

Here is the call graph for this function:

◆ ValueAt()

Tagged< Object > v8::internal::OrderedHashMap::ValueAt ( InternalIndex entry)
inline

Definition at line 84 of file ordered-hash-table-inl.h.

Here is the call graph for this function:

Member Data Documentation

◆ kPrefixSize

const int v8::internal::OrderedHashMap::kPrefixSize = 0
static

Definition at line 367 of file ordered-hash-table.h.

◆ kValueOffset

const int v8::internal::OrderedHashMap::kValueOffset = 1
static

Definition at line 366 of file ordered-hash-table.h.


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