OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_PROPERTY_DETAILS_H_ | 5 #ifndef V8_PROPERTY_DETAILS_H_ |
6 #define V8_PROPERTY_DETAILS_H_ | 6 #define V8_PROPERTY_DETAILS_H_ |
7 | 7 |
8 #include "include/v8.h" | 8 #include "include/v8.h" |
9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
10 #include "src/utils.h" | 10 #include "src/utils.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 Representation representation() const { | 242 Representation representation() const { |
243 DCHECK(type() != NORMAL); | 243 DCHECK(type() != NORMAL); |
244 return DecodeRepresentation(RepresentationField::decode(value_)); | 244 return DecodeRepresentation(RepresentationField::decode(value_)); |
245 } | 245 } |
246 | 246 |
247 int field_index() const { | 247 int field_index() const { |
248 return FieldIndexField::decode(value_); | 248 return FieldIndexField::decode(value_); |
249 } | 249 } |
250 | 250 |
| 251 inline int field_width_in_words() const; |
| 252 |
251 inline PropertyDetails AsDeleted() const; | 253 inline PropertyDetails AsDeleted() const; |
252 | 254 |
253 static bool IsValidIndex(int index) { | 255 static bool IsValidIndex(int index) { |
254 return DictionaryStorageField::is_valid(index); | 256 return DictionaryStorageField::is_valid(index); |
255 } | 257 } |
256 | 258 |
257 bool IsReadOnly() const { return (attributes() & READ_ONLY) != 0; } | 259 bool IsReadOnly() const { return (attributes() & READ_ONLY) != 0; } |
258 bool IsConfigurable() const { return (attributes() & DONT_DELETE) == 0; } | 260 bool IsConfigurable() const { return (attributes() & DONT_DELETE) == 0; } |
259 bool IsDontEnum() const { return (attributes() & DONT_ENUM) != 0; } | 261 bool IsDontEnum() const { return (attributes() & DONT_ENUM) != 0; } |
260 bool IsDeleted() const { return DeletedField::decode(value_) != 0;} | 262 bool IsDeleted() const { return DeletedField::decode(value_) != 0;} |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 uint32_t value_; | 297 uint32_t value_; |
296 }; | 298 }; |
297 | 299 |
298 | 300 |
299 std::ostream& operator<<(std::ostream& os, | 301 std::ostream& operator<<(std::ostream& os, |
300 const PropertyAttributes& attributes); | 302 const PropertyAttributes& attributes); |
301 std::ostream& operator<<(std::ostream& os, const PropertyDetails& details); | 303 std::ostream& operator<<(std::ostream& os, const PropertyDetails& details); |
302 } } // namespace v8::internal | 304 } } // namespace v8::internal |
303 | 305 |
304 #endif // V8_PROPERTY_DETAILS_H_ | 306 #endif // V8_PROPERTY_DETAILS_H_ |
OLD | NEW |