v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::base::BitField< T, shift, size, U > Class Template Referencefinal

#include <bit-field.h>

Collaboration diagram for v8::base::BitField< T, shift, size, U >:

Public Types

using FieldType = T
 
using BaseType = U
 
template<class T2 , int size2>
using Next = BitField<T2, kShift + kSize, size2, U>
 

Static Public Member Functions

static constexpr bool is_valid (T value)
 
static constexpr U encode (T value)
 
static V8_NODISCARD constexpr U update (U previous, T value)
 
static constexpr T decode (U value)
 

Static Public Attributes

static constexpr int kShift = shift
 
static constexpr int kSize = size
 
static constexpr U kMask = ((U{1} << kShift) << kSize) - (U{1} << kShift)
 
static constexpr int kLastUsedBit = kShift + kSize - 1
 
static constexpr U kNumValues = U{1} << kSize
 
static constexpr U kMax = kNumValues - 1
 

Detailed Description

template<class T, int shift, int size, class U = uint32_t>
class v8::base::BitField< T, shift, size, U >

Definition at line 25 of file bit-field.h.

Member Typedef Documentation

◆ BaseType

template<class T , int shift, int size, class U = uint32_t>
using v8::base::BitField< T, shift, size, U >::BaseType = U

Definition at line 34 of file bit-field.h.

◆ FieldType

template<class T , int shift, int size, class U = uint32_t>
using v8::base::BitField< T, shift, size, U >::FieldType = T

Definition at line 33 of file bit-field.h.

◆ Next

template<class T , int shift, int size, class U = uint32_t>
template<class T2 , int size2>
using v8::base::BitField< T, shift, size, U >::Next = BitField<T2, kShift + kSize, size2, U>

Definition at line 47 of file bit-field.h.

Member Function Documentation

◆ decode()

template<class T , int shift, int size, class U = uint32_t>
static constexpr T v8::base::BitField< T, shift, size, U >::decode ( U value)
inlinestaticconstexpr

Definition at line 66 of file bit-field.h.

◆ encode()

template<class T , int shift, int size, class U = uint32_t>
static constexpr U v8::base::BitField< T, shift, size, U >::encode ( T value)
inlinestaticconstexpr

Definition at line 55 of file bit-field.h.

Here is the call graph for this function:

◆ is_valid()

template<class T , int shift, int size, class U = uint32_t>
static constexpr bool v8::base::BitField< T, shift, size, U >::is_valid ( T value)
inlinestaticconstexpr

Definition at line 50 of file bit-field.h.

Here is the caller graph for this function:

◆ update()

template<class T , int shift, int size, class U = uint32_t>
static V8_NODISCARD constexpr U v8::base::BitField< T, shift, size, U >::update ( U previous,
T value )
inlinestaticconstexpr

Definition at line 61 of file bit-field.h.

Here is the call graph for this function:

Member Data Documentation

◆ kLastUsedBit

template<class T , int shift, int size, class U = uint32_t>
int v8::base::BitField< T, shift, size, U >::kLastUsedBit = kShift + kSize - 1
staticconstexpr

Definition at line 42 of file bit-field.h.

◆ kMask

template<class T , int shift, int size, class U = uint32_t>
U v8::base::BitField< T, shift, size, U >::kMask = ((U{1} << kShift) << kSize) - (U{1} << kShift)
staticconstexpr

Definition at line 41 of file bit-field.h.

◆ kMax

template<class T , int shift, int size, class U = uint32_t>
U v8::base::BitField< T, shift, size, U >::kMax = kNumValues - 1
staticconstexpr

Definition at line 44 of file bit-field.h.

◆ kNumValues

template<class T , int shift, int size, class U = uint32_t>
U v8::base::BitField< T, shift, size, U >::kNumValues = U{1} << kSize
staticconstexpr

Definition at line 43 of file bit-field.h.

◆ kShift

template<class T , int shift, int size, class U = uint32_t>
int v8::base::BitField< T, shift, size, U >::kShift = shift
staticconstexpr

Definition at line 39 of file bit-field.h.

◆ kSize

template<class T , int shift, int size, class U = uint32_t>
int v8::base::BitField< T, shift, size, U >::kSize = size
staticconstexpr

Definition at line 40 of file bit-field.h.


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