OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 ASSERT(attributes == this->attributes()); | 112 ASSERT(attributes == this->attributes()); |
113 ASSERT(index == this->index()); | 113 ASSERT(index == this->index()); |
114 } | 114 } |
115 | 115 |
116 // Conversion for storing details as Object*. | 116 // Conversion for storing details as Object*. |
117 explicit inline PropertyDetails(Smi* smi); | 117 explicit inline PropertyDetails(Smi* smi); |
118 inline Smi* AsSmi(); | 118 inline Smi* AsSmi(); |
119 | 119 |
120 PropertyType type() { return TypeField::decode(value_); } | 120 PropertyType type() { return TypeField::decode(value_); } |
121 | 121 |
122 bool IsProperty() { | |
123 return IsRealProperty(type()); | |
124 } | |
125 | |
126 PropertyAttributes attributes() { return AttributesField::decode(value_); } | 122 PropertyAttributes attributes() { return AttributesField::decode(value_); } |
127 | 123 |
128 int index() { return StorageField::decode(value_); } | 124 int index() { return StorageField::decode(value_); } |
129 | 125 |
130 inline PropertyDetails AsDeleted(); | 126 inline PropertyDetails AsDeleted(); |
131 | 127 |
132 static bool IsValidIndex(int index) { | 128 static bool IsValidIndex(int index) { |
133 return StorageField::is_valid(index); | 129 return StorageField::is_valid(index); |
134 } | 130 } |
135 | 131 |
(...skipping 11 matching lines...) Expand all Loading... |
147 | 143 |
148 static const int kInitialIndex = 1; | 144 static const int kInitialIndex = 1; |
149 | 145 |
150 private: | 146 private: |
151 uint32_t value_; | 147 uint32_t value_; |
152 }; | 148 }; |
153 | 149 |
154 } } // namespace v8::internal | 150 } } // namespace v8::internal |
155 | 151 |
156 #endif // V8_PROPERTY_DETAILS_H_ | 152 #endif // V8_PROPERTY_DETAILS_H_ |
OLD | NEW |