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/disasm.h" | 10 #include "src/disasm.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 break; | 159 break; |
160 case JS_MAP_ITERATOR_TYPE: | 160 case JS_MAP_ITERATOR_TYPE: |
161 JSMapIterator::cast(this)->JSMapIteratorPrint(os); | 161 JSMapIterator::cast(this)->JSMapIteratorPrint(os); |
162 break; | 162 break; |
163 case JS_WEAK_MAP_TYPE: | 163 case JS_WEAK_MAP_TYPE: |
164 JSWeakMap::cast(this)->JSWeakMapPrint(os); | 164 JSWeakMap::cast(this)->JSWeakMapPrint(os); |
165 break; | 165 break; |
166 case JS_WEAK_SET_TYPE: | 166 case JS_WEAK_SET_TYPE: |
167 JSWeakSet::cast(this)->JSWeakSetPrint(os); | 167 JSWeakSet::cast(this)->JSWeakSetPrint(os); |
168 break; | 168 break; |
| 169 case JS_MODULE_NAMESPACE_TYPE: |
| 170 JSModuleNamespace::cast(this)->JSModuleNamespacePrint(os); |
| 171 break; |
169 case FOREIGN_TYPE: | 172 case FOREIGN_TYPE: |
170 Foreign::cast(this)->ForeignPrint(os); | 173 Foreign::cast(this)->ForeignPrint(os); |
171 break; | 174 break; |
172 case SHARED_FUNCTION_INFO_TYPE: | 175 case SHARED_FUNCTION_INFO_TYPE: |
173 SharedFunctionInfo::cast(this)->SharedFunctionInfoPrint(os); | 176 SharedFunctionInfo::cast(this)->SharedFunctionInfoPrint(os); |
174 break; | 177 break; |
175 case JS_MESSAGE_OBJECT_TYPE: | 178 case JS_MESSAGE_OBJECT_TYPE: |
176 JSMessageObject::cast(this)->JSMessageObjectPrint(os); | 179 JSMessageObject::cast(this)->JSMessageObjectPrint(os); |
177 break; | 180 break; |
178 case CELL_TYPE: | 181 case CELL_TYPE: |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 void Module::ModulePrint(std::ostream& os) { // NOLINT | 1164 void Module::ModulePrint(std::ostream& os) { // NOLINT |
1162 HeapObject::PrintHeader(os, "Module"); | 1165 HeapObject::PrintHeader(os, "Module"); |
1163 os << "\n - code: " << Brief(code()); | 1166 os << "\n - code: " << Brief(code()); |
1164 os << "\n - exports: " << Brief(exports()); | 1167 os << "\n - exports: " << Brief(exports()); |
1165 os << "\n - requested_modules: " << Brief(requested_modules()); | 1168 os << "\n - requested_modules: " << Brief(requested_modules()); |
1166 os << "\n - evaluated: " << evaluated(); | 1169 os << "\n - evaluated: " << evaluated(); |
1167 os << "\n - embedder_data: " << Brief(embedder_data()); | 1170 os << "\n - embedder_data: " << Brief(embedder_data()); |
1168 os << "\n"; | 1171 os << "\n"; |
1169 } | 1172 } |
1170 | 1173 |
| 1174 void JSModuleNamespace::JSModuleNamespacePrint(std::ostream& os) { // NOLINT |
| 1175 HeapObject::PrintHeader(os, "JSModuleNamespace"); |
| 1176 os << "\n - module: " << Brief(module()); |
| 1177 os << "\n"; |
| 1178 } |
| 1179 |
1171 void PrototypeInfo::PrototypeInfoPrint(std::ostream& os) { // NOLINT | 1180 void PrototypeInfo::PrototypeInfoPrint(std::ostream& os) { // NOLINT |
1172 HeapObject::PrintHeader(os, "PrototypeInfo"); | 1181 HeapObject::PrintHeader(os, "PrototypeInfo"); |
1173 os << "\n - prototype users: " << Brief(prototype_users()); | 1182 os << "\n - prototype users: " << Brief(prototype_users()); |
1174 os << "\n - registry slot: " << registry_slot(); | 1183 os << "\n - registry slot: " << registry_slot(); |
1175 os << "\n - validity cell: " << Brief(validity_cell()); | 1184 os << "\n - validity cell: " << Brief(validity_cell()); |
1176 os << "\n"; | 1185 os << "\n"; |
1177 } | 1186 } |
1178 | 1187 |
1179 void ContextExtension::ContextExtensionPrint(std::ostream& os) { // NOLINT | 1188 void ContextExtension::ContextExtensionPrint(std::ostream& os) { // NOLINT |
1180 HeapObject::PrintHeader(os, "ContextExtension"); | 1189 HeapObject::PrintHeader(os, "ContextExtension"); |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1539 printf("Not a transition array\n"); | 1548 printf("Not a transition array\n"); |
1540 } else { | 1549 } else { |
1541 reinterpret_cast<i::TransitionArray*>(object)->Print(); | 1550 reinterpret_cast<i::TransitionArray*>(object)->Print(); |
1542 } | 1551 } |
1543 } | 1552 } |
1544 | 1553 |
1545 extern void _v8_internal_Print_StackTrace() { | 1554 extern void _v8_internal_Print_StackTrace() { |
1546 i::Isolate* isolate = i::Isolate::Current(); | 1555 i::Isolate* isolate = i::Isolate::Current(); |
1547 isolate->PrintStack(stdout); | 1556 isolate->PrintStack(stdout); |
1548 } | 1557 } |
OLD | NEW |