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 <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 5352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5363 static const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset + kPointerSize; | 5363 static const int kNextCodeLinkOffset = kTypeFeedbackInfoOffset + kPointerSize; |
5364 static const int kGCMetadataOffset = kNextCodeLinkOffset + kPointerSize; | 5364 static const int kGCMetadataOffset = kNextCodeLinkOffset + kPointerSize; |
5365 static const int kInstructionSizeOffset = kGCMetadataOffset + kPointerSize; | 5365 static const int kInstructionSizeOffset = kGCMetadataOffset + kPointerSize; |
5366 static const int kICAgeOffset = kInstructionSizeOffset + kIntSize; | 5366 static const int kICAgeOffset = kInstructionSizeOffset + kIntSize; |
5367 static const int kFlagsOffset = kICAgeOffset + kIntSize; | 5367 static const int kFlagsOffset = kICAgeOffset + kIntSize; |
5368 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize; | 5368 static const int kKindSpecificFlags1Offset = kFlagsOffset + kIntSize; |
5369 static const int kKindSpecificFlags2Offset = | 5369 static const int kKindSpecificFlags2Offset = |
5370 kKindSpecificFlags1Offset + kIntSize; | 5370 kKindSpecificFlags1Offset + kIntSize; |
5371 // Note: We might be able to squeeze this into the flags above. | 5371 // Note: We might be able to squeeze this into the flags above. |
5372 static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize; | 5372 static const int kPrologueOffset = kKindSpecificFlags2Offset + kIntSize; |
5373 static const int kConstantPoolOffset = kPrologueOffset + kPointerSize; | 5373 static const int kConstantPoolOffset = kPrologueOffset + kIntSize; |
5374 | 5374 |
5375 static const int kHeaderPaddingStart = kConstantPoolOffset + kPointerSize; | 5375 static const int kHeaderPaddingStart = kConstantPoolOffset + kPointerSize; |
5376 | 5376 |
5377 // Add padding to align the instruction start following right after | 5377 // Add padding to align the instruction start following right after |
5378 // the Code object header. | 5378 // the Code object header. |
5379 static const int kHeaderSize = | 5379 static const int kHeaderSize = |
5380 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask; | 5380 (kHeaderPaddingStart + kCodeAlignmentMask) & ~kCodeAlignmentMask; |
| 5381 // Ensure that the slot for the constant pool pointer is aligned. |
| 5382 STATIC_ASSERT((kConstantPoolOffset & kPointerAlignmentMask) == 0); |
5381 | 5383 |
5382 // Byte offsets within kKindSpecificFlags1Offset. | 5384 // Byte offsets within kKindSpecificFlags1Offset. |
5383 static const int kOptimizableOffset = kKindSpecificFlags1Offset; | 5385 static const int kOptimizableOffset = kKindSpecificFlags1Offset; |
5384 | 5386 |
5385 static const int kFullCodeFlags = kOptimizableOffset + 1; | 5387 static const int kFullCodeFlags = kOptimizableOffset + 1; |
5386 class FullCodeFlagsHasDeoptimizationSupportField: | 5388 class FullCodeFlagsHasDeoptimizationSupportField: |
5387 public BitField<bool, 0, 1> {}; // NOLINT | 5389 public BitField<bool, 0, 1> {}; // NOLINT |
5388 class FullCodeFlagsHasDebugBreakSlotsField: public BitField<bool, 1, 1> {}; | 5390 class FullCodeFlagsHasDebugBreakSlotsField: public BitField<bool, 1, 1> {}; |
5389 class FullCodeFlagsIsCompiledOptimizable: public BitField<bool, 2, 1> {}; | 5391 class FullCodeFlagsIsCompiledOptimizable: public BitField<bool, 2, 1> {}; |
5390 | 5392 |
(...skipping 5576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10967 } else { | 10969 } else { |
10968 value &= ~(1 << bit_position); | 10970 value &= ~(1 << bit_position); |
10969 } | 10971 } |
10970 return value; | 10972 return value; |
10971 } | 10973 } |
10972 }; | 10974 }; |
10973 | 10975 |
10974 } } // namespace v8::internal | 10976 } } // namespace v8::internal |
10975 | 10977 |
10976 #endif // V8_OBJECTS_H_ | 10978 #endif // V8_OBJECTS_H_ |
OLD | NEW |