18 void Object::Print() {
25 void Object::Print(OStream& os) {
27 Smi::cast(
this)->SmiPrint(os);
29 HeapObject::cast(
this)->HeapObjectPrint(os);
34 void HeapObject::PrintHeader(OStream& os,
const char*
id) {
35 os <<
"" <<
reinterpret_cast<void*
>(
this) <<
": [" <<
id <<
"]\n";
39 void HeapObject::HeapObjectPrint(OStream& os) {
44 String::cast(
this)->StringPrint(os);
48 switch (instance_type) {
50 Symbol::cast(
this)->SymbolPrint(os);
53 Map::cast(
this)->MapPrint(os);
56 HeapNumber::cast(
this)->HeapNumberPrint(os);
60 HeapNumber::cast(
this)->HeapNumberPrint(os);
64 FixedDoubleArray::cast(
this)->FixedDoubleArrayPrint(os);
67 ConstantPoolArray::cast(
this)->ConstantPoolArrayPrint(os);
70 FixedArray::cast(
this)->FixedArrayPrint(os);
73 ByteArray::cast(
this)->ByteArrayPrint(os);
76 FreeSpace::cast(
this)->FreeSpacePrint(os);
79 #define PRINT_EXTERNAL_ARRAY(Type, type, TYPE, ctype, size) \
80 case EXTERNAL_##TYPE##_ARRAY_TYPE: \
81 External##Type##Array::cast(this)->External##Type##ArrayPrint(os); \
85 #undef PRINT_EXTERNAL_ARRAY
87 #define PRINT_FIXED_TYPED_ARRAY(Type, type, TYPE, ctype, size) \
88 case Fixed##Type##Array::kInstanceType: \
89 Fixed##Type##Array::cast(this)->FixedTypedArrayPrint(os); \
93 #undef PRINT_FIXED_TYPED_ARRAY
103 JSObject::cast(
this)->JSObjectPrint(os);
106 Oddball::cast(
this)->to_string()->Print(os);
109 JSModule::cast(
this)->JSModulePrint(os);
112 JSFunction::cast(
this)->JSFunctionPrint(os);
115 JSGlobalProxy::cast(
this)->JSGlobalProxyPrint(os);
118 JSGlobalObject::cast(
this)->JSGlobalObjectPrint(os);
121 JSBuiltinsObject::cast(
this)->JSBuiltinsObjectPrint(os);
124 os <<
"Value wrapper around:";
125 JSValue::cast(
this)->value()->Print(os);
128 JSDate::cast(
this)->JSDatePrint(os);
131 Code::cast(
this)->CodePrint(os);
134 JSProxy::cast(
this)->JSProxyPrint(os);
137 JSFunctionProxy::cast(
this)->JSFunctionProxyPrint(os);
140 JSSet::cast(
this)->JSSetPrint(os);
143 JSMap::cast(
this)->JSMapPrint(os);
146 JSSetIterator::cast(
this)->JSSetIteratorPrint(os);
149 JSMapIterator::cast(
this)->JSMapIteratorPrint(os);
152 JSWeakMap::cast(
this)->JSWeakMapPrint(os);
155 JSWeakSet::cast(
this)->JSWeakSetPrint(os);
158 Foreign::cast(
this)->ForeignPrint(os);
161 SharedFunctionInfo::cast(
this)->SharedFunctionInfoPrint(os);
164 JSMessageObject::cast(
this)->JSMessageObjectPrint(os);
167 Cell::cast(
this)->CellPrint(os);
170 PropertyCell::cast(
this)->PropertyCellPrint(os);
173 JSArrayBuffer::cast(
this)->JSArrayBufferPrint(os);
176 JSTypedArray::cast(
this)->JSTypedArrayPrint(os);
179 JSDataView::cast(
this)->JSDataViewPrint(os);
181 #define MAKE_STRUCT_CASE(NAME, Name, name) \
183 Name::cast(this)->Name##Print(os); \
186 #undef MAKE_STRUCT_CASE
196 void ByteArray::ByteArrayPrint(OStream& os) {
201 void FreeSpace::FreeSpacePrint(OStream& os) {
202 os <<
"free space, size " <<
Size();
206 #define EXTERNAL_ARRAY_PRINTER(Type, type, TYPE, ctype, size) \
207 void External##Type##Array::External##Type##ArrayPrint(OStream& os) { \
208 os << "external " #type " array"; \
213 #undef EXTERNAL_ARRAY_PRINTER
216 template <
class Traits>
217 void FixedTypedArray<Traits>::FixedTypedArrayPrint(OStream& os) {
218 os <<
"fixed " << Traits::Designator();
222 void JSObject::PrintProperties(OStream& os) {
224 DescriptorArray* descs =
map()->instance_descriptors();
227 descs->GetKey(
i)->NamePrint(os);
229 switch (descs->GetType(
i)) {
231 FieldIndex index = FieldIndex::ForDescriptor(
map(),
i);
233 << index.property_index() <<
")\n";
237 os << Brief(descs->GetConstant(
i)) <<
" (constant)\n";
240 os << Brief(descs->GetCallbacksObject(
i)) <<
" (callback)\n";
254 static void DoPrintElements(OStream& os,
Object*
object) {
255 T* p = T::cast(
object);
256 for (
int i = 0;
i < p->length();
i++) {
257 os <<
" " <<
i <<
": " << p->get_scalar(
i) <<
"\n";
262 void JSObject::PrintElements(OStream& os) {
265 switch (
map()->elements_kind()) {
271 FixedArray* p = FixedArray::cast(elements());
272 for (
int i = 0;
i < p->length();
i++) {
273 os <<
" " <<
i <<
": " << Brief(p->get(
i)) <<
"\n";
280 if (elements()->length() > 0) {
281 FixedDoubleArray* p = FixedDoubleArray::cast(elements());
282 for (
int i = 0;
i < p->length();
i++) {
283 os <<
" " <<
i <<
": ";
284 if (p->is_the_hole(
i)) {
287 os << p->get_scalar(
i);
296 #define PRINT_ELEMENTS(Kind, Type) \
298 DoPrintElements<Type>(os, elements()); \
325 #undef PRINT_ELEMENTS
328 elements()->Print(os);
331 FixedArray* p = FixedArray::cast(elements());
332 os <<
" parameter map:";
333 for (
int i = 2;
i < p->length();
i++) {
334 os <<
" " << (
i - 2) <<
":" << Brief(p->get(
i));
336 os <<
"\n context: " << Brief(p->get(0))
337 <<
"\n arguments: " << Brief(p->get(1)) <<
"\n";
344 void JSObject::PrintTransitions(OStream& os) {
345 if (!
map()->HasTransitionArray())
return;
346 TransitionArray* transitions =
map()->transitions();
347 for (
int i = 0;
i < transitions->number_of_transitions();
i++) {
348 Name* key = transitions->GetKey(
i);
352 if (key ==
GetHeap()->frozen_symbol()) {
353 os <<
" (transition to frozen)\n";
354 }
else if (key ==
GetHeap()->elements_transition_symbol()) {
355 os <<
" (transition to "
358 }
else if (key ==
GetHeap()->observed_symbol()) {
359 os <<
" (transition to Object.observe)\n";
361 switch (transitions->GetTargetDetails(
i).type()) {
363 os <<
" (transition to field)\n";
367 os <<
" (transition to constant)\n";
370 os <<
" (transition to callback)\n";
382 void JSObject::JSObjectPrint(OStream& os) {
383 HeapObject::PrintHeader(os,
"JSObject");
387 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
" ["
389 <<
"]\n - prototype = " <<
reinterpret_cast<void*
>(iter.GetCurrent())
392 PrintTransitions(os);
398 void JSModule::JSModulePrint(OStream& os) {
399 HeapObject::PrintHeader(os,
"JSModule");
400 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
"\n"
402 context()->Print(os);
403 os <<
" - scope_info = " << Brief(scope_info())
413 #define TYPE_TO_STRING(TYPE) case TYPE: return #TYPE;
415 #undef TYPE_TO_STRING
422 void Symbol::SymbolPrint(OStream& os) {
423 HeapObject::PrintHeader(os,
"Symbol");
424 os <<
" - hash: " <<
Hash();
425 os <<
"\n - name: " << Brief(
name());
426 os <<
"\n - private: " << is_private();
427 os <<
"\n - own: " << is_own();
432 void Map::MapPrint(OStream& os) {
433 HeapObject::PrintHeader(os,
"Map");
438 os <<
"\n - pre-allocated property fields: "
455 << Brief(instance_descriptors());
457 os <<
"\n - transitions: " << Brief(transitions());
459 os <<
"\n - prototype: " << Brief(prototype());
460 os <<
"\n - constructor: " << Brief(constructor());
461 os <<
"\n - code cache: " << Brief(code_cache());
467 void CodeCache::CodeCachePrint(OStream& os) {
468 HeapObject::PrintHeader(os,
"CodeCache");
469 os <<
"\n - default_cache: " << Brief(default_cache());
470 os <<
"\n - normal_type_cache: " << Brief(normal_type_cache());
474 void PolymorphicCodeCache::PolymorphicCodeCachePrint(OStream& os) {
475 HeapObject::PrintHeader(os,
"PolymorphicCodeCache");
476 os <<
"\n - cache: " << Brief(cache());
480 void TypeFeedbackInfo::TypeFeedbackInfoPrint(OStream& os) {
481 HeapObject::PrintHeader(os,
"TypeFeedbackInfo");
488 void AliasedArgumentsEntry::AliasedArgumentsEntryPrint(OStream& os) {
489 HeapObject::PrintHeader(os,
"AliasedArgumentsEntry");
494 void FixedArray::FixedArrayPrint(OStream& os) {
495 HeapObject::PrintHeader(os,
"FixedArray");
496 os <<
" - length: " <<
length();
498 os <<
"\n [" <<
i <<
"]: " << Brief(
get(
i));
504 void FixedDoubleArray::FixedDoubleArrayPrint(OStream& os) {
505 HeapObject::PrintHeader(os,
"FixedDoubleArray");
506 os <<
" - length: " <<
length();
508 os <<
"\n [" <<
i <<
"]: ";
519 void ConstantPoolArray::ConstantPoolArrayPrint(OStream& os) {
520 HeapObject::PrintHeader(os,
"ConstantPoolArray");
521 os <<
" - length: " <<
length();
526 os <<
"\n [" <<
i <<
"]: code target pointer: "
529 os <<
"\n [" <<
i <<
"]: heap pointer: "
536 os <<
"\n Extended section:";
542 os <<
"\n [" <<
i <<
"]: code target pointer: "
545 os <<
"\n [" <<
i <<
"]: heap pointer: "
556 void JSValue::JSValuePrint(OStream& os) {
557 HeapObject::PrintHeader(os,
"ValueObject");
562 void JSMessageObject::JSMessageObjectPrint(OStream& os) {
563 HeapObject::PrintHeader(os,
"JSMessageObject");
564 os <<
" - type: " << Brief(type());
565 os <<
"\n - arguments: " << Brief(arguments());
568 os <<
"\n - script: " << Brief(script());
569 os <<
"\n - stack_frames: " << Brief(stack_frames());
574 void String::StringPrint(OStream& os) {
575 if (StringShape(
this).IsInternalized()) {
577 }
else if (StringShape(
this).IsCons()) {
583 const char truncated_epilogue[] =
"...<truncated>";
585 if (!FLAG_use_verbose_printer) {
587 len = 100 -
sizeof(truncated_epilogue);
590 for (
int i = 0;
i < len;
i++) {
591 os << AsUC16(Get(
i));
594 os << truncated_epilogue;
597 if (!StringShape(
this).IsInternalized()) os <<
"\"";
601 void Name::NamePrint(OStream& os) {
603 String::cast(
this)->StringPrint(os);
612 char* String::ToAsciiArray() {
615 static char* buffer =
NULL;
616 if (buffer !=
NULL) free(buffer);
617 buffer =
new char[
length()+1];
624 static const char*
const weekdays[] = {
625 "???",
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"
629 void JSDate::JSDatePrint(OStream& os) {
630 HeapObject::PrintHeader(os,
"JSDate");
631 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
"\n";
634 if (!year()->IsSmi()) {
635 os <<
" - time = NaN\n";
640 buf,
" - time = %s %04d/%02d/%02d %02d:%02d:%02d\n",
641 weekdays[weekday()->IsSmi() ? Smi::cast(weekday())->value() + 1 : 0],
642 year()->IsSmi() ? Smi::cast(year())->value() : -1,
643 month()->IsSmi() ? Smi::cast(month())->value() : -1,
644 day()->IsSmi() ? Smi::cast(day())->value() : -1,
645 hour()->IsSmi() ? Smi::cast(hour())->value() : -1,
646 min()->IsSmi() ? Smi::cast(
min())->value() : -1,
647 sec()->IsSmi() ? Smi::cast(sec())->value() : -1);
653 void JSProxy::JSProxyPrint(OStream& os) {
654 HeapObject::PrintHeader(os,
"JSProxy");
655 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
"\n";
656 os <<
" - handler = ";
657 handler()->Print(os);
658 os <<
"\n - hash = ";
664 void JSFunctionProxy::JSFunctionProxyPrint(OStream& os) {
665 HeapObject::PrintHeader(os,
"JSFunctionProxy");
666 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
"\n";
667 os <<
" - handler = ";
668 handler()->Print(os);
669 os <<
"\n - call_trap = ";
670 call_trap()->Print(os);
671 os <<
"\n - construct_trap = ";
672 construct_trap()->Print(os);
677 void JSSet::JSSetPrint(OStream& os) {
678 HeapObject::PrintHeader(os,
"JSSet");
679 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
"\n";
680 os <<
" - table = " << Brief(table());
685 void JSMap::JSMapPrint(OStream& os) {
686 HeapObject::PrintHeader(os,
"JSMap");
687 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
"\n";
688 os <<
" - table = " << Brief(table());
693 template <
class Derived,
class TableType>
694 void OrderedHashTableIterator<
695 Derived, TableType>::OrderedHashTableIteratorPrint(OStream& os) {
696 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
"\n";
697 os <<
" - table = " << Brief(table());
698 os <<
"\n - index = " << Brief(index());
699 os <<
"\n - kind = " << Brief(kind());
704 template void OrderedHashTableIterator<
706 OrderedHashSet>::OrderedHashTableIteratorPrint(OStream& os);
709 template void OrderedHashTableIterator<
711 OrderedHashMap>::OrderedHashTableIteratorPrint(OStream& os);
714 void JSSetIterator::JSSetIteratorPrint(OStream& os) {
715 HeapObject::PrintHeader(os,
"JSSetIterator");
716 OrderedHashTableIteratorPrint(os);
720 void JSMapIterator::JSMapIteratorPrint(OStream& os) {
721 HeapObject::PrintHeader(os,
"JSMapIterator");
722 OrderedHashTableIteratorPrint(os);
726 void JSWeakMap::JSWeakMapPrint(OStream& os) {
727 HeapObject::PrintHeader(os,
"JSWeakMap");
728 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
"\n";
729 os <<
" - table = " << Brief(table());
734 void JSWeakSet::JSWeakSetPrint(OStream& os) {
735 HeapObject::PrintHeader(os,
"JSWeakSet");
736 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
"\n";
737 os <<
" - table = " << Brief(table());
742 void JSArrayBuffer::JSArrayBufferPrint(OStream& os) {
743 HeapObject::PrintHeader(os,
"JSArrayBuffer");
744 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
"\n";
745 os <<
" - backing_store = " << backing_store() <<
"\n";
746 os <<
" - byte_length = " << Brief(byte_length());
751 void JSTypedArray::JSTypedArrayPrint(OStream& os) {
752 HeapObject::PrintHeader(os,
"JSTypedArray");
753 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
"\n";
754 os <<
" - buffer = " << Brief(buffer());
755 os <<
"\n - byte_offset = " << Brief(byte_offset());
756 os <<
"\n - byte_length = " << Brief(byte_length());
757 os <<
"\n - length = " << Brief(length());
763 void JSDataView::JSDataViewPrint(OStream& os) {
764 HeapObject::PrintHeader(os,
"JSDataView");
765 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
"\n";
766 os <<
" - buffer =" << Brief(buffer());
767 os <<
"\n - byte_offset = " << Brief(byte_offset());
768 os <<
"\n - byte_length = " << Brief(byte_length());
773 void JSFunction::JSFunctionPrint(OStream& os) {
774 HeapObject::PrintHeader(os,
"Function");
775 os <<
" - map = " <<
reinterpret_cast<void*
>(
map()) <<
"\n";
776 os <<
" - initial_map = ";
778 os <<
"\n - shared_info = " << Brief(shared());
779 os <<
"\n - name = " << Brief(shared()->
name());
780 os <<
"\n - context = " << Brief(
context());
781 if (shared()->bound()) {
784 os <<
"\n - literals = " << Brief(
literals());
786 os <<
"\n - code = " << Brief(
code());
794 void SharedFunctionInfo::SharedFunctionInfoPrint(OStream& os) {
795 HeapObject::PrintHeader(os,
"SharedFunctionInfo");
796 os <<
" - name: " << Brief(
name());
799 os <<
"\n - instance class name = ";
800 instance_class_name()->Print(os);
801 os <<
"\n - code = " << Brief(code());
803 os <<
"\n - source code = ";
804 String* source = String::cast(Script::cast(script())->source());
807 SmartArrayPointer<char> source_string =
811 os << source_string.get();
819 os <<
"\n - is expression = " << is_expression();
820 os <<
"\n - debug info = " << Brief(debug_info());
821 os <<
"\n - length = " <<
length();
822 os <<
"\n - optimized_code_map = " << Brief(optimized_code_map());
823 os <<
"\n - feedback_vector = ";
829 void JSGlobalProxy::JSGlobalProxyPrint(OStream& os) {
830 os <<
"global_proxy ";
832 os <<
"native context : " << Brief(native_context());
837 void JSGlobalObject::JSGlobalObjectPrint(OStream& os) {
840 os <<
"native context : " << Brief(native_context());
845 void JSBuiltinsObject::JSBuiltinsObjectPrint(OStream& os) {
851 void Cell::CellPrint(OStream& os) {
852 HeapObject::PrintHeader(os,
"Cell");
856 void PropertyCell::PropertyCellPrint(OStream& os) {
857 HeapObject::PrintHeader(os,
"PropertyCell");
861 void Code::CodePrint(OStream& os) {
862 HeapObject::PrintHeader(os,
"Code");
863 #ifdef ENABLE_DISASSEMBLER
864 if (FLAG_use_verbose_printer) {
865 Disassemble(
NULL, os);
871 void Foreign::ForeignPrint(OStream& os) {
876 void ExecutableAccessorInfo::ExecutableAccessorInfoPrint(
878 HeapObject::PrintHeader(os,
"ExecutableAccessorInfo");
879 os <<
"\n - name: " << Brief(
name());
880 os <<
"\n - flag: " << Brief(
flag());
881 os <<
"\n - getter: " << Brief(getter());
882 os <<
"\n - setter: " << Brief(setter());
883 os <<
"\n - data: " << Brief(data());
888 void DeclaredAccessorInfo::DeclaredAccessorInfoPrint(OStream& os) {
889 HeapObject::PrintHeader(os,
"DeclaredAccessorInfo");
890 os <<
"\n - name: " << Brief(
name());
891 os <<
"\n - flag: " << Brief(
flag());
892 os <<
"\n - descriptor: " << Brief(descriptor());
897 void DeclaredAccessorDescriptor::DeclaredAccessorDescriptorPrint(
899 HeapObject::PrintHeader(os,
"DeclaredAccessorDescriptor");
905 void Box::BoxPrint(OStream& os) {
906 HeapObject::PrintHeader(os,
"Box");
907 os <<
"\n - value: " << Brief(value());
912 void AccessorPair::AccessorPairPrint(OStream& os) {
913 HeapObject::PrintHeader(os,
"AccessorPair");
914 os <<
"\n - getter: " << Brief(getter());
915 os <<
"\n - setter: " << Brief(setter());
920 void AccessCheckInfo::AccessCheckInfoPrint(OStream& os) {
921 HeapObject::PrintHeader(os,
"AccessCheckInfo");
922 os <<
"\n - named_callback: " << Brief(named_callback());
923 os <<
"\n - indexed_callback: " << Brief(indexed_callback());
924 os <<
"\n - data: " << Brief(data());
929 void InterceptorInfo::InterceptorInfoPrint(OStream& os) {
930 HeapObject::PrintHeader(os,
"InterceptorInfo");
931 os <<
"\n - getter: " << Brief(getter());
932 os <<
"\n - setter: " << Brief(setter());
933 os <<
"\n - query: " << Brief(query());
934 os <<
"\n - deleter: " << Brief(deleter());
935 os <<
"\n - enumerator: " << Brief(enumerator());
936 os <<
"\n - data: " << Brief(data());
941 void CallHandlerInfo::CallHandlerInfoPrint(OStream& os) {
942 HeapObject::PrintHeader(os,
"CallHandlerInfo");
943 os <<
"\n - callback: " << Brief(callback());
944 os <<
"\n - data: " << Brief(data());
949 void FunctionTemplateInfo::FunctionTemplateInfoPrint(OStream& os) {
950 HeapObject::PrintHeader(os,
"FunctionTemplateInfo");
951 os <<
"\n - class name: " << Brief(class_name());
952 os <<
"\n - tag: " << Brief(tag());
953 os <<
"\n - property_list: " << Brief(property_list());
954 os <<
"\n - serial_number: " << Brief(serial_number());
955 os <<
"\n - call_code: " << Brief(call_code());
956 os <<
"\n - property_accessors: " << Brief(property_accessors());
958 os <<
"\n - parent_template: " << Brief(parent_template());
959 os <<
"\n - named_property_handler: " << Brief(named_property_handler());
961 os <<
"\n - instance_template: " << Brief(instance_template());
962 os <<
"\n - signature: " << Brief(signature());
963 os <<
"\n - access_check_info: " << Brief(access_check_info());
965 os <<
"\n - undetectable: " << (undetectable() ?
"true" :
"false");
966 os <<
"\n - need_access_check: " << (needs_access_check() ?
"true" :
"false");
971 void ObjectTemplateInfo::ObjectTemplateInfoPrint(OStream& os) {
972 HeapObject::PrintHeader(os,
"ObjectTemplateInfo");
973 os <<
" - tag: " << Brief(tag());
974 os <<
"\n - property_list: " << Brief(property_list());
975 os <<
"\n - property_accessors: " << Brief(property_accessors());
976 os <<
"\n - constructor: " << Brief(constructor());
982 void SignatureInfo::SignatureInfoPrint(OStream& os) {
983 HeapObject::PrintHeader(os,
"SignatureInfo");
984 os <<
"\n - receiver: " << Brief(receiver());
985 os <<
"\n - args: " << Brief(args());
990 void TypeSwitchInfo::TypeSwitchInfoPrint(OStream& os) {
991 HeapObject::PrintHeader(os,
"TypeSwitchInfo");
992 os <<
"\n - types: " << Brief(types());
997 void AllocationSite::AllocationSitePrint(OStream& os) {
998 HeapObject::PrintHeader(os,
"AllocationSite");
999 os <<
" - weak_next: " << Brief(weak_next());
1001 os <<
"\n - nested site: " << Brief(nested_site());
1002 os <<
"\n - memento found count: "
1004 os <<
"\n - memento create count: "
1006 os <<
"\n - pretenure decision: "
1008 os <<
"\n - transition_info: ";
1009 if (transition_info()->IsSmi()) {
1012 }
else if (transition_info()->IsJSArray()) {
1013 os <<
"Array literal " << Brief(transition_info());
1015 os <<
"unknown transition_info" << Brief(transition_info());
1021 void AllocationMemento::AllocationMementoPrint(OStream& os) {
1022 HeapObject::PrintHeader(os,
"AllocationMemento");
1023 os <<
" - allocation site: ";
1027 os <<
"<invalid>\n";
1032 void Script::ScriptPrint(OStream& os) {
1033 HeapObject::PrintHeader(os,
"Script");
1034 os <<
"\n - source: " << Brief(source());
1035 os <<
"\n - name: " << Brief(
name());
1036 os <<
"\n - line_offset: " << Brief(line_offset());
1037 os <<
"\n - column_offset: " << Brief(column_offset());
1038 os <<
"\n - type: " << Brief(type());
1039 os <<
"\n - id: " << Brief(
id());
1040 os <<
"\n - context data: " << Brief(context_data());
1041 os <<
"\n - wrapper: " << Brief(wrapper());
1043 os <<
"\n - line ends: " << Brief(line_ends());
1044 os <<
"\n - eval from shared: " << Brief(eval_from_shared());
1045 os <<
"\n - eval from instructions offset: "
1046 << Brief(eval_from_instructions_offset());
1051 void DebugInfo::DebugInfoPrint(OStream& os) {
1052 HeapObject::PrintHeader(os,
"DebugInfo");
1053 os <<
"\n - shared: " << Brief(shared());
1054 os <<
"\n - original_code: " << Brief(original_code());
1055 os <<
"\n - code: " << Brief(code());
1056 os <<
"\n - break_points: ";
1057 break_points()->Print(os);
1061 void BreakPointInfo::BreakPointInfoPrint(OStream& os) {
1062 HeapObject::PrintHeader(os,
"BreakPointInfo");
1063 os <<
"\n - code_position: " << code_position()->value();
1064 os <<
"\n - source_position: " << source_position()->value();
1065 os <<
"\n - statement_position: " << statement_position()->value();
1066 os <<
"\n - break_point_objects: " << Brief(break_point_objects());
1071 void DescriptorArray::PrintDescriptors(OStream& os) {
1076 os <<
" " <<
i <<
": " << desc;
1082 void TransitionArray::PrintTransitions(OStream& os) {
1085 os <<
" " <<
i <<
": ";
1090 os <<
" (transition to field)\n";
1094 os <<
" (transition to constant)\n";
1097 os <<
" (transition to callback)\n";
int aliased_context_slot() const
AllocationSite * GetAllocationSite()
int memento_found_count()
PretenureDecision pretenure_decision()
int memento_create_count()
ElementsKind GetElementsKind()
Address GetDataStartAddress()
Address get_code_ptr_entry(int index)
int32_t get_int32_entry(int index)
Object * get_heap_ptr_entry(int index)
int last_index(Type type, LayoutSection layout_section)
bool is_extended_layout()
double get_int64_entry_as_double(int index)
int first_extended_section_index()
void Get(int descriptor_number, Descriptor *desc)
int number_of_descriptors()
bool is_the_hole(int index)
double get_scalar(int index)
Address foreign_address()
Isolate * GetIsolate() const
FixedArray * function_bindings()
int start_position() const
Object * RawFastPropertyAt(FieldIndex index)
NameDictionary * property_dictionary()
ElementsKind elements_kind()
int NumberOfOwnDescriptors()
int unused_property_fields()
int pre_allocated_property_fields()
Object * GetBackPointer()
bool is_access_check_needed()
bool has_named_interceptor()
bool is_hidden_prototype()
int inobject_properties()
bool has_instance_call_handler()
InstanceType instance_type()
bool HasTransitionArray() const
bool has_indexed_interceptor()
friend class PrototypeIterator
CompilationType compilation_type()
int start_position() const
int function_token_position() const
int ast_node_count() const
bool HasSourceCode() const
int expected_nof_properties() const
static Smi * FromInt(int value)
static void WriteToFlat(String *source, sinkchar *sink, int from, int to)
int number_of_transitions()
Name * GetKey(int transition_number)
PropertyDetails GetTargetDetails(int transition_number)
int ic_with_type_info_count()
static Vector< T > New(int length)
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset internal_field_count
kSerializedDataOffset kPrototypeTemplateOffset indexed_property_handler
static int min(int a, int b)
int SNPrintF(Vector< char > str, const char *format,...)
kSerializedDataOffset Object
@ FIXED_DOUBLE_ARRAY_TYPE
@ JS_GENERATOR_OBJECT_TYPE
@ JS_CONTEXT_EXTENSION_OBJECT_TYPE
@ MUTABLE_HEAP_NUMBER_TYPE
@ SHARED_FUNCTION_INFO_TYPE
@ JS_BUILTINS_OBJECT_TYPE
@ CONSTANT_POOL_ARRAY_TYPE
@ EXTERNAL_UINT16_ELEMENTS
@ EXTERNAL_INT16_ELEMENTS
@ EXTERNAL_UINT8_ELEMENTS
@ EXTERNAL_INT32_ELEMENTS
@ FAST_HOLEY_DOUBLE_ELEMENTS
@ SLOPPY_ARGUMENTS_ELEMENTS
@ EXTERNAL_FLOAT32_ELEMENTS
@ EXTERNAL_FLOAT64_ELEMENTS
@ FAST_HOLEY_SMI_ELEMENTS
@ EXTERNAL_UINT32_ELEMENTS
@ EXTERNAL_UINT8_CLAMPED_ELEMENTS
const char * ElementsKindToString(ElementsKind kind)
OStream & flush(OStream &os)
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset kInternalFieldCountOffset dependent_code
kFeedbackVectorOffset hidden_prototype
kFeedbackVectorOffset flag
kSerializedDataOffset prototype_template
Debugger support for the V8 JavaScript engine.
#define MAKE_STRUCT_CASE(NAME, Name, name)
#define INSTANCE_TYPE_LIST(V)
#define T(name, string, precedence)