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 "src/disasm.h" | 7 #include "src/disasm.h" |
8 #include "src/disassembler.h" | 8 #include "src/disassembler.h" |
9 #include "src/interpreter/bytecodes.h" | 9 #include "src/interpreter/bytecodes.h" |
10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
(...skipping 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
930 | 930 |
931 void Foreign::ForeignPrint(std::ostream& os) { // NOLINT | 931 void Foreign::ForeignPrint(std::ostream& os) { // NOLINT |
932 os << "foreign address : " << foreign_address(); | 932 os << "foreign address : " << foreign_address(); |
933 } | 933 } |
934 | 934 |
935 | 935 |
936 void ExecutableAccessorInfo::ExecutableAccessorInfoPrint( | 936 void ExecutableAccessorInfo::ExecutableAccessorInfoPrint( |
937 std::ostream& os) { // NOLINT | 937 std::ostream& os) { // NOLINT |
938 HeapObject::PrintHeader(os, "ExecutableAccessorInfo"); | 938 HeapObject::PrintHeader(os, "ExecutableAccessorInfo"); |
939 os << "\n - name: " << Brief(name()); | 939 os << "\n - name: " << Brief(name()); |
940 os << "\n - flag: " << Brief(flag()); | 940 os << "\n - flag: " << flag(); |
941 os << "\n - getter: " << Brief(getter()); | 941 os << "\n - getter: " << Brief(getter()); |
942 os << "\n - setter: " << Brief(setter()); | 942 os << "\n - setter: " << Brief(setter()); |
943 os << "\n - data: " << Brief(data()); | 943 os << "\n - data: " << Brief(data()); |
944 os << "\n"; | 944 os << "\n"; |
945 } | 945 } |
946 | 946 |
947 | 947 |
948 void Box::BoxPrint(std::ostream& os) { // NOLINT | 948 void Box::BoxPrint(std::ostream& os) { // NOLINT |
949 HeapObject::PrintHeader(os, "Box"); | 949 HeapObject::PrintHeader(os, "Box"); |
950 os << "\n - value: " << Brief(value()); | 950 os << "\n - value: " << Brief(value()); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1082 } else { | 1082 } else { |
1083 os << "<invalid>\n"; | 1083 os << "<invalid>\n"; |
1084 } | 1084 } |
1085 } | 1085 } |
1086 | 1086 |
1087 | 1087 |
1088 void Script::ScriptPrint(std::ostream& os) { // NOLINT | 1088 void Script::ScriptPrint(std::ostream& os) { // NOLINT |
1089 HeapObject::PrintHeader(os, "Script"); | 1089 HeapObject::PrintHeader(os, "Script"); |
1090 os << "\n - source: " << Brief(source()); | 1090 os << "\n - source: " << Brief(source()); |
1091 os << "\n - name: " << Brief(name()); | 1091 os << "\n - name: " << Brief(name()); |
1092 os << "\n - line_offset: " << Brief(line_offset()); | 1092 os << "\n - line_offset: " << line_offset(); |
1093 os << "\n - column_offset: " << Brief(column_offset()); | 1093 os << "\n - column_offset: " << column_offset(); |
1094 os << "\n - type: " << Brief(type()); | 1094 os << "\n - type: " << type(); |
1095 os << "\n - id: " << Brief(id()); | 1095 os << "\n - id: " << id(); |
1096 os << "\n - context data: " << Brief(context_data()); | 1096 os << "\n - context data: " << Brief(context_data()); |
1097 os << "\n - wrapper: " << Brief(wrapper()); | 1097 os << "\n - wrapper: " << Brief(wrapper()); |
1098 os << "\n - compilation type: " << compilation_type(); | 1098 os << "\n - compilation type: " << compilation_type(); |
1099 os << "\n - line ends: " << Brief(line_ends()); | 1099 os << "\n - line ends: " << Brief(line_ends()); |
1100 os << "\n - eval from shared: " << Brief(eval_from_shared()); | 1100 os << "\n - eval from shared: " << Brief(eval_from_shared()); |
1101 os << "\n - eval from instructions offset: " | 1101 os << "\n - eval from instructions offset: " |
1102 << Brief(eval_from_instructions_offset()); | 1102 << eval_from_instructions_offset(); |
1103 os << "\n - shared function infos: " << Brief(shared_function_infos()); | 1103 os << "\n - shared function infos: " << Brief(shared_function_infos()); |
1104 os << "\n"; | 1104 os << "\n"; |
1105 } | 1105 } |
1106 | 1106 |
1107 | 1107 |
1108 void DebugInfo::DebugInfoPrint(std::ostream& os) { // NOLINT | 1108 void DebugInfo::DebugInfoPrint(std::ostream& os) { // NOLINT |
1109 HeapObject::PrintHeader(os, "DebugInfo"); | 1109 HeapObject::PrintHeader(os, "DebugInfo"); |
1110 os << "\n - shared: " << Brief(shared()); | 1110 os << "\n - shared: " << Brief(shared()); |
1111 os << "\n - code: " << Brief(code()); | 1111 os << "\n - code: " << Brief(code()); |
1112 os << "\n - break_points: "; | 1112 os << "\n - break_points: "; |
1113 break_points()->Print(os); | 1113 break_points()->Print(os); |
1114 } | 1114 } |
1115 | 1115 |
1116 | 1116 |
1117 void BreakPointInfo::BreakPointInfoPrint(std::ostream& os) { // NOLINT | 1117 void BreakPointInfo::BreakPointInfoPrint(std::ostream& os) { // NOLINT |
1118 HeapObject::PrintHeader(os, "BreakPointInfo"); | 1118 HeapObject::PrintHeader(os, "BreakPointInfo"); |
1119 os << "\n - code_position: " << code_position()->value(); | 1119 os << "\n - code_position: " << code_position(); |
1120 os << "\n - source_position: " << source_position()->value(); | 1120 os << "\n - source_position: " << source_position(); |
1121 os << "\n - statement_position: " << statement_position()->value(); | 1121 os << "\n - statement_position: " << statement_position(); |
1122 os << "\n - break_point_objects: " << Brief(break_point_objects()); | 1122 os << "\n - break_point_objects: " << Brief(break_point_objects()); |
1123 os << "\n"; | 1123 os << "\n"; |
1124 } | 1124 } |
1125 | 1125 |
1126 | 1126 |
1127 static void PrintBitMask(std::ostream& os, uint32_t value) { // NOLINT | 1127 static void PrintBitMask(std::ostream& os, uint32_t value) { // NOLINT |
1128 for (int i = 0; i < 32; i++) { | 1128 for (int i = 0; i < 32; i++) { |
1129 if ((i & 7) == 0) os << " "; | 1129 if ((i & 7) == 0) os << " "; |
1130 os << (((value & 1) == 0) ? "_" : "x"); | 1130 os << (((value & 1) == 0) ? "_" : "x"); |
1131 value >>= 1; | 1131 value >>= 1; |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 } | 1288 } |
1289 } | 1289 } |
1290 | 1290 |
1291 | 1291 |
1292 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT | 1292 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT |
1293 TransitionArray::PrintTransitions(os, map()->raw_transitions()); | 1293 TransitionArray::PrintTransitions(os, map()->raw_transitions()); |
1294 } | 1294 } |
1295 #endif // defined(DEBUG) || defined(OBJECT_PRINT) | 1295 #endif // defined(DEBUG) || defined(OBJECT_PRINT) |
1296 } // namespace internal | 1296 } // namespace internal |
1297 } // namespace v8 | 1297 } // namespace v8 |
OLD | NEW |