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

Unified Diff: src/property.cc

Issue 659363002: More details printed for Map, DescriptorArray and TransitionArray. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: gdbinit updated Created 6 years, 2 months 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') | src/property-details.h » ('j') | 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 81966d4017fe976935b0e20eff2b0a5705491907..e9e4b64690777aede7c4595e8bd122e07a8bc3ac 100644
--- a/src/property.cc
+++ b/src/property.cc
@@ -31,9 +31,43 @@ std::ostream& operator<<(std::ostream& os, const LookupResult& r) {
}
+std::ostream& operator<<(std::ostream& os,
+ const PropertyAttributes& attributes) {
+ os << "[";
+ os << (((attributes & READ_ONLY) == 0) ? "W" : "_"); // writable
+ os << (((attributes & DONT_ENUM) == 0) ? "E" : "_"); // enumerable
+ os << (((attributes & DONT_DELETE) == 0) ? "C" : "_"); // configurable
+ os << "]";
+ return os;
+}
+
+
+std::ostream& operator<<(std::ostream& os, const PropertyDetails& details) {
+ os << "(";
+ switch (details.type()) {
+ case NORMAL:
+ os << "normal: dictionary_index: " << details.dictionary_index();
+ break;
+ case CONSTANT:
+ os << "constant: p: " << details.pointer();
+ break;
+ case FIELD:
+ os << "field: " << details.representation().Mnemonic()
+ << ", field_index: " << details.field_index()
+ << ", p: " << details.pointer();
+ break;
+ case CALLBACKS:
+ os << "callbacks: p: " << details.pointer();
+ break;
+ }
+ os << ", attrs: " << details.attributes() << ")";
+ return os;
+}
+
+
std::ostream& operator<<(std::ostream& os, const Descriptor& d) {
return os << "Descriptor " << Brief(*d.GetKey()) << " @ "
- << Brief(*d.GetValue());
+ << Brief(*d.GetValue()) << " " << d.GetDetails();
}
} } // namespace v8::internal
« no previous file with comments | « src/objects-printer.cc ('k') | src/property-details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698