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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include "allocation.h" | 8 #include "allocation.h" |
9 #include "assert-scope.h" | 9 #include "assert-scope.h" |
10 #include "builtins.h" | 10 #include "builtins.h" |
(...skipping 5941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5952 // Bit field 3. | 5952 // Bit field 3. |
5953 inline uint32_t bit_field3(); | 5953 inline uint32_t bit_field3(); |
5954 inline void set_bit_field3(uint32_t bits); | 5954 inline void set_bit_field3(uint32_t bits); |
5955 | 5955 |
5956 class EnumLengthBits: public BitField<int, | 5956 class EnumLengthBits: public BitField<int, |
5957 0, kDescriptorIndexBitCount> {}; // NOLINT | 5957 0, kDescriptorIndexBitCount> {}; // NOLINT |
5958 class NumberOfOwnDescriptorsBits: public BitField<int, | 5958 class NumberOfOwnDescriptorsBits: public BitField<int, |
5959 kDescriptorIndexBitCount, kDescriptorIndexBitCount> {}; // NOLINT | 5959 kDescriptorIndexBitCount, kDescriptorIndexBitCount> {}; // NOLINT |
5960 STATIC_ASSERT(kDescriptorIndexBitCount + kDescriptorIndexBitCount == 20); | 5960 STATIC_ASSERT(kDescriptorIndexBitCount + kDescriptorIndexBitCount == 20); |
5961 class IsShared: public BitField<bool, 20, 1> {}; | 5961 class IsShared: public BitField<bool, 20, 1> {}; |
5962 class FunctionWithPrototype: public BitField<bool, 21, 1> {}; | 5962 class DictionaryMap: public BitField<bool, 21, 1> {}; |
5963 class DictionaryMap: public BitField<bool, 22, 1> {}; | 5963 class OwnsDescriptors: public BitField<bool, 22, 1> {}; |
5964 class OwnsDescriptors: public BitField<bool, 23, 1> {}; | 5964 class HasInstanceCallHandler: public BitField<bool, 23, 1> {}; |
5965 class HasInstanceCallHandler: public BitField<bool, 24, 1> {}; | 5965 class Deprecated: public BitField<bool, 24, 1> {}; |
5966 class Deprecated: public BitField<bool, 25, 1> {}; | 5966 class IsFrozen: public BitField<bool, 25, 1> {}; |
5967 class IsFrozen: public BitField<bool, 26, 1> {}; | 5967 class IsUnstable: public BitField<bool, 26, 1> {}; |
5968 class IsUnstable: public BitField<bool, 27, 1> {}; | 5968 class IsMigrationTarget: public BitField<bool, 27, 1> {}; |
5969 class IsMigrationTarget: public BitField<bool, 28, 1> {}; | |
5970 | 5969 |
5971 // Tells whether the object in the prototype property will be used | 5970 // Tells whether the object in the prototype property will be used |
5972 // for instances created from this function. If the prototype | 5971 // for instances created from this function. If the prototype |
5973 // property is set to a value that is not a JSObject, the prototype | 5972 // property is set to a value that is not a JSObject, the prototype |
5974 // property will not be used to create instances of the function. | 5973 // property will not be used to create instances of the function. |
5975 // See ECMA-262, 13.2.2. | 5974 // See ECMA-262, 13.2.2. |
5976 inline void set_non_instance_prototype(bool value); | 5975 inline void set_non_instance_prototype(bool value); |
5977 inline bool has_non_instance_prototype(); | 5976 inline bool has_non_instance_prototype(); |
5978 | 5977 |
5979 // Tells whether function has special prototype property. If not, prototype | 5978 // Tells whether function has special prototype property. If not, prototype |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6514 | 6513 |
6515 // Byte offsets within kInstanceAttributesOffset attributes. | 6514 // Byte offsets within kInstanceAttributesOffset attributes. |
6516 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 0; | 6515 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 0; |
6517 static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 1; | 6516 static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 1; |
6518 static const int kBitFieldOffset = kInstanceAttributesOffset + 2; | 6517 static const int kBitFieldOffset = kInstanceAttributesOffset + 2; |
6519 static const int kBitField2Offset = kInstanceAttributesOffset + 3; | 6518 static const int kBitField2Offset = kInstanceAttributesOffset + 3; |
6520 | 6519 |
6521 STATIC_CHECK(kInstanceTypeOffset == Internals::kMapInstanceTypeOffset); | 6520 STATIC_CHECK(kInstanceTypeOffset == Internals::kMapInstanceTypeOffset); |
6522 | 6521 |
6523 // Bit positions for bit field. | 6522 // Bit positions for bit field. |
6524 static const int kUnused = 0; // To be used for marking recently used maps. | 6523 static const int kHasNonInstancePrototype = 0; |
6525 static const int kHasNonInstancePrototype = 1; | 6524 static const int kIsHiddenPrototype = 1; |
6526 static const int kIsHiddenPrototype = 2; | 6525 static const int kHasNamedInterceptor = 2; |
6527 static const int kHasNamedInterceptor = 3; | 6526 static const int kHasIndexedInterceptor = 3; |
6528 static const int kHasIndexedInterceptor = 4; | 6527 static const int kIsUndetectable = 4; |
6529 static const int kIsUndetectable = 5; | 6528 static const int kIsObserved = 5; |
6530 static const int kIsObserved = 6; | 6529 static const int kIsAccessCheckNeeded = 6; |
6531 static const int kIsAccessCheckNeeded = 7; | 6530 class FunctionWithPrototype: public BitField<bool, 7, 1> {}; |
6532 | 6531 |
6533 // Bit positions for bit field 2 | 6532 // Bit positions for bit field 2 |
6534 static const int kIsExtensible = 0; | 6533 static const int kIsExtensible = 0; |
6535 static const int kStringWrapperSafeForDefaultValueOf = 1; | 6534 static const int kStringWrapperSafeForDefaultValueOf = 1; |
6536 static const int kAttachedToSharedFunctionInfo = 2; | 6535 static const int kAttachedToSharedFunctionInfo = 2; |
6537 // No bits can be used after kElementsKindFirstBit, they are all reserved for | 6536 // No bits can be used after kElementsKindFirstBit, they are all reserved for |
6538 // storing ElementKind. | 6537 // storing ElementKind. |
6539 static const int kElementsKindShift = 3; | 6538 static const int kElementsKindShift = 3; |
6540 static const int kElementsKindBitCount = 5; | 6539 static const int kElementsKindBitCount = 5; |
6541 | 6540 |
(...skipping 4578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11120 } else { | 11119 } else { |
11121 value &= ~(1 << bit_position); | 11120 value &= ~(1 << bit_position); |
11122 } | 11121 } |
11123 return value; | 11122 return value; |
11124 } | 11123 } |
11125 }; | 11124 }; |
11126 | 11125 |
11127 } } // namespace v8::internal | 11126 } } // namespace v8::internal |
11128 | 11127 |
11129 #endif // V8_OBJECTS_H_ | 11128 #endif // V8_OBJECTS_H_ |
OLD | NEW |