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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 | 447 |
448 void Map::MapPrint(std::ostream& os) { // NOLINT | 448 void Map::MapPrint(std::ostream& os) { // NOLINT |
449 HeapObject::PrintHeader(os, "Map"); | 449 HeapObject::PrintHeader(os, "Map"); |
450 os << "\n - type: " << instance_type(); | 450 os << "\n - type: " << instance_type(); |
451 os << "\n - instance size: " << instance_size(); | 451 os << "\n - instance size: " << instance_size(); |
452 if (IsJSObjectMap()) { | 452 if (IsJSObjectMap()) { |
453 os << "\n - inobject properties: " << GetInObjectProperties(); | 453 os << "\n - inobject properties: " << GetInObjectProperties(); |
454 } | 454 } |
455 os << "\n - elements kind: " << ElementsKindToString(elements_kind()); | 455 os << "\n - elements kind: " << ElementsKindToString(elements_kind()); |
456 os << "\n - unused property fields: " << unused_property_fields(); | 456 os << "\n - unused property fields: " << unused_property_fields(); |
| 457 os << "\n - enum length: "; |
| 458 if (EnumLength() == kInvalidEnumCacheSentinel) { |
| 459 os << "invalid"; |
| 460 } else { |
| 461 os << EnumLength(); |
| 462 } |
457 if (is_deprecated()) os << "\n - deprecated_map"; | 463 if (is_deprecated()) os << "\n - deprecated_map"; |
458 if (is_stable()) os << "\n - stable_map"; | 464 if (is_stable()) os << "\n - stable_map"; |
459 if (is_dictionary_map()) os << "\n - dictionary_map"; | 465 if (is_dictionary_map()) os << "\n - dictionary_map"; |
460 if (has_hidden_prototype()) os << "\n - has_hidden_prototype"; | 466 if (has_hidden_prototype()) os << "\n - has_hidden_prototype"; |
461 if (has_named_interceptor()) os << " - named_interceptor"; | 467 if (has_named_interceptor()) os << " - named_interceptor"; |
462 if (has_indexed_interceptor()) os << "\n - indexed_interceptor"; | 468 if (has_indexed_interceptor()) os << "\n - indexed_interceptor"; |
463 if (is_undetectable()) os << "\n - undetectable"; | 469 if (is_undetectable()) os << "\n - undetectable"; |
464 if (is_callable()) os << "\n - callable"; | 470 if (is_callable()) os << "\n - callable"; |
465 if (is_constructor()) os << "\n - constructor"; | 471 if (is_constructor()) os << "\n - constructor"; |
466 if (is_access_check_needed()) os << "\n - access_check_needed"; | 472 if (is_access_check_needed()) os << "\n - access_check_needed"; |
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1316 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT | 1322 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT |
1317 Object* transitions = map()->raw_transitions(); | 1323 Object* transitions = map()->raw_transitions(); |
1318 int num_transitions = TransitionArray::NumberOfTransitions(transitions); | 1324 int num_transitions = TransitionArray::NumberOfTransitions(transitions); |
1319 if (num_transitions == 0) return; | 1325 if (num_transitions == 0) return; |
1320 os << "\n - transitions"; | 1326 os << "\n - transitions"; |
1321 TransitionArray::PrintTransitions(os, transitions, false); | 1327 TransitionArray::PrintTransitions(os, transitions, false); |
1322 } | 1328 } |
1323 #endif // defined(DEBUG) || defined(OBJECT_PRINT) | 1329 #endif // defined(DEBUG) || defined(OBJECT_PRINT) |
1324 } // namespace internal | 1330 } // namespace internal |
1325 } // namespace v8 | 1331 } // namespace v8 |
OLD | NEW |