| 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 { |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 case FIELD: | 55 case FIELD: |
| 56 os << "normal: "; | 56 os << "normal: "; |
| 57 break; | 57 break; |
| 58 case CALLBACKS: | 58 case CALLBACKS: |
| 59 os << "callbacks: "; | 59 os << "callbacks: "; |
| 60 break; | 60 break; |
| 61 case CONSTANT: | 61 case CONSTANT: |
| 62 UNREACHABLE(); | 62 UNREACHABLE(); |
| 63 break; | 63 break; |
| 64 } | 64 } |
| 65 return os << "dictionary_index: " << details.dictionary_index() | 65 return os << " dictionary_index: " << details.dictionary_index() |
| 66 << ", attrs: " << details.attributes() << ")"; | 66 << ", attrs: " << details.attributes() << ")"; |
| 67 } | 67 } |
| 68 | 68 |
| 69 | 69 |
| 70 // Outputs PropertyDetails as a descriptor array details. | 70 // Outputs PropertyDetails as a descriptor array details. |
| 71 std::ostream& operator<<(std::ostream& os, | 71 std::ostream& operator<<(std::ostream& os, |
| 72 const FastPropertyDetails& details_fast) { | 72 const FastPropertyDetails& details_fast) { |
| 73 const PropertyDetails& details = details_fast.details; | 73 const PropertyDetails& details = details_fast.details; |
| 74 os << "("; | 74 os << "("; |
| 75 switch (details.type()) { | 75 switch (details.type()) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 96 os << *this; | 96 os << *this; |
| 97 } else { | 97 } else { |
| 98 os << FastPropertyDetails(*this); | 98 os << FastPropertyDetails(*this); |
| 99 } | 99 } |
| 100 os << "\n" << std::flush; | 100 os << "\n" << std::flush; |
| 101 } | 101 } |
| 102 #endif | 102 #endif |
| 103 | 103 |
| 104 | 104 |
| 105 std::ostream& operator<<(std::ostream& os, const Descriptor& d) { | 105 std::ostream& operator<<(std::ostream& os, const Descriptor& d) { |
| 106 return os << "Descriptor " << Brief(*d.GetKey()) << " @ " | 106 Object* value = *d.GetValue(); |
| 107 << Brief(*d.GetValue()) << " " | 107 os << "Descriptor " << Brief(*d.GetKey()) << " @ " << Brief(value) << " "; |
| 108 << FastPropertyDetails(d.GetDetails()); | 108 if (value->IsAccessorPair()) { |
| 109 AccessorPair* pair = AccessorPair::cast(value); |
| 110 os << "(get: " << Brief(pair->getter()) |
| 111 << ", set: " << Brief(pair->setter()) << ") "; |
| 112 } |
| 113 os << FastPropertyDetails(d.GetDetails()); |
| 114 return os; |
| 109 } | 115 } |
| 110 | 116 |
| 111 } } // namespace v8::internal | 117 } } // namespace v8::internal |
| OLD | NEW |