![]() |
v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
|
#include <v8-primitive.h>
Static Public Member Functions | |
static Local< BigInt > | New (Isolate *isolate, int64_t value) |
static Local< BigInt > | NewFromUnsigned (Isolate *isolate, uint64_t value) |
static MaybeLocal< BigInt > | NewFromWords (Local< Context > context, int sign_bit, int word_count, const uint64_t *words) |
static V8_INLINE BigInt * | Cast (v8::Data *data) |
![]() | |
template<class T > | |
static V8_INLINE Value * | Cast (T *value) |
Private Member Functions | |
BigInt () | |
Static Private Member Functions | |
static void | CheckCast (v8::Data *that) |
A JavaScript BigInt value (https://tc39.github.io/proposal-bigint)
Definition at line 925 of file v8-primitive.h.
|
private |
Definition at line 970 of file v8-primitive.h.
|
staticprivate |
int64_t v8::BigInt::Int64Value | ( | bool * | lossless = nullptr | ) | const |
|
static |
void v8::BigInt::ToWordsArray | ( | int * | sign_bit, |
int * | word_count, | ||
uint64_t * | words ) const |
Writes the contents of this BigInt to a specified memory location. sign_bit
must be provided and will be set to 1 if this BigInt is negative. *word_count
has to be initialized to the length of the words
array. Upon return, it will be set to the actual number of words that would be needed to store this BigInt (i.e. the return value of WordCount()
).
Definition at line 9630 of file api.cc.
uint64_t v8::BigInt::Uint64Value | ( | bool * | lossless = nullptr | ) | const |
Returns the value of this BigInt as an unsigned 64-bit integer. If lossless
is provided, it will reflect whether the return value was truncated or wrapped around. In particular, it is set to false
if this BigInt is negative.
Definition at line 9618 of file api.cc.
int v8::BigInt::WordCount | ( | ) | const |
Returns the number of 64-bit words needed to store the result of ToWordsArray().
Definition at line 9626 of file api.cc.