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 #ifndef V8_FIELD_INDEX_H_ | 5 #ifndef V8_FIELD_INDEX_H_ |
6 #define V8_FIELD_INDEX_H_ | 6 #define V8_FIELD_INDEX_H_ |
7 | 7 |
8 #include "src/property-details.h" | 8 #include "src/property-details.h" |
9 #include "src/utils.h" | 9 #include "src/utils.h" |
10 | 10 |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 | 90 |
91 static const int kIndexBitsSize = kDescriptorIndexBitCount + 1; | 91 static const int kIndexBitsSize = kDescriptorIndexBitCount + 1; |
92 | 92 |
93 // Index from beginning of object. | 93 // Index from beginning of object. |
94 class IndexBits: public BitField<int, 0, kIndexBitsSize> {}; | 94 class IndexBits: public BitField<int, 0, kIndexBitsSize> {}; |
95 class IsInObjectBits: public BitField<bool, IndexBits::kNext, 1> {}; | 95 class IsInObjectBits: public BitField<bool, IndexBits::kNext, 1> {}; |
96 class IsDoubleBits: public BitField<bool, IsInObjectBits::kNext, 1> {}; | 96 class IsDoubleBits: public BitField<bool, IsInObjectBits::kNext, 1> {}; |
97 // Number of inobject properties. | 97 // Number of inobject properties. |
98 class InObjectPropertyBits: public BitField<int, IsDoubleBits::kNext, | 98 class InObjectPropertyBits: public BitField<int, IsDoubleBits::kNext, |
99 kDescriptorIndexBitCount> {}; | 99 kDescriptorIndexBitCount> { |
| 100 }; |
100 // Offset of first inobject property from beginning of object. | 101 // Offset of first inobject property from beginning of object. |
101 class FirstInobjectPropertyOffsetBits: | 102 class FirstInobjectPropertyOffsetBits: |
102 public BitField<int, InObjectPropertyBits::kNext, 7> {}; | 103 public BitField<int, InObjectPropertyBits::kNext, 7> { |
| 104 }; |
103 class IsHiddenField: | 105 class IsHiddenField: |
104 public BitField<bool, FirstInobjectPropertyOffsetBits::kNext, 1> {}; | 106 public BitField<bool, FirstInobjectPropertyOffsetBits::kNext, 1> { |
| 107 }; |
105 STATIC_ASSERT(IsHiddenField::kNext <= 32); | 108 STATIC_ASSERT(IsHiddenField::kNext <= 32); |
106 | 109 |
107 int bit_field_; | 110 int bit_field_; |
108 }; | 111 }; |
109 | 112 |
110 } } // namespace v8::internal | 113 } } // namespace v8::internal |
111 | 114 |
112 #endif | 115 #endif |
OLD | NEW |