| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/property.h" | 5 #include "src/property.h" |
| 6 | 6 |
| 7 #include "src/handles-inl.h" | 7 #include "src/handles-inl.h" |
| 8 #include "src/ostreams.h" | 8 #include "src/ostreams.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| 11 namespace internal { | 11 namespace internal { |
| 12 | 12 |
| 13 void LookupResult::Iterate(ObjectVisitor* visitor) { | |
| 14 LookupResult* current = this; // Could be NULL. | |
| 15 while (current != NULL) { | |
| 16 visitor->VisitPointer(bit_cast<Object**>(¤t->transition_)); | |
| 17 current = current->next_; | |
| 18 } | |
| 19 } | |
| 20 | |
| 21 | |
| 22 std::ostream& operator<<(std::ostream& os, const LookupResult& r) { | |
| 23 if (!r.IsFound()) return os << "Not Found\n"; | |
| 24 | |
| 25 os << "LookupResult:\n"; | |
| 26 if (r.IsTransition()) { | |
| 27 os << " -transition target:\n" << Brief(r.GetTransitionTarget()) << "\n"; | |
| 28 } | |
| 29 return os; | |
| 30 } | |
| 31 | |
| 32 | |
| 33 std::ostream& operator<<(std::ostream& os, | 13 std::ostream& operator<<(std::ostream& os, |
| 34 const PropertyAttributes& attributes) { | 14 const PropertyAttributes& attributes) { |
| 35 os << "["; | 15 os << "["; |
| 36 os << (((attributes & READ_ONLY) == 0) ? "W" : "_"); // writable | 16 os << (((attributes & READ_ONLY) == 0) ? "W" : "_"); // writable |
| 37 os << (((attributes & DONT_ENUM) == 0) ? "E" : "_"); // enumerable | 17 os << (((attributes & DONT_ENUM) == 0) ? "E" : "_"); // enumerable |
| 38 os << (((attributes & DONT_DELETE) == 0) ? "C" : "_"); // configurable | 18 os << (((attributes & DONT_DELETE) == 0) ? "C" : "_"); // configurable |
| 39 os << "]"; | 19 os << "]"; |
| 40 return os; | 20 return os; |
| 41 } | 21 } |
| 42 | 22 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 if (value->IsAccessorPair()) { | 76 if (value->IsAccessorPair()) { |
| 97 AccessorPair* pair = AccessorPair::cast(value); | 77 AccessorPair* pair = AccessorPair::cast(value); |
| 98 os << "(get: " << Brief(pair->getter()) | 78 os << "(get: " << Brief(pair->getter()) |
| 99 << ", set: " << Brief(pair->setter()) << ") "; | 79 << ", set: " << Brief(pair->setter()) << ") "; |
| 100 } | 80 } |
| 101 os << FastPropertyDetails(d.GetDetails()); | 81 os << FastPropertyDetails(d.GetDetails()); |
| 102 return os; | 82 return os; |
| 103 } | 83 } |
| 104 | 84 |
| 105 } } // namespace v8::internal | 85 } } // namespace v8::internal |
| OLD | NEW |