| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 // Outputs PropertyDetails as a descriptor array details. | 63 // Outputs PropertyDetails as a descriptor array details. |
| 64 std::ostream& operator<<(std::ostream& os, | 64 std::ostream& operator<<(std::ostream& os, |
| 65 const FastPropertyDetails& details_fast) { | 65 const FastPropertyDetails& details_fast) { |
| 66 const PropertyDetails& details = details_fast.details; | 66 const PropertyDetails& details = details_fast.details; |
| 67 os << "("; | 67 os << "("; |
| 68 if (details.location() == kDescriptor) { | 68 if (details.location() == kDescriptor) { |
| 69 os << "immutable "; | 69 os << "immutable "; |
| 70 } | 70 } |
| 71 os << (details.kind() == kData ? "data" : "accessor"); | 71 os << (details.kind() == kData ? "data" : "accessor"); |
| 72 os << ": " << details.representation().Mnemonic(); |
| 72 if (details.location() == kField) { | 73 if (details.location() == kField) { |
| 73 os << ": " << details.representation().Mnemonic() | 74 os << ", field_index: " << details.field_index(); |
| 74 << ", field_index: " << details.field_index(); | |
| 75 } | 75 } |
| 76 return os << ", p: " << details.pointer() | 76 return os << ", p: " << details.pointer() |
| 77 << ", attrs: " << details.attributes() << ")"; | 77 << ", attrs: " << details.attributes() << ")"; |
| 78 } | 78 } |
| 79 | 79 |
| 80 | 80 |
| 81 #ifdef OBJECT_PRINT | 81 #ifdef OBJECT_PRINT |
| 82 void PropertyDetails::Print(bool dictionary_mode) { | 82 void PropertyDetails::Print(bool dictionary_mode) { |
| 83 OFStream os(stdout); | 83 OFStream os(stdout); |
| 84 if (dictionary_mode) { | 84 if (dictionary_mode) { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 97 if (value->IsAccessorPair()) { | 97 if (value->IsAccessorPair()) { |
| 98 AccessorPair* pair = AccessorPair::cast(value); | 98 AccessorPair* pair = AccessorPair::cast(value); |
| 99 os << "(get: " << Brief(pair->getter()) | 99 os << "(get: " << Brief(pair->getter()) |
| 100 << ", set: " << Brief(pair->setter()) << ") "; | 100 << ", set: " << Brief(pair->setter()) << ") "; |
| 101 } | 101 } |
| 102 os << FastPropertyDetails(d.GetDetails()); | 102 os << FastPropertyDetails(d.GetDetails()); |
| 103 return os; | 103 return os; |
| 104 } | 104 } |
| 105 | 105 |
| 106 } } // namespace v8::internal | 106 } } // namespace v8::internal |
| OLD | NEW |