v8 14.1.146 (node 25.0.0)
V8 is Google's open source JavaScript engine
Loading...
Searching...
No Matches
SmiTagging< 8 > Struct Reference

#include <v8-internal.h>

Public Types

enum  { kSmiShiftSize = 31 , kSmiValueSize = 32 }
 

Static Public Member Functions

static V8_INLINE constexpr int SmiToInt (Address value)
 
template<class T , typename std::enable_if_t< std::is_integral_v< T > &&std::is_signed_v< T > > * = nullptr>
static V8_INLINE constexpr bool IsValidSmi (T value)
 
template<class T , typename std::enable_if_t< std::is_integral_v< T > &&std::is_unsigned_v< T > > * = nullptr>
static V8_INLINE constexpr bool IsValidSmi (T value)
 

Static Public Attributes

static constexpr intptr_t kSmiMinValue
 
static constexpr intptr_t kSmiMaxValue = -(kSmiMinValue + 1)
 

Detailed Description

Definition at line 149 of file v8-internal.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kSmiShiftSize 
kSmiValueSize 

Definition at line 150 of file v8-internal.h.

Member Function Documentation

◆ IsValidSmi() [1/2]

template<class T , typename std::enable_if_t< std::is_integral_v< T > &&std::is_signed_v< T > > * = nullptr>
static V8_INLINE constexpr bool IsValidSmi ( value)
inlinestaticconstexpr

Definition at line 164 of file v8-internal.h.

◆ IsValidSmi() [2/2]

template<class T , typename std::enable_if_t< std::is_integral_v< T > &&std::is_unsigned_v< T > > * = nullptr>
static V8_INLINE constexpr bool IsValidSmi ( value)
inlinestaticconstexpr

Definition at line 173 of file v8-internal.h.

◆ SmiToInt()

static V8_INLINE constexpr int SmiToInt ( Address  value)
inlinestaticconstexpr

Definition at line 156 of file v8-internal.h.

References SmiTagging< 8 >::kSmiShiftSize, and v8::internal::kSmiTagSize.

Referenced by Internals::SmiValue().

Field Documentation

◆ kSmiMaxValue

constexpr intptr_t kSmiMaxValue = -(kSmiMinValue + 1)
staticconstexpr

Definition at line 154 of file v8-internal.h.

◆ kSmiMinValue

constexpr intptr_t kSmiMinValue
staticconstexpr
Initial value:
=
static_cast<intptr_t>(kUintptrAllBitsSet << (kSmiValueSize - 1))
constexpr uintptr_t kUintptrAllBitsSet
Definition v8-internal.h:94

Definition at line 152 of file v8-internal.h.


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