47 if (ToObject(&this_as_object)) {
48 if (this_as_object->IsSmi()) {
60 void MaybeObject::PrintLn() {
65 void MaybeObject::PrintLn(FILE* out) {
71 void HeapObject::PrintHeader(FILE* out,
const char*
id) {
72 PrintF(out,
"%p: [%s]\n", reinterpret_cast<void*>(
this),
id);
76 void HeapObject::HeapObjectPrint(FILE* out) {
85 switch (instance_type) {
111 #define PRINT_EXTERNAL_ARRAY(Type, type, TYPE, ctype, size) \
112 case EXTERNAL_##TYPE##_ARRAY_TYPE: \
113 External##Type##Array::cast(this)->External##Type##ArrayPrint(out); \
117 #undef PRINT_EXTERNAL_ARRAY
119 #define PRINT_FIXED_TYPED_ARRAY(Type, type, TYPE, ctype, size) \
120 case Fixed##Type##Array::kInstanceType: \
121 Fixed##Type##Array::cast(this)->FixedTypedArrayPrint(out); \
125 #undef PRINT_FIXED_TYPED_ARRAY
156 PrintF(out,
"Value wrapper around:");
207 #define MAKE_STRUCT_CASE(NAME, Name, name) \
209 Name::cast(this)->Name##Print(out); \
212 #undef MAKE_STRUCT_CASE
215 PrintF(out,
"UNKNOWN TYPE %d",
map()->instance_type());
222 void ByteArray::ByteArrayPrint(FILE* out) {
227 void FreeSpace::FreeSpacePrint(FILE* out) {
232 #define EXTERNAL_ARRAY_PRINTER(Type, type, TYPE, ctype, size) \
233 void External##Type##Array::External##Type##ArrayPrint(FILE* out) { \
234 PrintF(out, "external " #type " array"); \
239 #undef EXTERNAL_ARRAY_PRINTER
242 template <
class Traits>
243 void FixedTypedArray<Traits>::FixedTypedArrayPrint(FILE* out) {
244 PrintF(out,
"fixed %s", Traits::Designator());
248 void JSObject::PrintProperties(FILE* out) {
250 DescriptorArray* descs =
map()->instance_descriptors();
253 descs->GetKey(i)->NamePrint(out);
255 switch (descs->GetType(i)) {
257 int index = descs->GetFieldIndex(i);
259 PrintF(out,
" (field at offset %d)\n", index);
263 descs->GetConstant(i)->ShortPrint(out);
264 PrintF(out,
" (constant)\n");
267 descs->GetCallbacksObject(i)->ShortPrint(out);
268 PrintF(out,
" (callback)\n");
287 static void DoPrintElements(FILE *out,
Object*
object) {
288 T* p = T::cast(
object);
289 for (
int i = 0; i < p->length(); i++) {
290 PrintF(out,
" %d: %d\n", i, p->get_scalar(i));
296 static void DoPrintDoubleElements(FILE* out,
Object*
object) {
297 T* p = T::cast(
object);
298 for (
int i = 0; i < p->length(); i++) {
299 PrintF(out,
" %d: %f\n", i, p->get_scalar(i));
304 void JSObject::PrintElements(FILE* out) {
307 switch (
map()->elements_kind()) {
314 for (
int i = 0; i < p->length(); i++) {
316 p->get(i)->ShortPrint(out);
324 if (elements()->length() > 0) {
326 for (
int i = 0; i < p->length(); i++) {
327 if (p->is_the_hole(i)) {
328 PrintF(out,
" %d: <the hole>", i);
330 PrintF(out,
" %d: %g", i, p->get_scalar(i));
339 #define PRINT_ELEMENTS(Kind, Type) \
341 DoPrintElements<Type>(out, elements()); \
345 #define PRINT_DOUBLE_ELEMENTS(Kind, Type) \
347 DoPrintDoubleElements<Type>(out, elements()); \
375 #undef PRINT_DOUBLE_ELEMENTS
376 #undef PRINT_ELEMENTS
379 elements()->Print(out);
383 PrintF(out,
" parameter map:");
384 for (
int i = 2; i < p->length(); i++) {
385 PrintF(out,
" %d:", i - 2);
386 p->get(i)->ShortPrint(out);
388 PrintF(out,
"\n context: ");
389 p->get(0)->ShortPrint(out);
390 PrintF(out,
"\n arguments: ");
391 p->get(1)->ShortPrint(out);
399 void JSObject::PrintTransitions(FILE* out) {
400 if (!
map()->HasTransitionArray())
return;
401 TransitionArray* transitions =
map()->transitions();
402 for (
int i = 0; i < transitions->number_of_transitions(); i++) {
403 Name* key = transitions->GetKey(i);
407 if (key ==
GetHeap()->frozen_symbol()) {
408 PrintF(out,
" (transition to frozen)\n");
409 }
else if (key ==
GetHeap()->elements_transition_symbol()) {
410 PrintF(out,
" (transition to ");
413 }
else if (key ==
GetHeap()->observed_symbol()) {
414 PrintF(out,
" (transition to Object.observe)\n");
416 switch (transitions->GetTargetDetails(i).type()) {
418 PrintF(out,
" (transition to field)\n");
422 PrintF(out,
" (transition to constant)\n");
425 PrintF(out,
" (transition to callback)\n");
441 void JSObject::JSObjectPrint(FILE* out) {
442 PrintF(out,
"%p: [JSObject]\n", reinterpret_cast<void*>(
this));
443 PrintF(out,
" - map = %p [", reinterpret_cast<void*>(
map()));
448 "]\n - prototype = %p\n",
451 PrintProperties(out);
452 PrintTransitions(out);
458 void JSModule::JSModulePrint(FILE* out) {
459 HeapObject::PrintHeader(out,
"JSModule");
460 PrintF(out,
" - map = %p\n", reinterpret_cast<void*>(
map()));
461 PrintF(out,
" - context = ");
462 context()->Print(out);
463 PrintF(out,
" - scope_info = ");
464 scope_info()->ShortPrint(out);
467 PrintProperties(out);
475 #define TYPE_TO_STRING(TYPE) case TYPE: return #TYPE;
477 #undef TYPE_TO_STRING
484 void Symbol::SymbolPrint(FILE* out) {
485 HeapObject::PrintHeader(out,
"Symbol");
488 name()->ShortPrint();
489 PrintF(out,
" - private: %d\n", is_private());
494 void Map::MapPrint(FILE* out) {
495 HeapObject::PrintHeader(out,
"Map");
499 PrintF(out,
" - elements kind: ");
501 PrintF(out,
"\n - pre-allocated property fields: %d\n",
505 PrintF(out,
" - hidden_prototype\n");
508 PrintF(out,
" - named_interceptor\n");
511 PrintF(out,
" - indexed_interceptor\n");
514 PrintF(out,
" - undetectable\n");
517 PrintF(out,
" - instance_call_handler\n");
520 PrintF(out,
" - access_check_needed\n");
523 PrintF(out,
" - frozen\n");
525 PrintF(out,
" - sealed\n");
527 PrintF(out,
" - back pointer: ");
529 PrintF(out,
"\n - instance descriptors %s#%i: ",
532 instance_descriptors()->ShortPrint(out);
534 PrintF(out,
"\n - transitions: ");
535 transitions()->ShortPrint(out);
537 PrintF(out,
"\n - prototype: ");
538 prototype()->ShortPrint(out);
539 PrintF(out,
"\n - constructor: ");
540 constructor()->ShortPrint(out);
541 PrintF(out,
"\n - code cache: ");
542 code_cache()->ShortPrint(out);
543 PrintF(out,
"\n - dependent code: ");
549 void CodeCache::CodeCachePrint(FILE* out) {
550 HeapObject::PrintHeader(out,
"CodeCache");
551 PrintF(out,
"\n - default_cache: ");
552 default_cache()->ShortPrint(out);
553 PrintF(out,
"\n - normal_type_cache: ");
554 normal_type_cache()->ShortPrint(out);
558 void PolymorphicCodeCache::PolymorphicCodeCachePrint(FILE* out) {
559 HeapObject::PrintHeader(out,
"PolymorphicCodeCache");
560 PrintF(out,
"\n - cache: ");
561 cache()->ShortPrint(out);
565 void TypeFeedbackInfo::TypeFeedbackInfoPrint(FILE* out) {
566 HeapObject::PrintHeader(out,
"TypeFeedbackInfo");
567 PrintF(out,
" - ic_total_count: %d, ic_with_type_info_count: %d\n",
569 PrintF(out,
" - feedback_vector: ");
570 feedback_vector()->FixedArrayPrint(out);
574 void AliasedArgumentsEntry::AliasedArgumentsEntryPrint(FILE* out) {
575 HeapObject::PrintHeader(out,
"AliasedArgumentsEntry");
580 void FixedArray::FixedArrayPrint(FILE* out) {
581 HeapObject::PrintHeader(out,
"FixedArray");
583 for (
int i = 0; i <
length(); i++) {
584 PrintF(out,
"\n [%d]: ", i);
591 void FixedDoubleArray::FixedDoubleArrayPrint(FILE* out) {
592 HeapObject::PrintHeader(out,
"FixedDoubleArray");
594 for (
int i = 0; i <
length(); i++) {
596 PrintF(out,
"\n [%d]: <the hole>", i);
605 void ConstantPoolArray::ConstantPoolArrayPrint(FILE* out) {
606 HeapObject::PrintHeader(out,
"ConstantPoolArray");
608 for (
int i = 0; i <
length(); i++) {
612 PrintF(out,
"\n [%d]: code target pointer: %p", i,
615 PrintF(out,
"\n [%d]: heap pointer: %p", i,
625 void JSValue::JSValuePrint(FILE* out) {
626 HeapObject::PrintHeader(out,
"ValueObject");
631 void JSMessageObject::JSMessageObjectPrint(FILE* out) {
632 HeapObject::PrintHeader(out,
"JSMessageObject");
634 type()->ShortPrint(out);
635 PrintF(out,
"\n - arguments: ");
636 arguments()->ShortPrint(out);
639 PrintF(out,
"\n - script: ");
640 script()->ShortPrint(out);
641 PrintF(out,
"\n - stack_frames: ");
642 stack_frames()->ShortPrint(out);
647 void String::StringPrint(FILE* out) {
648 if (StringShape(
this).IsInternalized()) {
650 }
else if (StringShape(
this).IsCons()) {
656 const char truncated_epilogue[] =
"...<truncated>";
658 if (!FLAG_use_verbose_printer) {
660 len = 100 -
sizeof(truncated_epilogue);
663 for (
int i = 0; i < len; i++) {
664 PrintF(out,
"%c", Get(i));
667 PrintF(out,
"%s", truncated_epilogue);
670 if (!StringShape(
this).IsInternalized())
PrintF(out,
"\"");
674 void Name::NamePrint(FILE* out) {
685 char* String::ToAsciiArray() {
688 static char* buffer =
NULL;
689 if (buffer !=
NULL) free(buffer);
690 buffer =
new char[
length()+1];
697 static const char*
const weekdays[] = {
698 "???",
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"
702 void JSDate::JSDatePrint(FILE* out) {
703 HeapObject::PrintHeader(out,
"JSDate");
704 PrintF(out,
" - map = %p\n", reinterpret_cast<void*>(
map()));
705 PrintF(out,
" - value = ");
707 if (!year()->IsSmi()) {
708 PrintF(out,
" - time = NaN\n");
710 PrintF(out,
" - time = %s %04d/%02d/%02d %02d:%02d:%02d\n",
711 weekdays[weekday()->IsSmi() ?
Smi::cast(weekday())->value() + 1 : 0],
712 year()->IsSmi() ?
Smi::cast(year())->value() : -1,
713 month()->IsSmi() ?
Smi::cast(month())->value() : -1,
714 day()->IsSmi() ?
Smi::cast(day())->value() : -1,
715 hour()->IsSmi() ?
Smi::cast(hour())->value() : -1,
716 min()->IsSmi() ?
Smi::cast(min())->value() : -1,
717 sec()->IsSmi() ?
Smi::cast(sec())->value() : -1);
722 void JSProxy::JSProxyPrint(FILE* out) {
723 HeapObject::PrintHeader(out,
"JSProxy");
724 PrintF(out,
" - map = %p\n", reinterpret_cast<void*>(
map()));
725 PrintF(out,
" - handler = ");
726 handler()->Print(out);
727 PrintF(out,
" - hash = ");
733 void JSFunctionProxy::JSFunctionProxyPrint(FILE* out) {
734 HeapObject::PrintHeader(out,
"JSFunctionProxy");
735 PrintF(out,
" - map = %p\n", reinterpret_cast<void*>(
map()));
736 PrintF(out,
" - handler = ");
737 handler()->Print(out);
738 PrintF(out,
" - call_trap = ");
739 call_trap()->Print(out);
740 PrintF(out,
" - construct_trap = ");
741 construct_trap()->Print(out);
746 void JSSet::JSSetPrint(FILE* out) {
747 HeapObject::PrintHeader(out,
"JSSet");
748 PrintF(out,
" - map = %p\n", reinterpret_cast<void*>(
map()));
749 PrintF(out,
" - table = ");
750 table()->ShortPrint(out);
755 void JSMap::JSMapPrint(FILE* out) {
756 HeapObject::PrintHeader(out,
"JSMap");
757 PrintF(out,
" - map = %p\n", reinterpret_cast<void*>(
map()));
758 PrintF(out,
" - table = ");
759 table()->ShortPrint(out);
764 void JSWeakMap::JSWeakMapPrint(FILE* out) {
765 HeapObject::PrintHeader(out,
"JSWeakMap");
766 PrintF(out,
" - map = %p\n", reinterpret_cast<void*>(
map()));
767 PrintF(out,
" - table = ");
768 table()->ShortPrint(out);
773 void JSWeakSet::JSWeakSetPrint(FILE* out) {
774 HeapObject::PrintHeader(out,
"JSWeakSet");
775 PrintF(out,
" - map = %p\n", reinterpret_cast<void*>(
map()));
776 PrintF(out,
" - table = ");
777 table()->ShortPrint(out);
782 void JSArrayBuffer::JSArrayBufferPrint(FILE* out) {
783 HeapObject::PrintHeader(out,
"JSArrayBuffer");
784 PrintF(out,
" - map = %p\n", reinterpret_cast<void*>(
map()));
785 PrintF(out,
" - backing_store = %p\n", backing_store());
786 PrintF(out,
" - byte_length = ");
787 byte_length()->ShortPrint(out);
792 void JSTypedArray::JSTypedArrayPrint(FILE* out) {
793 HeapObject::PrintHeader(out,
"JSTypedArray");
794 PrintF(out,
" - map = %p\n", reinterpret_cast<void*>(
map()));
795 PrintF(out,
" - buffer =");
796 buffer()->ShortPrint(out);
797 PrintF(out,
"\n - byte_offset = ");
798 byte_offset()->ShortPrint(out);
799 PrintF(out,
"\n - byte_length = ");
800 byte_length()->ShortPrint(out);
801 PrintF(out,
"\n - length = ");
802 length()->ShortPrint(out);
808 void JSDataView::JSDataViewPrint(FILE* out) {
809 HeapObject::PrintHeader(out,
"JSDataView");
810 PrintF(out,
" - map = %p\n", reinterpret_cast<void*>(
map()));
811 PrintF(out,
" - buffer =");
812 buffer()->ShortPrint(out);
813 PrintF(out,
"\n - byte_offset = ");
814 byte_offset()->ShortPrint(out);
815 PrintF(out,
"\n - byte_length = ");
816 byte_length()->ShortPrint(out);
821 void JSFunction::JSFunctionPrint(FILE* out) {
822 HeapObject::PrintHeader(out,
"Function");
823 PrintF(out,
" - map = %p\n", reinterpret_cast<void*>(
map()));
824 PrintF(out,
" - initial_map = ");
828 PrintF(out,
"\n - shared_info = ");
829 shared()->ShortPrint(out);
830 PrintF(out,
"\n - name = ");
831 shared()->name()->Print(out);
832 PrintF(out,
"\n - context = ");
834 if (shared()->bound()) {
835 PrintF(out,
"\n - bindings = ");
838 PrintF(out,
"\n - literals = ");
841 PrintF(out,
"\n - code = ");
845 PrintProperties(out);
852 void SharedFunctionInfo::SharedFunctionInfoPrint(FILE* out) {
853 HeapObject::PrintHeader(out,
"SharedFunctionInfo");
855 name()->ShortPrint(out);
857 PrintF(out,
"\n - instance class name = ");
859 PrintF(out,
"\n - code = ");
860 code()->ShortPrint(out);
862 PrintF(out,
"\n - source code = ");
866 SmartArrayPointer<char> source_string =
869 start, length,
NULL);
870 PrintF(out,
"%s", source_string.get());
879 PrintF(out,
"\n - debug info = ");
880 debug_info()->ShortPrint(out);
882 PrintF(out,
"\n - optimized_code_map = ");
883 optimized_code_map()->ShortPrint(out);
888 void JSGlobalProxy::JSGlobalProxyPrint(FILE* out) {
889 PrintF(out,
"global_proxy ");
891 PrintF(out,
"native context : ");
892 native_context()->ShortPrint(out);
897 void JSGlobalObject::JSGlobalObjectPrint(FILE* out) {
900 PrintF(out,
"native context : ");
901 native_context()->ShortPrint(out);
906 void JSBuiltinsObject::JSBuiltinsObjectPrint(FILE* out) {
912 void Cell::CellPrint(FILE* out) {
913 HeapObject::PrintHeader(out,
"Cell");
917 void PropertyCell::PropertyCellPrint(FILE* out) {
918 HeapObject::PrintHeader(out,
"PropertyCell");
922 void Code::CodePrint(FILE* out) {
923 HeapObject::PrintHeader(out,
"Code");
924 #ifdef ENABLE_DISASSEMBLER
925 if (FLAG_use_verbose_printer) {
926 Disassemble(
NULL, out);
932 void Foreign::ForeignPrint(FILE* out) {
937 void ExecutableAccessorInfo::ExecutableAccessorInfoPrint(FILE* out) {
938 HeapObject::PrintHeader(out,
"ExecutableAccessorInfo");
939 PrintF(out,
"\n - name: ");
940 name()->ShortPrint(out);
941 PrintF(out,
"\n - flag: ");
942 flag()->ShortPrint(out);
943 PrintF(out,
"\n - getter: ");
944 getter()->ShortPrint(out);
945 PrintF(out,
"\n - setter: ");
946 setter()->ShortPrint(out);
947 PrintF(out,
"\n - data: ");
948 data()->ShortPrint(out);
952 void DeclaredAccessorInfo::DeclaredAccessorInfoPrint(FILE* out) {
953 HeapObject::PrintHeader(out,
"DeclaredAccessorInfo");
954 PrintF(out,
"\n - name: ");
955 name()->ShortPrint(out);
956 PrintF(out,
"\n - flag: ");
957 flag()->ShortPrint(out);
958 PrintF(out,
"\n - descriptor: ");
959 descriptor()->ShortPrint(out);
963 void DeclaredAccessorDescriptor::DeclaredAccessorDescriptorPrint(FILE* out) {
964 HeapObject::PrintHeader(out,
"DeclaredAccessorDescriptor");
965 PrintF(out,
"\n - internal field: ");
970 void Box::BoxPrint(FILE* out) {
971 HeapObject::PrintHeader(out,
"Box");
972 PrintF(out,
"\n - value: ");
973 value()->ShortPrint(out);
977 void AccessorPair::AccessorPairPrint(FILE* out) {
978 HeapObject::PrintHeader(out,
"AccessorPair");
979 PrintF(out,
"\n - getter: ");
980 getter()->ShortPrint(out);
981 PrintF(out,
"\n - setter: ");
982 setter()->ShortPrint(out);
983 PrintF(out,
"\n - flag: ");
984 access_flags()->ShortPrint(out);
988 void AccessCheckInfo::AccessCheckInfoPrint(FILE* out) {
989 HeapObject::PrintHeader(out,
"AccessCheckInfo");
990 PrintF(out,
"\n - named_callback: ");
991 named_callback()->ShortPrint(out);
992 PrintF(out,
"\n - indexed_callback: ");
993 indexed_callback()->ShortPrint(out);
994 PrintF(out,
"\n - data: ");
995 data()->ShortPrint(out);
999 void InterceptorInfo::InterceptorInfoPrint(FILE* out) {
1000 HeapObject::PrintHeader(out,
"InterceptorInfo");
1001 PrintF(out,
"\n - getter: ");
1002 getter()->ShortPrint(out);
1003 PrintF(out,
"\n - setter: ");
1004 setter()->ShortPrint(out);
1005 PrintF(out,
"\n - query: ");
1006 query()->ShortPrint(out);
1007 PrintF(out,
"\n - deleter: ");
1008 deleter()->ShortPrint(out);
1009 PrintF(out,
"\n - enumerator: ");
1010 enumerator()->ShortPrint(out);
1011 PrintF(out,
"\n - data: ");
1012 data()->ShortPrint(out);
1016 void CallHandlerInfo::CallHandlerInfoPrint(FILE* out) {
1017 HeapObject::PrintHeader(out,
"CallHandlerInfo");
1018 PrintF(out,
"\n - callback: ");
1019 callback()->ShortPrint(out);
1020 PrintF(out,
"\n - data: ");
1021 data()->ShortPrint(out);
1022 PrintF(out,
"\n - call_stub_cache: ");
1026 void FunctionTemplateInfo::FunctionTemplateInfoPrint(FILE* out) {
1027 HeapObject::PrintHeader(out,
"FunctionTemplateInfo");
1028 PrintF(out,
"\n - class name: ");
1029 class_name()->ShortPrint(out);
1030 PrintF(out,
"\n - tag: ");
1031 tag()->ShortPrint(out);
1032 PrintF(out,
"\n - property_list: ");
1033 property_list()->ShortPrint(out);
1034 PrintF(out,
"\n - serial_number: ");
1035 serial_number()->ShortPrint(out);
1036 PrintF(out,
"\n - call_code: ");
1037 call_code()->ShortPrint(out);
1038 PrintF(out,
"\n - property_accessors: ");
1039 property_accessors()->ShortPrint(out);
1040 PrintF(out,
"\n - prototype_template: ");
1042 PrintF(out,
"\n - parent_template: ");
1043 parent_template()->ShortPrint(out);
1044 PrintF(out,
"\n - named_property_handler: ");
1045 named_property_handler()->ShortPrint(out);
1046 PrintF(out,
"\n - indexed_property_handler: ");
1048 PrintF(out,
"\n - instance_template: ");
1049 instance_template()->ShortPrint(out);
1050 PrintF(out,
"\n - signature: ");
1051 signature()->ShortPrint(out);
1052 PrintF(out,
"\n - access_check_info: ");
1053 access_check_info()->ShortPrint(out);
1054 PrintF(out,
"\n - hidden_prototype: %s",
1055 hidden_prototype() ?
"true" :
"false");
1056 PrintF(out,
"\n - undetectable: %s", undetectable() ?
"true" :
"false");
1057 PrintF(out,
"\n - need_access_check: %s",
1062 void ObjectTemplateInfo::ObjectTemplateInfoPrint(FILE* out) {
1063 HeapObject::PrintHeader(out,
"ObjectTemplateInfo");
1065 tag()->ShortPrint(out);
1066 PrintF(out,
"\n - property_list: ");
1067 property_list()->ShortPrint(out);
1068 PrintF(out,
"\n - property_accessors: ");
1069 property_accessors()->ShortPrint(out);
1070 PrintF(out,
"\n - constructor: ");
1071 constructor()->ShortPrint(out);
1072 PrintF(out,
"\n - internal_field_count: ");
1078 void SignatureInfo::SignatureInfoPrint(FILE* out) {
1079 HeapObject::PrintHeader(out,
"SignatureInfo");
1080 PrintF(out,
"\n - receiver: ");
1081 receiver()->ShortPrint(out);
1082 PrintF(out,
"\n - args: ");
1083 args()->ShortPrint(out);
1087 void TypeSwitchInfo::TypeSwitchInfoPrint(FILE* out) {
1088 HeapObject::PrintHeader(out,
"TypeSwitchInfo");
1089 PrintF(out,
"\n - types: ");
1090 types()->ShortPrint(out);
1094 void AllocationSite::AllocationSitePrint(FILE* out) {
1095 HeapObject::PrintHeader(out,
"AllocationSite");
1096 PrintF(out,
" - weak_next: ");
1097 weak_next()->ShortPrint(out);
1098 PrintF(out,
"\n - dependent code: ");
1100 PrintF(out,
"\n - nested site: ");
1101 nested_site()->ShortPrint(out);
1102 PrintF(out,
"\n - memento found count: ");
1104 PrintF(out,
"\n - memento create count: ");
1106 PrintF(out,
"\n - pretenure decision: ");
1108 PrintF(out,
"\n - transition_info: ");
1109 if (transition_info()->IsSmi()) {
1111 PrintF(out,
"Array allocation with ElementsKind ");
1115 }
else if (transition_info()->IsJSArray()) {
1116 PrintF(out,
"Array literal ");
1117 transition_info()->ShortPrint(out);
1122 PrintF(out,
"unknown transition_info");
1123 transition_info()->ShortPrint(out);
1128 void AllocationMemento::AllocationMementoPrint(FILE* out) {
1129 HeapObject::PrintHeader(out,
"AllocationMemento");
1130 PrintF(out,
" - allocation site: ");
1134 PrintF(out,
"<invalid>\n");
1139 void Script::ScriptPrint(FILE* out) {
1140 HeapObject::PrintHeader(out,
"Script");
1141 PrintF(out,
"\n - source: ");
1142 source()->ShortPrint(out);
1143 PrintF(out,
"\n - name: ");
1144 name()->ShortPrint(out);
1145 PrintF(out,
"\n - line_offset: ");
1146 line_offset()->ShortPrint(out);
1147 PrintF(out,
"\n - column_offset: ");
1148 column_offset()->ShortPrint(out);
1149 PrintF(out,
"\n - type: ");
1150 type()->ShortPrint(out);
1151 PrintF(out,
"\n - id: ");
1152 id()->ShortPrint(out);
1153 PrintF(out,
"\n - context data: ");
1154 context_data()->ShortPrint(out);
1155 PrintF(out,
"\n - wrapper: ");
1156 wrapper()->ShortPrint(out);
1158 PrintF(out,
"\n - line ends: ");
1159 line_ends()->ShortPrint(out);
1160 PrintF(out,
"\n - eval from shared: ");
1161 eval_from_shared()->ShortPrint(out);
1162 PrintF(out,
"\n - eval from instructions offset: ");
1163 eval_from_instructions_offset()->ShortPrint(out);
1168 #ifdef ENABLE_DEBUGGER_SUPPORT
1169 void DebugInfo::DebugInfoPrint(FILE* out) {
1170 HeapObject::PrintHeader(out,
"DebugInfo");
1171 PrintF(out,
"\n - shared: ");
1172 shared()->ShortPrint(out);
1173 PrintF(out,
"\n - original_code: ");
1174 original_code()->ShortPrint(out);
1175 PrintF(out,
"\n - code: ");
1176 code()->ShortPrint(out);
1177 PrintF(out,
"\n - break_points: ");
1178 break_points()->Print(out);
1182 void BreakPointInfo::BreakPointInfoPrint(FILE* out) {
1183 HeapObject::PrintHeader(out,
"BreakPointInfo");
1184 PrintF(out,
"\n - code_position: %d", code_position()->value());
1185 PrintF(out,
"\n - source_position: %d", source_position()->value());
1186 PrintF(out,
"\n - statement_position: %d", statement_position()->value());
1187 PrintF(out,
"\n - break_point_objects: ");
1188 break_point_objects()->ShortPrint(out);
1190 #endif // ENABLE_DEBUGGER_SUPPORT
1193 void DescriptorArray::PrintDescriptors(FILE* out) {
1205 void TransitionArray::PrintTransitions(FILE* out) {
1209 GetKey(i)->NamePrint(out);
1213 PrintF(out,
" (transition to field)\n");
1217 PrintF(out,
" (transition to constant)\n");
1220 PrintF(out,
" (transition to callback)\n");
1236 #endif // OBJECT_PRINT
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
FixedArray * function_bindings()
static ConstantPoolArray * cast(Object *obj)
int inobject_properties()
#define INSTANCE_TYPE_LIST(V)
AllocationSite * GetAllocationSite()
bool is_hidden_prototype()
void PrintF(const char *format,...)
kInstanceClassNameOffset kNeedsAccessCheckBit kRemovePrototypeBit is_expression
static String * cast(Object *obj)
kInstanceClassNameOffset needs_access_check
int memento_create_count()
int unused_property_fields()
static Smi * FromInt(int value)
PretenureDecision pretenure_decision()
int NumberOfOwnDescriptors()
static HeapObject * cast(Object *obj)
bool is_access_check_needed()
static JSBuiltinsObject * cast(Object *obj)
void Get(int descriptor_number, Descriptor *desc)
static JSSet * cast(Object *obj)
static Map * cast(Object *obj)
kSerializedDataOffset Object
static ByteArray * cast(Object *obj)
int32_t get_int32_entry(int index)
static FreeSpace * cast(Object *obj)
static Foreign * cast(Object *obj)
static Script * cast(Object *obj)
static SharedFunctionInfo * cast(Object *obj)
Name * GetKey(int transition_number)
static Code * cast(Object *obj)
static Symbol * cast(Object *obj)
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset internal_field_count
static Smi * cast(Object *object)
int function_token_position()
kInstanceClassNameOffset flag
bool has_instance_call_handler()
static JSFunctionProxy * cast(Object *obj)
void FailurePrint(FILE *out=stdout)
Object * get_heap_ptr_entry(int index)
static JSGlobalProxy * cast(Object *obj)
static Cell * cast(Object *obj)
int pre_allocated_property_fields()
double get_int64_entry_as_double(int index)
static Failure * cast(MaybeObject *object)
static Oddball * cast(Object *obj)
Object * RawFastPropertyAt(int index)
int first_code_ptr_index()
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
int memento_found_count()
static JSTypedArray * cast(Object *obj)
static FixedDoubleArray * cast(Object *obj)
ElementsKind GetElementsKind()
int number_of_transitions()
static PropertyCell * cast(Object *obj)
static JSMap * cast(Object *obj)
double get_scalar(int index)
static JSMessageObject * cast(Object *obj)
#define T(name, string, precedence)
static JSDate * cast(Object *obj)
bool HasTransitionArray()
static JSDataView * cast(Object *obj)
void PrintElementsKind(FILE *out, ElementsKind kind)
bool has_named_interceptor()
static HeapNumber * cast(Object *obj)
static void WriteToFlat(String *source, sinkchar *sink, int from, int to)
NameDictionary * property_dictionary()
bool is_the_hole(int index)
bool has_indexed_interceptor()
Object * GetBackPointer()
void HeapNumberPrint(FILE *out=stdout)
static JSValue * cast(Object *obj)
void ShortPrint(FILE *out=stdout)
int number_of_descriptors()
static JSWeakMap * cast(Object *obj)
static JSWeakSet * cast(Object *obj)
int ic_with_type_info_count()
InstanceType instance_type()
static JSProxy * cast(Object *obj)
void SmiPrint(FILE *out=stdout)
static FixedArray * cast(Object *obj)
void Print(const v8::FunctionCallbackInfo< v8::Value > &args)
kSerializedDataOffset kPrototypeTemplateOffset kIndexedPropertyHandlerOffset kInstanceCallHandlerOffset kInternalFieldCountOffset dependent_code
ElementsKind elements_kind()
int first_heap_ptr_index()
kSerializedDataOffset kPrototypeTemplateOffset indexed_property_handler
Address GetDataStartAddress()
static JSArrayBuffer * cast(Object *obj)
Address foreign_address()
int aliased_context_slot()
kSerializedDataOffset prototype_template
static JSModule * cast(Object *obj)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV 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 expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print statistics of the maximum memory committed for the heap in name
int expected_nof_properties()
#define MAKE_STRUCT_CASE(NAME, Name, name)
Address get_code_ptr_entry(int index)
static JSObject * cast(Object *obj)
CompilationType compilation_type()
PropertyDetails GetTargetDetails(int transition_number)
static JSGlobalObject * cast(Object *obj)
static JSFunction * cast(Object *obj)