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

#include <bigint.h>

Inheritance diagram for v8::internal::BigIntBase:
Collaboration diagram for v8::internal::BigIntBase:

Public Types

using SignBits = base::BitField<bool, 0, 1>
 
using LengthBits = SignBits::Next<uint32_t, kLengthFieldBits>
 

Public Member Functions

uint32_t length () const
 
uint32_t length (AcquireLoadTag) const
 
bigint::Digits digits () const
 
- Public Member Functions inherited from v8::internal::HeapObjectLayout
 HeapObjectLayout ()=delete
 
Tagged< Mapmap () const
 
Tagged< Mapmap (AcquireLoadTag) const
 
MapWord map_word (RelaxedLoadTag) const
 
void set_map (Isolate *isolate, Tagged< Map > value)
 
template<typename IsolateT >
void set_map (IsolateT *isolate, Tagged< Map > value, ReleaseStoreTag)
 
template<typename IsolateT >
void set_map_safe_transition (IsolateT *isolate, Tagged< Map > value, ReleaseStoreTag)
 
void set_map_safe_transition_no_write_barrier (Isolate *isolate, Tagged< Map > value, RelaxedStoreTag=kRelaxedStore)
 
template<typename IsolateT >
void set_map_after_allocation (IsolateT *isolate, Tagged< Map > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
void set_map_no_write_barrier (Isolate *isolate, Tagged< Map > value, RelaxedStoreTag=kRelaxedStore)
 
void set_map_word_forwarded (Tagged< HeapObject > target_object, ReleaseStoreTag)
 
void set_map_word_forwarded (Tagged< HeapObject > target_object, RelaxedStoreTag)
 
Address ptr () const
 
Address address () const
 
ReadOnlyRoots EarlyGetReadOnlyRoots () const
 
int Size () const
 
V8_EXPORT_PRIVATE int SizeFromMap (Tagged< Map > map) const
 
WriteBarrierMode GetWriteBarrierMode (const DisallowGarbageCollection &promise)
 

Static Public Attributes

static const uint32_t kMaxLengthBits = 1 << 30
 
static const uint32_t kMaxLength
 
static const uint32_t kLengthFieldBits = 30
 

Private Types

using digit_t = uintptr_t
 

Private Member Functions

bool sign () const
 
digit_t digit (uint32_t n) const
 
bool is_zero () const
 
 FLEXIBLE_ARRAY_MEMBER (UnalignedValueMember< digit_t >, raw_digits)
 

Private Attributes

std::atomic_uint32_t bitfield_
 

Static Private Attributes

static const uint32_t kDigitSize = sizeof(digit_t)
 
static const uint32_t kDigitBits = kDigitSize * kBitsPerByte
 
static const uint32_t kHalfDigitBits = kDigitBits / 2
 
static const digit_t kHalfDigitMask = (1ull << kHalfDigitBits) - 1
 

Friends

class ::v8::internal::BigInt
 
class MutableBigInt
 
class FreshlyAllocatedBigInt
 
struct OffsetsForDebug
 
class CodeStubAssembler
 
class maglev::MaglevAssembler
 
class compiler::AccessBuilder
 

Detailed Description

Definition at line 88 of file bigint.h.

Member Typedef Documentation

◆ digit_t

using v8::internal::BigIntBase::digit_t = uintptr_t
private

Definition at line 130 of file bigint.h.

◆ LengthBits

Definition at line 114 of file bigint.h.

◆ SignBits

Definition at line 113 of file bigint.h.

Member Function Documentation

◆ digit()

digit_t v8::internal::BigIntBase::digit ( uint32_t n) const
inlineprivate

Definition at line 145 of file bigint.h.

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

◆ digits()

bigint::Digits v8::internal::BigIntBase::digits ( ) const

Definition at line 146 of file bigint.cc.

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

◆ FLEXIBLE_ARRAY_MEMBER()

v8::internal::BigIntBase::FLEXIBLE_ARRAY_MEMBER ( UnalignedValueMember< digit_t > ,
raw_digits  )
private

◆ is_zero()

bool v8::internal::BigIntBase::is_zero ( ) const
inlineprivate

Definition at line 150 of file bigint.h.

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

◆ length() [1/2]

uint32_t v8::internal::BigIntBase::length ( ) const
inline

Definition at line 90 of file bigint.h.

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

◆ length() [2/2]

uint32_t v8::internal::BigIntBase::length ( AcquireLoadTag ) const
inline

Definition at line 95 of file bigint.h.

Here is the call graph for this function:

◆ sign()

bool v8::internal::BigIntBase::sign ( ) const
inlineprivate

Definition at line 141 of file bigint.h.

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

Friends And Related Symbol Documentation

◆ ::v8::internal::BigInt

friend class ::v8::internal::BigInt
friend

Definition at line 121 of file bigint.h.

◆ CodeStubAssembler

friend class CodeStubAssembler
friend

Definition at line 126 of file bigint.h.

◆ compiler::AccessBuilder

friend class compiler::AccessBuilder
friend

Definition at line 128 of file bigint.h.

◆ FreshlyAllocatedBigInt

friend class FreshlyAllocatedBigInt
friend

Definition at line 123 of file bigint.h.

◆ maglev::MaglevAssembler

friend class maglev::MaglevAssembler
friend

Definition at line 127 of file bigint.h.

◆ MutableBigInt

friend class MutableBigInt
friend

Definition at line 122 of file bigint.h.

◆ OffsetsForDebug

friend struct OffsetsForDebug
friend

Definition at line 125 of file bigint.h.

Member Data Documentation

◆ bitfield_

std::atomic_uint32_t v8::internal::BigIntBase::bitfield_
private

Definition at line 152 of file bigint.h.

◆ kDigitBits

const uint32_t v8::internal::BigIntBase::kDigitBits = kDigitSize * kBitsPerByte
staticprivate

Definition at line 136 of file bigint.h.

◆ kDigitSize

const uint32_t v8::internal::BigIntBase::kDigitSize = sizeof(digit_t)
staticprivate

Definition at line 132 of file bigint.h.

◆ kHalfDigitBits

const uint32_t v8::internal::BigIntBase::kHalfDigitBits = kDigitBits / 2
staticprivate

Definition at line 137 of file bigint.h.

◆ kHalfDigitMask

const digit_t v8::internal::BigIntBase::kHalfDigitMask = (1ull << kHalfDigitBits) - 1
staticprivate

Definition at line 138 of file bigint.h.

◆ kLengthFieldBits

const uint32_t v8::internal::BigIntBase::kLengthFieldBits = 30
static

Definition at line 111 of file bigint.h.

◆ kMaxLength

const uint32_t v8::internal::BigIntBase::kMaxLength
static
Initial value:
=
static const uint32_t kMaxLengthBits
Definition bigint.h:105
constexpr int kBitsPerByte
Definition globals.h:682
constexpr int kSystemPointerSize
Definition globals.h:410

Definition at line 106 of file bigint.h.

◆ kMaxLengthBits

const uint32_t v8::internal::BigIntBase::kMaxLengthBits = 1 << 30
static

Definition at line 105 of file bigint.h.


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