5#ifndef INCLUDE_V8_VALUE_H_
6#define INCLUDE_V8_VALUE_H_
98 bool IsSymbol()
const;
105 bool IsFunction()
const;
111 bool IsArray()
const;
116 bool IsObject()
const;
123 bool IsBigInt()
const;
130 bool IsBoolean()
const;
137 bool IsNumber()
const;
142 bool IsExternal()
const;
147 bool IsInt32()
const;
152 bool IsUint32()
const;
192 bool IsNativeError()
const;
197 bool IsRegExp()
const;
202 bool IsAsyncFunction()
const;
207 bool IsGeneratorFunction()
const;
212 bool IsGeneratorObject()
const;
217 bool IsPromise()
const;
232 bool IsMapIterator()
const;
237 bool IsSetIterator()
const;
257 bool IsArrayBuffer()
const;
262 bool IsArrayBufferView()
const;
267 bool IsTypedArray()
const;
307 bool IsFloat16Array()
const;
332 bool IsDataView()
const;
337 bool IsSharedArrayBuffer()
const;
342 bool IsProxy()
const;
347 bool IsWasmMemoryObject()
const;
352 bool IsWasmMemoryMapDescriptor()
const;
357 bool IsWasmModuleObject()
const;
362 bool IsWasmNull()
const;
367 bool IsModuleNamespaceObject()
const;
372 bool IsPrimitive()
const;
447 bool BooleanValue(
Isolate* isolate)
const;
486 V8_INLINE bool QuickIsNullOrUndefined()
const;
487#if V8_STATIC_ROOTS_BOOL
492 bool FullIsUndefined()
const;
493 bool FullIsNull()
const;
494 bool FullIsTrue()
const;
495 bool FullIsFalse()
const;
496 bool FullIsString()
const;
498 static void CheckCast(
Data* that);
538#ifdef V8_ENABLE_CHECKS
545#ifdef V8_ENABLE_CHECKS
556#if V8_STATIC_ROOTS_BOOL
557 return I::is_identical(obj, I::StaticReadOnlyRoot::kUndefinedValue);
559 if (!I::HasHeapObjectTag(obj))
return false;
560 if (I::GetInstanceType(obj) != I::kOddballType)
return false;
561 return (I::GetOddballKind(obj) == I::kUndefinedOddballKind);
566#ifdef V8_ENABLE_CHECKS
577#if V8_STATIC_ROOTS_BOOL
578 return I::is_identical(obj, I::StaticReadOnlyRoot::kNullValue);
580 if (!I::HasHeapObjectTag(obj))
return false;
581 if (I::GetInstanceType(obj) != I::kOddballType)
return false;
582 return (I::GetOddballKind(obj) == I::kNullOddballKind);
587#ifdef V8_ENABLE_CHECKS
595#if V8_STATIC_ROOTS_BOOL
601 if (!I::HasHeapObjectTag(obj))
return false;
602 if (I::GetInstanceType(obj) != I::kOddballType)
return false;
603 int kind = I::GetOddballKind(obj);
604 return kind == I::kNullOddballKind ||
kind == I::kUndefinedOddballKind;
609#if V8_STATIC_ROOTS_BOOL && !defined(V8_ENABLE_CHECKS)
610 return QuickIsTrue();
616#if V8_STATIC_ROOTS_BOOL
617bool Value::QuickIsTrue()
const {
621 return I::is_identical(obj, I::StaticReadOnlyRoot::kTrueValue);
626#if V8_STATIC_ROOTS_BOOL && !defined(V8_ENABLE_CHECKS)
627 return QuickIsFalse();
633#if V8_STATIC_ROOTS_BOOL
634bool Value::QuickIsFalse()
const {
638 return I::is_identical(obj, I::StaticReadOnlyRoot::kFalseValue);
643#ifdef V8_ENABLE_CHECKS
654 if (!I::HasHeapObjectTag(obj))
return false;
655#if V8_STATIC_ROOTS_BOOL && !V8_MAP_PACKING
656 return I::CheckInstanceMapRange(obj,
657 I::StaticReadOnlyRoot::kStringMapLowerBound,
658 I::StaticReadOnlyRoot::kStringMapUpperBound);
660 return (I::GetInstanceType(obj) < I::kFirstNonstringType);
669 return obj_map == cached;
Local< Data > cached_map_
V8_INLINE bool Matches(Local< Value > candidate) const
bool IsSymbolObject() const
bool IsBigInt64Array() const
bool IsStringObject() const
bool IsBigIntObject() const
bool FullIsUndefined() const
V8_INLINE bool IsNullOrUndefined() const
V8_INLINE bool IsTrue() const
bool IsNumberObject() const
bool IsBooleanObject() const
bool IsUint32Array() const
V8_INLINE bool QuickIsUndefined() const
bool IsUint8ClampedArray() const
V8_INLINE bool IsString() const
V8_INLINE bool IsNull() const
bool IsFloat64Array() const
V8_INLINE bool IsFalse() const
bool IsBigUint64Array() const
bool IsInt16Array() const
V8_INLINE bool QuickIsString() const
bool FullIsString() const
static V8_INLINE Value * Cast(T *value)
bool IsFloat32Array() const
V8_INLINE bool QuickIsNull() const
V8_INLINE bool IsUndefined() const
static void CheckCast(Data *that)
bool IsArgumentsObject() const
bool IsUint8Array() const
V8_INLINE bool QuickIsNullOrUndefined() const
bool IsUint16Array() const
bool IsInt32Array() const
static V8_INLINE Address LoadMap(Address obj)
static V8_INLINE Address ValueAsAddress(const T *value)
constexpr const char * ToString(DataViewOp op)
UnionOf< BigInt, NonBigIntPrimitive > Primitive
Union< Smi, HeapNumber > Number
Union< Smi, HeapNumber, BigInt > Numeric
v8_inspector::String16 String
#define I(name, number_of_args, result_size)
#define V8_WARN_UNUSED_RESULT
std::unique_ptr< ValueMirror > value