22 if (type == ObjectType::kHeapObjectReference)
return Smi::FromInt(0).
ptr();
26#define TYPE_CASE(Name) \
27 case ObjectType::k##Name: \
30#define TYPE_STRUCT_CASE(NAME, Name, name) \
31 case ObjectType::k##Name: \
44#undef TYPE_STRUCT_CASE
49 case ObjectType::kHeapObjectReference:
51 expected =
"HeapObjectReference";
53 case ObjectType::kObject:
55#define TYPE_CASE(Name) \
56 case ObjectType::k##Name: \
57 if (Is##Name(value)) return Smi::FromInt(0).ptr(); \
60#define TYPE_STRUCT_CASE(NAME, Name, name) \
61 case ObjectType::k##Name: \
62 if (Is##Name(value)) return Smi::FromInt(0).ptr(); \
73#undef TYPE_STRUCT_CASE
77 std::stringstream value_description;
78 Print(maybe_value, value_description);
80 "Type cast failed in %s\n"
81 " Expected %s but found %s",
82 location->ToAsciiArray(), expected, value_description.str().c_str());
static constexpr Tagged< Smi > FromInt(int value)
V8_INLINE constexpr StorageType ptr() const
#define HAS_WEAK_HEAP_OBJECT_TAG(value)
Address CheckObjectType(Address raw_value, Address raw_type, Address raw_location)
V8_INLINE constexpr bool IsSmi(TaggedImpl< kRefType, StorageType > obj)
void Print(Tagged< Object > obj)
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
#define HEAP_OBJECT_TYPE_LIST(V)
#define OBJECT_TYPE_LIST(V)