OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <iomanip> | 7 #include <iomanip> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1047 os << "\n - shared_info = " << Brief(shared()); | 1047 os << "\n - shared_info = " << Brief(shared()); |
1048 os << "\n - name = " << Brief(shared()->name()); | 1048 os << "\n - name = " << Brief(shared()->name()); |
1049 os << "\n - formal_parameter_count = " | 1049 os << "\n - formal_parameter_count = " |
1050 << shared()->internal_formal_parameter_count(); | 1050 << shared()->internal_formal_parameter_count(); |
1051 if (IsGeneratorFunction(shared()->kind())) { | 1051 if (IsGeneratorFunction(shared()->kind())) { |
1052 os << "\n - generator"; | 1052 os << "\n - generator"; |
1053 } else if (IsAsyncFunction(shared()->kind())) { | 1053 } else if (IsAsyncFunction(shared()->kind())) { |
1054 os << "\n - async"; | 1054 os << "\n - async"; |
1055 } | 1055 } |
1056 os << "\n - context = " << Brief(context()); | 1056 os << "\n - context = " << Brief(context()); |
1057 os << "\n - feedback vector = " << Brief(feedback_vector()); | 1057 os << "\n - feedback vector cell = " << Brief(feedback_vector_cell()); |
1058 os << "\n - code = " << Brief(code()); | 1058 os << "\n - code = " << Brief(code()); |
1059 JSObjectPrintBody(os, this); | 1059 JSObjectPrintBody(os, this); |
1060 } | 1060 } |
1061 | 1061 |
1062 | 1062 |
1063 void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) { // NOLINT | 1063 void SharedFunctionInfo::SharedFunctionInfoPrint(std::ostream& os) { // NOLINT |
1064 HeapObject::PrintHeader(os, "SharedFunctionInfo"); | 1064 HeapObject::PrintHeader(os, "SharedFunctionInfo"); |
1065 os << "\n - name = " << Brief(name()); | 1065 os << "\n - name = " << Brief(name()); |
1066 os << "\n - formal_parameter_count = " << internal_formal_parameter_count(); | 1066 os << "\n - formal_parameter_count = " << internal_formal_parameter_count(); |
1067 os << "\n - expected_nof_properties = " << expected_nof_properties(); | 1067 os << "\n - expected_nof_properties = " << expected_nof_properties(); |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1679 // | 1679 // |
1680 extern void _v8_internal_Print_Object(void* object) { | 1680 extern void _v8_internal_Print_Object(void* object) { |
1681 reinterpret_cast<i::Object*>(object)->Print(); | 1681 reinterpret_cast<i::Object*>(object)->Print(); |
1682 } | 1682 } |
1683 | 1683 |
1684 extern void _v8_internal_Print_Code(void* object) { | 1684 extern void _v8_internal_Print_Code(void* object) { |
1685 i::Isolate* isolate = i::Isolate::Current(); | 1685 i::Isolate* isolate = i::Isolate::Current(); |
1686 isolate->FindCodeObject(reinterpret_cast<i::Address>(object))->Print(); | 1686 isolate->FindCodeObject(reinterpret_cast<i::Address>(object))->Print(); |
1687 } | 1687 } |
1688 | 1688 |
| 1689 extern void _v8_internal_Print_TypeFeedbackMetadata(void* object) { |
| 1690 if (reinterpret_cast<i::Object*>(object)->IsSmi()) { |
| 1691 printf("Not a type feedback metadata object\n"); |
| 1692 } else { |
| 1693 reinterpret_cast<i::TypeFeedbackMetadata*>(object)->Print(); |
| 1694 } |
| 1695 } |
| 1696 |
1689 extern void _v8_internal_Print_TypeFeedbackVector(void* object) { | 1697 extern void _v8_internal_Print_TypeFeedbackVector(void* object) { |
1690 if (reinterpret_cast<i::Object*>(object)->IsSmi()) { | 1698 if (reinterpret_cast<i::Object*>(object)->IsSmi()) { |
1691 printf("Not a type feedback vector\n"); | 1699 printf("Not a type feedback vector\n"); |
1692 } else { | 1700 } else { |
1693 reinterpret_cast<i::TypeFeedbackVector*>(object)->Print(); | 1701 reinterpret_cast<i::TypeFeedbackVector*>(object)->Print(); |
1694 } | 1702 } |
1695 } | 1703 } |
1696 | 1704 |
1697 extern void _v8_internal_Print_DescriptorArray(void* object) { | 1705 extern void _v8_internal_Print_DescriptorArray(void* object) { |
1698 if (reinterpret_cast<i::Object*>(object)->IsSmi()) { | 1706 if (reinterpret_cast<i::Object*>(object)->IsSmi()) { |
(...skipping 17 matching lines...) Expand all Loading... |
1716 printf("Not a transition array\n"); | 1724 printf("Not a transition array\n"); |
1717 } else { | 1725 } else { |
1718 reinterpret_cast<i::TransitionArray*>(object)->Print(); | 1726 reinterpret_cast<i::TransitionArray*>(object)->Print(); |
1719 } | 1727 } |
1720 } | 1728 } |
1721 | 1729 |
1722 extern void _v8_internal_Print_StackTrace() { | 1730 extern void _v8_internal_Print_StackTrace() { |
1723 i::Isolate* isolate = i::Isolate::Current(); | 1731 i::Isolate* isolate = i::Isolate::Current(); |
1724 isolate->PrintStack(stdout); | 1732 isolate->PrintStack(stdout); |
1725 } | 1733 } |
OLD | NEW |