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 | 9 |
10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
(...skipping 5301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5312 static const int kGCMetadataOffset = kNextCodeLinkOffset + kPointerSize; | 5312 static const int kGCMetadataOffset = kNextCodeLinkOffset + kPointerSize; |
5313 static const int kInstructionSizeOffset = kGCMetadataOffset + kPointerSize; | 5313 static const int kInstructionSizeOffset = kGCMetadataOffset + kPointerSize; |
5314 static const int kICAgeOffset = kInstructionSizeOffset + kIntSize; | 5314 static const int kICAgeOffset = kInstructionSizeOffset + kIntSize; |
5315 static const int kFlagsOffset = kICAgeOffset + kIntSize; | 5315 static const int kFlagsOffset = kICAgeOffset + kIntSize; |
5316 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize; | 5316 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize; |
5317 static const int kKindSpecificFlags2Offset = | 5317 static const int kKindSpecificFlags2Offset = |
5318 kKindSpecificFlags1Offset + kIntSize; | 5318 kKindSpecificFlags1Offset + kIntSize; |
5319 // Note: We might be able to squeeze this into the flags above. | 5319 // Note: We might be able to squeeze this into the flags above. |
5320 static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize; | 5320 static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize; |
5321 static const int kConstantPoolOffset = kPrologueOffset + kIntSize; | 5321 static const int kConstantPoolOffset = kPrologueOffset + kIntSize; |
5322 static const int kHeaderPaddingStart = | 5322 static const int kBuiltinIndexOffset = |
5323 kConstantPoolOffset + kConstantPoolSize; | 5323 kConstantPoolOffset + kConstantPoolSize; |
| 5324 static const int kHeaderPaddingStart = kBuiltinIndexOffset + kIntSize; |
5324 | 5325 |
5325 // Add padding to align the instruction start following right after | 5326 // Add padding to align the instruction start following right after |
5326 // the Code object header. | 5327 // the Code object header. |
5327 static const int kHeaderSize = | 5328 static const int kHeaderSize = |
5328 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask; | 5329 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask; |
5329 | 5330 |
5330 class BodyDescriptor; | 5331 class BodyDescriptor; |
5331 | 5332 |
5332 // Byte offsets within kKindSpecificFlags1Offset. | 5333 // Byte offsets within kKindSpecificFlags1Offset. |
5333 static const int kFullCodeFlags = kKindSpecificFlags1Offset; | 5334 static const int kFullCodeFlags = kKindSpecificFlags1Offset; |
5334 class FullCodeFlagsHasDeoptimizationSupportField: | 5335 class FullCodeFlagsHasDeoptimizationSupportField: |
5335 public BitField<bool, 0, 1> {}; // NOLINT | 5336 public BitField<bool, 0, 1> {}; // NOLINT |
5336 class FullCodeFlagsHasDebugBreakSlotsField: public BitField<bool, 1, 1> {}; | 5337 class FullCodeFlagsHasDebugBreakSlotsField: public BitField<bool, 1, 1> {}; |
5337 class FullCodeFlagsHasRelocInfoForSerialization | 5338 class FullCodeFlagsHasRelocInfoForSerialization |
5338 : public BitField<bool, 2, 1> {}; | 5339 : public BitField<bool, 2, 1> {}; |
5339 // Bit 3 in this bitfield is unused. | 5340 // Bit 3 in this bitfield is unused. |
5340 class ProfilerTicksField : public BitField<int, 4, 28> {}; | 5341 class ProfilerTicksField : public BitField<int, 4, 28> {}; |
5341 | 5342 |
5342 // Flags layout. BitField<type, shift, size>. | 5343 // Flags layout. BitField<type, shift, size>. |
5343 class ICStateField : public BitField<InlineCacheState, 0, 3> {}; | 5344 class ICStateField : public BitField<InlineCacheState, 0, 3> {}; |
5344 class TypeField : public BitField<StubType, 3, 1> {}; | 5345 class TypeField : public BitField<StubType, 3, 1> {}; |
5345 class CacheHolderField : public BitField<CacheHolderFlag, 4, 2> {}; | 5346 class CacheHolderField : public BitField<CacheHolderFlag, 4, 2> {}; |
5346 class KindField : public BitField<Kind, 6, 5> {}; | 5347 class KindField : public BitField<Kind, 6, 5> {}; |
5347 class ExtraICStateField | 5348 class ExtraICStateField |
5348 : public BitField<ExtraICState, 11, PlatformSmiTagging::kSmiValueSize - | 5349 : public BitField<ExtraICState, 11, PlatformSmiTagging::kSmiValueSize - |
5349 11 + 1> {}; // NOLINT | 5350 11 + 1> {}; // NOLINT |
5350 | 5351 |
5351 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) | 5352 // KindSpecificFlags1 layout (STUB, BUILTIN and OPTIMIZED_FUNCTION) |
5352 static const int kStackSlotsFirstBit = 0; | 5353 static const int kStackSlotsFirstBit = 0; |
5353 static const int kStackSlotsBitCount = 24; | 5354 static const int kStackSlotsBitCount = 24; |
5354 static const int kMarkedForDeoptimizationBit = | 5355 static const int kMarkedForDeoptimizationBit = |
5355 kStackSlotsFirstBit + kStackSlotsBitCount; | 5356 kStackSlotsFirstBit + kStackSlotsBitCount; |
5356 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1; | 5357 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1; |
5357 static const int kCanHaveWeakObjects = kIsTurbofannedBit + 1; | 5358 static const int kCanHaveWeakObjects = kIsTurbofannedBit + 1; |
5358 | 5359 |
5359 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); | 5360 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); |
5360 STATIC_ASSERT(kCanHaveWeakObjects + 1 <= 32); | 5361 STATIC_ASSERT(kCanHaveWeakObjects + 1 <= 32); |
5361 | 5362 |
(...skipping 5534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10896 } | 10897 } |
10897 return value; | 10898 return value; |
10898 } | 10899 } |
10899 }; | 10900 }; |
10900 | 10901 |
10901 | 10902 |
10902 } // NOLINT, false-positive due to second-order macros. | 10903 } // NOLINT, false-positive due to second-order macros. |
10903 } // NOLINT, false-positive due to second-order macros. | 10904 } // NOLINT, false-positive due to second-order macros. |
10904 | 10905 |
10905 #endif // V8_OBJECTS_H_ | 10906 #endif // V8_OBJECTS_H_ |
OLD | NEW |