Chromium Code Reviews| 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/v8.h" | 5 #include "src/v8.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/heap/objects-visiting.h" | 9 #include "src/heap/objects-visiting.h" |
| 10 #include "src/jsregexp.h" | 10 #include "src/jsregexp.h" |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 415 << pre_allocated_property_fields() << "\n"; | 415 << pre_allocated_property_fields() << "\n"; |
| 416 os << " - unused property fields: " << unused_property_fields() << "\n"; | 416 os << " - unused property fields: " << unused_property_fields() << "\n"; |
| 417 if (is_dictionary_map()) os << " - dictionary_map\n"; | 417 if (is_dictionary_map()) os << " - dictionary_map\n"; |
| 418 if (is_prototype_map()) os << " - prototype_map\n"; | 418 if (is_prototype_map()) os << " - prototype_map\n"; |
| 419 if (is_hidden_prototype()) os << " - hidden_prototype\n"; | 419 if (is_hidden_prototype()) os << " - hidden_prototype\n"; |
| 420 if (has_named_interceptor()) os << " - named_interceptor\n"; | 420 if (has_named_interceptor()) os << " - named_interceptor\n"; |
| 421 if (has_indexed_interceptor()) os << " - indexed_interceptor\n"; | 421 if (has_indexed_interceptor()) os << " - indexed_interceptor\n"; |
| 422 if (is_undetectable()) os << " - undetectable\n"; | 422 if (is_undetectable()) os << " - undetectable\n"; |
| 423 if (has_instance_call_handler()) os << " - instance_call_handler\n"; | 423 if (has_instance_call_handler()) os << " - instance_call_handler\n"; |
| 424 if (is_access_check_needed()) os << " - access_check_needed\n"; | 424 if (is_access_check_needed()) os << " - access_check_needed\n"; |
| 425 if (is_frozen()) { | 425 if (!is_extensible()) os << " - non-extensible\n"; |
| 426 os << " - frozen\n"; | |
| 427 } else if (!is_extensible()) { | |
| 428 os << " - sealed\n"; | |
| 429 } | |
| 430 os << " - back pointer: " << Brief(GetBackPointer()); | 426 os << " - back pointer: " << Brief(GetBackPointer()); |
| 431 os << "\n - instance descriptors " << (owns_descriptors() ? "(own) " : "") | 427 os << "\n - instance descriptors " << (owns_descriptors() ? "(own) " : "") |
| 432 << "#" << NumberOfOwnDescriptors() << ": " | 428 << "#" << NumberOfOwnDescriptors() << ": " |
| 433 << Brief(instance_descriptors()); | 429 << Brief(instance_descriptors()); |
| 434 if (FLAG_unbox_double_fields) { | 430 if (FLAG_unbox_double_fields) { |
| 435 os << "\n - layout descriptor: " << Brief(layout_descriptor()); | 431 os << "\n - layout descriptor: " << Brief(layout_descriptor()); |
| 436 } | 432 } |
| 437 if (HasTransitionArray()) { | 433 if (HasTransitionArray()) { |
| 438 os << "\n - transitions: " << Brief(transitions()); | 434 os << "\n - transitions: " << Brief(transitions()); |
| 439 } | 435 } |
| (...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1133 void TransitionArray::PrintTransitions(std::ostream& os, | 1129 void TransitionArray::PrintTransitions(std::ostream& os, |
| 1134 bool print_header) { // NOLINT | 1130 bool print_header) { // NOLINT |
| 1135 if (print_header) { | 1131 if (print_header) { |
| 1136 os << "Transition array " << number_of_transitions() << "\n"; | 1132 os << "Transition array " << number_of_transitions() << "\n"; |
| 1137 } | 1133 } |
| 1138 for (int i = 0; i < number_of_transitions(); i++) { | 1134 for (int i = 0; i < number_of_transitions(); i++) { |
| 1139 Name* key = GetKey(i); | 1135 Name* key = GetKey(i); |
| 1140 os << " "; | 1136 os << " "; |
| 1141 key->NamePrint(os); | 1137 key->NamePrint(os); |
| 1142 os << ": "; | 1138 os << ": "; |
| 1143 if (key == GetHeap()->frozen_symbol()) { | 1139 if (key == GetHeap()->frozen_symbol()) { |
|
Igor Sheludko
2014/12/10 11:31:15
Please add support for seal and nonextensible tran
adamk
2014/12/10 18:46:01
Done.
| |
| 1144 os << " (transition to frozen)"; | 1140 os << " (transition to frozen)"; |
| 1145 } else if (key == GetHeap()->elements_transition_symbol()) { | 1141 } else if (key == GetHeap()->elements_transition_symbol()) { |
| 1146 os << " (transition to " | 1142 os << " (transition to " |
| 1147 << ElementsKindToString(GetTarget(i)->elements_kind()) << ")"; | 1143 << ElementsKindToString(GetTarget(i)->elements_kind()) << ")"; |
| 1148 } else if (key == GetHeap()->observed_symbol()) { | 1144 } else if (key == GetHeap()->observed_symbol()) { |
| 1149 os << " (transition to Object.observe)"; | 1145 os << " (transition to Object.observe)"; |
| 1150 } else { | 1146 } else { |
| 1151 PropertyDetails details = GetTargetDetails(i); | 1147 PropertyDetails details = GetTargetDetails(i); |
| 1152 switch (details.type()) { | 1148 switch (details.type()) { |
| 1153 case FIELD: { | 1149 case FIELD: { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1199 return SNPrintF(str, "#<%s>", s->PrivateSymbolToName()); | 1195 return SNPrintF(str, "#<%s>", s->PrivateSymbolToName()); |
| 1200 } else { | 1196 } else { |
| 1201 return SNPrintF(str, "<%s>", String::cast(s->name())->ToCString().get()); | 1197 return SNPrintF(str, "<%s>", String::cast(s->name())->ToCString().get()); |
| 1202 } | 1198 } |
| 1203 } | 1199 } |
| 1204 } | 1200 } |
| 1205 | 1201 |
| 1206 | 1202 |
| 1207 #endif // TRACE_MAPS | 1203 #endif // TRACE_MAPS |
| 1208 } } // namespace v8::internal | 1204 } } // namespace v8::internal |
| OLD | NEW |