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

#include <prototype.h>

Collaboration diagram for v8::internal::PrototypeIterator:

Public Types

enum  WhereToEnd { END_AT_NULL , END_AT_NON_HIDDEN }
 

Public Member Functions

 PrototypeIterator (Isolate *isolate, DirectHandle< JSReceiver > receiver, WhereToStart where_to_start=kStartAtPrototype, WhereToEnd where_to_end=END_AT_NULL)
 
 PrototypeIterator (Isolate *isolate, Tagged< JSReceiver > receiver, WhereToStart where_to_start=kStartAtPrototype, WhereToEnd where_to_end=END_AT_NULL)
 
 PrototypeIterator (Isolate *isolate, Tagged< Map > receiver_map, WhereToEnd where_to_end=END_AT_NULL)
 
 PrototypeIterator (Isolate *isolate, DirectHandle< Map > receiver_map, WhereToEnd where_to_end=END_AT_NULL)
 
 ~PrototypeIterator ()=default
 
 PrototypeIterator (const PrototypeIterator &)=delete
 
PrototypeIteratoroperator= (const PrototypeIterator &)=delete
 
bool HasAccess () const
 
template<typename T = JSPrototype>
Tagged< TGetCurrent () const
 
void Advance ()
 
void AdvanceIgnoringProxies ()
 
V8_WARN_UNUSED_RESULT bool AdvanceFollowingProxies ()
 
V8_WARN_UNUSED_RESULT bool AdvanceFollowingProxiesIgnoringAccessChecks ()
 
bool IsAtEnd () const
 
Isolateisolate () const
 

Static Public Member Functions

template<typename T = JSPrototype>
static DirectHandle< TGetCurrent (const PrototypeIterator &iterator)
 

Private Attributes

Isolateisolate_
 
Tagged< JSPrototypeobject_ = {}
 
IndirectHandle< JSPrototypehandle_
 
WhereToEnd where_to_end_
 
bool is_at_end_
 
int seen_proxies_
 

Detailed Description

A class to uniformly access the prototype of any Object and walk its prototype chain.

The PrototypeIterator can either start at the prototype (default), or include the receiver itself. If a PrototypeIterator is constructed for a Map, it will always start at the prototype.

The PrototypeIterator can either run to the null_value(), the first non-hidden prototype, or a given object.

Definition at line 26 of file prototype.h.

Member Enumeration Documentation

◆ WhereToEnd

Enumerator
END_AT_NULL 
END_AT_NON_HIDDEN 

Definition at line 28 of file prototype.h.

Constructor & Destructor Documentation

◆ PrototypeIterator() [1/5]

v8::internal::PrototypeIterator::PrototypeIterator ( Isolate * isolate,
DirectHandle< JSReceiver > receiver,
WhereToStart where_to_start = kStartAtPrototype,
WhereToEnd where_to_end = END_AT_NULL )
inline

Definition at line 18 of file prototype-inl.h.

Here is the call graph for this function:

◆ PrototypeIterator() [2/5]

v8::internal::PrototypeIterator::PrototypeIterator ( Isolate * isolate,
Tagged< JSReceiver > receiver,
WhereToStart where_to_start = kStartAtPrototype,
WhereToEnd where_to_end = END_AT_NULL )
inline

Definition at line 31 of file prototype-inl.h.

Here is the call graph for this function:

◆ PrototypeIterator() [3/5]

v8::internal::PrototypeIterator::PrototypeIterator ( Isolate * isolate,
Tagged< Map > receiver_map,
WhereToEnd where_to_end = END_AT_NULL )
inlineexplicit

Definition at line 43 of file prototype-inl.h.

Here is the call graph for this function:

◆ PrototypeIterator() [4/5]

v8::internal::PrototypeIterator::PrototypeIterator ( Isolate * isolate,
DirectHandle< Map > receiver_map,
WhereToEnd where_to_end = END_AT_NULL )
inlineexplicit

Definition at line 57 of file prototype-inl.h.

Here is the call graph for this function:

◆ ~PrototypeIterator()

v8::internal::PrototypeIterator::~PrototypeIterator ( )
default

◆ PrototypeIterator() [5/5]

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

Member Function Documentation

◆ Advance()

void v8::internal::PrototypeIterator::Advance ( )
inline

Definition at line 84 of file prototype-inl.h.

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

◆ AdvanceFollowingProxies()

V8_WARN_UNUSED_RESULT bool v8::internal::PrototypeIterator::AdvanceFollowingProxies ( )
inline

Definition at line 112 of file prototype-inl.h.

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

◆ AdvanceFollowingProxiesIgnoringAccessChecks()

V8_WARN_UNUSED_RESULT bool v8::internal::PrototypeIterator::AdvanceFollowingProxiesIgnoringAccessChecks ( )
inline

Definition at line 124 of file prototype-inl.h.

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

◆ AdvanceIgnoringProxies()

void v8::internal::PrototypeIterator::AdvanceIgnoringProxies ( )
inline

Definition at line 97 of file prototype-inl.h.

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

◆ GetCurrent() [1/2]

template<typename T = JSPrototype>
Tagged< T > v8::internal::PrototypeIterator::GetCurrent ( ) const
inline

Definition at line 52 of file prototype.h.

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

◆ GetCurrent() [2/2]

template<typename T = JSPrototype>
static DirectHandle< T > v8::internal::PrototypeIterator::GetCurrent ( const PrototypeIterator & iterator)
inlinestatic

Definition at line 58 of file prototype.h.

Here is the call graph for this function:

◆ HasAccess()

bool v8::internal::PrototypeIterator::HasAccess ( ) const
inline

Definition at line 73 of file prototype-inl.h.

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

◆ IsAtEnd()

bool v8::internal::PrototypeIterator::IsAtEnd ( ) const
inline

Definition at line 74 of file prototype.h.

Here is the caller graph for this function:

◆ isolate()

Isolate * v8::internal::PrototypeIterator::isolate ( ) const
inline

Definition at line 75 of file prototype.h.

◆ operator=()

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

Member Data Documentation

◆ handle_

IndirectHandle<JSPrototype> v8::internal::PrototypeIterator::handle_
private

Definition at line 83 of file prototype.h.

◆ is_at_end_

bool v8::internal::PrototypeIterator::is_at_end_
private

Definition at line 85 of file prototype.h.

◆ isolate_

Isolate* v8::internal::PrototypeIterator::isolate_
private

Definition at line 78 of file prototype.h.

◆ object_

Tagged<JSPrototype> v8::internal::PrototypeIterator::object_ = {}
private

Definition at line 79 of file prototype.h.

◆ seen_proxies_

int v8::internal::PrototypeIterator::seen_proxies_
private

Definition at line 86 of file prototype.h.

◆ where_to_end_

WhereToEnd v8::internal::PrototypeIterator::where_to_end_
private

Definition at line 84 of file prototype.h.


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