v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits > Class Template Reference

#include <pointer-with-payload.h>

Collaboration diagram for v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >:

Public Member Functions

 PointerWithPayload ()=default
 
 PointerWithPayload (PointerType *pointer)
 
 PointerWithPayload (PayloadType payload)
 
 PointerWithPayload (PointerType *pointer, PayloadType payload)
 
V8_INLINE PointerType * GetPointer () const
 
V8_INLINE PointerType * GetPointerWithKnownPayload (PayloadType payload) const
 
V8_INLINE PointerType * operator-> () const
 
V8_INLINE void Update (PointerType *new_pointer, PayloadType new_payload)
 
V8_INLINE void SetPointer (PointerType *newptr)
 
V8_INLINE PayloadType GetPayload () const
 
V8_INLINE void SetPayload (PayloadType new_payload)
 
uintptr_t raw () const
 

Private Attributes

uintptr_t pointer_with_payload_ = 0
 

Static Private Attributes

static constexpr int kAvailableBits
 
static constexpr uintptr_t kPayloadMask
 
static constexpr uintptr_t kPointerMask = ~kPayloadMask
 

Detailed Description

template<typename PointerType, typename PayloadType, int NumPayloadBits>
class v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >

Definition at line 40 of file pointer-with-payload.h.

Constructor & Destructor Documentation

◆ PointerWithPayload() [1/4]

template<typename PointerType , typename PayloadType , int NumPayloadBits>
v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::PointerWithPayload ( )
default

◆ PointerWithPayload() [2/4]

template<typename PointerType , typename PayloadType , int NumPayloadBits>
v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::PointerWithPayload ( PointerType * pointer)
inlineexplicit

Definition at line 44 of file pointer-with-payload.h.

Here is the call graph for this function:

◆ PointerWithPayload() [3/4]

template<typename PointerType , typename PayloadType , int NumPayloadBits>
v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::PointerWithPayload ( PayloadType payload)
inlineexplicit

Definition at line 50 of file pointer-with-payload.h.

Here is the call graph for this function:

◆ PointerWithPayload() [4/4]

template<typename PointerType , typename PayloadType , int NumPayloadBits>
v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::PointerWithPayload ( PointerType * pointer,
PayloadType payload )
inline

Definition at line 56 of file pointer-with-payload.h.

Here is the call graph for this function:

Member Function Documentation

◆ GetPayload()

template<typename PointerType , typename PayloadType , int NumPayloadBits>
V8_INLINE PayloadType v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::GetPayload ( ) const
inline

Definition at line 87 of file pointer-with-payload.h.

Here is the caller graph for this function:

◆ GetPointer()

template<typename PointerType , typename PayloadType , int NumPayloadBits>
V8_INLINE PointerType * v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::GetPointer ( ) const
inline

Definition at line 60 of file pointer-with-payload.h.

Here is the caller graph for this function:

◆ GetPointerWithKnownPayload()

template<typename PointerType , typename PayloadType , int NumPayloadBits>
V8_INLINE PointerType * v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::GetPointerWithKnownPayload ( PayloadType payload) const
inline

Definition at line 65 of file pointer-with-payload.h.

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

◆ operator->()

template<typename PointerType , typename PayloadType , int NumPayloadBits>
V8_INLINE PointerType * v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::operator-> ( ) const
inline

Definition at line 71 of file pointer-with-payload.h.

Here is the call graph for this function:

◆ raw()

template<typename PointerType , typename PayloadType , int NumPayloadBits>
uintptr_t v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::raw ( ) const
inline

Definition at line 99 of file pointer-with-payload.h.

Here is the caller graph for this function:

◆ SetPayload()

template<typename PointerType , typename PayloadType , int NumPayloadBits>
V8_INLINE void v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::SetPayload ( PayloadType new_payload)
inline

Definition at line 91 of file pointer-with-payload.h.

Here is the call graph for this function:

◆ SetPointer()

template<typename PointerType , typename PayloadType , int NumPayloadBits>
V8_INLINE void v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::SetPointer ( PointerType * newptr)
inline

Definition at line 80 of file pointer-with-payload.h.

Here is the call graph for this function:

◆ Update()

template<typename PointerType , typename PayloadType , int NumPayloadBits>
V8_INLINE void v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::Update ( PointerType * new_pointer,
PayloadType new_payload )
inline

Definition at line 73 of file pointer-with-payload.h.

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

Member Data Documentation

◆ kAvailableBits

template<typename PointerType , typename PayloadType , int NumPayloadBits>
int v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::kAvailableBits
staticconstexprprivate
Initial value:
= PointerWithPayloadTraits<
typename std::remove_const<PointerType>::type>::kAvailableBits

Definition at line 102 of file pointer-with-payload.h.

◆ kPayloadMask

template<typename PointerType , typename PayloadType , int NumPayloadBits>
uintptr_t v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::kPayloadMask
staticconstexprprivate
Initial value:
=
(uintptr_t{1} << NumPayloadBits) - 1

Definition at line 110 of file pointer-with-payload.h.

◆ kPointerMask

template<typename PointerType , typename PayloadType , int NumPayloadBits>
uintptr_t v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::kPointerMask = ~kPayloadMask
staticconstexprprivate

Definition at line 112 of file pointer-with-payload.h.

◆ pointer_with_payload_

template<typename PointerType , typename PayloadType , int NumPayloadBits>
uintptr_t v8::base::PointerWithPayload< PointerType, PayloadType, NumPayloadBits >::pointer_with_payload_ = 0
private

Definition at line 114 of file pointer-with-payload.h.


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