Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: src/property.cc

Issue 801783002: Map and Descriptor printing enhanced a bit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-printer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/property.cc
diff --git a/src/property.cc b/src/property.cc
index 9a2765dd6b02e66e758619512d9e44fe1b12f408..512527a5defff6cecf678fafab8473f3f5f6515e 100644
--- a/src/property.cc
+++ b/src/property.cc
@@ -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
« no previous file with comments | « src/objects-printer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698