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

#include <keys.h>

Collaboration diagram for v8::internal::KeyAccumulator:

Public Member Functions

 KeyAccumulator (Isolate *isolate, KeyCollectionMode mode, PropertyFilter filter)
 
 ~KeyAccumulator ()=default
 
 KeyAccumulator (const KeyAccumulator &)=delete
 
KeyAccumulatoroperator= (const KeyAccumulator &)=delete
 
Handle< FixedArrayGetKeys (GetKeysConversion convert=GetKeysConversion::kKeepNumbers)
 
Maybe< boolCollectKeys (DirectHandle< JSReceiver > receiver, DirectHandle< JSReceiver > object)
 
V8_WARN_UNUSED_RESULT ExceptionStatus AddKey (Tagged< Object > key, AddKeyConversion convert=DO_NOT_CONVERT)
 
V8_WARN_UNUSED_RESULT ExceptionStatus AddKey (DirectHandle< Object > key, AddKeyConversion convert=DO_NOT_CONVERT)
 
Isolateisolate ()
 
PropertyFilter filter ()
 
KeyCollectionMode mode ()
 
void set_skip_indices (bool value)
 
void AddShadowingKey (Tagged< Object > key, AllowGarbageCollection *allow_gc)
 
void AddShadowingKey (DirectHandle< Object > key)
 

Static Public Member Functions

static MaybeHandle< FixedArrayGetKeys (Isolate *isolate, DirectHandle< JSReceiver > object, KeyCollectionMode mode, PropertyFilter filter, GetKeysConversion keys_conversion=GetKeysConversion::kKeepNumbers, bool is_for_in=false, bool skip_indices=false)
 
static Handle< FixedArrayGetOwnEnumPropertyKeys (Isolate *isolate, DirectHandle< JSObject > object)
 

Private Types

enum  IndexedOrNamed { kIndexed , kNamed }
 

Private Member Functions

V8_WARN_UNUSED_RESULT ExceptionStatus CollectPrivateNames (DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object)
 
Maybe< boolCollectAccessCheckInterceptorKeys (DirectHandle< AccessCheckInfo > access_check_info, DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object)
 
Maybe< boolCollectInterceptorKeysInternal (DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object, DirectHandle< InterceptorInfo > interceptor, IndexedOrNamed type)
 
Maybe< boolCollectInterceptorKeys (DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object, IndexedOrNamed type)
 
Maybe< boolCollectOwnElementIndices (DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object)
 
Maybe< boolCollectOwnPropertyNames (DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object)
 
Maybe< boolCollectOwnKeys (DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object)
 
Maybe< boolCollectOwnJSProxyKeys (DirectHandle< JSReceiver > receiver, DirectHandle< JSProxy > proxy)
 
Maybe< boolCollectOwnJSProxyTargetKeys (DirectHandle< JSProxy > proxy, DirectHandle< JSReceiver > target)
 
V8_WARN_UNUSED_RESULT ExceptionStatus FilterForEnumerableProperties (DirectHandle< JSReceiver > receiver, DirectHandle< JSObject > object, DirectHandle< InterceptorInfo > interceptor, DirectHandle< JSObject > result, IndexedOrNamed type)
 
Maybe< boolAddKeysFromJSProxy (DirectHandle< JSProxy > proxy, DirectHandle< FixedArray > keys)
 
V8_WARN_UNUSED_RESULT ExceptionStatus AddKeys (DirectHandle< FixedArray > array, AddKeyConversion convert)
 
V8_WARN_UNUSED_RESULT ExceptionStatus AddKeys (DirectHandle< JSObject > array_like, AddKeyConversion convert)
 
bool IsShadowed (DirectHandle< Object > key)
 
bool HasShadowingKeys ()
 
Handle< OrderedHashSetkeys ()
 
void set_is_for_in (bool value)
 
void set_first_prototype_map (DirectHandle< Map > value)
 
void set_try_prototype_info_cache (bool value)
 
void set_receiver (DirectHandle< JSReceiver > object)
 
void set_last_non_empty_prototype (DirectHandle< JSReceiver > object)
 
void set_may_have_elements (bool value)
 

Private Attributes

Isolateisolate_
 
Handle< OrderedHashSetkeys_
 
DirectHandle< Mapfirst_prototype_map_
 
DirectHandle< JSReceiverreceiver_
 
DirectHandle< JSReceiverlast_non_empty_prototype_
 
Handle< ObjectHashSetshadowing_keys_
 
KeyCollectionMode mode_
 
PropertyFilter filter_
 
bool is_for_in_ = false
 
bool skip_indices_ = false
 
bool skip_shadow_check_ = true
 
bool may_have_elements_ = true
 
bool try_prototype_info_cache_ = false
 
friend FastKeyAccumulator
 

Detailed Description

Definition at line 50 of file keys.h.

Member Enumeration Documentation

◆ IndexedOrNamed

Enumerator
kIndexed 
kNamed 

Definition at line 97 of file keys.h.

Constructor & Destructor Documentation

◆ KeyAccumulator() [1/2]

v8::internal::KeyAccumulator::KeyAccumulator ( Isolate * isolate,
KeyCollectionMode mode,
PropertyFilter filter )
inline

Definition at line 52 of file keys.h.

◆ ~KeyAccumulator()

v8::internal::KeyAccumulator::~KeyAccumulator ( )
default

◆ KeyAccumulator() [2/2]

v8::internal::KeyAccumulator::KeyAccumulator ( const KeyAccumulator & )
delete

Member Function Documentation

◆ AddKey() [1/2]

ExceptionStatus v8::internal::KeyAccumulator::AddKey ( DirectHandle< Object > key,
AddKeyConversion convert = DO_NOT_CONVERT )

Definition at line 134 of file keys.cc.

Here is the call graph for this function:

◆ AddKey() [2/2]

ExceptionStatus v8::internal::KeyAccumulator::AddKey ( Tagged< Object > key,
AddKeyConversion convert = DO_NOT_CONVERT )

Definition at line 129 of file keys.cc.

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

◆ AddKeys() [1/2]

ExceptionStatus v8::internal::KeyAccumulator::AddKeys ( DirectHandle< FixedArray > array,
AddKeyConversion convert )
private

Definition at line 177 of file keys.cc.

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

◆ AddKeys() [2/2]

ExceptionStatus v8::internal::KeyAccumulator::AddKeys ( DirectHandle< JSObject > array_like,
AddKeyConversion convert )
private

Definition at line 187 of file keys.cc.

Here is the call graph for this function:

◆ AddKeysFromJSProxy()

Maybe< bool > v8::internal::KeyAccumulator::AddKeysFromJSProxy ( DirectHandle< JSProxy > proxy,
DirectHandle< FixedArray > keys )
private

Definition at line 233 of file keys.cc.

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

◆ AddShadowingKey() [1/2]

void v8::internal::KeyAccumulator::AddShadowingKey ( DirectHandle< Object > key)

Definition at line 314 of file keys.cc.

Here is the call graph for this function:

◆ AddShadowingKey() [2/2]

void v8::internal::KeyAccumulator::AddShadowingKey ( Tagged< Object > key,
AllowGarbageCollection * allow_gc )

Definition at line 308 of file keys.cc.

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

◆ CollectAccessCheckInterceptorKeys()

Maybe< bool > v8::internal::KeyAccumulator::CollectAccessCheckInterceptorKeys ( DirectHandle< AccessCheckInfo > access_check_info,
DirectHandle< JSReceiver > receiver,
DirectHandle< JSObject > object )
private

Definition at line 1113 of file keys.cc.

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

◆ CollectInterceptorKeys()

Maybe< bool > v8::internal::KeyAccumulator::CollectInterceptorKeys ( DirectHandle< JSReceiver > receiver,
DirectHandle< JSObject > object,
IndexedOrNamed type )
private

Definition at line 773 of file keys.cc.

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

◆ CollectInterceptorKeysInternal()

Maybe< bool > v8::internal::KeyAccumulator::CollectInterceptorKeysInternal ( DirectHandle< JSReceiver > receiver,
DirectHandle< JSObject > object,
DirectHandle< InterceptorInfo > interceptor,
IndexedOrNamed type )
private

Definition at line 736 of file keys.cc.

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

◆ CollectKeys()

Maybe< bool > v8::internal::KeyAccumulator::CollectKeys ( DirectHandle< JSReceiver > receiver,
DirectHandle< JSReceiver > object )

Definition at line 250 of file keys.cc.

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

◆ CollectOwnElementIndices()

Maybe< bool > v8::internal::KeyAccumulator::CollectOwnElementIndices ( DirectHandle< JSReceiver > receiver,
DirectHandle< JSObject > object )
private

Definition at line 788 of file keys.cc.

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

◆ CollectOwnJSProxyKeys()

Maybe< bool > v8::internal::KeyAccumulator::CollectOwnJSProxyKeys ( DirectHandle< JSReceiver > receiver,
DirectHandle< JSProxy > proxy )
private

Definition at line 1220 of file keys.cc.

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

◆ CollectOwnJSProxyTargetKeys()

Maybe< bool > v8::internal::KeyAccumulator::CollectOwnJSProxyTargetKeys ( DirectHandle< JSProxy > proxy,
DirectHandle< JSReceiver > target )
private

Definition at line 1392 of file keys.cc.

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

◆ CollectOwnKeys()

Maybe< bool > v8::internal::KeyAccumulator::CollectOwnKeys ( DirectHandle< JSReceiver > receiver,
DirectHandle< JSObject > object )
private

Definition at line 1138 of file keys.cc.

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

◆ CollectOwnPropertyNames()

Maybe< bool > v8::internal::KeyAccumulator::CollectOwnPropertyNames ( DirectHandle< JSReceiver > receiver,
DirectHandle< JSObject > object )
private

Definition at line 1011 of file keys.cc.

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

◆ CollectPrivateNames()

ExceptionStatus v8::internal::KeyAccumulator::CollectPrivateNames ( DirectHandle< JSReceiver > receiver,
DirectHandle< JSObject > object )
private

Definition at line 1089 of file keys.cc.

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

◆ filter()

PropertyFilter v8::internal::KeyAccumulator::filter ( )
inline

Definition at line 86 of file keys.h.

◆ FilterForEnumerableProperties()

V8_WARN_UNUSED_RESULT ExceptionStatus v8::internal::KeyAccumulator::FilterForEnumerableProperties ( DirectHandle< JSReceiver > receiver,
DirectHandle< JSObject > object,
DirectHandle< InterceptorInfo > interceptor,
DirectHandle< JSObject > result,
IndexedOrNamed type )
private

Definition at line 696 of file keys.cc.

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

◆ GetKeys() [1/2]

Handle< FixedArray > v8::internal::KeyAccumulator::GetKeys ( GetKeysConversion convert = GetKeysConversion::kKeepNumbers)

Definition at line 106 of file keys.cc.

Here is the call graph for this function:

◆ GetKeys() [2/2]

MaybeHandle< FixedArray > v8::internal::KeyAccumulator::GetKeys ( Isolate * isolate,
DirectHandle< JSReceiver > object,
KeyCollectionMode mode,
PropertyFilter filter,
GetKeysConversion keys_conversion = GetKeysConversion::kKeepNumbers,
bool is_for_in = false,
bool skip_indices = false )
static

Definition at line 97 of file keys.cc.

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

◆ GetOwnEnumPropertyKeys()

Handle< FixedArray > v8::internal::KeyAccumulator::GetOwnEnumPropertyKeys ( Isolate * isolate,
DirectHandle< JSObject > object )
static

Definition at line 1181 of file keys.cc.

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

◆ HasShadowingKeys()

bool v8::internal::KeyAccumulator::HasShadowingKeys ( )
private

Definition at line 301 of file keys.cc.

Here is the caller graph for this function:

◆ isolate()

Isolate * v8::internal::KeyAccumulator::isolate ( )
inline

Definition at line 84 of file keys.h.

Here is the caller graph for this function:

◆ IsShadowed()

bool v8::internal::KeyAccumulator::IsShadowed ( DirectHandle< Object > key)
private

Definition at line 303 of file keys.cc.

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

◆ keys()

Handle< OrderedHashSet > v8::internal::KeyAccumulator::keys ( )
private

Definition at line 125 of file keys.cc.

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

◆ mode()

KeyCollectionMode v8::internal::KeyAccumulator::mode ( )
inline

Definition at line 89 of file keys.h.

◆ operator=()

KeyAccumulator & v8::internal::KeyAccumulator::operator= ( const KeyAccumulator & )
delete

◆ set_first_prototype_map()

void v8::internal::KeyAccumulator::set_first_prototype_map ( DirectHandle< Map > value)
inlineprivate

Definition at line 143 of file keys.h.

Here is the caller graph for this function:

◆ set_is_for_in()

void v8::internal::KeyAccumulator::set_is_for_in ( bool value)
inlineprivate

Definition at line 142 of file keys.h.

Here is the caller graph for this function:

◆ set_last_non_empty_prototype()

void v8::internal::KeyAccumulator::set_last_non_empty_prototype ( DirectHandle< JSReceiver > object)
inlineprivate

Definition at line 153 of file keys.h.

Here is the caller graph for this function:

◆ set_may_have_elements()

void v8::internal::KeyAccumulator::set_may_have_elements ( bool value)
inlineprivate

Definition at line 156 of file keys.h.

Here is the caller graph for this function:

◆ set_receiver()

void v8::internal::KeyAccumulator::set_receiver ( DirectHandle< JSReceiver > object)
inlineprivate

Definition at line 149 of file keys.h.

Here is the caller graph for this function:

◆ set_skip_indices()

void v8::internal::KeyAccumulator::set_skip_indices ( bool value)
inline

Definition at line 90 of file keys.h.

Here is the caller graph for this function:

◆ set_try_prototype_info_cache()

void v8::internal::KeyAccumulator::set_try_prototype_info_cache ( bool value)
inlineprivate

Definition at line 146 of file keys.h.

Here is the caller graph for this function:

Member Data Documentation

◆ FastKeyAccumulator

friend v8::internal::KeyAccumulator::FastKeyAccumulator
private

Definition at line 174 of file keys.h.

◆ filter_

PropertyFilter v8::internal::KeyAccumulator::filter_
private

Definition at line 165 of file keys.h.

◆ first_prototype_map_

DirectHandle<Map> v8::internal::KeyAccumulator::first_prototype_map_
private

Definition at line 160 of file keys.h.

◆ is_for_in_

bool v8::internal::KeyAccumulator::is_for_in_ = false
private

Definition at line 166 of file keys.h.

◆ isolate_

Isolate* v8::internal::KeyAccumulator::isolate_
private

Definition at line 158 of file keys.h.

◆ keys_

Handle<OrderedHashSet> v8::internal::KeyAccumulator::keys_
private

Definition at line 159 of file keys.h.

◆ last_non_empty_prototype_

DirectHandle<JSReceiver> v8::internal::KeyAccumulator::last_non_empty_prototype_
private

Definition at line 162 of file keys.h.

◆ may_have_elements_

bool v8::internal::KeyAccumulator::may_have_elements_ = true
private

Definition at line 171 of file keys.h.

◆ mode_

KeyCollectionMode v8::internal::KeyAccumulator::mode_
private

Definition at line 164 of file keys.h.

◆ receiver_

DirectHandle<JSReceiver> v8::internal::KeyAccumulator::receiver_
private

Definition at line 161 of file keys.h.

◆ shadowing_keys_

Handle<ObjectHashSet> v8::internal::KeyAccumulator::shadowing_keys_
private

Definition at line 163 of file keys.h.

◆ skip_indices_

bool v8::internal::KeyAccumulator::skip_indices_ = false
private

Definition at line 167 of file keys.h.

◆ skip_shadow_check_

bool v8::internal::KeyAccumulator::skip_shadow_check_ = true
private

Definition at line 170 of file keys.h.

◆ try_prototype_info_cache_

bool v8::internal::KeyAccumulator::try_prototype_info_cache_ = false
private

Definition at line 172 of file keys.h.


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