16#ifdef V8_EXTERNAL_CODE_SPACE
24#if defined(V8_EXTERNAL_CODE_SPACE) || defined(V8_ENABLE_SANDBOX)
37#ifdef V8_ENABLE_SANDBOX
45template <HeapObjectReferenceType kRefType,
typename StorageType>
51 TaggedImpl<HeapObjectReferenceType::STRONG, Address> ptr, FILE* out);
53 TaggedImpl<HeapObjectReferenceType::WEAK, Address> ptr, FILE* out);
55template <HeapObjectReferenceType kRefType,
typename StorageType>
58 std::ostringstream os;
60 accumulator->
Add(os.str().c_str());
63 TaggedImpl<HeapObjectReferenceType::STRONG, Address> ptr,
64 StringStream* accumulator);
66 TaggedImpl<HeapObjectReferenceType::WEAK, Address> ptr,
67 StringStream* accumulator);
69template <HeapObjectReferenceType kRefType,
typename StorageType>
74 TaggedImpl<HeapObjectReferenceType::STRONG, Address> ptr, std::ostream& os);
76 TaggedImpl<HeapObjectReferenceType::WEAK, Address> ptr, std::ostream& os);
79template <HeapObjectReferenceType kRefType,
typename StorageType>
80void Print(TaggedImpl<kRefType, StorageType> ptr) {
86 TaggedImpl<HeapObjectReferenceType::STRONG, Address> ptr);
88 TaggedImpl<HeapObjectReferenceType::WEAK, Address> ptr);
90template <HeapObjectReferenceType kRefType,
typename StorageType>
91void Print(TaggedImpl<kRefType, StorageType> ptr, std::ostream& os) {
94 if (ptr.ToSmi(&smi)) {
95 os <<
"Smi: " << std::hex <<
"0x" << smi.value();
96 os << std::dec <<
" (" << smi.value() <<
")\n";
97 }
else if (ptr.IsCleared()) {
99 }
else if (ptr.GetHeapObjectIfWeak(&heap_object)) {
101 heap_object->HeapObjectPrint(os);
102 }
else if (ptr.GetHeapObjectIfStrong(&heap_object)) {
103 heap_object->HeapObjectPrint(os);
109 TaggedImpl<HeapObjectReferenceType::STRONG, Address> ptr, std::ostream& os);
111 TaggedImpl<HeapObjectReferenceType::WEAK, Address> ptr, std::ostream& os);
115template class TaggedImpl<HeapObjectReferenceType::STRONG, Address>;
116template class TaggedImpl<HeapObjectReferenceType::WEAK, Address>;
static V8_INLINE bool InTrustedSpace(Tagged< HeapObject > object)
static V8_INLINE bool InCodeSpace(Tagged< HeapObject > object)
void Add(const char *format)
#define HAS_STRONG_HEAP_OBJECT_TAG(value)
#define EXPORT_TEMPLATE_DEFINE(export)
kInterpreterTrampolineOffset Tagged< HeapObject >
void Print(Tagged< Object > obj)
Handle< To > UncheckedCast(Handle< From > value)
void ShortPrint(Tagged< Object > obj, FILE *out)
#define CHECK_EQ(lhs, rhs)
#define V8_EXPORT_PRIVATE