5#ifndef INCLUDE_V8_VALUE_H_
6#define INCLUDE_V8_VALUE_H_
429 return static_cast<Value*
>(value);
439 V8_INLINE bool QuickIsNullOrUndefined()
const;
441 bool FullIsUndefined()
const;
442 bool FullIsNull()
const;
443 bool FullIsString()
const;
445 static void CheckCast(
Data* that);
450#ifdef V8_ENABLE_CHECKS
453 return static_cast<Value*
>(value);
457#ifdef V8_ENABLE_CHECKS
458 return FullIsUndefined();
460 return QuickIsUndefined();
464bool Value::QuickIsUndefined()
const {
467 A obj = *
reinterpret_cast<const A*
>(
this);
468 if (!I::HasHeapObjectTag(obj))
return false;
469 if (I::GetInstanceType(obj) != I::kOddballType)
return false;
470 return (I::GetOddballKind(obj) == I::kUndefinedOddballKind);
474#ifdef V8_ENABLE_CHECKS
477 return QuickIsNull();
481bool Value::QuickIsNull()
const {
484 A obj = *
reinterpret_cast<const A*
>(
this);
485 if (!I::HasHeapObjectTag(obj))
return false;
486 if (I::GetInstanceType(obj) != I::kOddballType)
return false;
487 return (I::GetOddballKind(obj) == I::kNullOddballKind);
491#ifdef V8_ENABLE_CHECKS
492 return FullIsNull() || FullIsUndefined();
494 return QuickIsNullOrUndefined();
498bool Value::QuickIsNullOrUndefined()
const {
501 A obj = *
reinterpret_cast<const A*
>(
this);
502 if (!I::HasHeapObjectTag(obj))
return false;
503 if (I::GetInstanceType(obj) != I::kOddballType)
return false;
504 int kind = I::GetOddballKind(obj);
505 return kind == I::kNullOddballKind || kind == I::kUndefinedOddballKind;
509#ifdef V8_ENABLE_CHECKS
510 return FullIsString();
512 return QuickIsString();
516bool Value::QuickIsString()
const {
519 A obj = *
reinterpret_cast<const A*
>(
this);
520 if (!I::HasHeapObjectTag(obj))
return false;
521 return (I::GetInstanceType(obj) < I::kFirstNonstringType);
bool IsArgumentsObject() const
V8_WARN_UNUSED_RESULT MaybeLocal< Int32 > ToInt32(Local< Context > context) const
bool IsInt16Array() const
bool IsBigUint64Array() const
V8_WARN_UNUSED_RESULT Maybe< double > NumberValue(Local< Context > context) const
bool IsModuleNamespaceObject() const
V8_INLINE bool IsNullOrUndefined() const
bool IsTypedArray() const
bool IsSymbolObject() const
V8_WARN_UNUSED_RESULT MaybeLocal< BigInt > ToBigInt(Local< Context > context) const
bool IsArrayBuffer() const
bool IsWasmMemoryObject() const
bool IsSharedArrayBuffer() const
bool IsUint8Array() const
V8_WARN_UNUSED_RESULT MaybeLocal< Uint32 > ToUint32(Local< Context > context) const
bool IsWasmModuleObject() const
bool IsArrayBufferView() const
bool IsBooleanObject() const
bool IsInt32Array() const
bool IsBigIntObject() const
Local< String > TypeOf(Isolate *)
V8_WARN_UNUSED_RESULT MaybeLocal< String > ToDetailString(Local< Context > context) const
V8_INLINE bool IsString() const
V8_WARN_UNUSED_RESULT Maybe< bool > Equals(Local< Context > context, Local< Value > that) const
static V8_INLINE Value * Cast(T *value)
bool IsNativeError() const
bool BooleanValue(Isolate *isolate) const
V8_WARN_UNUSED_RESULT MaybeLocal< Number > ToNumber(Local< Context > context) const
bool IsSetIterator() const
bool IsUint8ClampedArray() const
bool IsStringObject() const
bool IsGeneratorFunction() const
V8_WARN_UNUSED_RESULT MaybeLocal< Object > ToObject(Local< Context > context) const
bool IsUint32Array() const
bool IsNumberObject() const
V8_WARN_UNUSED_RESULT MaybeLocal< Integer > ToInteger(Local< Context > context) const
V8_WARN_UNUSED_RESULT Maybe< int64_t > IntegerValue(Local< Context > context) const
bool IsFloat32Array() const
V8_INLINE bool IsNull() const
bool IsBigInt64Array() const
bool StrictEquals(Local< Value > that) const
V8_WARN_UNUSED_RESULT Maybe< uint32_t > Uint32Value(Local< Context > context) const
V8_WARN_UNUSED_RESULT MaybeLocal< String > ToString(Local< Context > context) const
V8_INLINE bool IsUndefined() const
bool IsMapIterator() const
bool IsGeneratorObject() const
Maybe< bool > InstanceOf(Local< Context > context, Local< Object > object)
bool IsFloat64Array() const
bool SameValue(Local< Value > that) const
V8_WARN_UNUSED_RESULT MaybeLocal< Uint32 > ToArrayIndex(Local< Context > context) const
bool IsUint16Array() const
bool IsAsyncFunction() const
V8_WARN_UNUSED_RESULT Maybe< int32_t > Int32Value(Local< Context > context) const
Local< Boolean > ToBoolean(Isolate *isolate) const
#define V8_WARN_UNUSED_RESULT