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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 return FirstInobjectPropertyOffsetBits::decode(bit_field_); | 88 return FirstInobjectPropertyOffsetBits::decode(bit_field_); |
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 |
99 kDescriptorIndexBitCount> {}; | 99 : public BitField<int, IsDoubleBits::kNext, kDescriptorIndexBitCount> {}; |
100 // Offset of first inobject property from beginning of object. | 100 // Offset of first inobject property from beginning of object. |
101 class FirstInobjectPropertyOffsetBits: | 101 class FirstInobjectPropertyOffsetBits |
102 public BitField<int, InObjectPropertyBits::kNext, 7> {}; | 102 : public BitField<int, InObjectPropertyBits::kNext, 7> {}; |
103 class IsHiddenField: | 103 class IsHiddenField |
104 public BitField<bool, FirstInobjectPropertyOffsetBits::kNext, 1> {}; | 104 : public BitField<bool, FirstInobjectPropertyOffsetBits::kNext, 1> {}; |
105 STATIC_ASSERT(IsHiddenField::kNext <= 32); | 105 STATIC_ASSERT(IsHiddenField::kNext <= 32); |
106 | 106 |
107 int bit_field_; | 107 int bit_field_; |
108 }; | 108 }; |
109 | 109 |
110 } } // namespace v8::internal | 110 } } // namespace v8::internal |
111 | 111 |
112 #endif | 112 #endif |
OLD | NEW |