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 5000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5011 // [back_edge_table_start]: For kind FUNCTION, the offset in the | 5011 // [back_edge_table_start]: For kind FUNCTION, the offset in the |
5012 // instruction stream where the back edge table starts. | 5012 // instruction stream where the back edge table starts. |
5013 inline unsigned back_edge_table_offset(); | 5013 inline unsigned back_edge_table_offset(); |
5014 inline void set_back_edge_table_offset(unsigned offset); | 5014 inline void set_back_edge_table_offset(unsigned offset); |
5015 | 5015 |
5016 inline bool back_edges_patched_for_osr(); | 5016 inline bool back_edges_patched_for_osr(); |
5017 | 5017 |
5018 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. | 5018 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. |
5019 inline uint16_t to_boolean_state(); | 5019 inline uint16_t to_boolean_state(); |
5020 | 5020 |
5021 // [has_function_cache]: For kind STUB tells whether there is a function | |
5022 // cache is passed to the stub. | |
5023 inline bool has_function_cache(); | |
5024 inline void set_has_function_cache(bool flag); | |
5025 | |
5026 | |
5027 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether | 5021 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether |
5028 // the code is going to be deoptimized because of dead embedded maps. | 5022 // the code is going to be deoptimized because of dead embedded maps. |
5029 inline bool marked_for_deoptimization(); | 5023 inline bool marked_for_deoptimization(); |
5030 inline void set_marked_for_deoptimization(bool flag); | 5024 inline void set_marked_for_deoptimization(bool flag); |
5031 | 5025 |
5032 // [constant_pool]: The constant pool for this function. | 5026 // [constant_pool]: The constant pool for this function. |
5033 inline Address constant_pool(); | 5027 inline Address constant_pool(); |
5034 | 5028 |
5035 // Get the safepoint entry for the given pc. | 5029 // Get the safepoint entry for the given pc. |
5036 SafepointEntry GetSafepointEntry(Address pc); | 5030 SafepointEntry GetSafepointEntry(Address pc); |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5262 class ICStateField : public BitField<InlineCacheState, 0, 3> {}; | 5256 class ICStateField : public BitField<InlineCacheState, 0, 3> {}; |
5263 class TypeField : public BitField<StubType, 3, 1> {}; | 5257 class TypeField : public BitField<StubType, 3, 1> {}; |
5264 class CacheHolderField : public BitField<CacheHolderFlag, 4, 2> {}; | 5258 class CacheHolderField : public BitField<CacheHolderFlag, 4, 2> {}; |
5265 class KindField : public BitField<Kind, 6, 5> {}; | 5259 class KindField : public BitField<Kind, 6, 5> {}; |
5266 class ExtraICStateField: public BitField<ExtraICState, 11, | 5260 class ExtraICStateField: public BitField<ExtraICState, 11, |
5267 PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT | 5261 PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT |
5268 | 5262 |
5269 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) | 5263 // KindSpecificFlags1 layout (STUB and OPTIMIZED_FUNCTION) |
5270 static const int kStackSlotsFirstBit = 0; | 5264 static const int kStackSlotsFirstBit = 0; |
5271 static const int kStackSlotsBitCount = 24; | 5265 static const int kStackSlotsBitCount = 24; |
5272 static const int kHasFunctionCacheBit = | 5266 static const int kMarkedForDeoptimizationBit = |
5273 kStackSlotsFirstBit + kStackSlotsBitCount; | 5267 kStackSlotsFirstBit + kStackSlotsBitCount; |
5274 static const int kMarkedForDeoptimizationBit = kHasFunctionCacheBit + 1; | |
5275 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1; | 5268 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1; |
5276 static const int kCanHaveWeakObjects = kIsTurbofannedBit + 1; | 5269 static const int kCanHaveWeakObjects = kIsTurbofannedBit + 1; |
5277 | 5270 |
5278 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); | 5271 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); |
5279 STATIC_ASSERT(kCanHaveWeakObjects + 1 <= 32); | 5272 STATIC_ASSERT(kCanHaveWeakObjects + 1 <= 32); |
5280 | 5273 |
5281 class StackSlotsField: public BitField<int, | 5274 class StackSlotsField: public BitField<int, |
5282 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT | 5275 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT |
5283 class HasFunctionCacheField : public BitField<bool, kHasFunctionCacheBit, 1> { | |
5284 }; // NOLINT | |
5285 class MarkedForDeoptimizationField | 5276 class MarkedForDeoptimizationField |
5286 : public BitField<bool, kMarkedForDeoptimizationBit, 1> {}; // NOLINT | 5277 : public BitField<bool, kMarkedForDeoptimizationBit, 1> {}; // NOLINT |
5287 class IsTurbofannedField : public BitField<bool, kIsTurbofannedBit, 1> { | 5278 class IsTurbofannedField : public BitField<bool, kIsTurbofannedBit, 1> { |
5288 }; // NOLINT | 5279 }; // NOLINT |
5289 class CanHaveWeakObjectsField | 5280 class CanHaveWeakObjectsField |
5290 : public BitField<bool, kCanHaveWeakObjects, 1> {}; // NOLINT | 5281 : public BitField<bool, kCanHaveWeakObjects, 1> {}; // NOLINT |
5291 | 5282 |
5292 // KindSpecificFlags2 layout (ALL) | 5283 // KindSpecificFlags2 layout (ALL) |
5293 static const int kIsCrankshaftedBit = 0; | 5284 static const int kIsCrankshaftedBit = 0; |
5294 class IsCrankshaftedField: public BitField<bool, | 5285 class IsCrankshaftedField: public BitField<bool, |
5295 kIsCrankshaftedBit, 1> {}; // NOLINT | 5286 kIsCrankshaftedBit, 1> {}; // NOLINT |
5296 | 5287 |
(...skipping 5436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10733 } | 10724 } |
10734 return value; | 10725 return value; |
10735 } | 10726 } |
10736 }; | 10727 }; |
10737 | 10728 |
10738 | 10729 |
10739 } // NOLINT, false-positive due to second-order macros. | 10730 } // NOLINT, false-positive due to second-order macros. |
10740 } // NOLINT, false-positive due to second-order macros. | 10731 } // NOLINT, false-positive due to second-order macros. |
10741 | 10732 |
10742 #endif // V8_OBJECTS_H_ | 10733 #endif // V8_OBJECTS_H_ |
OLD | NEW |