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 5556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5567 inline bool back_edges_patched_for_osr(); | 5567 inline bool back_edges_patched_for_osr(); |
5568 | 5568 |
5569 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. | 5569 // [to_boolean_foo]: For kind TO_BOOLEAN_IC tells what state the stub is in. |
5570 inline uint16_t to_boolean_state(); | 5570 inline uint16_t to_boolean_state(); |
5571 | 5571 |
5572 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether | 5572 // [marked_for_deoptimization]: For kind OPTIMIZED_FUNCTION tells whether |
5573 // the code is going to be deoptimized because of dead embedded maps. | 5573 // the code is going to be deoptimized because of dead embedded maps. |
5574 inline bool marked_for_deoptimization(); | 5574 inline bool marked_for_deoptimization(); |
5575 inline void set_marked_for_deoptimization(bool flag); | 5575 inline void set_marked_for_deoptimization(bool flag); |
5576 | 5576 |
| 5577 // [is_promise_rejection]: For kind BUILTIN tells whether the exception |
| 5578 // thrown by the code will lead to promise rejection. |
| 5579 inline bool is_promise_rejection(); |
| 5580 inline void set_is_promise_rejection(bool flag); |
| 5581 |
5577 // [constant_pool]: The constant pool for this function. | 5582 // [constant_pool]: The constant pool for this function. |
5578 inline Address constant_pool(); | 5583 inline Address constant_pool(); |
5579 | 5584 |
5580 // Get the safepoint entry for the given pc. | 5585 // Get the safepoint entry for the given pc. |
5581 SafepointEntry GetSafepointEntry(Address pc); | 5586 SafepointEntry GetSafepointEntry(Address pc); |
5582 | 5587 |
5583 // Find an object in a stub with a specified map | 5588 // Find an object in a stub with a specified map |
5584 Object* FindNthObject(int n, Map* match_map); | 5589 Object* FindNthObject(int n, Map* match_map); |
5585 | 5590 |
5586 // Find the first allocation site in an IC stub. | 5591 // Find the first allocation site in an IC stub. |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5843 | 5848 |
5844 // KindSpecificFlags1 layout (STUB, BUILTIN and OPTIMIZED_FUNCTION) | 5849 // KindSpecificFlags1 layout (STUB, BUILTIN and OPTIMIZED_FUNCTION) |
5845 static const int kStackSlotsFirstBit = 0; | 5850 static const int kStackSlotsFirstBit = 0; |
5846 static const int kStackSlotsBitCount = 24; | 5851 static const int kStackSlotsBitCount = 24; |
5847 static const int kMarkedForDeoptimizationBit = | 5852 static const int kMarkedForDeoptimizationBit = |
5848 kStackSlotsFirstBit + kStackSlotsBitCount; | 5853 kStackSlotsFirstBit + kStackSlotsBitCount; |
5849 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1; | 5854 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1; |
5850 static const int kCanHaveWeakObjects = kIsTurbofannedBit + 1; | 5855 static const int kCanHaveWeakObjects = kIsTurbofannedBit + 1; |
5851 // Could be moved to overlap previous bits when we need more space. | 5856 // Could be moved to overlap previous bits when we need more space. |
5852 static const int kIsConstructStub = kCanHaveWeakObjects + 1; | 5857 static const int kIsConstructStub = kCanHaveWeakObjects + 1; |
| 5858 static const int kIsPromiseRejection = kIsConstructStub + 1; |
5853 | 5859 |
5854 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); | 5860 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); |
5855 STATIC_ASSERT(kIsConstructStub + 1 <= 32); | 5861 STATIC_ASSERT(kIsPromiseRejection + 1 <= 32); |
5856 | 5862 |
5857 class StackSlotsField: public BitField<int, | 5863 class StackSlotsField: public BitField<int, |
5858 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT | 5864 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT |
5859 class MarkedForDeoptimizationField | 5865 class MarkedForDeoptimizationField |
5860 : public BitField<bool, kMarkedForDeoptimizationBit, 1> {}; // NOLINT | 5866 : public BitField<bool, kMarkedForDeoptimizationBit, 1> {}; // NOLINT |
5861 class IsTurbofannedField : public BitField<bool, kIsTurbofannedBit, 1> { | 5867 class IsTurbofannedField : public BitField<bool, kIsTurbofannedBit, 1> { |
5862 }; // NOLINT | 5868 }; // NOLINT |
5863 class CanHaveWeakObjectsField | 5869 class CanHaveWeakObjectsField |
5864 : public BitField<bool, kCanHaveWeakObjects, 1> {}; // NOLINT | 5870 : public BitField<bool, kCanHaveWeakObjects, 1> {}; // NOLINT |
5865 class IsConstructStubField : public BitField<bool, kIsConstructStub, 1> { | 5871 class IsConstructStubField : public BitField<bool, kIsConstructStub, 1> { |
5866 }; // NOLINT | 5872 }; // NOLINT |
| 5873 class IsPromiseRejectionField |
| 5874 : public BitField<bool, kIsPromiseRejection, 1> {}; // NOLINT |
5867 | 5875 |
5868 // KindSpecificFlags2 layout (ALL) | 5876 // KindSpecificFlags2 layout (ALL) |
5869 static const int kIsCrankshaftedBit = 0; | 5877 static const int kIsCrankshaftedBit = 0; |
5870 class IsCrankshaftedField: public BitField<bool, | 5878 class IsCrankshaftedField: public BitField<bool, |
5871 kIsCrankshaftedBit, 1> {}; // NOLINT | 5879 kIsCrankshaftedBit, 1> {}; // NOLINT |
5872 | 5880 |
5873 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) | 5881 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) |
5874 static const int kSafepointTableOffsetFirstBit = kIsCrankshaftedBit + 1; | 5882 static const int kSafepointTableOffsetFirstBit = kIsCrankshaftedBit + 1; |
5875 static const int kSafepointTableOffsetBitCount = 30; | 5883 static const int kSafepointTableOffsetBitCount = 30; |
5876 | 5884 |
(...skipping 6054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11931 } | 11939 } |
11932 return value; | 11940 return value; |
11933 } | 11941 } |
11934 }; | 11942 }; |
11935 | 11943 |
11936 | 11944 |
11937 } // NOLINT, false-positive due to second-order macros. | 11945 } // NOLINT, false-positive due to second-order macros. |
11938 } // NOLINT, false-positive due to second-order macros. | 11946 } // NOLINT, false-positive due to second-order macros. |
11939 | 11947 |
11940 #endif // V8_OBJECTS_H_ | 11948 #endif // V8_OBJECTS_H_ |
OLD | NEW |