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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 248 |
249 Representation representation() const { | 249 Representation representation() const { |
250 ASSERT(type() != NORMAL); | 250 ASSERT(type() != NORMAL); |
251 return DecodeRepresentation(RepresentationField::decode(value_)); | 251 return DecodeRepresentation(RepresentationField::decode(value_)); |
252 } | 252 } |
253 | 253 |
254 int field_index() const { | 254 int field_index() const { |
255 return FieldIndexField::decode(value_); | 255 return FieldIndexField::decode(value_); |
256 } | 256 } |
257 | 257 |
| 258 inline int field_width_in_words() const; |
| 259 |
258 inline PropertyDetails AsDeleted() const; | 260 inline PropertyDetails AsDeleted() const; |
259 | 261 |
260 static bool IsValidIndex(int index) { | 262 static bool IsValidIndex(int index) { |
261 return DictionaryStorageField::is_valid(index); | 263 return DictionaryStorageField::is_valid(index); |
262 } | 264 } |
263 | 265 |
264 bool IsReadOnly() const { return (attributes() & READ_ONLY) != 0; } | 266 bool IsReadOnly() const { return (attributes() & READ_ONLY) != 0; } |
265 bool IsDontDelete() const { return (attributes() & DONT_DELETE) != 0; } | 267 bool IsDontDelete() const { return (attributes() & DONT_DELETE) != 0; } |
266 bool IsDontEnum() const { return (attributes() & DONT_ENUM) != 0; } | 268 bool IsDontEnum() const { return (attributes() & DONT_ENUM) != 0; } |
267 bool IsDeleted() const { return DeletedField::decode(value_) != 0;} | 269 bool IsDeleted() const { return DeletedField::decode(value_) != 0;} |
(...skipping 30 matching lines...) Expand all Loading... |
298 PropertyDetails(int value, PropertyAttributes attributes) { | 300 PropertyDetails(int value, PropertyAttributes attributes) { |
299 value_ = AttributesField::update(value, attributes); | 301 value_ = AttributesField::update(value, attributes); |
300 } | 302 } |
301 | 303 |
302 uint32_t value_; | 304 uint32_t value_; |
303 }; | 305 }; |
304 | 306 |
305 } } // namespace v8::internal | 307 } } // namespace v8::internal |
306 | 308 |
307 #endif // V8_PROPERTY_DETAILS_H_ | 309 #endif // V8_PROPERTY_DETAILS_H_ |
OLD | NEW |