37#include "third_party/fp16/src/include/fp16.h"
39#if V8_ENABLE_WEBASSEMBLY
50constexpr char kUnavailableString[] =
"unavailable";
57 DbgStdoutStream dbg_os;
68 os <<
"Smi: " << std::hex <<
"0x" <<
Smi::ToInt(obj);
69 os << std::dec <<
" (" <<
Smi::ToInt(obj) <<
")\n";
77#define AS_PTR(x) reinterpret_cast<void*>(x)
78#define AS_OBJ(x) Brief(Tagged<Object>(x))
81 Address length, std::ostream& os) {
82 using FCA = FunctionCallbackArguments;
84 static_assert(FCA::kArgsLength == 6);
85 os <<
"FunctionCallbackInfo: "
86 <<
"\n - isolate: " << AS_PTR(implicit_args[FCA::kIsolateIndex])
87 <<
"\n - return_value: " << AS_OBJ(implicit_args[FCA::kReturnValueIndex])
88 <<
"\n - target: " << AS_OBJ(implicit_args[FCA::kTargetIndex])
89 <<
"\n - new_target: " << AS_OBJ(implicit_args[FCA::kNewTargetIndex])
91 <<
"\n - argc: " << length
92 <<
"\n - receiver: " << AS_OBJ(js_args[0]);
94 constexpr int kMaxArgs = 4;
95 for (
int i = 0; i < std::min(static_cast<int>(length), kMaxArgs);
i++) {
96 os <<
"\n - arg[" <<
i <<
"]: " << AS_OBJ(js_args[
i]);
102 using PCA = internal::PropertyCallbackArguments;
104 static_assert(PCA::kArgsLength == 8);
105 os <<
"PropertyCallbackInfo: "
106 <<
"\n - isolate: " << AS_PTR(
args[PCA::kIsolateIndex])
107 <<
"\n - return_value: " << AS_OBJ(
args[PCA::kReturnValueIndex])
108 <<
"\n - should_throw: " << AS_OBJ(
args[PCA::kShouldThrowOnErrorIndex])
109 <<
"\n - holder: " << AS_OBJ(
args[PCA::kHolderIndex])
110 <<
"\n - holderV2: " << AS_OBJ(
args[PCA::kHolderV2Index])
111 <<
"\n - data: " << AS_OBJ(
args[PCA::kDataIndex])
112 <<
"\n - property_key: " << AS_OBJ(
args[PCA::kPropertyKeyIndex])
113 <<
"\n - receiver: " << AS_OBJ(
args[PCA::kThisIndex]);
117 os <<
"\n - value?: " << AS_PTR(
args[PCA::kArgsLength]);
128 FCI& info = *
reinterpret_cast<FCI*
>(function_callback_info);
134 DbgStdoutStream dbg_os;
136 dbg_os << std::flush;
145 PCI& info = *
reinterpret_cast<PCI*
>(property_callback_info);
148 DbgStdoutStream dbg_os;
150 dbg_os << std::flush;
160 std::ostream& os,
const char*
id) {
162 os << reinterpret_cast<void*>(
object.ptr()) <<
": [";
166 os <<
object->map(cage_base)->instance_type();
170 os <<
" in ReadOnlySpace";
175void PrintDictionaryContents(std::ostream& os, Tagged<T> dict) {
179 if (dict->Capacity() == 0) {
183#ifdef V8_ENABLE_SWISS_NAME_DICTIONARY
186 HandleScope scope(isolate);
188 for (InternalIndex
i : dict->IterateEntries()) {
190 if (!dict->ToKey(roots,
i, &k))
continue;
197 os <<
": " << Brief(dict->ValueAt(
i)) <<
" ";
198 dict->DetailsAt(
i).PrintAsSlowTo(os, !T::kIsOrderedDictionaryType);
203void HeapObjectLayout::PrintHeader(std::ostream& os,
const char*
id) {
207void HeapObject::PrintHeader(std::ostream& os,
const char*
id) {
208 PrintHeapObjectHeaderWithoutMap(*
this, os,
id);
211 os <<
"\n - map: " << Brief(
map(cage_base));
215void HeapObject::HeapObjectPrint(std::ostream& os) {
229 if (InstanceTypeChecker::IsTrustedObject(instance_type) &&
231 os <<
"<Invalid TrustedObject (outside trusted space)>\n";
235 switch (instance_type) {
236 case AWAIT_CONTEXT_TYPE:
237 case BLOCK_CONTEXT_TYPE:
238 case CATCH_CONTEXT_TYPE:
239 case DEBUG_EVALUATE_CONTEXT_TYPE:
240 case EVAL_CONTEXT_TYPE:
241 case FUNCTION_CONTEXT_TYPE:
242 case MODULE_CONTEXT_TYPE:
243 case SCRIPT_CONTEXT_TYPE:
244 case WITH_CONTEXT_TYPE:
247 case NATIVE_CONTEXT_TYPE:
250 case HASH_TABLE_TYPE:
253 case NAME_TO_INDEX_HASH_TABLE_TYPE:
256 case REGISTERED_SYMBOL_TABLE_TYPE:
259 case ORDERED_HASH_MAP_TYPE:
262 case ORDERED_HASH_SET_TYPE:
265 case ORDERED_NAME_DICTIONARY_TYPE:
268 case NAME_DICTIONARY_TYPE:
271 case GLOBAL_DICTIONARY_TYPE:
274 case SIMPLE_NUMBER_DICTIONARY_TYPE:
277 case NUMBER_DICTIONARY_TYPE:
280 case EPHEMERON_HASH_TABLE_TYPE:
283 case TRANSITION_ARRAY_TYPE:
289 case JS_API_OBJECT_TYPE:
290 case JS_ARRAY_ITERATOR_PROTOTYPE_TYPE:
291 case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
293 case JS_ITERATOR_PROTOTYPE_TYPE:
294 case JS_MAP_ITERATOR_PROTOTYPE_TYPE:
295 case JS_OBJECT_PROTOTYPE_TYPE:
296 case JS_PROMISE_PROTOTYPE_TYPE:
297 case JS_REG_EXP_PROTOTYPE_TYPE:
298 case JS_SET_ITERATOR_PROTOTYPE_TYPE:
299 case JS_SET_PROTOTYPE_TYPE:
300 case JS_SPECIAL_API_OBJECT_TYPE:
301 case JS_STRING_ITERATOR_PROTOTYPE_TYPE:
302 case JS_TYPED_ARRAY_PROTOTYPE_TYPE:
305#if V8_ENABLE_WEBASSEMBLY
306 case WASM_TRUSTED_INSTANCE_DATA_TYPE:
309 case WASM_DISPATCH_TABLE_TYPE:
312 case WASM_VALUE_OBJECT_TYPE:
315 case WASM_EXCEPTION_PACKAGE_TYPE:
319 case INSTRUCTION_STREAM_TYPE:
325 case CODE_WRAPPER_TYPE:
328 case JS_SET_KEY_VALUE_ITERATOR_TYPE:
329 case JS_SET_VALUE_ITERATOR_TYPE:
332 case JS_MAP_KEY_ITERATOR_TYPE:
333 case JS_MAP_KEY_VALUE_ITERATOR_TYPE:
334 case JS_MAP_VALUE_ITERATOR_TYPE:
337#define MAKE_TORQUE_CASE(Name, TYPE) \
339 Cast<Name>(*this)->Name##Print(os); \
345#undef MAKE_TORQUE_CASE
350 case CLASS_POSITIONS_TYPE:
353 case ACCESSOR_PAIR_TYPE:
356 case ALLOCATION_SITE_TYPE:
359 case LOAD_HANDLER_TYPE:
362 case STORE_HANDLER_TYPE:
365 case FEEDBACK_METADATA_TYPE:
368 case BIG_INT_BASE_TYPE:
371 case JS_CLASS_CONSTRUCTOR_TYPE:
372 case JS_PROMISE_CONSTRUCTOR_TYPE:
373 case JS_REG_EXP_CONSTRUCTOR_TYPE:
374 case JS_ARRAY_CONSTRUCTOR_TYPE:
375#define TYPED_ARRAY_CONSTRUCTORS_SWITCH(Type, type, TYPE, Ctype) \
376 case TYPE##_TYPED_ARRAY_CONSTRUCTOR_TYPE:
378#undef TYPED_ARRAY_CONSTRUCTORS_SWITCH
405 case JS_LAST_DUMMY_API_OBJECT_TYPE:
407 os <<
"UNKNOWN TYPE " <<
map()->instance_type();
413void PrintByteArrayElements(std::ostream& os,
const T* array) {
414 int length = array->length();
417 os <<
" 0x" << std::setfill(
'0') << std::setw(4) << std::hex <<
i <<
":";
418 int line_end = std::min(
i + 16, length);
419 for (;
i < line_end; ++
i) {
420 os <<
" " << std::setfill(
'0') << std::setw(2) << std::hex
421 <<
static_cast<int>(array->get(
i));
427void ByteArray::ByteArrayPrint(std::ostream& os) {
428 PrintHeader(os,
"ByteArray");
429 os <<
"\n - length: " <<
length()
430 <<
"\n - begin: " <<
static_cast<void*
>(
begin()) <<
"\n";
431 PrintByteArrayElements(os,
this);
434void TrustedByteArray::TrustedByteArrayPrint(std::ostream& os) {
435 PrintHeader(os,
"TrustedByteArray");
436 os <<
"\n - length: " <<
length()
437 <<
"\n - begin: " <<
static_cast<void*
>(
begin()) <<
"\n";
438 PrintByteArrayElements(os,
this);
441void BytecodeArray::BytecodeArrayPrint(std::ostream& os) {
442 PrintHeader(os,
"BytecodeArray");
447void BytecodeWrapper::BytecodeWrapperPrint(std::ostream& os) {
448 PrintHeader(os,
"BytecodeWrapper");
450 os <<
"\n bytecode: " << Brief(
bytecode(isolate));
453void FreeSpace::FreeSpacePrint(std::ostream& os) {
454 os <<
"free space, size " <<
Size() <<
"\n";
457bool JSObject::PrintProperties(std::ostream& os) {
458 if (HasFastProperties()) {
460 int nof_inobject_properties =
map()->GetInObjectProperties();
461 for (InternalIndex
i :
map()->IterateOwnDescriptors()) {
463 descs->GetKey(
i)->NamePrint(os);
465 PropertyDetails details = descs->GetDetails(
i);
466 switch (details.location()) {
473 os << Brief(descs->GetStrongValue(
i));
481 int field_index = details.field_index();
482 if (field_index < nof_inobject_properties) {
483 os <<
", location: in-object";
485 field_index -= nof_inobject_properties;
486 os <<
", location: properties[" << field_index <<
"]";
489 os <<
", location: descriptor";
492 return map()->NumberOfOwnDescriptors() > 0;
493 }
else if (IsJSGlobalObject(*
this)) {
494 PrintDictionaryContents(
497 PrintDictionaryContents(os, property_dictionary_swiss());
499 PrintDictionaryContents(os, property_dictionary());
507bool IsTheHoleAt(Tagged<T> array,
int index) {
513 return array->is_the_hole(index);
516#ifdef V8_ENABLE_EXPERIMENTAL_UNDEFINED_DOUBLE
518bool IsUndefinedAt(Tagged<T> array,
int index) {
524 return array->is_undefined(index);
529double GetScalarElement(Tagged<T> array,
int index) {
530 if (IsTheHoleAt(array, index)) {
531 return std::numeric_limits<double>::quiet_NaN();
533 return array->get_scalar(index);
537void DoPrintElements(std::ostream& os,
Tagged<Object> object,
int length) {
538 const bool print_the_hole = std::is_same_v<T, FixedDoubleArray>;
539 Tagged<T> array =
Cast<T>(
object);
540 if (length == 0)
return;
541 int previous_index = 0;
542 uint64_t previous_representation = array->get_representation(0);
543 uint64_t representation = 0;
547 representation = array->get_representation(
i);
548 if (previous_representation == representation)
continue;
551 std::stringstream ss;
552 ss << previous_index;
553 if (previous_index !=
i - 1) {
554 ss <<
'-' << (
i - 1);
556 os << std::setw(12) << ss.str() <<
": ";
557 if (print_the_hole && IsTheHoleAt(array,
i - 1)) {
559#ifdef V8_ENABLE_EXPERIMENTAL_UNDEFINED_DOUBLE
560 }
else if (IsUndefinedAt(array,
i - 1)) {
564 os << GetScalarElement(array,
i - 1);
567 previous_representation = representation;
573 explicit Fp16Printer(
float f) : val(fp16_ieee_from_fp32_value(f)) {}
574 operator float()
const {
return fp16_ieee_to_fp32_value(val); }
577template <
typename ElementType>
578void PrintTypedArrayElements(std::ostream& os,
const ElementType* data_ptr,
579 size_t length,
bool is_on_heap) {
580 if (length == 0)
return;
581 size_t previous_index = 0;
582 if (
i::v8_flags.mock_arraybuffer_allocator && !is_on_heap) {
584 os <<
"\n 0-" << length <<
": <mocked array buffer bytes>";
588 ElementType previous_value = data_ptr[0];
589 ElementType value{0};
591 if (
i < length) value = data_ptr[
i];
592 if (
i != length && previous_value == value) {
596 std::stringstream ss;
597 ss << previous_index;
598 if (previous_index !=
i - 1) {
599 ss <<
'-' << (
i - 1);
601 os << std::setw(12) << ss.str() <<
": " << +previous_value;
603 previous_value =
value;
608void PrintFixedArrayElements(std::ostream& os, Tagged<T> array,
int capacity,
611 if (capacity == 0)
return;
614 int previous_index = 0;
616 for (
i = 1;
i <= capacity;
i++) {
617 if (
i < capacity) value = get(array,
i);
618 if (previous_value == value &&
i != capacity) {
622 std::stringstream ss;
623 ss << previous_index;
624 if (previous_index !=
i - 1) {
625 ss <<
'-' << (
i - 1);
627 os << std::setw(12) << ss.str() <<
": " << Brief(previous_value);
629 previous_value =
value;
634void PrintFixedArrayElements(std::ostream& os, Tagged<T> array) {
635 PrintFixedArrayElements<T>(
636 os, array, array->length(),
637 [](Tagged<T> xs,
int i) { return Cast<Object>(xs->get(i)); });
640void PrintDictionaryElements(std::ostream& os,
644 if (dict->requires_slow_elements()) {
645 os <<
"\n - requires_slow_elements";
647 os <<
"\n - max_number_key: " << dict->max_number_key();
649 PrintDictionaryContents(os, dict);
655 os <<
"\n 0: context: " << Brief(elements->context())
656 <<
"\n 1: arguments_store: " << Brief(arguments_store)
657 <<
"\n parameter to context slot map:";
658 for (
int i = 0;
i < elements->
length();
i++) {
660 os <<
"\n " <<
i <<
": param(" <<
i <<
"): " << Brief(mapped_entry);
661 if (IsTheHole(mapped_entry)) {
662 os <<
" in the arguments_store[" <<
i <<
"]";
664 os <<
" in the context";
667 if (arguments_store->length() == 0)
return;
669 <<
"\n - arguments_store: " << Brief(arguments_store) <<
" "
672 PrintFixedArrayElements(os, arguments_store);
675 PrintDictionaryElements(os, arguments_store);
679void PrintEmbedderData(IsolateForSandbox isolate, std::ostream& os,
680 EmbedderDataSlot slot) {
685 if (slot.ToAlignedPointer(isolate, &raw_pointer)) {
686 os <<
", aligned pointer: " << raw_pointer;
692void JSObject::PrintElements(std::ostream& os) {
695 os <<
" - elements: " << Brief(
elements()) <<
" {";
696 switch (
map()->elements_kind()) {
718#define PRINT_ELEMENTS(Type, type, TYPE, elementType) \
719 case TYPE##_ELEMENTS: { \
720 size_t length = Cast<JSTypedArray>(*this)->GetLength(); \
721 bool is_on_heap = Cast<JSTypedArray>(*this)->is_on_heap(); \
722 const elementType* data_ptr = \
723 static_cast<const elementType*>(Cast<JSTypedArray>(*this)->DataPtr()); \
724 PrintTypedArrayElements<elementType>(os, data_ptr, length, is_on_heap); \
733 PrintDictionaryElements(os,
elements());
737 PrintSloppyArgumentElements(os,
map()->elements_kind(),
753 Isolate* isolate = obj->GetIsolate();
754 obj->PrintHeader(os,
id);
758 if (obj->HasFastProperties()) {
759 os <<
"FastProperties";
761 os <<
"DictionaryProperties";
763 PrototypeIterator iter(isolate, obj);
764 os <<
"]\n - prototype: " << Brief(iter.GetCurrent());
765 os <<
"\n - elements: " << Brief(obj->elements()) <<
" ["
767 if (obj->elements()->IsCowArray()) os <<
" (COW)";
771 os <<
"\n - hash: " << Brief(hash);
773 if (obj->GetEmbedderFieldCount() > 0) {
774 os <<
"\n - embedder fields: " << obj->GetEmbedderFieldCount();
778void JSAPIObjectWithEmbedderSlotsPrintHeader(std::ostream& os,
780 const char*
id =
nullptr) {
781 JSObjectPrintHeader(os, obj,
id);
782 os <<
"\n - cpp_heap_wrappable: "
783 << obj->ReadField<uint32_t>(
784 JSAPIObjectWithEmbedderSlots::kCppHeapWrappableOffset);
788 bool print_elements =
true) {
789 os <<
"\n - properties: ";
791 if (!
IsSmi(properties_or_hash)) {
792 os << Brief(properties_or_hash);
794 os <<
"\n - All own properties (excluding elements): {";
795 if (obj->PrintProperties(os)) os <<
"\n ";
798 if (print_elements) {
800 : obj->elements()->length();
801 if (length > 0) obj->PrintElements(os);
803 int embedder_fields = obj->GetEmbedderFieldCount();
804 if (embedder_fields > 0) {
806 os <<
" - embedder fields = {";
807 for (
int i = 0;
i < embedder_fields;
i++) {
809 PrintEmbedderData(isolate, os, EmbedderDataSlot(obj,
i));
817void JSObject::JSObjectPrint(std::ostream& os) {
818 JSObjectPrintHeader(os, *
this,
nullptr);
819 JSObjectPrintBody(os, *
this);
822void JSExternalObject::JSExternalObjectPrint(std::ostream& os) {
823 JSObjectPrintHeader(os, *
this,
nullptr);
824 os <<
"\n - external value: " <<
value();
825 JSObjectPrintBody(os, *
this);
828void JSGeneratorObject::JSGeneratorObjectPrint(std::ostream& os) {
829 JSObjectPrintHeader(os, *
this,
"JSGeneratorObject");
830 os <<
"\n - function: " << Brief(function());
831 os <<
"\n - context: " << Brief(
context());
832 os <<
"\n - receiver: " << Brief(
receiver());
834 os <<
"\n - input: " << Brief(input_or_debug_pos());
837 os <<
"\n - debug pos: " << Brief(input_or_debug_pos());
839 const char* mode =
"(invalid)";
840 switch (resume_mode()) {
851 os <<
"\n - resume mode: " <<
mode;
859 if (fun_info->HasSourceCode()) {
865 os <<
"\n - source position: ";
868 Isolate* isolate = GetIsolate();
869 if (fun_info->HasBytecodeArray() &&
870 fun_info->GetBytecodeArray(isolate)->HasSourcePositionTable()) {
873 script_name->PrintUC16(os);
874 Script::PositionInfo
info;
876 os <<
", line " << info.line + 1;
877 os <<
", column " << info.column + 1;
879 os << kUnavailableString;
884 os <<
"\n - register file: " << Brief(parameters_and_registers());
885 JSObjectPrintBody(os, *
this);
888void JSArray::JSArrayPrint(std::ostream& os) {
889 JSObjectPrintHeader(os, *
this,
"JSArray");
890 os <<
"\n - length: " << Brief(this->
length());
891 JSObjectPrintBody(os, *
this);
894void JSPromise::JSPromisePrint(std::ostream& os) {
895 JSObjectPrintHeader(os, *
this,
"JSPromise");
898 os <<
"\n - reactions: " << Brief(
reactions());
900 os <<
"\n - result: " << Brief(
result());
902 os <<
"\n - has_handler: " << has_handler();
903 os <<
"\n - is_silent: " << is_silent();
904 JSObjectPrintBody(os, *
this);
907void JSRegExp::JSRegExpPrint(std::ostream& os) {
908 JSObjectPrintHeader(os, *
this,
"JSRegExp");
910 os <<
"\n - data: " << Brief(
data(isolate));
911 os <<
"\n - source: " << Brief(
source());
914 JSObjectPrintBody(os, *
this);
917void RegExpData::RegExpDataPrint(std::ostream& os) {
920 PrintHeader(os,
"AtomRegExpData");
923 PrintHeader(os,
"IrRegExpData");
926 PrintHeader(os,
"IrRegExpData");
931 os <<
"\n - source: " <<
source();
936void AtomRegExpData::AtomRegExpDataPrint(std::ostream& os) {
938 os <<
"\n - pattern: " <<
pattern();
942void IrRegExpData::IrRegExpDataPrint(std::ostream& os) {
945 if (has_latin1_bytecode()) {
946 os <<
"\n - latin1_bytecode: " << Brief(latin1_bytecode());
948 if (has_uc16_bytecode()) {
951 if (has_latin1_code()) {
952 os <<
"\n - latin1_code: " << Brief(latin1_code(isolate));
954 if (has_uc16_code()) {
955 os <<
"\n - uc16_code: " << Brief(uc16_code(isolate));
958 os <<
"\n - max_register_count: " << max_register_count();
959 os <<
"\n - capture_count: " << max_register_count();
960 os <<
"\n - ticks_until_tier_up: " << max_register_count();
961 os <<
"\n - backtrack_limit: " << max_register_count();
965void RegExpDataWrapper::RegExpDataWrapperPrint(std::ostream& os) {
966 PrintHeader(os,
"RegExpDataWrapper");
968 os <<
"\n data: " << Brief(
data(isolate));
972void JSRegExpStringIterator::JSRegExpStringIteratorPrint(std::ostream& os) {
973 JSObjectPrintHeader(os, *
this,
"JSRegExpStringIterator");
974 os <<
"\n - regex: " << Brief(iterating_reg_exp());
975 os <<
"\n - string: " << Brief(iterated_string());
976 os <<
"\n - done: " << done();
977 os <<
"\n - global: " << global();
978 os <<
"\n - unicode: " << unicode();
979 JSObjectPrintBody(os, *
this);
982void Symbol::SymbolPrint(std::ostream& os) {
983 PrintHeader(os,
"Symbol");
984 os <<
"\n - hash: " <<
hash();
985 os <<
"\n - description: " << Brief(
description());
997void DescriptorArray::DescriptorArrayPrint(std::ostream& os) {
998 PrintHeader(os,
"DescriptorArray");
999 os <<
"\n - enum_cache: ";
1000 if (enum_cache()->keys()->
length() == 0) {
1003 os << enum_cache()->keys()->length();
1004 os <<
"\n - keys: " << Brief(enum_cache()->keys());
1005 os <<
"\n - indices: " << Brief(enum_cache()->indices());
1010 os <<
"\n - raw gc state: mc epoch "
1011 << DescriptorArrayMarkingState::Epoch::decode(raw) <<
", marked "
1012 << DescriptorArrayMarkingState::Marked::decode(raw) <<
", delta "
1013 << DescriptorArrayMarkingState::Delta::decode(raw);
1018template <
typename T>
1019void PrintFixedArrayWithHeader(std::ostream& os, T* array,
const char* type) {
1020 array->PrintHeader(os, type);
1021 os <<
"\n - length: " << array->length();
1022 PrintFixedArrayElements(os,
Tagged(array));
1026template <
typename T>
1027void PrintWeakArrayElements(std::ostream& os, T* array) {
1032 int previous_index = 0;
1034 for (
i = 1;
i <= array->
length();
i++) {
1035 if (i < array->
length()) value = array->get(
i);
1036 if (previous_value == value &&
i != array->
length()) {
1040 std::stringstream ss;
1041 ss << previous_index;
1042 if (previous_index !=
i - 1) {
1043 ss <<
'-' << (
i - 1);
1045 os << std::setw(12) << ss.str() <<
": " << Brief(previous_value);
1047 previous_value =
value;
1053void ObjectBoilerplateDescription::ObjectBoilerplateDescriptionPrint(
1055 PrintHeader(os,
"ObjectBoilerplateDescription");
1056 os <<
"\n - capacity: " << capacity();
1058 os <<
"\n - flags: " <<
flags();
1059 os <<
"\n - elements:";
1060 PrintFixedArrayElements<ObjectBoilerplateDescription>(
1067void ClassBoilerplate::ClassBoilerplatePrint(std::ostream& os) {
1068 PrintHeader(os,
"ClassBoilerplate");
1069 os <<
"\n - arguments_count: " << arguments_count();
1070 os <<
"\n - static_properties_template: " << static_properties_template();
1072 os <<
"\n - static_computed_properties: " << static_computed_properties();
1074 os <<
"\n - instance_elements_template: " << instance_elements_template();
1079void RegExpBoilerplateDescription::RegExpBoilerplateDescriptionPrint(
1082 PrintHeader(os,
"RegExpBoilerplate");
1083 os <<
"\n - data: " << Brief(
data(isolate));
1084 os <<
"\n - source: " <<
source();
1085 os <<
"\n - flags: " <<
flags();
1089void EmbedderDataArray::EmbedderDataArrayPrint(std::ostream& os) {
1091 PrintHeader(os,
"EmbedderDataArray");
1092 os <<
"\n - length: " <<
length();
1093 EmbedderDataSlot
start(*
this, 0);
1095 for (EmbedderDataSlot slot =
start; slot <
end; ++slot) {
1097 PrintEmbedderData(isolate, os, slot);
1102void FixedArray::FixedArrayPrint(std::ostream& os) {
1103 PrintFixedArrayWithHeader(os,
this,
"FixedArray");
1106void TrustedFixedArray::TrustedFixedArrayPrint(std::ostream& os) {
1107 PrintFixedArrayWithHeader(os,
this,
"TrustedFixedArray");
1110void ProtectedFixedArray::ProtectedFixedArrayPrint(std::ostream& os) {
1111 PrintFixedArrayWithHeader(os,
this,
"ProtectedFixedArray");
1114void ArrayList::ArrayListPrint(std::ostream& os) {
1115 PrintHeader(os,
"ArrayList");
1116 os <<
"\n - capacity: " << capacity();
1117 os <<
"\n - length: " <<
length();
1118 os <<
"\n - elements:";
1119 PrintFixedArrayElements<ArrayList>(
1125void ScriptContextTable::ScriptContextTablePrint(std::ostream& os) {
1126 PrintHeader(os,
"ScriptContextTable");
1127 os <<
"\n - capacity: " << capacity();
1130 os <<
"\n - elements:";
1131 PrintFixedArrayElements<ScriptContextTable>(
1138void RegExpMatchInfo::RegExpMatchInfoPrint(std::ostream& os) {
1139 PrintHeader(os,
"RegExpMatchInfo");
1140 os <<
"\n - capacity: " << capacity();
1144 os <<
"\n - captures:";
1145 PrintFixedArrayElements<RegExpMatchInfo>(
1152void SloppyArgumentsElements::SloppyArgumentsElementsPrint(std::ostream& os) {
1153 PrintHeader(os,
"SloppyArgumentsElements");
1154 os <<
"\n - length: " <<
length();
1155 os <<
"\n - context: " << Brief(
context());
1156 os <<
"\n - arguments: " << Brief(
arguments());
1157 os <<
"\n - mapped_entries:";
1158 PrintFixedArrayElements<SloppyArgumentsElements>(
1169 return "kHasSideEffect";
1171 return "kHasNoSideEffect";
1173 return "kHasSideEffectToReceiver";
1178#define AS_PTR(x) reinterpret_cast<void*>(x)
1180void AccessorInfo::AccessorInfoPrint(std::ostream& os) {
1181 TorqueGeneratedAccessorInfo<AccessorInfo, HeapObject>::AccessorInfoPrint(os);
1183 os <<
"\n - replace_on_access: " << replace_on_access();
1184 os <<
"\n - getter_side_effect_type: "
1186 os <<
"\n - setter_side_effect_type: "
1191 os <<
"\n - getter: " << AS_PTR(
getter(isolate));
1193 os <<
"\n - maybe_redirected_getter: "
1194 << AS_PTR(maybe_redirected_getter(isolate));
1196 os <<
"\n - setter: " << AS_PTR(
setter(isolate));
1198 os <<
"\n - getter: " << kUnavailableString;
1199 os <<
"\n - maybe_redirected_getter: " << kUnavailableString;
1200 os <<
"\n - setter: " << kUnavailableString;
1205void InterceptorInfo::InterceptorInfoPrint(std::ostream& os) {
1206 TorqueGeneratedInterceptorInfo<InterceptorInfo,
1207 HeapObject>::InterceptorInfoPrint(os);
1210 os <<
" - getter: " << AS_PTR(named_getter(isolate));
1211 os <<
"\n - setter: " << AS_PTR(
named_setter(isolate));
1212 os <<
"\n - query: " << AS_PTR(named_query(isolate));
1213 os <<
"\n - descriptor: " << AS_PTR(named_descriptor(isolate));
1214 os <<
"\n - deleter: " << AS_PTR(named_deleter(isolate));
1215 os <<
"\n - enumerator: " << AS_PTR(named_enumerator(isolate));
1216 os <<
"\n - definer: " << AS_PTR(named_definer(isolate));
1218 os <<
" - getter: " << AS_PTR(indexed_getter(isolate));
1219 os <<
"\n - setter: " << AS_PTR(indexed_setter(isolate));
1220 os <<
"\n - query: " << AS_PTR(indexed_query(isolate));
1221 os <<
"\n - descriptor: " << AS_PTR(indexed_descriptor(isolate));
1222 os <<
"\n - deleter: " << AS_PTR(indexed_deleter(isolate));
1223 os <<
"\n - enumerator: " << AS_PTR(indexed_enumerator(isolate));
1224 os <<
"\n - definer: " << AS_PTR(indexed_definer(isolate));
1227 os <<
"\n --- flags: ";
1228 if (can_intercept_symbols()) os <<
"\n - can_intercept_symbols";
1229 if (non_masking()) os <<
"\n - non_masking";
1230 if (
is_named()) os <<
"\n - is_named";
1231 if (has_no_side_effect()) os <<
"\n - has_no_side_effect";
1237void FunctionTemplateInfo::FunctionTemplateInfoPrint(std::ostream& os) {
1238 TorqueGeneratedFunctionTemplateInfo<
1239 FunctionTemplateInfo,
1240 TemplateInfoWithProperties>::FunctionTemplateInfoPrint(os);
1244 os <<
" - callback: " <<
reinterpret_cast<void*
>(
callback(isolate));
1246 os <<
"\n - maybe_redirected_callback: "
1247 <<
reinterpret_cast<void*
>(maybe_redirected_callback(isolate));
1250 os <<
"\n - callback: " << kUnavailableString;
1251 os <<
"\n - maybe_redirected_callback: " << kUnavailableString;
1254 os <<
"\n - serial_number: ";
1255 if (serial_number() == kUninitializedSerialNumber) {
1258 os << serial_number();
1260 os <<
"\n --- flags: ";
1261 if (is_cacheable()) os <<
"\n - is_cacheable";
1262 if (should_promote_to_read_only()) os <<
"\n - should_promote_to_read_only";
1263 if (is_object_template_call_handler()) {
1264 os <<
"\n - is_object_template_call_handler";
1268 if (undetectable()) os <<
"\n - undetectable";
1270 if (read_only_prototype()) os <<
"\n - read_only_prototype";
1272 if (accept_any_receiver()) os <<
"\n - accept_any_receiver";
1273 if (published()) os <<
"\n - published";
1275 if (allowed_receiver_instance_type_range_start() ||
1277 os <<
"\n - allowed_receiver_instance_type_range: ["
1278 << allowed_receiver_instance_type_range_start() <<
", "
1287 context->PrintHeader(os, type);
1288 os <<
"\n - type: " << context->map()->instance_type();
1289 os <<
"\n - scope_info: " << Brief(context->scope_info());
1290 os <<
"\n - previous: " << Brief(context->unchecked_previous());
1291 os <<
"\n - native_context: " << Brief(context->native_context());
1292 if (context->scope_info()->HasContextExtensionSlot()) {
1293 os <<
"\n - extension: " << context->extension();
1295 os <<
"\n - length: " << context->length();
1296 os <<
"\n - elements:";
1297 PrintFixedArrayElements(os, context);
1302void Context::ContextPrint(std::ostream& os) {
1303 PrintContextWithHeader(os, *
this,
"Context");
1306void NativeContext::NativeContextPrint(std::ostream& os) {
1307 PrintContextWithHeader(os, *
this,
"NativeContext");
1312using DataPrinter = std::function<void(InternalIndex)>;
1323template <
typename T>
1324void PrintTableContentsGeneric(std::ostream& os, T* dict,
1325 DataPrinter print_data_at) {
1329 for (InternalIndex
i : dict->IterateEntries()) {
1331 if (!dict->ToKey(roots,
i, &k))
continue;
1332 os <<
"\n " << std::setw(12) <<
i.as_int() <<
": ";
1338 if (print_data_at) {
1346 if (dict->may_have_interesting_properties()) {
1347 os <<
"\n - may_have_interesting_properties";
1352template <
typename T>
1353void PrintDictionaryContentsFull(std::ostream& os, T* dict) {
1354 os <<
"\n - elements: {";
1355 auto print_value_and_property_details = [&](InternalIndex
i) {
1356 os << Brief(dict->ValueAt(
i)) <<
" ";
1357 dict->DetailsAt(
i).PrintAsSlowTo(os, !T::kIsOrderedDictionaryType);
1359 PrintTableContentsGeneric(os, dict, print_value_and_property_details);
1364template <
typename T>
1365void PrintHashMapContentsFull(std::ostream& os, T* dict) {
1366 os <<
"\n - elements: {";
1367 auto print_value = [&](InternalIndex
i) { os << Brief(dict->ValueAt(
i)); };
1368 PrintTableContentsGeneric(os, dict, print_value);
1373template <
typename T>
1374void PrintHashSetContentsFull(std::ostream& os, T* dict) {
1375 os <<
"\n - elements: {";
1377 PrintTableContentsGeneric(os, dict,
nullptr);
1382template <
typename T>
1383void PrintOrderedHashTableHeaderAndBuckets(std::ostream& os, T* table,
1387 PrintHeapObjectHeaderWithoutMap(table, os, type);
1388 os <<
"\n - FixedArray length: " << table->length();
1389 os <<
"\n - elements: " << table->NumberOfElements();
1390 os <<
"\n - deleted: " << table->NumberOfDeletedElements();
1391 os <<
"\n - buckets: " << table->NumberOfBuckets();
1392 os <<
"\n - capacity: " << table->Capacity();
1394 os <<
"\n - buckets: {";
1395 for (
int bucket = 0; bucket < table->NumberOfBuckets(); bucket++) {
1396 Tagged<Object> entry = table->get(T::HashTableStartIndex() + bucket);
1398 os <<
"\n " << std::setw(12) << bucket <<
": " << Brief(entry);
1404template <
typename T>
1405void PrintHashTableHeader(std::ostream& os, T* table,
const char* type) {
1406 PrintHeapObjectHeaderWithoutMap(table, os, type);
1407 os <<
"\n - FixedArray length: " << table->length();
1408 os <<
"\n - elements: " << table->NumberOfElements();
1409 os <<
"\n - deleted: " << table->NumberOfDeletedElements();
1410 os <<
"\n - capacity: " << table->Capacity();
1414void ObjectHashTable::ObjectHashTablePrint(std::ostream& os) {
1415 PrintHashTableHeader(os,
this,
"ObjectHashTable");
1416 PrintHashMapContentsFull(os,
this);
1419void NameToIndexHashTable::NameToIndexHashTablePrint(std::ostream& os) {
1420 PrintHashTableHeader(os,
this,
"NameToIndexHashTable");
1421 PrintHashMapContentsFull(os,
this);
1424void RegisteredSymbolTable::RegisteredSymbolTablePrint(std::ostream& os) {
1425 PrintHashTableHeader(os,
this,
"RegisteredSymbolTable");
1426 PrintHashMapContentsFull(os,
this);
1429void NumberDictionary::NumberDictionaryPrint(std::ostream& os) {
1430 PrintHashTableHeader(os,
this,
"NumberDictionary");
1431 PrintDictionaryContentsFull(os,
this);
1434void EphemeronHashTable::EphemeronHashTablePrint(std::ostream& os) {
1435 PrintHashTableHeader(os,
this,
"EphemeronHashTable");
1436 PrintHashMapContentsFull(os,
this);
1439void NameDictionary::NameDictionaryPrint(std::ostream& os) {
1440 PrintHashTableHeader(os,
this,
"NameDictionary");
1441 PrintNameDictionaryFlags(os,
this);
1442 PrintDictionaryContentsFull(os,
this);
1445void GlobalDictionary::GlobalDictionaryPrint(std::ostream& os) {
1446 PrintHashTableHeader(os,
this,
"GlobalDictionary");
1447 PrintDictionaryContentsFull(os,
this);
1450void SmallOrderedHashSet::SmallOrderedHashSetPrint(std::ostream& os) {
1451 PrintHeader(os,
"SmallOrderedHashSet");
1455void SmallOrderedHashMap::SmallOrderedHashMapPrint(std::ostream& os) {
1456 PrintHeader(os,
"SmallOrderedHashMap");
1460void SmallOrderedNameDictionary::SmallOrderedNameDictionaryPrint(
1462 PrintHeader(os,
"SmallOrderedNameDictionary");
1466void OrderedHashSet::OrderedHashSetPrint(std::ostream& os) {
1467 PrintOrderedHashTableHeaderAndBuckets(os,
this,
"OrderedHashSet");
1468 PrintHashSetContentsFull(os,
this);
1471void OrderedHashMap::OrderedHashMapPrint(std::ostream& os) {
1472 PrintOrderedHashTableHeaderAndBuckets(os,
this,
"OrderedHashMap");
1473 PrintHashMapContentsFull(os,
this);
1476void OrderedNameDictionary::OrderedNameDictionaryPrint(std::ostream& os) {
1477 PrintOrderedHashTableHeaderAndBuckets(os,
this,
"OrderedNameDictionary");
1478 PrintDictionaryContentsFull(os,
this);
1481void print_hex_byte(std::ostream& os,
int value) {
1482 os <<
"0x" << std::setfill(
'0') << std::setw(2) << std::right << std::hex
1483 << (value & 0xff) << std::setfill(
' ');
1486void SwissNameDictionary::SwissNameDictionaryPrint(std::ostream& os) {
1487 this->PrintHeader(os,
"SwissNameDictionary");
1488 os <<
"\n - meta table ByteArray: "
1489 <<
reinterpret_cast<void*
>(this->meta_table().ptr());
1490 os <<
"\n - capacity: " << this->
Capacity();
1494 std::ios_base::fmtflags sav_flags = os.flags();
1495 os <<
"\n - ctrl table (omitting buckets where key is hole value): {";
1499 if (ctrl == Ctrl::kEmpty)
continue;
1501 os <<
"\n " << std::setw(12) << std::dec <<
i <<
": ";
1505 case Ctrl::kDeleted:
1506 print_hex_byte(os, ctrl);
1507 os <<
" (= kDeleted)";
1509 case Ctrl::kSentinel:
1510 print_hex_byte(os, ctrl);
1511 os <<
" (= kSentinel)";
1514 print_hex_byte(os, ctrl);
1515 os <<
" (= H2 of a key)";
1521 os <<
"\n - enumeration table: {";
1522 for (
int enum_index = 0; enum_index < this->
UsedCapacity(); enum_index++) {
1524 os <<
"\n " << std::setw(12) << std::dec << enum_index <<
": " << entry;
1528 os <<
"\n - data table (omitting slots where key is the hole): {";
1529 for (
int bucket = 0; bucket < this->
Capacity(); ++bucket) {
1534 PropertyDetails details = this->
DetailsAt(bucket);
1535 os <<
"\n " << std::setw(12) << std::dec << bucket <<
": ";
1541 os <<
" -> " << Brief(value);
1542 details.PrintAsSlowTo(os,
false);
1545 os.flags(sav_flags);
1548void PropertyArray::PropertyArrayPrint(std::ostream& os) {
1549 PrintHeader(os,
"PropertyArray");
1550 os <<
"\n - length: " <<
length();
1551 os <<
"\n - hash: " <<
Hash();
1552 PrintFixedArrayElements(os,
Tagged(*
this));
1556void FixedDoubleArray::FixedDoubleArrayPrint(std::ostream& os) {
1557 PrintHeader(os,
"FixedDoubleArray");
1558 os <<
"\n - length: " <<
length();
1559 DoPrintElements<FixedDoubleArray>(os,
this,
length());
1563void WeakFixedArray::WeakFixedArrayPrint(std::ostream& os) {
1564 PrintHeader(os,
"WeakFixedArray");
1565 os <<
"\n - length: " <<
length();
1566 PrintWeakArrayElements(os,
this);
1570void TrustedWeakFixedArray::TrustedWeakFixedArrayPrint(std::ostream& os) {
1571 PrintHeader(os,
"TrustedWeakFixedArray");
1572 os <<
"\n - length: " <<
length();
1573 PrintWeakArrayElements(os,
this);
1577void ProtectedWeakFixedArray::ProtectedWeakFixedArrayPrint(std::ostream& os) {
1578 PrintHeader(os,
"ProtectedWeakFixedArray");
1579 os <<
"\n - length: " <<
length();
1580 PrintWeakArrayElements(os,
this);
1584void WeakArrayList::WeakArrayListPrint(std::ostream& os) {
1585 PrintHeader(os,
"WeakArrayList");
1586 os <<
"\n - capacity: " << capacity();
1587 os <<
"\n - length: " <<
length();
1588 PrintWeakArrayElements(os,
this);
1592void TransitionArray::TransitionArrayPrint(std::ostream& os) {
1593 PrintHeader(os,
"TransitionArray");
1598void FeedbackCell::FeedbackCellPrint(std::ostream& os) {
1599 PrintHeader(os,
"FeedbackCell");
1601 if (
map() == roots.no_closures_cell_map()) {
1602 os <<
"\n - no closures";
1603 }
else if (
map() == roots.one_closure_cell_map()) {
1604 os <<
"\n - one closure";
1605 }
else if (
map() == roots.many_closures_cell_map()) {
1606 os <<
"\n - many closures";
1608 os <<
"\n - Invalid FeedbackCell map";
1610 os <<
"\n - value: " << Brief(
value());
1611 os <<
"\n - interrupt_budget: " << interrupt_budget();
1612#ifdef V8_ENABLE_LEAPTIERING
1613 os <<
"\n - dispatch_handle: 0x" << std::hex << dispatch_handle() << std::dec;
1616 jdt->IsTieringRequested(dispatch_handle())) {
1617 os <<
"\n - tiering request ";
1619 TryCast(
value(), &fbv) && fbv->tiering_in_progress()) {
1620 os <<
"in_progress ";
1622 jdt->PrintCurrentTieringRequest(dispatch_handle(),
1630void FeedbackVectorSpec::Print() {
1633 FeedbackVectorSpecPrint(os);
1638void FeedbackVectorSpec::FeedbackVectorSpecPrint(std::ostream& os) {
1649 os <<
"\n Slot #" << slot <<
" " <<
kind;
1655void FeedbackMetadata::FeedbackMetadataPrint(std::ostream& os) {
1656 PrintHeader(os,
"FeedbackMetadata");
1660 FeedbackMetadataIterator iter(*
this);
1661 while (iter.HasNext()) {
1662 FeedbackSlot slot = iter.Next();
1664 os <<
"\n Slot " << slot <<
" " <<
kind;
1669void ClosureFeedbackCellArray::ClosureFeedbackCellArrayPrint(std::ostream& os) {
1670 PrintHeader(os,
"ClosureFeedbackCellArray");
1671 os <<
"\n - length: " <<
length();
1672 os <<
"\n - elements:";
1673 PrintFixedArrayElements<ClosureFeedbackCellArray>(os,
this);
1677void FeedbackVector::FeedbackVectorPrint(std::ostream& os) {
1678 PrintHeader(os,
"FeedbackVector");
1679 os <<
"\n - length: " <<
length();
1685 os <<
"\n - shared function info: " << Brief(shared_function_info());
1686#ifdef V8_ENABLE_LEAPTIERING
1687 os <<
"\n - tiering_in_progress: " << tiering_in_progress();
1691 os <<
"\n - optimized code: "
1694 os <<
"\n - no optimized code";
1700 os <<
"\n - invocation count: " << invocation_count();
1701 os <<
"\n - closure feedback cell array: ";
1702 closure_feedback_cell_array()->ClosureFeedbackCellArrayPrint(os);
1704 FeedbackMetadataIterator iter(metadata());
1705 while (iter.HasNext()) {
1706 FeedbackSlot slot = iter.Next();
1709 os <<
"\n - slot " << slot <<
" " <<
kind <<
" ";
1712 int entry_size = iter.entry_size();
1713 if (entry_size > 0) os <<
" {";
1714 for (
int i = 0;
i < entry_size;
i++) {
1715 FeedbackSlot slot_with_offset = slot.WithOffset(
i);
1716 os <<
"\n [" << slot_with_offset.ToInt()
1717 <<
"]: " << Brief(
Get(slot_with_offset));
1719 if (entry_size > 0) os <<
"\n }";
1725 FeedbackNexus nexus(GetIsolate(), *
this, slot);
1730 auto slot_kind =
kind();
1731 switch (slot_kind) {
1758 }
else if (IsPropertyCell(
GetFeedback().GetHeapObjectOrSmi())) {
1762 int handler =
GetFeedback().GetHeapObjectOrSmi().ToSmi().value();
1764 os <<
"Handler(Lexical variable mode)(context ix = "
1765 << FeedbackNexus::ContextIndexBits::decode(handler)
1766 <<
", slot ix = " << FeedbackNexus::SlotIndexBits::decode(handler)
1778 os <<
" <cleared>\n";
1782 if (IsWeakFixedArray(handler) &&
1786 LoadHandler::PrintHandler(handler, os);
1790 if (IsName(feedback)) {
1791 os <<
" with name " << Brief(feedback);
1796 for (
int i = 0;
i < array->
length();
i += 2) {
1797 os <<
"\n " << Brief(array->get(
i)) <<
": ";
1798 LoadHandler::PrintHandler(array->get(
i + 1).GetHeapObjectOrSmi(), os);
1811 os <<
"\n [cleared]";
1817 os <<
" [cleared]\n";
1820 if (IsName(feedback)) {
1821 os <<
" with name " << Brief(feedback);
1824 os <<
"\n " << Brief(array->get(0)) <<
": ";
1825 if (array->get(1).IsCleared()) {
1826 os <<
"[cleared]\n";
1829 StoreHandler::PrintHandler(handler, os);
1832 os <<
"\n " << Brief(feedback) <<
": ";
1839 if (IsName(feedback)) {
1840 os <<
" with name " << Brief(feedback);
1845 for (
int i = 0;
i < array->
length();
i += 2) {
1846 os <<
"\n " << Brief(array->get(
i)) <<
": ";
1847 if (!array->get(
i + 1).IsCleared()) {
1848 StoreHandler::PrintHandler(array->get(
i + 1).GetHeapObjectOrSmi(),
1877void Oddball::OddballPrint(std::ostream& os) {
1881 os << s->PrefixForDebugPrint();
1883 os << s->SuffixForDebugPrint();
1887void Hole::HolePrint(std::ostream& os) {
1888 PrintHeapObjectHeaderWithoutMap(*
this, os,
"Hole");
1890#define PRINT_SPECIFIC_HOLE(type, name, CamelName) \
1891 if (*this == roots.name()) { \
1892 os << "\n <" #name ">"; \
1895#undef PRINT_SPECIFIC_HOLE
1900void JSAsyncFunctionObject::JSAsyncFunctionObjectPrint(std::ostream& os) {
1901 JSGeneratorObjectPrint(os);
1904void JSAsyncGeneratorObject::JSAsyncGeneratorObjectPrint(std::ostream& os) {
1905 JSGeneratorObjectPrint(os);
1908void JSArgumentsObject::JSArgumentsObjectPrint(std::ostream& os) {
1912void JSStringIterator::JSStringIteratorPrint(std::ostream& os) {
1913 JSObjectPrintHeader(os, *
this,
"JSStringIterator");
1914 os <<
"\n - string: " << Brief(
string());
1915 os <<
"\n - index: " <<
index();
1916 JSObjectPrintBody(os, *
this);
1919void JSAsyncFromSyncIterator::JSAsyncFromSyncIteratorPrint(std::ostream& os) {
1920 JSObjectPrintHeader(os, *
this,
"JSAsyncFromSyncIterator");
1921 os <<
"\n - sync_iterator: " << Brief(sync_iterator());
1922 os <<
"\n - next: " << Brief(next());
1923 JSObjectPrintBody(os, *
this);
1926void JSValidIteratorWrapper::JSValidIteratorWrapperPrint(std::ostream& os) {
1927 JSObjectPrintHeader(os, *
this,
"JSValidIteratorWrapper");
1928 os <<
"\n - underlying.object: " << Brief(underlying_object());
1929 os <<
"\n - underlying.next: " << Brief(underlying_next());
1930 JSObjectPrintBody(os, *
this);
1933void JSPrimitiveWrapper::JSPrimitiveWrapperPrint(std::ostream& os) {
1934 JSObjectPrintHeader(os, *
this,
"JSPrimitiveWrapper");
1935 os <<
"\n - value: " << Brief(
value());
1936 JSObjectPrintBody(os, *
this);
1939void JSMessageObject::JSMessageObjectPrint(std::ostream& os) {
1940 JSObjectPrintHeader(os, *
this,
"JSMessageObject");
1941 os <<
"\n - type: " <<
static_cast<int>(
type());
1942 os <<
"\n - arguments: " << Brief(argument());
1943 os <<
"\n - script: " << Brief(
script());
1944 os <<
"\n - stack_trace: " << Brief(stack_trace());
1945 os <<
"\n - shared_info: " << Brief(shared_info());
1947 os <<
" (cleared after calculating line ends)";
1949 os <<
"(no line ends needed)";
1951 os <<
"\n - bytecode_offset: " << bytecode_offset();
1952 os <<
"\n - start_position: " << start_position();
1953 os <<
"\n - end_position: " << end_position();
1954 os <<
"\n - error_level: " << error_level();
1955 JSObjectPrintBody(os, *
this);
1958void String::StringPrint(std::ostream& os) {
1959 PrintHeapObjectHeaderWithoutMap(
this, os,
"String");
1966void Name::NamePrint(std::ostream& os) {
1967 if (IsString(
this)) {
1974static const char*
const weekdays[] = {
"???",
"Sun",
"Mon",
"Tue",
1975 "Wed",
"Thu",
"Fri",
"Sat"};
1977void JSDate::JSDatePrint(std::ostream& os) {
1978 JSObjectPrintHeader(os, *
this,
"JSDate");
1979 os <<
"\n - value: " <<
value();
1980 if (!
IsSmi(year())) {
1981 os <<
"\n - time = NaN\n";
1984 base::ScopedVector<char> buf(100);
1985 SNPrintF(buf,
"\n - time = %s %04d/%02d/%02d %02d:%02d:%02d\n",
1995 JSObjectPrintBody(os, *
this);
1998void JSSet::JSSetPrint(std::ostream& os) {
1999 JSObjectPrintHeader(os, *
this,
"JSSet");
2000 os <<
"\n - table: " << Brief(table());
2001 JSObjectPrintBody(os, *
this);
2004void JSMap::JSMapPrint(std::ostream& os) {
2005 JSObjectPrintHeader(os, *
this,
"JSMap");
2006 os <<
"\n - table: " << Brief(table());
2007 JSObjectPrintBody(os, *
this);
2012 JSObjectPrintHeader(os, *
this, name);
2013 os <<
"\n - table: " << Brief(table());
2014 os <<
"\n - index: " << Brief(
index());
2015 JSObjectPrintBody(os, *
this);
2018void JSSetIterator::JSSetIteratorPrint(std::ostream& os) {
2022void JSMapIterator::JSMapIteratorPrint(std::ostream& os) {
2026void JSWeakRef::JSWeakRefPrint(std::ostream& os) {
2027 JSObjectPrintHeader(os, *
this,
"JSWeakRef");
2028 os <<
"\n - target: " << Brief(
target());
2029 JSObjectPrintBody(os, *
this);
2032void JSShadowRealm::JSShadowRealmPrint(std::ostream& os) {
2033 JSObjectPrintHeader(os, *
this,
"JSShadowRealm");
2035 JSObjectPrintBody(os, *
this);
2038void JSWrappedFunction::JSWrappedFunctionPrint(std::ostream& os) {
2039 JSObjectPrintHeader(os, *
this,
"JSWrappedFunction");
2040 os <<
"\n - wrapped_target_function: " << Brief(wrapped_target_function());
2041 JSObjectPrintBody(os, *
this);
2044void JSFinalizationRegistry::JSFinalizationRegistryPrint(std::ostream& os) {
2045 JSObjectPrintHeader(os, *
this,
"JSFinalizationRegistry");
2047 os <<
"\n - cleanup: " << Brief(cleanup());
2048 os <<
"\n - active_cells: " << Brief(active_cells());
2050 while (IsWeakCell(active_cell)) {
2051 os <<
"\n - " << Brief(active_cell);
2054 os <<
"\n - cleared_cells: " << Brief(cleared_cells());
2056 while (IsWeakCell(cleared_cell)) {
2057 os <<
"\n - " << Brief(cleared_cell);
2060 os <<
"\n - key_map: " << Brief(key_map());
2061 JSObjectPrintBody(os, *
this);
2064void JSSharedArray::JSSharedArrayPrint(std::ostream& os) {
2065 JSObjectPrintHeader(os, *
this,
"JSSharedArray");
2067 os <<
"\n - isolate: " <<
isolate;
2069 JSObjectPrintBody(os, *
this);
2072void JSSharedStruct::JSSharedStructPrint(std::ostream& os) {
2073 JSObjectPrintHeader(os, *
this,
"JSSharedStruct");
2075 os <<
"\n - isolate: " <<
isolate;
2077 JSObjectPrintBody(os, *
this);
2080void JSAtomicsMutex::JSAtomicsMutexPrint(std::ostream& os) {
2081 JSObjectPrintHeader(os, *
this,
"JSAtomicsMutex");
2083 os <<
"\n - isolate: " <<
isolate;
2085 os <<
"\n - state: " << this->
state();
2086 os <<
"\n - owner_thread_id: " << this->owner_thread_id();
2087 JSObjectPrintBody(os, *
this);
2090void JSAtomicsCondition::JSAtomicsConditionPrint(std::ostream& os) {
2091 JSObjectPrintHeader(os, *
this,
"JSAtomicsCondition");
2093 os <<
"\n - isolate: " <<
isolate;
2095 os <<
"\n - state: " << this->
state();
2096 JSObjectPrintBody(os, *
this);
2102 return os <<
"Pending";
2104 return os <<
"Disposed";
2109void JSDisposableStackBase::JSDisposableStackBasePrint(std::ostream& os) {
2110 JSObjectPrintHeader(os, *
this,
"JSDisposableStack");
2111 os <<
"\n - stack: " << Brief(
stack());
2112 os <<
"\n - length: " <<
length();
2113 os <<
"\n - state: " <<
state();
2115 os <<
"\n - has_awaited: " << has_awaited();
2117 os <<
"\n - error: " << error();
2118 os <<
"\n - error_message: " << error_message();
2119 JSObjectPrintBody(os, *
this);
2122void JSAsyncDisposableStack::JSAsyncDisposableStackPrint(std::ostream& os) {
2123 JSObjectPrintHeader(os, *
this,
"JSAsyncDisposableStack");
2124 os <<
"\n - stack: " << Brief(
stack());
2125 os <<
"\n - length: " <<
length();
2126 os <<
"\n - state: " <<
state();
2128 os <<
"\n - has_awaited: " << has_awaited();
2130 os <<
"\n - error: " << error();
2131 os <<
"\n - error_message: " << error_message();
2132 JSObjectPrintBody(os, *
this);
2136 const char* helper_name) {
2137 JSObjectPrintHeader(os, *
this, helper_name);
2138 os <<
"\n - underlying.object: " << Brief(underlying_object());
2139 os <<
"\n - underlying.next: " << Brief(underlying_next());
2142void JSIteratorMapHelper::JSIteratorMapHelperPrint(std::ostream& os) {
2143 JSIteratorHelperPrintHeader(os,
"JSIteratorMapHelper");
2144 os <<
"\n - mapper: " << Brief(mapper());
2145 os <<
"\n - counter: " << counter();
2146 JSObjectPrintBody(os, *
this);
2149void JSIteratorFilterHelper::JSIteratorFilterHelperPrint(std::ostream& os) {
2150 JSIteratorHelperPrintHeader(os,
"JSIteratorFilterHelper");
2151 os <<
"\n - predicate: " << Brief(predicate());
2152 os <<
"\n - counter: " << counter();
2153 JSObjectPrintBody(os, *
this);
2156void JSIteratorTakeHelper::JSIteratorTakeHelperPrint(std::ostream& os) {
2157 JSIteratorHelperPrintHeader(os,
"JSIteratorTakeHelper");
2158 os <<
"\n - remaining: " << remaining();
2159 JSObjectPrintBody(os, *
this);
2162void JSIteratorDropHelper::JSIteratorDropHelperPrint(std::ostream& os) {
2163 JSIteratorHelperPrintHeader(os,
"JSIteratorDropHelper");
2164 os <<
"\n - remaining: " << remaining();
2165 JSObjectPrintBody(os, *
this);
2168void JSIteratorFlatMapHelper::JSIteratorFlatMapHelperPrint(std::ostream& os) {
2169 JSIteratorHelperPrintHeader(os,
"JSIteratorFlatMapHelper");
2170 os <<
"\n - mapper: " << Brief(mapper());
2171 os <<
"\n - counter: " << counter();
2172 os <<
"\n - innerIterator.object" << Brief(innerIterator_object());
2173 os <<
"\n - innerIterator.next" << Brief(innerIterator_next());
2174 os <<
"\n - innerAlive" << innerAlive();
2175 JSObjectPrintBody(os, *
this);
2178void JSWeakMap::JSWeakMapPrint(std::ostream& os) {
2179 JSObjectPrintHeader(os, *
this,
"JSWeakMap");
2180 os <<
"\n - table: " << Brief(table());
2181 JSObjectPrintBody(os, *
this);
2184void JSWeakSet::JSWeakSetPrint(std::ostream& os) {
2185 JSObjectPrintHeader(os, *
this,
"JSWeakSet");
2186 os <<
"\n - table: " << Brief(table());
2187 JSObjectPrintBody(os, *
this);
2190void JSArrayBuffer::JSArrayBufferPrint(std::ostream& os) {
2191 JSAPIObjectWithEmbedderSlotsPrintHeader(os, *
this,
"JSArrayBuffer");
2192 os <<
"\n - backing_store: " << backing_store();
2193 os <<
"\n - byte_length: " << byte_length();
2194 os <<
"\n - max_byte_length: " << max_byte_length();
2195 os <<
"\n - detach key: " << detach_key();
2196 if (is_external()) os <<
"\n - external";
2198 if (was_detached()) os <<
"\n - detached";
2200 if (is_resizable_by_js()) os <<
"\n - resizable_by_js";
2201 JSObjectPrintBody(os, *
this, !was_detached());
2204void JSTypedArray::JSTypedArrayPrint(std::ostream& os) {
2205 JSAPIObjectWithEmbedderSlotsPrintHeader(os, *
this,
"JSTypedArray");
2206 os <<
"\n - buffer: " << Brief(buffer());
2207 os <<
"\n - byte_offset: " << byte_offset();
2208 os <<
"\n - byte_length: " << byte_length();
2210 os <<
"\n - data_ptr: " <<
DataPtr();
2212 os <<
"\n - base_pointer: "
2213 <<
reinterpret_cast<void*
>(
static_cast<Address>(base_ptr));
2214 os <<
"\n - external_pointer: "
2215 <<
reinterpret_cast<void*
>(external_pointer());
2216 if (!IsJSArrayBuffer(buffer())) {
2217 os <<
"\n <invalid buffer>\n";
2220 if (WasDetached()) os <<
"\n - detached";
2221 if (is_length_tracking()) os <<
"\n - length-tracking";
2223 JSObjectPrintBody(os, *
this, !WasDetached());
2226void JSArrayIterator::JSArrayIteratorPrint(std::ostream& os) {
2227 JSObjectPrintHeader(os, *
this,
"JSArrayIterator");
2228 os <<
"\n - iterated_object: " << Brief(iterated_object());
2229 os <<
"\n - next_index: " << Brief(next_index());
2230 os <<
"\n - kind: " <<
kind();
2231 JSObjectPrintBody(os, *
this);
2234void JSDataView::JSDataViewPrint(std::ostream& os) {
2235 JSObjectPrintHeader(os, *
this,
"JSDataView");
2236 os <<
"\n - buffer =" << Brief(buffer());
2237 os <<
"\n - byte_offset: " << byte_offset();
2238 os <<
"\n - byte_length: " << byte_length();
2239 if (!IsJSArrayBuffer(buffer())) {
2240 os <<
"\n <invalid buffer>";
2243 if (WasDetached()) os <<
"\n - detached";
2244 JSObjectPrintBody(os, *
this, !WasDetached());
2247void JSRabGsabDataView::JSRabGsabDataViewPrint(std::ostream& os) {
2248 JSObjectPrintHeader(os, *
this,
"JSRabGsabDataView");
2249 os <<
"\n - buffer =" << Brief(buffer());
2250 os <<
"\n - byte_offset: " << byte_offset();
2251 os <<
"\n - byte_length: " << byte_length();
2252 if (is_length_tracking()) os <<
"\n - length-tracking";
2254 if (!IsJSArrayBuffer(buffer())) {
2255 os <<
"\n <invalid buffer>";
2258 if (WasDetached()) os <<
"\n - detached";
2259 JSObjectPrintBody(os, *
this, !WasDetached());
2262void JSBoundFunction::JSBoundFunctionPrint(std::ostream& os) {
2263 JSObjectPrintHeader(os, *
this,
"JSBoundFunction");
2264 os <<
"\n - bound_target_function: " << Brief(bound_target_function());
2265 os <<
"\n - bound_this: " << Brief(bound_this());
2266 os <<
"\n - bound_arguments: " << Brief(bound_arguments());
2267 JSObjectPrintBody(os, *
this);
2270void JSFunction::JSFunctionPrint(std::ostream& os) {
2271 Isolate* isolate = GetIsolate();
2272 JSObjectPrintHeader(os, *
this,
"Function");
2273 os <<
"\n - function prototype: ";
2275 if (has_prototype()) {
2277 if (
map()->has_non_instance_prototype()) {
2278 os <<
" (non-instance prototype)";
2281 os <<
"\n - initial_map: ";
2282 if (has_initial_map()) os << Brief(
initial_map());
2284 os <<
"<no-prototype-slot>";
2286 os <<
"\n - shared_info: " << Brief(
shared());
2287 os <<
"\n - name: " << Brief(
shared()->Name());
2292 os <<
"\n - builtin: " << isolate->builtins()->name(builtin);
2295 os <<
"\n - formal_parameter_count: ";
2296 int formal_parameter_count =
2297 shared()->internal_formal_parameter_count_with_receiver();
2299 os <<
"kDontAdaptArgumentsSentinel";
2301 os << formal_parameter_count;
2303 os <<
"\n - kind: " <<
shared()->kind();
2304 os <<
"\n - context: " << Brief(
context());
2305 os <<
"\n - code: " << Brief(
code(isolate));
2306#ifdef V8_ENABLE_LEAPTIERING
2307 os <<
"\n - dispatch_handle: 0x" << std::hex << dispatch_handle() << std::dec;
2308 if (has_feedback_vector() &&
2310 os <<
"\n - canonical feedback cell dispatch_handle: 0x" << std::hex
2314 os <<
"\n - tiering request ";
2316 os <<
"in_progress ";
2319 dispatch_handle(), GetIsolate(), os);
2323 if (
code(isolate)->
kind() == CodeKind::FOR_TESTING) {
2324 os <<
"\n - FOR_TESTING";
2326 os <<
"\n - interpreted";
2327 if (
shared()->HasBytecodeArray()) {
2328 os <<
"\n - bytecode: " <<
shared()->GetBytecodeArray(isolate);
2331#if V8_ENABLE_WEBASSEMBLY
2335 function->shared()->wasm_exported_function_data();
2336 os <<
"\n - Wasm instance data: " << Brief(data->instance_data());
2337 os <<
"\n - Wasm function index: " << data->function_index();
2341 os <<
"\n - Wasm wrapper around: "
2342 << Brief(function->shared()->wasm_js_function_data()->GetCallable());
2345 shared()->PrintSourceCode(os);
2346 JSObjectPrintBody(os, *
this);
2347 os <<
" - feedback vector: ";
2348 if (!
shared()->HasFeedbackMetadata()) {
2349 os <<
"feedback metadata is not available in SFI\n";
2350 }
else if (has_feedback_vector()) {
2351 feedback_vector()->FeedbackVectorPrint(os);
2353 os <<
"No feedback vector, but we have a closure feedback cell array\n";
2356 os <<
"not available\n";
2360void SharedFunctionInfo::PrintSourceCode(std::ostream& os) {
2362 os <<
"\n - source code: ";
2366 std::unique_ptr<char[]> source_string = source->ToCString(
start, length);
2367 os << source_string.get();
2371void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) {
2372 PrintHeader(os,
"SharedFunctionInfo");
2373 os <<
"\n - name: ";
2375 os << Brief(
Name());
2377 os <<
"<no-shared-name>";
2380 os <<
"\n - inferred name: " << Brief(inferred_name());
2382 if (class_scope_has_private_brand()) {
2383 os <<
"\n - class_scope_has_private_brand";
2386 os <<
"\n - has_static_private_methods_or_accessors";
2388 if (private_name_lookup_skips_outer_class()) {
2389 os <<
"\n - private_name_lookup_skips_outer_class";
2391 os <<
"\n - kind: " <<
kind();
2393 os <<
"\n - function_map_index: " << function_map_index();
2394 os <<
"\n - formal_parameter_count: ";
2397 os <<
"kDontAdaptArgumentsSentinel";
2399 os << formal_parameter_count;
2401 os <<
"\n - expected_nof_properties: "
2402 <<
static_cast<int>(expected_nof_properties());
2405 os <<
"\n - trusted_function_data: "
2408 os <<
"\n - trusted_function_data: <empty>";
2411 os <<
"\n - code (from function_data): ";
2414 os << Brief(
GetCode(isolate));
2416 os << kUnavailableString;
2418 PrintSourceCode(os);
2420 os <<
"\n - script: " << Brief(
script());
2424 os <<
"\n - scope info: " << Brief(scope_info());
2428 os <<
"\n - length: " <<
length();
2429 os <<
"\n - feedback_metadata: ";
2431 feedback_metadata()->FeedbackMetadataPrint(os);
2435 os <<
"\n - function_literal_id: " << function_literal_id();
2436 os <<
"\n - unique_id: " << unique_id();
2437 os <<
"\n - age: " << age();
2441void SharedFunctionInfoWrapper::SharedFunctionInfoWrapperPrint(
2443 PrintHeader(os,
"SharedFunctionInfoWrapper");
2444 os <<
"\n sfi: " << Brief(shared_info());
2447void JSGlobalProxy::JSGlobalProxyPrint(std::ostream& os) {
2448 JSAPIObjectWithEmbedderSlotsPrintHeader(os, *
this,
"JSGlobalProxy");
2449 JSObjectPrintBody(os, *
this);
2452void JSGlobalObject::JSGlobalObjectPrint(std::ostream& os) {
2453 JSAPIObjectWithEmbedderSlotsPrintHeader(os, *
this,
"JSGlobalObject");
2454 os <<
"\n - global proxy: " << Brief(global_proxy());
2455 JSObjectPrintBody(os, *
this);
2458void PropertyCell::PropertyCellPrint(std::ostream& os) {
2459 PrintHeader(os,
"PropertyCell");
2460 os <<
"\n - name: ";
2461 name()->NamePrint(os);
2463 os <<
"\n - details: ";
2465 details.PrintAsSlowTo(os,
true);
2466 os <<
"\n - cell_type: " << details.cell_type();
2471void ContextSidePropertyCell::ContextSidePropertyCellPrint(std::ostream& os) {
2472 PrintHeader(os,
"ContextSidePropertyCell");
2474 os <<
"\n - cell_type: " << context_side_property_raw(
kAcquireLoad);
2478void InstructionStream::InstructionStreamPrint(std::ostream& os) {
2482void Code::CodePrint(std::ostream& os,
const char* name,
Address current_pc) {
2486 PrintHeader(os,
"Code");
2491 os <<
"\n - deoptimization_data_or_interpreter_data: "
2495 os <<
"\n - instruction_stream: " << Brief(raw_instruction_stream());
2496 os <<
"\n - instruction_start: "
2497 <<
reinterpret_cast<void*
>(instruction_start());
2500 os <<
"\n - marked_for_deoptimization: " << marked_for_deoptimization();
2502 os <<
"\n - can_have_weak_objects: " << can_have_weak_objects();
2503 os <<
"\n - instruction_size: " << instruction_size();
2504 os <<
"\n - metadata_size: " << metadata_size();
2506 if (
kind() != CodeKind::WASM_TO_JS_FUNCTION) {
2507 os <<
"\n - inlined_bytecode_size: " << inlined_bytecode_size();
2509 os <<
"\n - wasm_js_tagged_parameter_count: "
2510 << wasm_js_tagged_parameter_count();
2511 os <<
"\n - wasm_js_first_tagged_parameter: "
2512 << wasm_js_first_tagged_parameter();
2514 os <<
"\n - osr_offset: " << osr_offset();
2515 os <<
"\n - handler_table_offset: " << handler_table_offset();
2516 os <<
"\n - unwinding_info_offset: " << unwinding_info_offset();
2518 os <<
"\n - constant_pool_offset: " << constant_pool_offset();
2520 os <<
"\n - code_comments_offset: " << code_comments_offset();
2525 os <<
"\n - instruction_stream.relocation_info: "
2526 << Brief(istream->relocation_info());
2527 os <<
"\n - instruction_stream.body_size: " << istream->body_size();
2532#ifdef ENABLE_DISASSEMBLER
2533 os <<
"\n--- Disassembly: ---\n";
2538void CodeWrapper::CodeWrapperPrint(std::ostream& os) {
2539 PrintHeader(os,
"CodeWrapper");
2544void Foreign::ForeignPrint(std::ostream& os) {
2545 PrintHeader(os,
"Foreign");
2546 os <<
"\n - foreign address: "
2551void TrustedForeign::TrustedForeignPrint(std::ostream& os) {
2552 PrintHeader(os,
"TrustedForeign");
2553 os <<
"\n - foreign address: " <<
reinterpret_cast<void*
>(foreign_address());
2557void AsyncGeneratorRequest::AsyncGeneratorRequestPrint(std::ostream& os) {
2558 PrintHeader(os,
"AsyncGeneratorRequest");
2559 const char* mode =
"Invalid!";
2560 switch (resume_mode()) {
2571 os <<
"\n - resume mode: " <<
mode;
2572 os <<
"\n - value: " << Brief(
value());
2573 os <<
"\n - next: " << Brief(next());
2577static void PrintModuleFields(
Tagged<Module> module, std::ostream& os) {
2578 os <<
"\n - exports: " << Brief(module->exports());
2579 os <<
"\n - status: " << module->status();
2580 os <<
"\n - exception: " << Brief(module->exception());
2583void Module::ModulePrint(std::ostream& os) {
2584 if (IsSourceTextModule(*
this)) {
2586 }
else if (IsSyntheticModule(*
this)) {
2593void SourceTextModule::SourceTextModulePrint(std::ostream& os) {
2594 PrintHeader(os,
"SourceTextModule");
2595 PrintModuleFields(*
this, os);
2596 os <<
"\n - sfi/code/info: " << Brief(
code());
2598 os <<
"\n - script: " << Brief(script);
2599 os <<
"\n - origin: " << Brief(script->GetNameOrSourceURL());
2600 os <<
"\n - requested_modules: " << Brief(requested_modules());
2601 os <<
"\n - import_meta: " << Brief(import_meta(
kAcquireLoad));
2602 os <<
"\n - cycle_root: " << Brief(cycle_root());
2603 os <<
"\n - has_toplevel_await: " << has_toplevel_await();
2608void JSModuleNamespace::JSModuleNamespacePrint(std::ostream& os) {
2609 JSObjectPrintHeader(os, *
this,
"JSModuleNamespace");
2610 os <<
"\n - module: " << Brief(module());
2611 JSObjectPrintBody(os, *
this);
2614void PrototypeInfo::PrototypeInfoPrint(std::ostream& os) {
2615 PrintHeader(os,
"PrototypeInfo");
2616 os <<
"\n - module namespace: " << Brief(module_namespace());
2617 os <<
"\n - prototype users: " << Brief(prototype_users());
2618 os <<
"\n - registry slot: " << registry_slot();
2619 os <<
"\n - derived maps: " << Brief(derived_maps());
2620 os <<
"\n - should_be_fast_map: " << should_be_fast_map();
2624void ArrayBoilerplateDescription::ArrayBoilerplateDescriptionPrint(
2626 PrintHeader(os,
"ArrayBoilerplateDescription");
2628 os <<
"\n - constant elements: " << Brief(constant_elements());
2632#if V8_ENABLE_WEBASSEMBLY
2633void AsmWasmData::AsmWasmDataPrint(std::ostream& os) {
2634 PrintHeader(os,
"AsmWasmData");
2635 os <<
"\n - native module: " << Brief(managed_native_module());
2636 os <<
"\n - uses bitset: " << uses_bitset()->value();
2640void WasmTypeInfo::WasmTypeInfoPrint(std::ostream& os) {
2641 PrintHeader(os,
"WasmTypeInfo");
2642 os <<
"\n - canonical type: " <<
type().
name();
2644 os <<
"\n - supertypes: ";
2645 for (
int i = 0;
i < supertypes_length();
i++) {
2646 os <<
"\n - " << Brief(supertypes(
i));
2651void WasmStruct::WasmStructPrint(std::ostream& os) {
2652 PrintHeader(os,
"WasmStruct");
2653 const wasm::CanonicalStructType* struct_type =
2655 map()->wasm_type_info()->type_index());
2656 if (struct_type->is_descriptor()) {
2659 os <<
"\n - fields (" << struct_type->field_count() <<
"):";
2660 for (uint32_t
i = 0;
i < struct_type->field_count();
i++) {
2661 wasm::CanonicalValueType field = struct_type->field(
i);
2662 os <<
"\n - " << field.short_name() <<
": ";
2663 uint32_t field_offset = struct_type->field_offset(
i);
2665 switch (field.kind()) {
2667 os << base::ReadUnalignedValue<int32_t>(field_address);
2670 os << base::ReadUnalignedValue<int64_t>(field_address);
2673 os << fp16_ieee_to_fp32_value(
2677 os << base::ReadUnalignedValue<float>(field_address);
2680 os << base::ReadUnalignedValue<double>(field_address);
2683 os << base::ReadUnalignedValue<int8_t>(field_address);
2686 os << base::ReadUnalignedValue<int16_t>(field_address);
2689 case wasm::kRefNull: {
2691#if V8_COMPRESS_POINTERS
2696 os << Brief(Tagged<Object>(obj));
2700 os <<
"0x" << std::hex << std::setfill(
'0');
2701#ifdef V8_TARGET_BIG_ENDIAN
2707 <<
static_cast<int>(
reinterpret_cast<uint8_t*
>(field_address)[j]);
2709 os << std::dec << std::setfill(
' ');
2720void WasmArray::WasmArrayPrint(std::ostream& os) {
2721 PrintHeader(os,
"WasmArray");
2722 const wasm::CanonicalValueType element_type =
2723 map()->wasm_type_info()->element_type();
2725 os <<
"\n - element type: " << element_type.name();
2726 os <<
"\n - length: " << len;
2728 switch (element_type.kind()) {
2730 PrintTypedArrayElements(os,
reinterpret_cast<int32_t*
>(data_ptr), len,
2734 PrintTypedArrayElements(os,
reinterpret_cast<int64_t*
>(data_ptr), len,
2738 PrintTypedArrayElements(os,
reinterpret_cast<Fp16Printer*
>(data_ptr), len,
2742 PrintTypedArrayElements(os,
reinterpret_cast<float*
>(data_ptr), len,
2746 PrintTypedArrayElements(os,
reinterpret_cast<double*
>(data_ptr), len,
2750 PrintTypedArrayElements(os,
reinterpret_cast<int8_t*
>(data_ptr), len,
2754 PrintTypedArrayElements(os,
reinterpret_cast<int16_t*
>(data_ptr), len,
2758 case wasm::kRefNull: {
2759 os <<
"\n - elements:";
2760 constexpr uint32_t kWasmArrayMaximumPrintedElements = 5;
2761 for (uint32_t
i = 0;
2762 i < std::min(this->
length(), kWasmArrayMaximumPrintedElements);
2764 os <<
"\n " <<
static_cast<int>(
i) <<
" - "
2767 if (this->
length() > kWasmArrayMaximumPrintedElements) os <<
"\n ...";
2771 os <<
"\n - elements:";
2772 constexpr uint32_t kWasmArrayMaximumPrintedElements = 5;
2773 for (uint32_t
i = 0;
2774 i < std::min(this->
length(), kWasmArrayMaximumPrintedElements);
2776 os <<
"\n " <<
static_cast<int>(
i) <<
" - 0x" << std::hex
2777 << std::setfill(
'0');
2778#ifdef V8_TARGET_BIG_ENDIAN
2784 <<
static_cast<int>(
2785 reinterpret_cast<uint8_t*
>(this->ElementAddress(
i))[j]);
2787 os << std::dec << std::setfill(
' ');
2789 if (this->
length() > kWasmArrayMaximumPrintedElements) os <<
"\n ...";
2800void WasmSuspenderObject::WasmSuspenderObjectPrint(std::ostream& os) {
2801 PrintHeader(os,
"WasmSuspenderObject");
2802 os <<
"\n - stack: " << (
stack() ==
nullptr ? -1 :
stack()->id());
2803 os <<
"\n - parent: " << parent();
2804 os <<
"\n - promise: " << promise();
2805 os <<
"\n - resume: " << resume();
2806 os <<
"\n - reject: " << reject();
2810void WasmSuspendingObject::WasmSuspendingObjectPrint(std::ostream& os) {
2811 PrintHeader(os,
"WasmSuspendingObject");
2812 os <<
"\n - callable: " << callable();
2816void WasmInstanceObject::WasmInstanceObjectPrint(std::ostream& os) {
2818 JSObjectPrintHeader(os, *
this,
"WasmInstanceObject");
2819 os <<
"\n - trusted_data: " << Brief(
trusted_data(isolate));
2820 os <<
"\n - module_object: " << Brief(module_object());
2821 os <<
"\n - exports_object: " << Brief(exports_object());
2822 JSObjectPrintBody(os, *
this);
2826void WasmTrustedInstanceData::WasmTrustedInstanceDataPrint(std::ostream& os) {
2827#define PRINT_WASM_INSTANCE_FIELD(name, convert) \
2828 os << "\n - " #name ": " << convert(name());
2829#define PRINT_OPTIONAL_WASM_INSTANCE_FIELD(name, convert) \
2830 if (has_##name()) os << "\n - " #name ": " << convert(name());
2832 auto to_void_ptr = [](
auto value) {
2834 return reinterpret_cast<void*
>(
value);
2837 PrintHeader(os,
"WasmTrustedInstanceData");
2840 PRINT_WASM_INSTANCE_FIELD(shared_part, Brief);
2842 PRINT_OPTIONAL_WASM_INSTANCE_FIELD(untagged_globals_buffer, Brief);
2844 PRINT_OPTIONAL_WASM_INSTANCE_FIELD(imported_mutable_globals_buffers, Brief);
2845#if V8_ENABLE_DRUMBRAKE
2846 PRINT_OPTIONAL_WASM_INSTANCE_FIELD(interpreter_object, Brief);
2848 PRINT_OPTIONAL_WASM_INSTANCE_FIELD(
tables, Brief);
2850 PRINT_WASM_INSTANCE_FIELD(dispatch_tables, Brief);
2852 PRINT_OPTIONAL_WASM_INSTANCE_FIELD(tags_table, Brief);
2853 PRINT_WASM_INSTANCE_FIELD(
func_refs, Brief);
2854 PRINT_WASM_INSTANCE_FIELD(managed_object_maps, Brief);
2856 PRINT_WASM_INSTANCE_FIELD(well_known_imports, Brief);
2857 PRINT_WASM_INSTANCE_FIELD(memory0_start, to_void_ptr);
2860 PRINT_WASM_INSTANCE_FIELD(new_allocation_top_address, to_void_ptr);
2862 PRINT_WASM_INSTANCE_FIELD(old_allocation_top_address, to_void_ptr);
2863#if V8_ENABLE_DRUMBRAKE
2864 PRINT_WASM_INSTANCE_FIELD(imported_function_indices, Brief);
2867 PRINT_WASM_INSTANCE_FIELD(imported_mutable_globals, Brief);
2870 PRINT_WASM_INSTANCE_FIELD(data_segment_sizes, Brief);
2872 PRINT_WASM_INSTANCE_FIELD(hook_on_function_call_address, to_void_ptr);
2874 PRINT_WASM_INSTANCE_FIELD(memory_bases_and_sizes, Brief);
2875 PRINT_WASM_INSTANCE_FIELD(break_on_entry,
static_cast<int>);
2878#undef PRINT_OPTIONAL_WASM_INSTANCE_FIELD
2879#undef PRINT_WASM_INSTANCE_FIELD
2882void WasmDispatchTable::WasmDispatchTablePrint(std::ostream& os) {
2883 PrintHeader(os,
"WasmDispatchTable");
2885 os <<
"\n - length: " << len;
2886 os <<
"\n - capacity: " << capacity();
2888 os <<
"\n - uses: " << Brief(uses);
2889 os <<
"\n - table type: " << table_type().name();
2891 int printed = len > 55 ? 50 : len;
2892 for (
int i = 0;
i < printed; ++
i) {
2893 os <<
"\n " << std::setw(8) <<
i <<
": sig: " <<
sig(
i)
2895 <<
"; implicit_arg: " << Brief(implicit_arg(
i));
2897 if (printed != len) os <<
"\n [...]";
2902void WasmFunctionData::WasmFunctionDataPrint(std::ostream& os) {
2904 os <<
"\n - func_ref: " << Brief(func_ref());
2905 os <<
"\n - internal: " << Brief(
internal());
2906 os <<
"\n - wrapper_code: " << Brief(wrapper_code(isolate));
2907 os <<
"\n - js_promise_flags: " << js_promise_flags();
2911void WasmExportedFunctionData::WasmExportedFunctionDataPrint(std::ostream& os) {
2912 PrintHeader(os,
"WasmExportedFunctionData");
2913 WasmFunctionDataPrint(os);
2915 os <<
"\n - function_index: " << function_index();
2916 os <<
"\n - signature: " <<
reinterpret_cast<const void*
>(
sig());
2917 os <<
"\n - wrapper_budget: " << wrapper_budget()->value();
2921void WasmJSFunctionData::WasmJSFunctionDataPrint(std::ostream& os) {
2922 PrintHeader(os,
"WasmJSFunctionData");
2923 WasmFunctionDataPrint(os);
2924 os <<
"\n - canonical_sig_index: " << canonical_sig_index();
2928void WasmResumeData::WasmResumeDataPrint(std::ostream& os) {
2929 PrintHeader(os,
"WasmResumeData");
2930 os <<
"\n - suspender: " << Brief(suspender());
2934void WasmImportData::WasmImportDataPrint(std::ostream& os) {
2935 PrintHeader(os,
"WasmImportData");
2937 os <<
"\n - callable: " << Brief(callable());
2938 os <<
"\n - instance_data: ";
2939 if (has_instance_data()) {
2944 os <<
"\n - suspend: " <<
static_cast<int>(suspend());
2945 os <<
"\n - wrapper_budget: " << wrapper_budget();
2946 if (has_call_origin()) {
2947 os <<
"\n - call_origin: " << Brief(
call_origin());
2949 os <<
"\n - sig: " <<
sig() <<
" (" <<
sig()->parameter_count() <<
" params, "
2950 <<
sig()->return_count() <<
" returns)";
2954void WasmInternalFunction::WasmInternalFunctionPrint(std::ostream& os) {
2955 PrintHeader(os,
"WasmInternalFunction");
2956 os <<
"\n - call target: "
2959 os <<
"\n - implicit arg: " << Brief(implicit_arg());
2960 os <<
"\n - external: " << Brief(external());
2964void WasmFuncRef::WasmFuncRefPrint(std::ostream& os) {
2965 PrintHeader(os,
"WasmFuncRef");
2967 os <<
"\n - internal: " << Brief(
internal(isolate));
2971void WasmCapiFunctionData::WasmCapiFunctionDataPrint(std::ostream& os) {
2972 PrintHeader(os,
"WasmCapiFunctionData");
2973 WasmFunctionDataPrint(os);
2974 os <<
"\n - canonical_sig_index: " << canonical_sig_index();
2975 os <<
"\n - embedder_data: " << Brief(embedder_data());
2976 os <<
"\n - sig: " <<
sig();
2980void WasmExceptionPackage::WasmExceptionPackagePrint(std::ostream& os) {
2981 PrintHeader(os,
"WasmExceptionPackage");
2985void WasmModuleObject::WasmModuleObjectPrint(std::ostream& os) {
2986 PrintHeader(os,
"WasmModuleObject");
2987 os <<
"\n - module: " << module();
2988 os <<
"\n - native module: " << native_module();
2989 os <<
"\n - script: " << Brief(
script());
2993void WasmGlobalObject::WasmGlobalObjectPrint(std::ostream& os) {
2994 PrintHeader(os,
"WasmGlobalObject");
2998 os <<
"\n - untagged_buffer: " << Brief(untagged_buffer());
3000 os <<
"\n - offset: " <<
offset();
3001 os <<
"\n - raw_type: " << raw_type();
3002 os <<
"\n - is_mutable: " << is_mutable();
3003 os <<
"\n - type: " <<
type();
3004 os <<
"\n - is_mutable: " << is_mutable();
3008void WasmValueObject::WasmValueObjectPrint(std::ostream& os) {
3009 PrintHeader(os,
"WasmValueObject");
3010 os <<
"\n - value: " << Brief(
value());
3015void Tuple2::Tuple2Print(std::ostream& os) {
3016 this->PrintHeader(os,
"Tuple2");
3017 os <<
"\n - value1: " << Brief(this->value1());
3018 os <<
"\n - value2: " << Brief(this->value2());
3022void AccessorPair::AccessorPairPrint(std::ostream& os) {
3023 this->PrintHeader(os,
"AccessorPair");
3024 os <<
"\n - getter: " << Brief(this->
getter());
3025 os <<
"\n - setter: " << Brief(this->
setter());
3029void ClassPositions::ClassPositionsPrint(std::ostream& os) {
3030 this->PrintHeader(os,
"ClassPositions");
3031 os <<
"\n - start: " << this->
start();
3032 os <<
"\n - end: " << this->
end();
3036void LoadHandler::LoadHandlerPrint(std::ostream& os) {
3037 PrintHeader(os,
"LoadHandler");
3039 os <<
"\n - handler: " << Brief(smi_handler());
3040 os <<
"\n - validity_cell: " << Brief(validity_cell());
3041 int data_count = data_field_count();
3042 if (data_count >= 1) {
3043 os <<
"\n - data1: " << Brief(data1());
3045 if (data_count >= 2) {
3046 os <<
"\n - data2: " << Brief(data2());
3048 if (data_count >= 3) {
3049 os <<
"\n - data3: " << Brief(data3());
3054void StoreHandler::StoreHandlerPrint(std::ostream& os) {
3055 PrintHeader(os,
"StoreHandler");
3057 os <<
"\n - handler: " << Brief(smi_handler());
3058 os <<
"\n - validity_cell: " << Brief(validity_cell());
3059 int data_count = data_field_count();
3060 if (data_count >= 1) {
3061 os <<
"\n - data1: " << Brief(data1());
3063 if (data_count >= 2) {
3064 os <<
"\n - data2: " << Brief(data2());
3066 if (data_count >= 3) {
3067 os <<
"\n - data3: " << Brief(data3());
3072void AllocationSite::AllocationSitePrint(std::ostream& os) {
3073 PrintHeader(os,
"AllocationSite");
3074 if (this->HasWeakNext())
3075 os <<
"\n - weak_next: "
3078 os <<
"\n - nested site: " << Brief(nested_site());
3079 os <<
"\n - memento found count: "
3081 os <<
"\n - memento create count: "
3083 os <<
"\n - pretenure decision: "
3085 os <<
"\n - transition_info: ";
3086 if (!PointsToLiteral()) {
3089 }
else if (IsJSArray(boilerplate())) {
3090 os <<
"Array literal with boilerplate " << Brief(boilerplate());
3092 os <<
"Object literal with boilerplate " << Brief(boilerplate());
3097void AllocationMemento::AllocationMementoPrint(std::ostream& os) {
3098 PrintHeader(os,
"AllocationMemento");
3099 os <<
"\n - allocation site: ";
3101 GetAllocationSite()->AllocationSitePrint(os);
3103 os <<
"<invalid>\n";
3107void ScriptOrModule::ScriptOrModulePrint(std::ostream& os) {
3108 PrintHeader(os,
"ScriptOrModule");
3109 os <<
"\n - host_defined_options: " << Brief(host_defined_options());
3110 os <<
"\n - resource_name: " << Brief(resource_name());
3113void Script::ScriptPrint(std::ostream& os) {
3114 PrintHeader(os,
"Script");
3115 os <<
"\n - source: " << Brief(
source());
3116 os <<
"\n - name: " << Brief(
name());
3117 os <<
"\n - line_offset: " << line_offset();
3118 os <<
"\n - column_offset: " << column_offset();
3119 os <<
"\n - context data: " << Brief(context_data());
3120 os <<
"\n - type: " <<
static_cast<int>(
type());
3121 os <<
"\n - line ends: " << Brief(line_ends());
3122 if (!has_line_ends()) os <<
" (not set)";
3123 os <<
"\n - id: " << id();
3124 os <<
"\n - source_url: " << Brief(source_url());
3125 os <<
"\n - source_mapping_url: " << Brief(source_mapping_url());
3126 os <<
"\n - host_defined_options: " << Brief(host_defined_options());
3127 os <<
"\n - compilation type: " <<
static_cast<int>(compilation_type());
3128 os <<
"\n - compiled lazy function positions: "
3129 << compiled_lazy_function_positions();
3130 bool is_wasm =
false;
3131#if V8_ENABLE_WEBASSEMBLY
3132 if ((is_wasm = (
type() == Type::kWasm))) {
3133 if (has_wasm_breakpoint_infos()) {
3134 os <<
"\n - wasm_breakpoint_infos: " << Brief(wasm_breakpoint_infos());
3139 if (has_eval_from_shared()) {
3140 os <<
"\n - eval from shared: " << Brief(eval_from_shared());
3141 }
else if (is_wrapped()) {
3142 os <<
"\n - wrapped arguments: " << Brief(wrapped_arguments());
3146 os <<
"\n - infos: " << Brief(infos());
3150void JSTemporalPlainDate::JSTemporalPlainDatePrint(std::ostream& os) {
3151 JSObjectPrintHeader(os, *
this,
"JSTemporalPlainDate");
3152 JSObjectPrintBody(os, *
this);
3155void JSTemporalPlainTime::JSTemporalPlainTimePrint(std::ostream& os) {
3156 JSObjectPrintHeader(os, *
this,
"JSTemporalPlainTime");
3157 JSObjectPrintBody(os, *
this);
3160void JSTemporalPlainDateTime::JSTemporalPlainDateTimePrint(std::ostream& os) {
3161 JSObjectPrintHeader(os, *
this,
"JSTemporalPlainDateTime");
3162 JSObjectPrintBody(os, *
this);
3165void JSTemporalZonedDateTime::JSTemporalZonedDateTimePrint(std::ostream& os) {
3166 JSObjectPrintHeader(os, *
this,
"JSTemporalZonedDateTime");
3167 JSObjectPrintBody(os, *
this);
3170void JSTemporalDuration::JSTemporalDurationPrint(std::ostream& os) {
3171 JSObjectPrintHeader(os, *
this,
"JSTemporalDuration");
3172 JSObjectPrintBody(os, *
this);
3175void JSTemporalInstant::JSTemporalInstantPrint(std::ostream& os) {
3176 JSObjectPrintHeader(os, *
this,
"JSTemporalInstant");
3177 JSObjectPrintBody(os, *
this);
3180void JSTemporalPlainYearMonth::JSTemporalPlainYearMonthPrint(std::ostream& os) {
3181 JSObjectPrintHeader(os, *
this,
"JSTemporalPlainYearMonth");
3182 JSObjectPrintBody(os, *
this);
3185void JSTemporalPlainMonthDay::JSTemporalPlainMonthDayPrint(std::ostream& os) {
3186 JSObjectPrintHeader(os, *
this,
"JSTemporalPlainMonthDay");
3187 JSObjectPrintBody(os, *
this);
3190void JSTemporalTimeZone::JSTemporalTimeZonePrint(std::ostream& os) {
3191 JSObjectPrintHeader(os, *
this,
"JSTemporalTimeZone");
3192 JSObjectPrintBody(os, *
this);
3195void JSTemporalCalendar::JSTemporalCalendarPrint(std::ostream& os) {
3196 JSObjectPrintHeader(os, *
this,
"JSTemporalCalendar");
3197 JSObjectPrintBody(os, *
this);
3200void JSRawJson::JSRawJsonPrint(std::ostream& os) {
3201 JSObjectPrintHeader(os, *
this,
"JSRawJson");
3202 JSObjectPrintBody(os, *
this);
3205#ifdef V8_INTL_SUPPORT
3206void JSV8BreakIterator::JSV8BreakIteratorPrint(std::ostream& os) {
3207 JSObjectPrintHeader(os, *
this,
"JSV8BreakIterator");
3208 os <<
"\n - locale: " << Brief(locale());
3209 os <<
"\n - break iterator: " << Brief(break_iterator());
3211 os <<
"\n - bound adopt text: " << Brief(bound_adopt_text());
3212 os <<
"\n - bound first: " << Brief(bound_first());
3213 os <<
"\n - bound next: " << Brief(bound_next());
3214 os <<
"\n - bound current: " << Brief(bound_current());
3215 os <<
"\n - bound break type: " << Brief(bound_break_type());
3219void JSCollator::JSCollatorPrint(std::ostream& os) {
3220 JSObjectPrintHeader(os, *
this,
"JSCollator");
3221 os <<
"\n - icu collator: " << Brief(icu_collator());
3222 os <<
"\n - bound compare: " << Brief(bound_compare());
3223 JSObjectPrintBody(os, *
this);
3226void JSDateTimeFormat::JSDateTimeFormatPrint(std::ostream& os) {
3227 JSObjectPrintHeader(os, *
this,
"JSDateTimeFormat");
3228 os <<
"\n - locale: " << Brief(locale());
3229 os <<
"\n - icu locale: " << Brief(icu_locale());
3231 os <<
"\n - icu date interval format: " << Brief(icu_date_interval_format());
3232 os <<
"\n - bound format: " << Brief(bound_format());
3233 os <<
"\n - hour cycle: " << HourCycleAsString(GetIsolate());
3234 JSObjectPrintBody(os, *
this);
3237void JSDisplayNames::JSDisplayNamesPrint(std::ostream& os) {
3238 JSObjectPrintHeader(os, *
this,
"JSDisplayNames");
3239 os <<
"\n - internal: " << Brief(
internal());
3240 os <<
"\n - style: " << StyleAsString(GetIsolate());
3241 os <<
"\n - fallback: " << FallbackAsString(GetIsolate());
3242 JSObjectPrintBody(os, *
this);
3245void JSDurationFormat::JSDurationFormatPrint(std::ostream& os) {
3246 JSObjectPrintHeader(os, *
this,
"JSDurationFormat");
3248 os <<
"\n - display_flags: " << display_flags();
3249 os <<
"\n - icu locale: " << Brief(icu_locale());
3251 JSObjectPrintBody(os, *
this);
3254void JSListFormat::JSListFormatPrint(std::ostream& os) {
3255 JSObjectPrintHeader(os, *
this,
"JSListFormat");
3256 os <<
"\n - locale: " << Brief(locale());
3257 os <<
"\n - style: " << StyleAsString(GetIsolate());
3258 os <<
"\n - type: " << TypeAsString(GetIsolate());
3259 os <<
"\n - icu formatter: " << Brief(icu_formatter());
3260 JSObjectPrintBody(os, *
this);
3263void JSLocale::JSLocalePrint(std::ostream& os) {
3264 JSObjectPrintHeader(os, *
this,
"JSLocale");
3265 os <<
"\n - icu locale: " << Brief(icu_locale());
3266 JSObjectPrintBody(os, *
this);
3269void JSNumberFormat::JSNumberFormatPrint(std::ostream& os) {
3270 JSObjectPrintHeader(os, *
this,
"JSNumberFormat");
3271 os <<
"\n - locale: " << Brief(locale());
3273 os <<
"\n - bound_format: " << Brief(bound_format());
3274 JSObjectPrintBody(os, *
this);
3277void JSPluralRules::JSPluralRulesPrint(std::ostream& os) {
3278 JSObjectPrintHeader(os, *
this,
"JSPluralRules");
3279 os <<
"\n - locale: " << Brief(locale());
3280 os <<
"\n - type: " << TypeAsString(GetIsolate());
3281 os <<
"\n - icu plural rules: " << Brief(icu_plural_rules());
3283 JSObjectPrintBody(os, *
this);
3286void JSRelativeTimeFormat::JSRelativeTimeFormatPrint(std::ostream& os) {
3287 JSObjectPrintHeader(os, *
this,
"JSRelativeTimeFormat");
3288 os <<
"\n - locale: " << Brief(locale());
3289 os <<
"\n - numberingSystem: " << Brief(numberingSystem());
3290 os <<
"\n - numeric: " << NumericAsString(GetIsolate());
3291 os <<
"\n - icu formatter: " << Brief(icu_formatter());
3295void JSSegmentIterator::JSSegmentIteratorPrint(std::ostream& os) {
3296 JSObjectPrintHeader(os, *
this,
"JSSegmentIterator");
3297 os <<
"\n - icu break iterator: " << Brief(icu_break_iterator());
3298 os <<
"\n - granularity: " << GranularityAsString(GetIsolate());
3302void JSSegmenter::JSSegmenterPrint(std::ostream& os) {
3303 JSObjectPrintHeader(os, *
this,
"JSSegmenter");
3304 os <<
"\n - locale: " << Brief(locale());
3305 os <<
"\n - granularity: " << GranularityAsString(GetIsolate());
3306 os <<
"\n - icu break iterator: " << Brief(icu_break_iterator());
3307 JSObjectPrintBody(os, *
this);
3310void JSSegments::JSSegmentsPrint(std::ostream& os) {
3311 JSObjectPrintHeader(os, *
this,
"JSSegments");
3312 os <<
"\n - icu break iterator: " << Brief(icu_break_iterator());
3314 os <<
"\n - granularity: " << GranularityAsString(GetIsolate());
3315 JSObjectPrintBody(os, *
this);
3321 const char* list_name,
int length) {
3323 if (length <= 0)
return;
3324 os <<
"\n - " << list_name;
3327 os <<
" - " << it->index() <<
": " << it->name() <<
"\n";
3333void ScopeInfo::ScopeInfoPrint(std::ostream& os) {
3334 PrintHeader(os,
"ScopeInfo");
3335 if (this->IsEmpty()) {
3336 os <<
"\n - empty\n";
3339 int flags =
Flags();
3341 os <<
"\n - parameters: " << ParameterCount();
3342 os <<
"\n - context locals : " << ContextLocalCount();
3343 if (HasInlinedLocalNames()) {
3344 os <<
"\n - inlined local names";
3346 os <<
"\n - local names in a hashtable: "
3347 << Brief(context_local_names_hashtable());
3350 os <<
"\n - scope type: " << scope_type();
3351 if (SloppyEvalCanExtendVars()) {
3352 os <<
"\n - sloppy eval";
3355 os <<
"\n - language mode: " << language_mode();
3356 if (is_declaration_scope()) os <<
"\n - declaration scope";
3357 if (HasReceiver()) {
3358 os <<
"\n - receiver: " << ReceiverVariableBits::decode(flags);
3360 if (ClassScopeHasPrivateBrand()) os <<
"\n - class scope has private brand";
3361 if (HasSavedClassVariable()) os <<
"\n - has saved class variable";
3362 if (HasNewTarget()) os <<
"\n - needs new target";
3363 if (HasFunctionName()) {
3364 os <<
"\n - function name(" << FunctionVariableBits::decode(flags) <<
"): ";
3367 if (IsAsmModule()) os <<
"\n - asm module";
3368 if (HasSimpleParameters()) os <<
"\n - simple parameters";
3369 if (PrivateNameLookupSkipsOuterClass())
3370 os <<
"\n - private name lookup skips outer class";
3371 os <<
"\n - function kind: " << function_kind();
3372 if (HasOuterScopeInfo()) {
3373 os <<
"\n - outer scope info: " << Brief(OuterScopeInfo());
3375 if (HasFunctionName()) {
3376 os <<
"\n - function name: " << Brief(FunctionName());
3378 if (HasInferredFunctionName()) {
3379 os <<
"\n - inferred function name: " << Brief(InferredFunctionName());
3381 if (HasContextExtensionSlot()) {
3382 os <<
"\n - has context extension slot";
3385 if (HasPositionInfo()) {
3386 os <<
"\n - start position: " << StartPosition();
3387 os <<
"\n - end position: " << EndPosition();
3389 os <<
"\n - length: " <<
length();
3391 PrintScopeInfoList(*
this, os,
"context slots", ContextLocalCount());
3397void PreparseData::PreparseDataPrint(std::ostream& os) {
3398 PrintHeader(os,
"PreparseData");
3399 os <<
"\n - data_length: " << data_length();
3400 os <<
"\n - children_length: " << children_length();
3401 if (data_length() > 0) {
3402 os <<
"\n - data-start: " << (address() + kDataStartOffset);
3404 if (children_length() > 0) {
3405 os <<
"\n - children-start: " << inner_start_offset();
3407 for (
int i = 0;
i < children_length(); ++
i) {
3408 os <<
"\n - [" <<
i <<
"]: " << Brief(get_child(
i));
3413void HeapNumber::HeapNumberPrint(std::ostream& os) {
3414 PrintHeader(os,
"HeapNumber");
3415 os <<
"\n - value: ";
3416 HeapNumberShortPrint(os);
3436 if (IsString(*
this, cage_base)) {
3443 if (IsJSObject(*
this, cage_base)) {
3456 if (InstanceTypeChecker::IsTrustedObject(instance_type) &&
3458 os <<
"<Invalid TrustedObject (outside trusted space)>\n";
3462 switch (instance_type) {
3465 if (map->instance_type() == MAP_TYPE) {
3467 os <<
"<MetaMap (" <<
Brief(map->native_context_or_null()) <<
")>";
3471 os <<
"[" << map->instance_size() <<
"]";
3474 if (IsJSObjectMap(map)) {
3477 os << map->instance_type();
3482 case AWAIT_CONTEXT_TYPE: {
3483 os <<
"<AwaitContext generator= ";
3491 case BLOCK_CONTEXT_TYPE:
3492 os <<
"<BlockContext[" <<
Cast<Context>(*this)->length() <<
"]>";
3494 case CATCH_CONTEXT_TYPE:
3495 os <<
"<CatchContext[" <<
Cast<Context>(*this)->length() <<
"]>";
3497 case DEBUG_EVALUATE_CONTEXT_TYPE:
3498 os <<
"<DebugEvaluateContext[" <<
Cast<Context>(*this)->length() <<
"]>";
3500 case EVAL_CONTEXT_TYPE:
3501 os <<
"<EvalContext[" <<
Cast<Context>(*this)->length() <<
"]>";
3503 case FUNCTION_CONTEXT_TYPE:
3504 os <<
"<FunctionContext[" <<
Cast<Context>(*this)->length() <<
"]>";
3506 case MODULE_CONTEXT_TYPE:
3507 os <<
"<ModuleContext[" <<
Cast<Context>(*this)->length() <<
"]>";
3509 case NATIVE_CONTEXT_TYPE:
3510 os <<
"<NativeContext[" <<
Cast<Context>(*this)->length() <<
"]>";
3512 case SCRIPT_CONTEXT_TYPE:
3513 os <<
"<ScriptContext[" <<
Cast<Context>(*this)->length() <<
"]>";
3515 case WITH_CONTEXT_TYPE:
3516 os <<
"<WithContext[" <<
Cast<Context>(*this)->length() <<
"]>";
3518 case SCRIPT_CONTEXT_TABLE_TYPE:
3519 os <<
"<ScriptContextTable["
3522 case HASH_TABLE_TYPE:
3525 case ORDERED_HASH_MAP_TYPE:
3528 case ORDERED_HASH_SET_TYPE:
3531 case ORDERED_NAME_DICTIONARY_TYPE:
3535 case NAME_DICTIONARY_TYPE:
3538 case SWISS_NAME_DICTIONARY_TYPE:
3539 os <<
"<SwissNameDictionary["
3542 case GLOBAL_DICTIONARY_TYPE:
3545 case NUMBER_DICTIONARY_TYPE:
3548 case SIMPLE_NUMBER_DICTIONARY_TYPE:
3552 case FIXED_ARRAY_TYPE:
3555 case OBJECT_BOILERPLATE_DESCRIPTION_TYPE:
3556 os <<
"<ObjectBoilerplateDescription["
3559 case FIXED_DOUBLE_ARRAY_TYPE:
3563 case BYTE_ARRAY_TYPE:
3566 case BYTECODE_ARRAY_TYPE:
3569 case DESCRIPTOR_ARRAY_TYPE:
3570 os <<
"<DescriptorArray["
3573 case WEAK_FIXED_ARRAY_TYPE:
3576 case TRUSTED_FIXED_ARRAY_TYPE:
3580 case TRUSTED_WEAK_FIXED_ARRAY_TYPE:
3581 os <<
"<TrustedWeakFixedArray["
3584 case PROTECTED_FIXED_ARRAY_TYPE:
3585 os <<
"<ProtectedFixedArray["
3588 case PROTECTED_WEAK_FIXED_ARRAY_TYPE:
3589 os <<
"<ProtectedWeakFixedArray["
3592 case TRANSITION_ARRAY_TYPE:
3596 case PROPERTY_ARRAY_TYPE:
3599 case FEEDBACK_CELL_TYPE: {
3602 os <<
"<FeedbackCell[";
3603 if (
map() == roots.no_closures_cell_map()) {
3604 os <<
"no feedback";
3605 }
else if (
map() == roots.one_closure_cell_map()) {
3606 os <<
"one closure";
3607 }
else if (
map() == roots.many_closures_cell_map()) {
3608 os <<
"many closures";
3610 os <<
"!!!INVALID MAP!!!";
3616 case CLOSURE_FEEDBACK_CELL_ARRAY_TYPE:
3617 os <<
"<ClosureFeedbackCellArray["
3620 case FEEDBACK_VECTOR_TYPE:
3623 case FREE_SPACE_TYPE:
3627 case PREPARSE_DATA_TYPE: {
3629 os <<
"<PreparseData[data=" << data->data_length()
3630 <<
" children=" << data->children_length() <<
"]>";
3634 case UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_TYPE: {
3637 os <<
"<UncompiledDataWithoutPreparseData (" << data->start_position()
3638 <<
", " << data->end_position() <<
")]>";
3642 case UNCOMPILED_DATA_WITH_PREPARSE_DATA_TYPE: {
3645 os <<
"<UncompiledDataWithPreparseData (" << data->start_position()
3646 <<
", " << data->end_position()
3647 <<
") preparsed=" <<
Brief(data->preparse_data()) <<
">";
3651 case SHARED_FUNCTION_INFO_TYPE: {
3653 std::unique_ptr<char[]> debug_name = shared->DebugNameCStr();
3654 if (debug_name[0] !=
'\0') {
3655 os <<
"<SharedFunctionInfo " << debug_name.get() <<
">";
3657 os <<
"<SharedFunctionInfo>";
3661 case JS_MESSAGE_OBJECT_TYPE:
3662 os <<
"<JSMessageObject>";
3664#define MAKE_STRUCT_CASE(TYPE, Name, name) \
3667 Cast<Name>(*this)->BriefPrintDetails(os); \
3671#undef MAKE_STRUCT_CASE
3672 case ALLOCATION_SITE_TYPE: {
3673 os <<
"<AllocationSite>";
3676 case SCOPE_INFO_TYPE: {
3679 if (!scope->IsEmpty()) os <<
" " << scope->scope_type();
3686 if (code->is_builtin()) {
3693#define PRINT_HOLE(Type, Value, _) \
3694 if (Is##Type(*this)) { \
3695 os << "<" #Value ">"; \
3702 case INSTRUCTION_STREAM_TYPE: {
3706 if (code->is_builtin()) {
3712 case ODDBALL_TYPE: {
3713 if (IsUndefined(*
this)) {
3714 os <<
"<undefined>";
3715 }
else if (
IsNull(*
this)) {
3717 }
else if (IsTrue(*
this)) {
3719 }
else if (IsFalse(*
this)) {
3722 os <<
"<Odd Oddball: ";
3723 os << Cast<Oddball>(*this)->to_string()->ToCString().get();
3730 symbol->SymbolShortPrint(os);
3733 case HEAP_NUMBER_TYPE: {
3734 os <<
"<HeapNumber ";
3752 os <<
"<Cell value= ";
3760 case PROPERTY_CELL_TYPE: {
3762 os <<
"<PropertyCell name=";
3772 case CONTEXT_SIDE_PROPERTY_CELL_TYPE: {
3773 os <<
"<ContextSidePropertyCell>";
3776 case ACCESSOR_INFO_TYPE: {
3778 os <<
"<AccessorInfo ";
3779 os <<
"name= " <<
Brief(info->name());
3780 os <<
", data= " <<
Brief(info->data());
3784 case FUNCTION_TEMPLATE_INFO_TYPE: {
3786 os <<
"<FunctionTemplateInfo ";
3789 os <<
"callback= " <<
reinterpret_cast<void*
>(info->callback(isolate));
3791 os <<
"callback= " << kUnavailableString;
3794 os <<
", has_side_effects= ";
3795 if (info->has_side_effects()) {
3802#if V8_ENABLE_WEBASSEMBLY
3803 case WASM_DISPATCH_TABLE_TYPE:
3809 os <<
"<Other heap object (" <<
map()->instance_type() <<
")>";
3815 double val =
value();
3822 int64_t
i =
static_cast<int64_t
>(val);
3831 if (IsString(
this)) {
3836 if (IsUndefined(s->description())) {
3837 PrintF(
"#<%s>", s->PrivateSymbolToName());
3846 if (IsString(
this)) {
3847 return SNPrintF(str,
"%s",
Cast<String>(
this)->ToCString().get());
3851 if (IsUndefined(s->description())) {
3852 return SNPrintF(str,
"#<%s>", s->PrivateSymbolToName());
3854 return SNPrintF(str,
"<%s>",
3862 if (!IsUndefined(description())) {
3865 description_as_string->PrintUC16(os, 0, description_as_string->length());
3867 os <<
" (" << PrivateSymbolToName() <<
")";
3879 bool is_meta_map = instance_type() == MAP_TYPE;
3881 PrintHeader(os, is_meta_map ?
"MetaMap" :
"Map");
3883 os << (is_meta_map ?
"MetaMap=" :
"Map=") <<
reinterpret_cast<void*
>(ptr());
3885 os <<
"\n - type: " << instance_type();
3886 os <<
"\n - instance size: ";
3890 os << instance_size();
3894 os <<
"\n - native_context: " <<
Brief(native_context_or_null());
3899 if (IsJSObjectMap(*
this)) {
3900 os <<
"\n - inobject properties: " << GetInObjectProperties();
3901 os <<
"\n - unused property fields: " << UnusedPropertyFields();
3904 os <<
"\n - enum length: ";
3911 if (is_stable()) os <<
"\n - stable_map";
3912 if (is_migration_target()) os <<
"\n - migration_target";
3913 if (is_dictionary_map()) os <<
"\n - dictionary_map";
3915 if (has_indexed_interceptor()) os <<
"\n - indexed_interceptor";
3916 if (may_have_interesting_properties())
3917 os <<
"\n - may_have_interesting_properties";
3919 if (is_callable()) os <<
"\n - callable";
3922 os <<
"\n - has_prototype_slot";
3923 if (has_non_instance_prototype()) os <<
" (non-instance prototype)";
3925 if (is_access_check_needed()) os <<
"\n - access_check_needed";
3927 if (IsContextMap(*
this)) {
3930 os <<
"\n - prototype_map";
3931 os <<
"\n - prototype info: " <<
Brief(prototype_info());
3933 os <<
"\n - back pointer: " <<
Brief(GetBackPointer());
3935 os <<
"\n - prototype_validity cell: "
3937 os <<
"\n - instance descriptors " << (owns_descriptors() ?
"(own) " :
"")
3938 <<
"#" << NumberOfOwnDescriptors() <<
": "
3946 int nof_transitions = transitions.NumberOfTransitions();
3947 if (nof_transitions > 0 || transitions.HasPrototypeTransitions() ||
3948 transitions.HasSideStepTransitions()) {
3949 os <<
"\n - transitions #" << nof_transitions <<
": ";
3955 os <<
Brief(heap_object);
3958 transitions.PrintTransitions(os);
3963 if (has_non_instance_prototype()) {
3964 os <<
"\n - non-instance prototype: " <<
Brief(GetNonInstancePrototype());
3966 if (!IsContextMap(*
this)) {
3967 os <<
"\n - constructor: " <<
Brief(GetConstructor());
3977 os <<
"\n [" <<
i.as_int() <<
"]: ";
4004 if (IsAccessorPair(value)) {
4006 os <<
"(get: " <<
Brief(pair->getter())
4007 <<
", set: " <<
Brief(pair->setter()) <<
")";
4013#if defined(DEBUG) || defined(OBJECT_PRINT)
4017char* String::ToAsciiArray() {
4020 static char* buffer =
nullptr;
4021 if (buffer !=
nullptr)
delete[] buffer;
4022 buffer =
new char[
length() + 1];
4023 WriteToFlat(
this,
reinterpret_cast<uint8_t*
>(buffer), 0,
length());
4029void TransitionsAccessor::PrintOneTransition(std::ostream& os,
Tagged<Name> key,
4030 Tagged<Map> target) {
4039 if (
key == roots.nonextensible_symbol()) {
4040 os <<
"(transition to non-extensible)";
4041 }
else if (
key == roots.sealed_symbol()) {
4042 os <<
"(transition to sealed)";
4043 }
else if (
key == roots.frozen_symbol()) {
4044 os <<
"(transition to frozen)";
4045 }
else if (
key == roots.elements_transition_symbol()) {
4048 }
else if (
key == roots.strict_function_transition_symbol()) {
4049 os <<
" (transition to strict function)";
4051 DCHECK(!IsSpecialTransition(roots,
key));
4052 os <<
"(transition to ";
4053 InternalIndex descriptor = target->LastAdded();
4055 descriptors->PrintDescriptorDetails(os, descriptor,
4059 os <<
" -> " << Brief(target);
4064 int num_transitions = number_of_transitions();
4065 os <<
"\n Transitions #" << num_transitions <<
":";
4066 for (
int i = 0;
i < num_transitions;
i++) {
4070 TransitionsAccessor::PrintOneTransition(os,
key, target);
4074 if (HasPrototypeTransitions()) {
4075 auto prototype_transitions = GetPrototypeTransitions();
4076 int num_transitions = NumberOfPrototypeTransitions(prototype_transitions);
4077 os <<
"\n Prototype transitions #" << num_transitions <<
": "
4078 << Brief(prototype_transitions);
4079 for (
int i = 0;
i < num_transitions;
i++) {
4080 auto maybe = prototype_transitions->get(
4083 if (maybe.GetHeapObjectIfWeak(&target)) {
4085 os <<
"\n " << Brief(map->prototype()) <<
" -> "
4091 if (HasSideStepTransitions()) {
4092 auto sidestep_transitions = GetSideStepTransitions();
4093 int num_transitions = sidestep_transitions->length();
4094 os <<
"\n Sidestep transitions #" << num_transitions <<
": "
4095 << Brief(sidestep_transitions);
4096 for (
int i = 0;
i < num_transitions;
i++) {
4098 auto maybe_target = sidestep_transitions->get(
i);
4099 os <<
"\n " <<
kind <<
" -> " << Brief(maybe_target);
4104void TransitionsAccessor::PrintTransitions(std::ostream& os) {
4105 switch (encoding()) {
4106 case kPrototypeInfo:
4108 case kMigrationTarget:
4111 Tagged<Map> target =
4112 Cast<Map>(raw_transitions_.GetHeapObjectAssumeWeak());
4114 PrintOneTransition(os,
key, target);
4117 case kFullTransitionArray:
4118 return transitions()->PrintInternal(os);
4122void TransitionsAccessor::PrintTransitionTree() {
4124 os << (IsUndefined(
map_->GetBackPointer()) ?
"root_" :
"")
4125 <<
"map= " << Brief(
map_);
4127 PrintTransitionTree(os, 0, &no_gc);
4128 os <<
"\n" << std::flush;
4131void TransitionsAccessor::PrintTransitionTree(
4133 ReadOnlyRoots roots = ReadOnlyRoots(
isolate_);
4136 ForEachTransitionWithKey(
4140 <<
" " << level <<
"/" <<
pos <<
":" << std::setw(level * 2 + 2)
4143 std::stringstream ss;
4144 ss << Brief(target);
4145 os << std::left << std::setw(50) << ss.str() <<
": ";
4147 if (
key == roots.nonextensible_symbol()) {
4148 os <<
"to non-extensible";
4149 }
else if (
key == roots.sealed_symbol()) {
4151 }
else if (
key == roots.frozen_symbol()) {
4153 }
else if (
key == roots.elements_transition_symbol()) {
4155 }
else if (
key == roots.strict_function_transition_symbol()) {
4156 os <<
"to strict function";
4166 InternalIndex descriptor = target->LastAdded();
4168 target->instance_descriptors(
isolate_);
4169 descriptors->PrintDescriptorDetails(os, descriptor,
4172 TransitionsAccessor transitions(
isolate_, target);
4173 transitions.PrintTransitionTree(os, level + 1, no_gc);
4175 [&](Tagged<Map>
target) {
4177 <<
" " << level <<
"/p" << proto_pos <<
":"
4178 << std::setw(level * 2 + 2) <<
" ";
4180 std::stringstream ss;
4181 ss << Brief(target);
4182 os << std::left << std::setw(50) << ss.str() <<
": to proto ";
4184 TransitionsAccessor transitions(
isolate_, target);
4185 transitions.PrintTransitionTree(os, level + 1, no_gc);
4189 <<
" " << level <<
"/s:" << std::setw(level * 2 + 2) <<
" ";
4190 std::stringstream ss;
4191 ss << Brief(side_step);
4192 os << std::left << std::setw(50) << ss.str() <<
": sidestep " <<
kind;
4196void JSObject::PrintTransitions(std::ostream& os) {
4197 TransitionsAccessor
ta(GetIsolate(),
map());
4198 if (
ta.NumberOfTransitions() != 0 ||
ta.HasPrototypeTransitions()) {
4199 os <<
"\n - transitions";
4200 ta.PrintTransitions(os);
4211#ifdef V8_COMPRESS_POINTERS
4214 i::Isolate* isolate = i::Isolate::TryGetCurrent();
4215 if (isolate !=
nullptr) {
4216 object_ptr = i::V8HeapCompressionScheme::DecompressTagged(
4220 object_ptr = i::V8HeapCompressionScheme::DecompressTagged(
4235 return GetObjectFromRaw(
object);
4250#define AS_HELPER_DEF(Type, ...) \
4251 V8_DEBUGGING_EXPORT auto& _As_##Type(i::Address ptr) { \
4252 i::Tagged<i::Type> tagged = UncheckedCast<i::Type>( \
4253 GetObjectFromRaw(reinterpret_cast<void*>(ptr))); \
4257 static auto result = tagged.operator->(); \
4258 result = tagged.operator->(); \
4261 V8_DEBUGGING_EXPORT auto& _As_##Type(i::Tagged<i::HeapObject>& obj) { \
4262 return _As_##Type(obj.ptr()); \
4273 i::Print(GetObjectFromRaw(
object));
4279 std::stringstream strm;
4280 i::Print(GetObjectFromRaw(
object), strm);
4288 i::LoadHandler::PrintHandler(GetObjectFromRaw(
object), os);
4289 os << std::endl << std::flush;
4297 i::StoreHandler::PrintHandler(GetObjectFromRaw(
object), os);
4306#if V8_ENABLE_WEBASSEMBLY
4308 if (
auto* wasm_code =
4309 i::wasm::GetWasmCodeManager()->LookupCode(isolate, address)) {
4311 wasm_code->Disassemble(
nullptr, os, address);
4317 std::optional<i::Tagged<i::Code>> lookup_result =
4318 isolate->heap()->TryFindCodeForInnerPointerForPrinting(address);
4319 if (!lookup_result.has_value()) {
4321 "%p is not within the current isolate's code or embedded spaces\n",
4326#if defined(OBJECT_PRINT)
4328 lookup_result.value()->CodePrint(os,
nullptr, address);
4329#elif defined(ENABLE_DISASSEMBLER)
4331 lookup_result.value()->Disassemble(
nullptr, os, isolate, address);
4337#ifdef V8_ENABLE_LEAPTIERING
4340 i::IsolateGroup::current()->js_dispatch_table()->PrintEntry(
4346 void*
object,
size_t range_limit) {
4350#if V8_ENABLE_WEBASSEMBLY
4352 if (i::wasm::GetWasmCodeManager()->LookupCode(isolate, address)) {
4353 i::PrintF(
"Not supported on wasm code");
4359 std::optional<i::Tagged<i::Code>> lookup_result =
4360 isolate->heap()->TryFindCodeForInnerPointerForPrinting(address);
4361 if (!lookup_result.has_value()) {
4363 "%p is not within the current isolate's code or embedded spaces\n",
4368#if defined(ENABLE_DISASSEMBLER)
4370 lookup_result.value()->DisassembleOnlyCode(
nullptr, os, isolate, address,
4377 isolate->PrintStack(stdout);
4395 std::vector<_v8_internal_debugonly::StackTraceDebugDetails>
stack;
4397 int frame_index = 0;
4405 i::JavaScriptFrame::cast(frame)->GetFunctions(&details.
functions);
4408 for (
int i = 0;
i < exprcount;
i++) {
4415 i::StringStream::ClearMentionedObjectCache(isolate);
4418 frame->
Print(&accumulator, i::StackFrame::OVERVIEW, frame_index++);
4419 std::unique_ptr<char[]> overview = accumulator.
ToCString();
4420 details.
summary = overview.get();
4421 stack.push_back(std::move(details));
4427 void*
object,
bool start_at_root =
false) {
4430 printf(
"Please provide a valid Map\n");
4432#if defined(DEBUG) || defined(OBJECT_PRINT)
4435 i::Isolate::Current(),
4437 transitions.PrintTransitionTree();
4445 const auto mark_bit =
4448 os <<
"Object " <<
object <<
" is "
4449 << (mark_bit.Get() ?
"marked" :
"unmarked") << std::endl;
4450 os <<
" mark-bit cell: " << mark_bit.CellAddress()
4451 <<
", mask: " << mark_bit.Mask() << std::endl;
4456 void* function_callback_info) {
4463 void* property_callback_info) {
interpreter::Bytecode bytecode
union v8::internal::@341::BuiltinMetadata::KindSpecificData data
internal::Address * values_
PropertyAttributes initial_property_attributes() const
SideEffectType setter_side_effect_type() const
SideEffectType getter_side_effect_type() const
ElementsKind elements_kind() const
static constexpr bool IsBuiltinId(Builtin builtin)
static V8_EXPORT_PRIVATE const char * name(Builtin builtin)
V8_EXPORT_PRIVATE void Disassemble(std::ostream &os)
uint32_t stack_slots() const
bool is_turbofanned() const
Tagged< Object > raw_deoptimization_data_or_interpreter_data() const
bool embedded_objects_cleared() const
Tagged< Object > raw_position_table() const
Builtin builtin_id() const
bool has_instruction_stream() const
int ComputeExpressionsCount() const
Tagged< Object > GetExpression(int index) const
void PrintDescriptors(std::ostream &os)
int16_t number_of_slack_descriptors() const
void PrintDescriptorDetails(std::ostream &os, InternalIndex descriptor, PropertyDetails::PrintMode mode)
CompareOperationHint GetCompareOperationFeedback() const
Tagged< MaybeObject > GetFeedbackExtra() const
FeedbackSlotKind kind() const
ForInHint GetForInFeedback() const
void Print(std::ostream &os)
Tagged< MaybeObject > GetFeedback() const
InlineCacheState ic_state() const
BinaryOperationHint GetBinaryOperationFeedback() const
FeedbackSlotKind GetKind(FeedbackSlot slot) const
Tagged< MaybeObject > Get(FeedbackSlot slot) const
Tagged< Code > optimized_code(IsolateForSandbox isolate) const
bool has_optimized_code() const
bool maybe_has_turbofan_code() const
bool maybe_has_maglev_code() const
bool osr_tiering_in_progress()
void FeedbackSlotPrint(std::ostream &os, FeedbackSlot slot)
TieringState tiering_state() const
static FieldIndex ForDetails(Tagged< Map > map, PropertyDetails details)
static V8_EXPORT_PRIVATE void PrintTo(Tagged< FieldType > type, std::ostream &os)
Address foreign_address_unchecked() const
static V8_INLINE bool InWritableSharedSpace(Tagged< HeapObject > object)
static V8_INLINE bool InReadOnlySpace(Tagged< HeapObject > object)
V8_EXPORT_PRIVATE void HeapNumberShortPrint(std::ostream &os)
void HeapObjectShortPrint(std::ostream &os)
static IsolateGroup * current()
static V8_INLINE Isolate * Current()
IterationKind kind() const
void JSCollectionIteratorPrint(std::ostream &os, const char *name)
DisposableStackState state() const
Tagged< Context > context()
bool tiering_in_progress() const
bool has_closure_feedback_cell_array() const
Tagged< ClosureFeedbackCellArray > closure_feedback_cell_array() const
bool IsTieringRequestedOrInProgress() const
V8_EXPORT_PRIVATE bool ActiveTierIsIgnition(IsolateForSandbox isolate) const
int source_position() const
bool is_suspended() const
bool is_executing() const
void JSIteratorHelperPrintHeader(std::ostream &os, const char *helper_name)
MessageTemplate type() const
Tagged< JSAny > RawFastPropertyAt(FieldIndex index) const
Tagged< FixedArrayBase > elements(PtrComprCageBase cage_base, AcquireLoadTag tag) const =delete
Tagged< Object > reactions() const
static const char * Status(Promise::PromiseState status)
Tagged< Object > result() const
V8_EXPORT_PRIVATE Promise::PromiseState status() const
static const char * FlagsToString(Flags flags, FlagsBuffer *out_buffer)
Tagged< String > source() const
base::EmbeddedVector< char, kFlagCount+1 > FlagsBuffer
void MapPrint(std::ostream &os)
void PrintMapDetails(std::ostream &os)
static V8_ALLOW_UNUSED MarkBit From(Address)
int backing_store_size() const
Tagged< String > to_string() const
PropertyDetails property_details() const
PropertyLocation location() const
void PrintAsFastTo(std::ostream &out, PrintMode mode=kPrintFull)
static V8_EXPORT_PRIVATE bool Contains(Address address)
JSRegExp::Flags flags() const
int number_of_capture_registers() const
Tagged< Object > last_input() const
Tagged< String > last_subject() const
static LocalNamesRange< DirectHandle< ScopeInfo > > IterateLocalNames(DirectHandle< ScopeInfo > scope_info)
Tagged< NameToIndexHashTable > names_to_context_index() const
uint16_t internal_formal_parameter_count_with_receiver() const
Tagged< Object > GetUntrustedData() const
LanguageMode language_mode() const
int function_token_position() const
bool HasOuterScopeInfo() const
bool HasTrustedData() const
FunctionKind kind() const
Tagged< HeapObject > script() const
Tagged< String > Name() const
Tagged< ScopeInfo > GetOuterScopeInfo() const
Tagged< Object > GetTrustedData() const
bool HasSharedName() const
V8_EXPORT_PRIVATE int StartPosition() const
V8_EXPORT_PRIVATE int EndPosition() const
bool HasSourceCode() const
bool HasFeedbackMetadata() const
V8_EXPORT_PRIVATE Tagged< Code > GetCode(Isolate *isolate) const
Tagged< Context > context() const
Tagged< UnionOf< FixedArray, NumberDictionary > > arguments() const
static constexpr int ToInt(const Tagged< Object > object)
static constexpr Tagged< Smi > FromInt(int value)
static constexpr Tagged< Smi > zero()
Tagged< Script > GetScript() const
virtual Type type() const =0
bool is_javascript() const
virtual void Print(StringStream *accumulator, PrintMode mode, int index) const
bool is_optimized_js() const
std::unique_ptr< char[]> ToCString() const
const char * PrefixForDebugPrint() const
const char * SuffixForDebugPrint() const
void PrintUC16(std::ostream &os, int start=0, int end=-1)
int EntryForEnumerationIndex(int enumeration_index)
Tagged< Object > ValueAtRaw(int entry)
int NumberOfDeletedElements()
bool ToKey(ReadOnlyRoots roots, InternalIndex entry, Tagged< Object > *out_key)
PropertyDetails DetailsAt(InternalIndex entry)
static const int kGroupWidth
swiss_table::ctrl_t ctrl_t
bool is_interesting_symbol() const
Tagged< PrimitiveHeapObject > description() const
bool is_private_name() const
void SymbolShortPrint(std::ostream &os)
const char * PrivateSymbolToName() const
bool is_well_known_symbol() const
bool is_private_brand() const
static PtrType load(Tagged< HeapObject > host, int offset=0)
constexpr bool SafeEquals(TaggedImpl< kOtherRefType, Address > other) const
void PrintInternal(std::ostream &os)
static const int kProtoTransitionHeaderSize
static V8_INLINE Address DecompressTagged(TOnHeapAddress on_heap_addr, Tagged_t raw_value)
static V8_EXPORT_PRIVATE bool IsWasmExportedFunction(Tagged< Object > object)
static bool IsWasmJSFunction(Tagged< Object > object)
Address RawFieldAddress(int raw_offset)
Tagged< Map > get_described_rtt() const
wasm::CanonicalValueType type() const
wasm::CanonicalValueType element_type() const
V8_EXPORT_PRIVATE const CanonicalStructType * LookupStruct(CanonicalTypeIndex index) const
V8_EXPORT_PRIVATE std::string name() const
Address GetEntrypointWithoutSignatureCheck(WasmCodePointer index) const
#define V8_ENABLE_SWISS_NAME_DICTIONARY_BOOL
#define V8_EMBEDDED_CONSTANT_POOL_BOOL
#define USE_SIMULATOR_BOOL
Handle< SharedFunctionInfo > info
#define RAB_GSAB_TYPED_ARRAYS(V)
MicrotaskQueue * microtask_queue
base::Vector< const DirectHandle< Object > > args
DirectHandle< FixedArray > capture_name_map
#define MAKE_TORQUE_CASE(Name, TYPE)
SharedFunctionInfoRef shared
ZoneStack< RpoNumber > & stack
MovableLabel continuation
LiftoffAssembler::CacheState state
InstructionOperand source
static V ReadUnalignedValue(Address p)
int SNPrintF(Vector< char > str, const char *format,...)
FunctionCallbackArguments FCA
V8_EXPORT_PRIVATE WasmCodePointerTable * GetProcessWideWasmCodePointerTable()
TypeCanonicalizer * GetTypeCanonicalizer()
void Disassemble(const WasmModule *module, ModuleWireBytes wire_bytes, NamesProvider *names, v8::debug::DisassemblyCollector *collector, std::vector< int > *function_body_offsets)
constexpr bool is_reference(ValueKind kind)
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset uint8_t kGlobalsStartOffset kJumpTableStartOffset std::atomic< uint32_t > kTieringBudgetArrayOffset kDataSegmentStartsOffset kElementSegmentsOffset kInstanceObjectOffset kMemoryObjectsOffset kTaggedGlobalsBufferOffset kTablesOffset kProtectedDispatchTable0Offset kProtectedDispatchTableForImportsOffset kFuncRefsOffset feedback_vectors
V8_INLINE IndirectHandle< T > handle(Tagged< T > object, Isolate *isolate)
V8_EXPORT_PRIVATE base::Vector< Flag > Flags()
bool TryCast(Tagged< From > value, Tagged< To > *out)
HasSideEffectsBit::kShift NeedsAccessCheckBit::kShift remove_prototype
kStaticElementsTemplateOffset kInstancePropertiesTemplateOffset instance_computed_properties
constexpr double kMaxSafeInteger
constexpr int kSimd128Size
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset uint8_t kGlobalsStartOffset kJumpTableStartOffset std::atomic< uint32_t > kTieringBudgetArrayOffset kDataSegmentStartsOffset kElementSegmentsOffset kInstanceObjectOffset kMemoryObjectsOffset kTaggedGlobalsBufferOffset kTablesOffset kProtectedDispatchTable0Offset dispatch_table_for_imports
PerThreadAssertScopeDebugOnly< false, SAFEPOINTS_ASSERT, HEAP_ALLOCATION_ASSERT > DisallowGarbageCollection
bool is_sloppy(LanguageMode language_mode)
kMemory0SizeOffset new_allocation_limit_address
ReadOnlyRoots GetReadOnlyRoots()
void PrintF(const char *format,...)
Map::Bits1::HasPrototypeSlotBit Map::Bits1::HasNamedInterceptorBit Map::Bits1::IsUndetectableBit Map::Bits1::IsConstructorBit Map::Bits2::IsImmutablePrototypeBit Map::Bits3::IsDeprecatedBit is_prototype_map
void PrintPropertyCallbackInfo(void *property_callback_info)
const char * CodeKindToString(CodeKind kind)
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset uint8_t kGlobalsStartOffset kJumpTableStartOffset tiering_budget_array
Tagged< DescriptorArray >
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset old_allocation_limit_address
SharedFunctionInfo::HasStaticPrivateMethodsOrAccessorsBit SharedFunctionInfo::MaglevCompilationFailedBit syntax_kind
Tagged(T object) -> Tagged< T >
V8_INLINE IsolateForSandbox GetCurrentIsolateForSandbox()
double DoubleToInteger(double x)
kWasmInternalFunctionIndirectPointerTag instance_data
V8_INLINE Isolate * GetIsolateFromWritableObject(Tagged< HeapObject > object)
V8_INLINE bool GetIsolateFromHeapObject(Tagged< HeapObject > object, Isolate **isolate)
V8_INLINE constexpr bool IsSmi(TaggedImpl< kRefType, StorageType > obj)
constexpr uint16_t kDontAdaptArgumentsSentinel
@ kLoadGlobalNotInsideTypeof
@ kLoadGlobalInsideTypeof
@ kDefineKeyedOwnPropertyInLiteral
kInterpreterTrampolineOffset Tagged< HeapObject >
const char * InlineCacheState2String(InlineCacheState state)
kStaticElementsTemplateOffset kInstancePropertiesTemplateOffset Tagged< FixedArray >
@ HOLEY_NONEXTENSIBLE_ELEMENTS
@ SLOW_STRING_WRAPPER_ELEMENTS
@ PACKED_NONEXTENSIBLE_ELEMENTS
@ SLOW_SLOPPY_ARGUMENTS_ELEMENTS
@ FAST_SLOPPY_ARGUMENTS_ELEMENTS
@ FAST_STRING_WRAPPER_ELEMENTS
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in name
kWasmInternalFunctionIndirectPointerTag kProtectedInstanceDataOffset sig
Map::Bits1::HasPrototypeSlotBit Map::Bits1::HasNamedInterceptorBit Map::Bits1::IsUndetectableBit Map::Bits1::IsConstructorBit Map::Bits2::IsImmutablePrototypeBit Map::Bits3::IsDeprecatedBit Map::Bits3::IsPrototypeMapBit Map::Bits3::IsExtensibleBit construction_counter
Map::Bits1::HasPrototypeSlotBit Map::Bits1::HasNamedInterceptorBit is_undetectable
too high values may cause the compiler to set high thresholds for inlining to as much as possible avoid inlined allocation of objects that cannot escape trace load stores from virtual maglev objects use TurboFan fast string builder analyze liveness of environment slots and zap dead values trace TurboFan load elimination emit data about basic block usage in builtins to this enable builtin reordering when run mksnapshot flag for emit warnings when applying builtin profile data verify register allocation in TurboFan randomly schedule instructions to stress dependency tracking enable store store elimination in TurboFan rewrite far to near simulate GC compiler thread race related to allow float parameters to be passed in simulator mode JS Wasm Run additional turbo_optimize_inlined_js_wasm_wrappers enable experimental feedback collection in generic lowering enable Turboshaft s WasmLoadElimination enable Turboshaft s low level load elimination for JS enable Turboshaft s escape analysis for string concatenation use enable Turbolev features that we want to ship in the not too far future trace individual Turboshaft reduction steps trace intermediate Turboshaft reduction steps invocation count threshold for early optimization Enables optimizations which favor memory size over execution speed Enables sampling allocation profiler with X as a sample interval min size of a semi the new space consists of two semi spaces max size of the Collect garbage after Collect garbage after keeps maps alive for< n > old space garbage collections print one detailed trace line in allocation gc speed threshold for starting incremental marking via a task in percent of available threshold for starting incremental marking immediately in percent of available Use a single schedule for determining a marking schedule between JS and C objects schedules the minor GC task with kUserVisible priority max worker number of concurrent for NumberOfWorkerThreads start background threads that allocate memory concurrent_array_buffer_sweeping use parallel threads to clear weak refs in the atomic pause trace progress of the incremental marking trace object counts and memory usage report a tick only when allocated zone memory changes by this amount TracingFlags::gc_stats TracingFlags::gc_stats track native contexts that are expected to be garbage collected verify heap pointers before and after GC memory reducer runs GC with ReduceMemoryFootprint flag Maximum number of memory reducer GCs scheduled Old gen GC speed is computed directly from gc tracer counters Perform compaction on full GCs based on V8 s default heuristics Perform compaction on every full GC Perform code space compaction when finalizing a full GC with stack Stress GC compaction to flush out bugs with moving objects flush of baseline code when it has not been executed recently Use time base code flushing instead of age Use a progress bar to scan large objects in increments when incremental marking is active force incremental marking for small heaps and run it more often force marking at random points between and force scavenge at random points between and reclaim otherwise unreachable unmodified wrapper objects when possible less compaction in non memory reducing mode use high priority threads for concurrent Marking Test mode only flag It allows an unit test to select evacuation candidates use incremental marking for CppHeap cppheap_concurrent_marking c value for membalancer A special constant to balance between memory and space tradeoff The smaller the more memory it uses enable use of SSE4 instructions if available enable use of AVX VNNI instructions if available enable use of POPCNT instruction if available force all emitted branches to be in long mode(MIPS/PPC only)") DEFINE_BOOL(partial_constant_pool
return Cast< NumberDictionary >(elements(cage_base))
const char * ElementsKindToString(ElementsKind kind)
std::ostream & operator<<(std::ostream &os, AtomicMemoryOrder order)
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset globals_start
const int kVariableSizeSentinel
V8_INLINE IsolateForSandbox GetIsolateForSandbox(Tagged< HeapObject >)
HasSideEffectsBit::kShift needs_access_check
void Print(Tagged< Object > obj)
Handle< To > UncheckedCast(Handle< From > value)
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset uint8_t kGlobalsStartOffset kJumpTableStartOffset std::atomic< uint32_t > kTieringBudgetArrayOffset kDataSegmentStartsOffset kElementSegmentsOffset kInstanceObjectOffset memory_objects
constexpr int kSystemPointerSize
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset uint8_t kGlobalsStartOffset jump_table_start
V8_INLINE bool OutsideSandboxOrInReadonlySpace(Tagged< HeapObject > obj)
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset uint8_t kGlobalsStartOffset kJumpTableStartOffset std::atomic< uint32_t > kTieringBudgetArrayOffset kDataSegmentStartsOffset kElementSegmentsOffset kInstanceObjectOffset kMemoryObjectsOffset kTaggedGlobalsBufferOffset tables
V8_INLINE PtrComprCageBase GetPtrComprCageBase()
static const int kInvalidEnumCacheSentinel
Map::Bits1::HasPrototypeSlotBit has_named_interceptor
constexpr JSDispatchHandle kNullJSDispatchHandle(0)
DONT_OVERRIDE DISABLE_ALLOCATION_SITES HOLEY_ELEMENTS
kInstanceDescriptorsOffset raw_transitions
Map::Bits1::HasPrototypeSlotBit Map::Bits1::HasNamedInterceptorBit Map::Bits1::IsUndetectableBit Map::Bits1::IsConstructorBit Map::Bits2::IsImmutablePrototypeBit is_deprecated
void ShortPrint(Tagged< Object > obj, FILE *out)
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset uint8_t kGlobalsStartOffset kJumpTableStartOffset std::atomic< uint32_t > kTieringBudgetArrayOffset data_segment_starts
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset uint8_t kGlobalsStartOffset kJumpTableStartOffset std::atomic< uint32_t > kTieringBudgetArrayOffset kDataSegmentStartsOffset kElementSegmentsOffset kInstanceObjectOffset kMemoryObjectsOffset kTaggedGlobalsBufferOffset kTablesOffset kProtectedDispatchTable0Offset kProtectedDispatchTableForImportsOffset func_refs
JSDisposableStackBase::NeedsAwaitBit suppressed_error_created
@ UNCACHED_EXTERNAL_INTERNALIZED_ONE_BYTE_STRING_TYPE
@ SHARED_SEQ_ONE_BYTE_STRING_TYPE
@ SEQ_ONE_BYTE_STRING_TYPE
@ SHARED_SEQ_TWO_BYTE_STRING_TYPE
@ UNCACHED_EXTERNAL_TWO_BYTE_STRING_TYPE
@ SHARED_EXTERNAL_TWO_BYTE_STRING_TYPE
@ UNCACHED_EXTERNAL_INTERNALIZED_TWO_BYTE_STRING_TYPE
@ CONS_ONE_BYTE_STRING_TYPE
@ SLICED_TWO_BYTE_STRING_TYPE
@ UNCACHED_EXTERNAL_ONE_BYTE_STRING_TYPE
@ SHARED_UNCACHED_EXTERNAL_TWO_BYTE_STRING_TYPE
@ SLICED_ONE_BYTE_STRING_TYPE
@ EXTERNAL_TWO_BYTE_STRING_TYPE
@ SEQ_TWO_BYTE_STRING_TYPE
@ THIN_ONE_BYTE_STRING_TYPE
@ SHARED_UNCACHED_EXTERNAL_ONE_BYTE_STRING_TYPE
@ EXTERNAL_INTERNALIZED_TWO_BYTE_STRING_TYPE
@ SHARED_EXTERNAL_ONE_BYTE_STRING_TYPE
@ CONS_TWO_BYTE_STRING_TYPE
@ EXTERNAL_INTERNALIZED_ONE_BYTE_STRING_TYPE
@ EXTERNAL_ONE_BYTE_STRING_TYPE
@ INTERNALIZED_ONE_BYTE_STRING_TYPE
@ INTERNALIZED_TWO_BYTE_STRING_TYPE
@ THIN_TWO_BYTE_STRING_TYPE
DONT_OVERRIDE DISABLE_ALLOCATION_SITES DISABLE_ALLOCATION_SITES HOLEY_DOUBLE_ELEMENTS
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset uint8_t kGlobalsStartOffset kJumpTableStartOffset std::atomic< uint32_t > kTieringBudgetArrayOffset kDataSegmentStartsOffset element_segments
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset uint8_t kGlobalsStartOffset kJumpTableStartOffset std::atomic< uint32_t > kTieringBudgetArrayOffset kDataSegmentStartsOffset kElementSegmentsOffset kInstanceObjectOffset kMemoryObjectsOffset tagged_globals_buffer
V8_EXPORT_PRIVATE FlagValues v8_flags
kStaticElementsTemplateOffset instance_properties_template
void PrintFunctionCallbackInfo(void *function_callback_info)
has_static_private_methods_or_accessors
static bool IsMinusZero(double value)
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset uint8_t kGlobalsStartOffset kJumpTableStartOffset std::atomic< uint32_t > kTieringBudgetArrayOffset kDataSegmentStartsOffset kElementSegmentsOffset kInstanceObjectOffset kMemoryObjectsOffset kTaggedGlobalsBufferOffset kTablesOffset dispatch_table0
bool IsLoadGlobalICKind(FeedbackSlotKind kind)
Tagged< NumberDictionary >
static constexpr Address kNullAddress
constexpr double kMinSafeInteger
JSArrayBuffer::IsDetachableBit is_shared
kMemory0SizeOffset Address kNewAllocationLimitAddressOffset Address kOldAllocationLimitAddressOffset uint8_t kGlobalsStartOffset kJumpTableStartOffset std::atomic< uint32_t > kTieringBudgetArrayOffset kDataSegmentStartsOffset kElementSegmentsOffset instance_object
Map::Bits1::HasPrototypeSlotBit Map::Bits1::HasNamedInterceptorBit Map::Bits1::IsUndetectableBit Map::Bits1::IsConstructorBit Map::Bits2::IsImmutablePrototypeBit Map::Bits3::IsDeprecatedBit Map::Bits3::IsPrototypeMapBit is_extensible
kInstanceDescriptorsOffset kTransitionsOrPrototypeInfoOffset IsNull(value)||IsJSProxy(value)||IsWasmObject(value)||(IsJSObject(value) &&(HeapLayout
kInstanceDescriptorsOffset kTransitionsOrPrototypeInfoOffset prototype
kInterpreterTrampolineOffset script
allowed_receiver_instance_type_range_end
!IsContextMap !IsContextMap native_context
Tagged< To > Cast(Tagged< From > value, const v8::SourceLocation &loc=INIT_SOURCE_LOCATION_IN_DEBUG)
@ kHasSideEffectToReceiver
static constexpr RelaxedLoadTag kRelaxedLoad
static constexpr AcquireLoadTag kAcquireLoad
#define HEAP_OBJECT_TRUSTED_TYPE_LIST(V)
#define HEAP_OBJECT_ORDINARY_TYPE_LIST(V)
V8_DEBUGGING_EXPORT C void _v8_internal_Print_PropertyCallbackInfo(void *property_callback_info)
#define MAKE_STRUCT_CASE(TYPE, Name, name)
V8_DEBUGGING_EXPORT C void _v8_internal_Print_OnlyCode(void *object, size_t range_limit)
V8_DEBUGGING_EXPORT C void _v8_internal_Print_Object_MarkBit(void *object)
V8_DEBUGGING_EXPORT C void _v8_internal_Print_Code(void *object)
V8_DEBUGGING_EXPORT C void _v8_internal_Print_Object(void *object)
V8_DEBUGGING_EXPORT C void _v8_internal_Print_StoreHandler(void *object)
#define AS_HELPER_DEF(Type,...)
V8_DEBUGGING_EXPORT C void _v8_internal_Print_StackTrace()
V8_DEBUGGING_EXPORT std::vector< _v8_internal_debugonly::StackTraceDebugDetails > _v8_internal_Expand_StackTrace(i::Isolate *isolate)
V8_DEBUGGING_EXPORT i::Tagged< i::Object > _v8_internal_Get_Object(void *object)
#define PRINT_HOLE(Type, Value, _)
V8_DEBUGGING_EXPORT C void _v8_internal_Print_TransitionTree(void *object, bool start_at_root=false)
V8_DEBUGGING_EXPORT C void _v8_internal_Print_LoadHandler(void *object)
V8_DEBUGGING_EXPORT C void _v8_internal_Print_FunctionCallbackInfo(void *function_callback_info)
V8_DEBUGGING_EXPORT std::string _v8_internal_Print_Object_To_String(void *object)
#define V8_DEBUGGING_EXPORT
#define DCHECK(condition)
#define DCHECK_LT(v1, v2)
#define DCHECK_EQ(v1, v2)
constexpr T RoundDown(T x, intptr_t m)
std::vector< i::Tagged< i::Object > > expressions
std::vector< i::Tagged< i::SharedFunctionInfo > > functions
static AsHex Address(Address a)
#define TYPED_ARRAY_CONSTRUCTORS_SWITCH(Type, type, TYPE, Ctype)