Commit c535ec69 authored by ishell's avatar ishell Committed by Commit bot

Map and Descriptor printing enhanced a bit.

Review URL: https://codereview.chromium.org/801783002

Cr-Commit-Position: refs/heads/master@{#25797}
parent 7c42ae3e
......@@ -408,6 +408,7 @@ void Map::MapPrint(std::ostream& os) { // NOLINT
os << "\n - pre-allocated property fields: "
<< pre_allocated_property_fields() << "\n";
os << " - unused property fields: " << unused_property_fields() << "\n";
if (is_deprecated()) os << " - deprecated_map\n";
if (is_dictionary_map()) os << " - dictionary_map\n";
if (is_prototype_map()) os << " - prototype_map\n";
if (is_hidden_prototype()) os << " - hidden_prototype\n";
......
......@@ -62,7 +62,7 @@ std::ostream& operator<<(std::ostream& os, const PropertyDetails& details) {
UNREACHABLE();
break;
}
return os << "dictionary_index: " << details.dictionary_index()
return os << " dictionary_index: " << details.dictionary_index()
<< ", attrs: " << details.attributes() << ")";
}
......@@ -103,9 +103,15 @@ void PropertyDetails::Print(bool dictionary_mode) {
std::ostream& operator<<(std::ostream& os, const Descriptor& d) {
return os << "Descriptor " << Brief(*d.GetKey()) << " @ "
<< Brief(*d.GetValue()) << " "
<< FastPropertyDetails(d.GetDetails());
Object* value = *d.GetValue();
os << "Descriptor " << Brief(*d.GetKey()) << " @ " << Brief(value) << " ";
if (value->IsAccessorPair()) {
AccessorPair* pair = AccessorPair::cast(value);
os << "(get: " << Brief(pair->getter())
<< ", set: " << Brief(pair->setter()) << ") ";
}
os << FastPropertyDetails(d.GetDetails());
return os;
}
} } // namespace v8::internal
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment