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