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 // TODO(ishell): remove once FLAG_track_constant_fields is removed. | 10 // TODO(ishell): remove once FLAG_track_constant_fields is removed. |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 // constants can be embedded in generated code. | 333 // constants can be embedded in generated code. |
334 class KindField : public BitField<PropertyKind, 0, 1> {}; | 334 class KindField : public BitField<PropertyKind, 0, 1> {}; |
335 class LocationField : public BitField<PropertyLocation, KindField::kNext, 1> { | 335 class LocationField : public BitField<PropertyLocation, KindField::kNext, 1> { |
336 }; | 336 }; |
337 class ConstnessField | 337 class ConstnessField |
338 : public BitField<PropertyConstness, LocationField::kNext, 1> {}; | 338 : public BitField<PropertyConstness, LocationField::kNext, 1> {}; |
339 class AttributesField | 339 class AttributesField |
340 : public BitField<PropertyAttributes, ConstnessField::kNext, 3> {}; | 340 : public BitField<PropertyAttributes, ConstnessField::kNext, 3> {}; |
341 static const int kAttributesReadOnlyMask = | 341 static const int kAttributesReadOnlyMask = |
342 (READ_ONLY << AttributesField::kShift); | 342 (READ_ONLY << AttributesField::kShift); |
| 343 static const int kAttributesDontDeleteMask = |
| 344 (DONT_DELETE << AttributesField::kShift); |
343 | 345 |
344 // Bit fields for normalized objects. | 346 // Bit fields for normalized objects. |
345 class PropertyCellTypeField | 347 class PropertyCellTypeField |
346 : public BitField<PropertyCellType, AttributesField::kNext, 2> {}; | 348 : public BitField<PropertyCellType, AttributesField::kNext, 2> {}; |
347 class DictionaryStorageField | 349 class DictionaryStorageField |
348 : public BitField<uint32_t, PropertyCellTypeField::kNext, 23> {}; | 350 : public BitField<uint32_t, PropertyCellTypeField::kNext, 23> {}; |
349 | 351 |
350 // Bit fields for fast objects. | 352 // Bit fields for fast objects. |
351 class RepresentationField | 353 class RepresentationField |
352 : public BitField<uint32_t, AttributesField::kNext, 4> {}; | 354 : public BitField<uint32_t, AttributesField::kNext, 4> {}; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
415 PropertyConstness b) { | 417 PropertyConstness b) { |
416 return a == kMutable ? kMutable : b; | 418 return a == kMutable ? kMutable : b; |
417 } | 419 } |
418 | 420 |
419 std::ostream& operator<<(std::ostream& os, | 421 std::ostream& operator<<(std::ostream& os, |
420 const PropertyAttributes& attributes); | 422 const PropertyAttributes& attributes); |
421 } // namespace internal | 423 } // namespace internal |
422 } // namespace v8 | 424 } // namespace v8 |
423 | 425 |
424 #endif // V8_PROPERTY_DETAILS_H_ | 426 #endif // V8_PROPERTY_DETAILS_H_ |
OLD | NEW |