OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 bool IsReadOnly() { return (attributes() & READ_ONLY) != 0; } | 172 bool IsReadOnly() { return (attributes() & READ_ONLY) != 0; } |
173 bool IsDontDelete() { return (attributes() & DONT_DELETE) != 0; } | 173 bool IsDontDelete() { return (attributes() & DONT_DELETE) != 0; } |
174 bool IsDontEnum() { return (attributes() & DONT_ENUM) != 0; } | 174 bool IsDontEnum() { return (attributes() & DONT_ENUM) != 0; } |
175 bool IsDeleted() { return DeletedField::decode(value_) != 0;} | 175 bool IsDeleted() { return DeletedField::decode(value_) != 0;} |
176 | 176 |
177 // Bit fields in value_ (type, shift, size). Must be public so the | 177 // Bit fields in value_ (type, shift, size). Must be public so the |
178 // constants can be embedded in generated code. | 178 // constants can be embedded in generated code. |
179 class TypeField: public BitField<PropertyType, 0, 3> {}; | 179 class TypeField: public BitField<PropertyType, 0, 3> {}; |
180 class AttributesField: public BitField<PropertyAttributes, 3, 3> {}; | 180 class AttributesField: public BitField<PropertyAttributes, 3, 3> {}; |
181 class DeletedField: public BitField<uint32_t, 6, 1> {}; | 181 class DeletedField: public BitField<uint32_t, 6, 1> {}; |
182 class IndexField: public BitField<uint32_t, 7, 31-7> {}; | 182 class IndexField: public BitField<uint32_t, 7, 32-7> {}; |
183 | 183 |
184 static const int kInitialIndex = 1; | 184 static const int kInitialIndex = 1; |
185 private: | 185 private: |
186 uint32_t value_; | 186 uint32_t value_; |
187 }; | 187 }; |
188 | 188 |
189 | 189 |
190 // Setter that skips the write barrier if mode is SKIP_WRITE_BARRIER. | 190 // Setter that skips the write barrier if mode is SKIP_WRITE_BARRIER. |
191 enum WriteBarrierMode { SKIP_WRITE_BARRIER, UPDATE_WRITE_BARRIER }; | 191 enum WriteBarrierMode { SKIP_WRITE_BARRIER, UPDATE_WRITE_BARRIER }; |
192 | 192 |
(...skipping 4782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4975 } else { | 4975 } else { |
4976 value &= ~(1 << bit_position); | 4976 value &= ~(1 << bit_position); |
4977 } | 4977 } |
4978 return value; | 4978 return value; |
4979 } | 4979 } |
4980 }; | 4980 }; |
4981 | 4981 |
4982 } } // namespace v8::internal | 4982 } } // namespace v8::internal |
4983 | 4983 |
4984 #endif // V8_OBJECTS_H_ | 4984 #endif // V8_OBJECTS_H_ |
OLD | NEW |