diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-11-14 00:52:27 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2014-11-14 16:34:58 +0100 |
commit | 5d1b6d3e0fa4b97a490ef964be48aed9872e3ec1 (patch) | |
tree | ab5f510c4d83b175681de629395525bf7ec7cedb /deps/v8/src/property.cc | |
parent | 3b3d89bad26f5dfebe73fef6ae284ee78acbd5c9 (diff) | |
download | android-node-v8-5d1b6d3e0fa4b97a490ef964be48aed9872e3ec1.tar.gz android-node-v8-5d1b6d3e0fa4b97a490ef964be48aed9872e3ec1.tar.bz2 android-node-v8-5d1b6d3e0fa4b97a490ef964be48aed9872e3ec1.zip |
deps: upgrade v8 to 3.30.37
Diffstat (limited to 'deps/v8/src/property.cc')
-rw-r--r-- | deps/v8/src/property.cc | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/deps/v8/src/property.cc b/deps/v8/src/property.cc index f0ff95c0fe..e9e4b64690 100644 --- a/deps/v8/src/property.cc +++ b/deps/v8/src/property.cc @@ -20,7 +20,7 @@ void LookupResult::Iterate(ObjectVisitor* visitor) { } -OStream& operator<<(OStream& os, const LookupResult& r) { +std::ostream& operator<<(std::ostream& os, const LookupResult& r) { if (!r.IsFound()) return os << "Not Found\n"; os << "LookupResult:\n"; @@ -31,9 +31,43 @@ OStream& operator<<(OStream& os, const LookupResult& r) { } -OStream& operator<<(OStream& os, const Descriptor& d) { +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 |