OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 7525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7536 DISALLOW_COPY_AND_ASSIGN(Iterator); | 7536 DISALLOW_COPY_AND_ASSIGN(Iterator); |
7537 }; | 7537 }; |
7538 | 7538 |
7539 DECLARE_CAST(SharedFunctionInfo) | 7539 DECLARE_CAST(SharedFunctionInfo) |
7540 | 7540 |
7541 // Constants. | 7541 // Constants. |
7542 static const int kDontAdaptArgumentsSentinel = -1; | 7542 static const int kDontAdaptArgumentsSentinel = -1; |
7543 | 7543 |
7544 // Layout description. | 7544 // Layout description. |
7545 // Pointer fields. | 7545 // Pointer fields. |
7546 static const int kNameOffset = HeapObject::kHeaderSize; | 7546 static const int kCodeOffset = HeapObject::kHeaderSize; |
7547 static const int kCodeOffset = kNameOffset + kPointerSize; | 7547 static const int kNameOffset = kCodeOffset + kPointerSize; |
7548 static const int kOptimizedCodeMapOffset = kCodeOffset + kPointerSize; | 7548 static const int kOptimizedCodeMapOffset = kNameOffset + kPointerSize; |
7549 static const int kScopeInfoOffset = kOptimizedCodeMapOffset + kPointerSize; | 7549 static const int kScopeInfoOffset = kOptimizedCodeMapOffset + kPointerSize; |
7550 static const int kOuterScopeInfoOffset = kScopeInfoOffset + kPointerSize; | 7550 static const int kOuterScopeInfoOffset = kScopeInfoOffset + kPointerSize; |
7551 static const int kConstructStubOffset = kOuterScopeInfoOffset + kPointerSize; | 7551 static const int kConstructStubOffset = kOuterScopeInfoOffset + kPointerSize; |
7552 static const int kInstanceClassNameOffset = | 7552 static const int kInstanceClassNameOffset = |
7553 kConstructStubOffset + kPointerSize; | 7553 kConstructStubOffset + kPointerSize; |
7554 static const int kFunctionDataOffset = | 7554 static const int kFunctionDataOffset = |
7555 kInstanceClassNameOffset + kPointerSize; | 7555 kInstanceClassNameOffset + kPointerSize; |
7556 static const int kScriptOffset = kFunctionDataOffset + kPointerSize; | 7556 static const int kScriptOffset = kFunctionDataOffset + kPointerSize; |
7557 static const int kDebugInfoOffset = kScriptOffset + kPointerSize; | 7557 static const int kDebugInfoOffset = kScriptOffset + kPointerSize; |
7558 static const int kFunctionIdentifierOffset = kDebugInfoOffset + kPointerSize; | 7558 static const int kFunctionIdentifierOffset = kDebugInfoOffset + kPointerSize; |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7663 static const int kSize = kAstNodeCountOffset + kIntSize; | 7663 static const int kSize = kAstNodeCountOffset + kIntSize; |
7664 | 7664 |
7665 #else | 7665 #else |
7666 #error Unknown byte ordering | 7666 #error Unknown byte ordering |
7667 #endif // Big endian | 7667 #endif // Big endian |
7668 #endif // 64-bit | 7668 #endif // 64-bit |
7669 | 7669 |
7670 | 7670 |
7671 static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize); | 7671 static const int kAlignedSize = POINTER_SIZE_ALIGN(kSize); |
7672 | 7672 |
| 7673 typedef FixedBodyDescriptor<kCodeOffset, |
| 7674 kLastPointerFieldOffset + kPointerSize, kSize> |
| 7675 BodyDescriptor; |
7673 typedef FixedBodyDescriptor<kNameOffset, | 7676 typedef FixedBodyDescriptor<kNameOffset, |
7674 kLastPointerFieldOffset + kPointerSize, | 7677 kLastPointerFieldOffset + kPointerSize, kSize> |
7675 kSize> BodyDescriptor; | 7678 BodyDescriptorWeakCode; |
7676 | 7679 |
7677 // Bit positions in start_position_and_type. | 7680 // Bit positions in start_position_and_type. |
7678 // The source code start position is in the 30 most significant bits of | 7681 // The source code start position is in the 30 most significant bits of |
7679 // the start_position_and_type field. | 7682 // the start_position_and_type field. |
7680 static const int kIsNamedExpressionBit = 0; | 7683 static const int kIsNamedExpressionBit = 0; |
7681 static const int kIsTopLevelBit = 1; | 7684 static const int kIsTopLevelBit = 1; |
7682 static const int kStartPositionShift = 2; | 7685 static const int kStartPositionShift = 2; |
7683 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); | 7686 static const int kStartPositionMask = ~((1 << kStartPositionShift) - 1); |
7684 | 7687 |
7685 // Bit positions in compiler_hints. | 7688 // Bit positions in compiler_hints. |
(...skipping 3751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11437 } | 11440 } |
11438 return value; | 11441 return value; |
11439 } | 11442 } |
11440 }; | 11443 }; |
11441 | 11444 |
11442 | 11445 |
11443 } // NOLINT, false-positive due to second-order macros. | 11446 } // NOLINT, false-positive due to second-order macros. |
11444 } // NOLINT, false-positive due to second-order macros. | 11447 } // NOLINT, false-positive due to second-order macros. |
11445 | 11448 |
11446 #endif // V8_OBJECTS_H_ | 11449 #endif // V8_OBJECTS_H_ |
OLD | NEW |