| 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 "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/assert-scope.h" | 9 #include "src/assert-scope.h" |
| 10 #include "src/builtins.h" | 10 #include "src/builtins.h" |
| (...skipping 6689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6700 static const int kPreAllocatedPropertyFieldsByte = 2; | 6700 static const int kPreAllocatedPropertyFieldsByte = 2; |
| 6701 static const int kPreAllocatedPropertyFieldsOffset = | 6701 static const int kPreAllocatedPropertyFieldsOffset = |
| 6702 kInstanceSizesOffset + kPreAllocatedPropertyFieldsByte; | 6702 kInstanceSizesOffset + kPreAllocatedPropertyFieldsByte; |
| 6703 static const int kVisitorIdByte = 3; | 6703 static const int kVisitorIdByte = 3; |
| 6704 static const int kVisitorIdOffset = kInstanceSizesOffset + kVisitorIdByte; | 6704 static const int kVisitorIdOffset = kInstanceSizesOffset + kVisitorIdByte; |
| 6705 | 6705 |
| 6706 // Byte offsets within kInstanceAttributesOffset attributes. | 6706 // Byte offsets within kInstanceAttributesOffset attributes. |
| 6707 #if V8_TARGET_LITTLE_ENDIAN | 6707 #if V8_TARGET_LITTLE_ENDIAN |
| 6708 // Order instance type and bit field together such that they can be loaded | 6708 // Order instance type and bit field together such that they can be loaded |
| 6709 // together as a 16-bit word with instance type in the lower 8 bits regardless | 6709 // together as a 16-bit word with instance type in the lower 8 bits regardless |
| 6710 // of endianess. | 6710 // of endianess. Also provide endian-independent offset to that 16-bit word. |
| 6711 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 0; | 6711 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 0; |
| 6712 static const int kBitFieldOffset = kInstanceAttributesOffset + 1; | 6712 static const int kBitFieldOffset = kInstanceAttributesOffset + 1; |
| 6713 #else | 6713 #else |
| 6714 static const int kBitFieldOffset = kInstanceAttributesOffset + 0; | 6714 static const int kBitFieldOffset = kInstanceAttributesOffset + 0; |
| 6715 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 1; | 6715 static const int kInstanceTypeOffset = kInstanceAttributesOffset + 1; |
| 6716 #endif | 6716 #endif |
| 6717 static const int kInstanceTypeAndBitFieldOffset = |
| 6718 kInstanceAttributesOffset + 0; |
| 6717 static const int kBitField2Offset = kInstanceAttributesOffset + 2; | 6719 static const int kBitField2Offset = kInstanceAttributesOffset + 2; |
| 6718 static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 3; | 6720 static const int kUnusedPropertyFieldsOffset = kInstanceAttributesOffset + 3; |
| 6719 | 6721 |
| 6720 STATIC_ASSERT(kInstanceTypeOffset == Internals::kMapInstanceTypeOffset); | 6722 STATIC_ASSERT(kInstanceTypeAndBitFieldOffset == |
| 6723 Internals::kMapInstanceTypeAndBitFieldOffset); |
| 6721 | 6724 |
| 6722 // Bit positions for bit field. | 6725 // Bit positions for bit field. |
| 6723 static const int kHasNonInstancePrototype = 0; | 6726 static const int kHasNonInstancePrototype = 0; |
| 6724 static const int kIsHiddenPrototype = 1; | 6727 static const int kIsHiddenPrototype = 1; |
| 6725 static const int kHasNamedInterceptor = 2; | 6728 static const int kHasNamedInterceptor = 2; |
| 6726 static const int kHasIndexedInterceptor = 3; | 6729 static const int kHasIndexedInterceptor = 3; |
| 6727 static const int kIsUndetectable = 4; | 6730 static const int kIsUndetectable = 4; |
| 6728 static const int kIsObserved = 5; | 6731 static const int kIsObserved = 5; |
| 6729 static const int kIsAccessCheckNeeded = 6; | 6732 static const int kIsAccessCheckNeeded = 6; |
| 6730 class FunctionWithPrototype: public BitField<bool, 7, 1> {}; | 6733 class FunctionWithPrototype: public BitField<bool, 7, 1> {}; |
| (...skipping 4517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11248 } else { | 11251 } else { |
| 11249 value &= ~(1 << bit_position); | 11252 value &= ~(1 << bit_position); |
| 11250 } | 11253 } |
| 11251 return value; | 11254 return value; |
| 11252 } | 11255 } |
| 11253 }; | 11256 }; |
| 11254 | 11257 |
| 11255 } } // namespace v8::internal | 11258 } } // namespace v8::internal |
| 11256 | 11259 |
| 11257 #endif // V8_OBJECTS_H_ | 11260 #endif // V8_OBJECTS_H_ |
| OLD | NEW |