![]() |
v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
|
#include <v8-value.h>
Static Public Member Functions | |
template<class T > | |
static V8_INLINE Value * | Cast (T *value) |
Private Member Functions | |
V8_INLINE bool | QuickIsUndefined () const |
V8_INLINE bool | QuickIsNull () const |
V8_INLINE bool | QuickIsNullOrUndefined () const |
V8_INLINE bool | QuickIsString () const |
bool | FullIsUndefined () const |
bool | FullIsNull () const |
bool | FullIsTrue () const |
bool | FullIsFalse () const |
bool | FullIsString () const |
Static Private Member Functions | |
static void | CheckCast (Data *that) |
The superclass of all JavaScript values and objects.
Definition at line 32 of file v8-value.h.
bool v8::Value::BooleanValue | ( | Isolate * | isolate | ) | const |
Returns the equivalent of ToBoolean()->Value()
.
Definition at line 3738 of file api.cc.
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
uint32_t v8::Value::GetHash | ( | ) |
Get the hash of this value. The hash is not guaranteed to be unique. For |Object| and |Name| instances the result is equal to |GetIdentityHash|. Hashes are not guaranteed to be stable across different isolates or processes.
Definition at line 4282 of file api.cc.
Returns the equivalent of ToInteger()->Value()
.
Definition at line 4169 of file api.cc.
bool v8::Value::IsArgumentsObject | ( | ) | const |
Returns true if this value is an Arguments object.
bool v8::Value::IsArray | ( | ) | const |
bool v8::Value::IsArrayBuffer | ( | ) | const |
Returns true if this value is an ArrayBuffer.
Definition at line 3529 of file api.cc.
bool v8::Value::IsArrayBufferView | ( | ) | const |
Returns true if this value is an ArrayBufferView.
Definition at line 3535 of file api.cc.
bool v8::Value::IsAsyncFunction | ( | ) | const |
bool v8::Value::IsBigInt | ( | ) | const |
bool v8::Value::IsBigInt64Array | ( | ) | const |
Returns true if this value is a BigInt64Array.
bool v8::Value::IsBigIntObject | ( | ) | const |
Returns true if this value is a BigInt object.
bool v8::Value::IsBigUint64Array | ( | ) | const |
Returns true if this value is a BigUint64Array.
bool v8::Value::IsBoolean | ( | ) | const |
bool v8::Value::IsBooleanObject | ( | ) | const |
Returns true if this value is a Boolean object.
bool v8::Value::IsDataView | ( | ) | const |
bool v8::Value::IsDate | ( | ) | const |
Returns true if this value is a Date.
bool v8::Value::IsExternal | ( | ) | const |
bool v8::Value::IsFalse | ( | ) | const |
Returns true if this value is false.
This is not the same as !BooleanValue()
. The latter performs a conversion to boolean, i.e. the result of !Boolean(value)
in JS, whereas this checks value === false
.
Definition at line 625 of file v8-value.h.
bool v8::Value::IsFloat16Array | ( | ) | const |
Returns true if this value is a Float16Array.
Definition at line 3553 of file api.cc.
bool v8::Value::IsFloat32Array | ( | ) | const |
Returns true if this value is a Float32Array.
bool v8::Value::IsFloat64Array | ( | ) | const |
Returns true if this value is a Float64Array.
bool v8::Value::IsFunction | ( | ) | const |
bool v8::Value::IsGeneratorFunction | ( | ) | const |
bool v8::Value::IsGeneratorObject | ( | ) | const |
bool v8::Value::IsInt16Array | ( | ) | const |
Returns true if this value is an Int16Array.
bool v8::Value::IsInt32 | ( | ) | const |
bool v8::Value::IsInt32Array | ( | ) | const |
Returns true if this value is an Int32Array.
bool v8::Value::IsInt8Array | ( | ) | const |
Returns true if this value is an Int8Array.
bool v8::Value::IsMap | ( | ) | const |
bool v8::Value::IsMapIterator | ( | ) | const |
bool v8::Value::IsModuleNamespaceObject | ( | ) | const |
bool v8::Value::IsName | ( | ) | const |
bool v8::Value::IsNativeError | ( | ) | const |
bool v8::Value::IsNull | ( | ) | const |
Returns true if this value is the null value. See ECMA-262 4.3.11.
This is equivalent to value === null
in JS.
Definition at line 565 of file v8-value.h.
bool v8::Value::IsNullOrUndefined | ( | ) | const |
Returns true if this value is either the null or the undefined value. See ECMA-262 4.3.11. and 4.3.12
This is equivalent to value == null
in JS.
Definition at line 586 of file v8-value.h.
bool v8::Value::IsNumber | ( | ) | const |
bool v8::Value::IsNumberObject | ( | ) | const |
Returns true if this value is a Number object.
bool v8::Value::IsObject | ( | ) | const |
bool v8::Value::IsPrimitive | ( | ) | const |
bool v8::Value::IsPromise | ( | ) | const |
bool v8::Value::IsProxy | ( | ) | const |
bool v8::Value::IsRegExp | ( | ) | const |
bool v8::Value::IsSet | ( | ) | const |
bool v8::Value::IsSetIterator | ( | ) | const |
bool v8::Value::IsSharedArrayBuffer | ( | ) | const |
Returns true if this value is a SharedArrayBuffer.
Definition at line 3566 of file api.cc.
bool v8::Value::IsString | ( | ) | const |
Returns true if this value is an instance of the String type. See ECMA-262 8.4.
This is equivalent to ‘typeof value === 'string’` in JS.
Definition at line 642 of file v8-value.h.
bool v8::Value::IsStringObject | ( | ) | const |
Returns true if this value is a String object.
bool v8::Value::IsSymbol | ( | ) | const |
bool v8::Value::IsSymbolObject | ( | ) | const |
Returns true if this value is a Symbol object.
bool v8::Value::IsTrue | ( | ) | const |
Returns true if this value is true.
This is not the same as BooleanValue()
. The latter performs a conversion to boolean, i.e. the result of Boolean(value)
in JS, whereas this checks value === true
.
Definition at line 608 of file v8-value.h.
bool v8::Value::IsTypedArray | ( | ) | const |
bool v8::Value::IsUint16Array | ( | ) | const |
Returns true if this value is an Uint16Array.
bool v8::Value::IsUint32 | ( | ) | const |
bool v8::Value::IsUint32Array | ( | ) | const |
Returns true if this value is an Uint32Array.
bool v8::Value::IsUint8Array | ( | ) | const |
Returns true if this value is an Uint8Array.
bool v8::Value::IsUint8ClampedArray | ( | ) | const |
Returns true if this value is an Uint8ClampedArray.
bool v8::Value::IsUndefined | ( | ) | const |
Returns true if this value is the undefined value. See ECMA-262 4.3.10.
This is equivalent to value === undefined
in JS.
Definition at line 544 of file v8-value.h.
bool v8::Value::IsWasmMemoryMapDescriptor | ( | ) | const |
Returns true if this value is a WasmMemoryMapDescriptor.
bool v8::Value::IsWasmMemoryObject | ( | ) | const |
Returns true if this value is a WasmMemoryObject.
bool v8::Value::IsWasmModuleObject | ( | ) | const |
Returns true if this value is a WasmModuleObject.
bool v8::Value::IsWasmNull | ( | ) | const |
bool v8::Value::IsWeakMap | ( | ) | const |
Returns true if this value is a WeakMap.
bool v8::Value::IsWeakRef | ( | ) | const |
Returns true if this value is a WeakRef.
bool v8::Value::IsWeakSet | ( | ) | const |
Returns true if this value is a WeakSet.
Returns the equivalent of ToNumber()->Value()
.
Definition at line 4156 of file api.cc.
|
private |
Definition at line 573 of file v8-value.h.
|
private |
Definition at line 594 of file v8-value.h.
|
private |
Definition at line 650 of file v8-value.h.
|
private |
Definition at line 552 of file v8-value.h.
MaybeLocal< Uint32 > v8::Value::ToArrayIndex | ( | Local< Context > | context | ) | const |
MaybeLocal< BigInt > v8::Value::ToBigInt | ( | Local< Context > | context | ) | const |
MaybeLocal< String > v8::Value::ToDetailString | ( | Local< Context > | context | ) | const |
MaybeLocal< Int32 > v8::Value::ToInt32 | ( | Local< Context > | context | ) | const |
Perform the equivalent of Number(value)
in JS and convert the result to a signed 32-bit integer by performing the steps in https://tc39.es/ecma262/#sec-toint32.
Definition at line 3794 of file api.cc.
MaybeLocal< Integer > v8::Value::ToInteger | ( | Local< Context > | context | ) | const |
Perform the equivalent of Number(value)
in JS and convert the result to an integer. Negative values are rounded up, positive values are rounded down. NaN is converted to 0. Infinite values yield undefined results.
Definition at line 3783 of file api.cc.
MaybeLocal< Number > v8::Value::ToNumber | ( | Local< Context > | context | ) | const |
MaybeLocal< Numeric > v8::Value::ToNumeric | ( | Local< Context > | context | ) | const |
Perform ToNumeric(value)
as specified in: https://tc39.es/ecma262/#sec-tonumeric.
Definition at line 3754 of file api.cc.
MaybeLocal< Object > v8::Value::ToObject | ( | Local< Context > | context | ) | const |
MaybeLocal< Primitive > v8::Value::ToPrimitive | ( | Local< Context > | context | ) | const |
Perform ToPrimitive(value)
as specified in: https://tc39.es/ecma262/#sec-toprimitive.
Definition at line 3743 of file api.cc.
MaybeLocal< String > v8::Value::ToString | ( | Local< Context > | context | ) | const |
MaybeLocal< Uint32 > v8::Value::ToUint32 | ( | Local< Context > | context | ) | const |
Perform the equivalent of Number(value)
in JS and convert the result to an unsigned 32-bit integer by performing the steps in https://tc39.es/ecma262/#sec-touint32.
Definition at line 3804 of file api.cc.
Local< String > v8::Value::TypeOf | ( | v8::Isolate * | external_isolate | ) |
Returns the equivalent of ToUint32()->Value()
.
Definition at line 4195 of file api.cc.