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 5551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5562 // the instruction stream where the safepoint table starts. | 5562 // the instruction stream where the safepoint table starts. |
5563 inline unsigned safepoint_table_offset(); | 5563 inline unsigned safepoint_table_offset(); |
5564 inline void set_safepoint_table_offset(unsigned offset); | 5564 inline void set_safepoint_table_offset(unsigned offset); |
5565 | 5565 |
5566 // [back_edge_table_start]: For kind FUNCTION, the offset in the | 5566 // [back_edge_table_start]: For kind FUNCTION, the offset in the |
5567 // instruction stream where the back edge table starts. | 5567 // instruction stream where the back edge table starts. |
5568 inline unsigned back_edge_table_offset(); | 5568 inline unsigned back_edge_table_offset(); |
5569 inline void set_back_edge_table_offset(unsigned offset); | 5569 inline void set_back_edge_table_offset(unsigned offset); |
5570 | 5570 |
5571 inline bool back_edges_patched_for_osr(); | 5571 inline bool back_edges_patched_for_osr(); |
5572 inline void set_back_edges_patched_for_osr(bool value); | |
5573 | 5572 |
5574 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. | 5573 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. |
5575 inline byte to_boolean_state(); | 5574 inline byte to_boolean_state(); |
5576 | 5575 |
5577 // [has_function_cache]: For kind STUB tells whether there is a function | 5576 // [has_function_cache]: For kind STUB tells whether there is a function |
5578 // cache is passed to the stub. | 5577 // cache is passed to the stub. |
5579 inline bool has_function_cache(); | 5578 inline bool has_function_cache(); |
5580 inline void set_has_function_cache(bool flag); | 5579 inline void set_has_function_cache(bool flag); |
5581 | 5580 |
5582 | 5581 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5807 | 5806 |
5808 // Byte offsets within kKindSpecificFlags1Offset. | 5807 // Byte offsets within kKindSpecificFlags1Offset. |
5809 static const int kOptimizableOffset = kKindSpecificFlags1Offset; | 5808 static const int kOptimizableOffset = kKindSpecificFlags1Offset; |
5810 | 5809 |
5811 static const int kFullCodeFlags = kOptimizableOffset + 1; | 5810 static const int kFullCodeFlags = kOptimizableOffset + 1; |
5812 class FullCodeFlagsHasDeoptimizationSupportField: | 5811 class FullCodeFlagsHasDeoptimizationSupportField: |
5813 public BitField<bool, 0, 1> {}; // NOLINT | 5812 public BitField<bool, 0, 1> {}; // NOLINT |
5814 class FullCodeFlagsHasDebugBreakSlotsField: public BitField<bool, 1, 1> {}; | 5813 class FullCodeFlagsHasDebugBreakSlotsField: public BitField<bool, 1, 1> {}; |
5815 class FullCodeFlagsIsCompiledOptimizable: public BitField<bool, 2, 1> {}; | 5814 class FullCodeFlagsIsCompiledOptimizable: public BitField<bool, 2, 1> {}; |
5816 | 5815 |
5817 static const int kAllowOSRAtLoopNestingLevelOffset = kFullCodeFlags + 1; | 5816 static const int kProfilerTicksOffset = kFullCodeFlags + 1; |
5818 static const int kProfilerTicksOffset = kAllowOSRAtLoopNestingLevelOffset + 1; | |
5819 | 5817 |
5820 // Flags layout. BitField<type, shift, size>. | 5818 // Flags layout. BitField<type, shift, size>. |
5821 class ICStateField: public BitField<InlineCacheState, 0, 3> {}; | 5819 class ICStateField: public BitField<InlineCacheState, 0, 3> {}; |
5822 class TypeField: public BitField<StubType, 3, 1> {}; | 5820 class TypeField: public BitField<StubType, 3, 1> {}; |
5823 class CacheHolderField: public BitField<InlineCacheHolderFlag, 5, 1> {}; | 5821 class CacheHolderField: public BitField<InlineCacheHolderFlag, 5, 1> {}; |
5824 class KindField: public BitField<Kind, 6, 4> {}; | 5822 class KindField: public BitField<Kind, 6, 4> {}; |
5825 // TODO(bmeurer): Bit 10 is available for free use. :-) | 5823 // TODO(bmeurer): Bit 10 is available for free use. :-) |
5826 class ExtraICStateField: public BitField<ExtraICState, 11, | 5824 class ExtraICStateField: public BitField<ExtraICState, 11, |
5827 PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT | 5825 PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT |
5828 | 5826 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5879 kSafepointTableOffsetBitCount <= 32); | 5877 kSafepointTableOffsetBitCount <= 32); |
5880 | 5878 |
5881 class SafepointTableOffsetField: public BitField<int, | 5879 class SafepointTableOffsetField: public BitField<int, |
5882 kSafepointTableOffsetFirstBit, | 5880 kSafepointTableOffsetFirstBit, |
5883 kSafepointTableOffsetBitCount> {}; // NOLINT | 5881 kSafepointTableOffsetBitCount> {}; // NOLINT |
5884 class StubMajorKeyField: public BitField<int, | 5882 class StubMajorKeyField: public BitField<int, |
5885 kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT | 5883 kStubMajorKeyFirstBit, kStubMajorKeyBits> {}; // NOLINT |
5886 | 5884 |
5887 // KindSpecificFlags2 layout (FUNCTION) | 5885 // KindSpecificFlags2 layout (FUNCTION) |
5888 class BackEdgeTableOffsetField: public BitField<int, | 5886 class BackEdgeTableOffsetField: public BitField<int, |
5889 kIsCrankshaftedBit + 1, 29> {}; // NOLINT | 5887 kIsCrankshaftedBit + 1, 27> {}; // NOLINT |
5890 class BackEdgesPatchedForOSRField: public BitField<bool, | 5888 class AllowOSRAtLoopNestingLevelField: public BitField<int, |
5891 kIsCrankshaftedBit + 1 + 29, 1> {}; // NOLINT | 5889 kIsCrankshaftedBit + 1 + 27, 4> {}; // NOLINT |
| 5890 STATIC_ASSERT(AllowOSRAtLoopNestingLevelField::kMax >= kMaxLoopNestingMarker); |
5892 | 5891 |
5893 static const int kArgumentsBits = 16; | 5892 static const int kArgumentsBits = 16; |
5894 static const int kMaxArguments = (1 << kArgumentsBits) - 1; | 5893 static const int kMaxArguments = (1 << kArgumentsBits) - 1; |
5895 | 5894 |
5896 // This constant should be encodable in an ARM instruction. | 5895 // This constant should be encodable in an ARM instruction. |
5897 static const int kFlagsNotUsedInLookup = | 5896 static const int kFlagsNotUsedInLookup = |
5898 TypeField::kMask | CacheHolderField::kMask; | 5897 TypeField::kMask | CacheHolderField::kMask; |
5899 | 5898 |
5900 private: | 5899 private: |
5901 friend class RelocIterator; | 5900 friend class RelocIterator; |
(...skipping 5245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11147 } else { | 11146 } else { |
11148 value &= ~(1 << bit_position); | 11147 value &= ~(1 << bit_position); |
11149 } | 11148 } |
11150 return value; | 11149 return value; |
11151 } | 11150 } |
11152 }; | 11151 }; |
11153 | 11152 |
11154 } } // namespace v8::internal | 11153 } } // namespace v8::internal |
11155 | 11154 |
11156 #endif // V8_OBJECTS_H_ | 11155 #endif // V8_OBJECTS_H_ |
OLD | NEW |