| 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 5561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 5577 // [is_promise_rejection]: For kind BUILTIN tells whether the exception |
| 5578 // thrown by the code will lead to promise rejection. | 5578 // thrown by the code will lead to promise rejection. |
| 5579 inline bool is_promise_rejection(); | 5579 inline bool is_promise_rejection(); |
| 5580 inline void set_is_promise_rejection(bool flag); | 5580 inline void set_is_promise_rejection(bool flag); |
| 5581 | 5581 |
| 5582 // [is_exception_caught]: For kind BUILTIN tells whether the exception |
| 5583 // thrown by the code will be caught internally. |
| 5584 inline bool is_exception_caught(); |
| 5585 inline void set_is_exception_caught(bool flag); |
| 5586 |
| 5582 // [constant_pool]: The constant pool for this function. | 5587 // [constant_pool]: The constant pool for this function. |
| 5583 inline Address constant_pool(); | 5588 inline Address constant_pool(); |
| 5584 | 5589 |
| 5585 // Get the safepoint entry for the given pc. | 5590 // Get the safepoint entry for the given pc. |
| 5586 SafepointEntry GetSafepointEntry(Address pc); | 5591 SafepointEntry GetSafepointEntry(Address pc); |
| 5587 | 5592 |
| 5588 // Find an object in a stub with a specified map | 5593 // Find an object in a stub with a specified map |
| 5589 Object* FindNthObject(int n, Map* match_map); | 5594 Object* FindNthObject(int n, Map* match_map); |
| 5590 | 5595 |
| 5591 // Find the first allocation site in an IC stub. | 5596 // Find the first allocation site in an IC stub. |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5849 // KindSpecificFlags1 layout (STUB, BUILTIN and OPTIMIZED_FUNCTION) | 5854 // KindSpecificFlags1 layout (STUB, BUILTIN and OPTIMIZED_FUNCTION) |
| 5850 static const int kStackSlotsFirstBit = 0; | 5855 static const int kStackSlotsFirstBit = 0; |
| 5851 static const int kStackSlotsBitCount = 24; | 5856 static const int kStackSlotsBitCount = 24; |
| 5852 static const int kMarkedForDeoptimizationBit = | 5857 static const int kMarkedForDeoptimizationBit = |
| 5853 kStackSlotsFirstBit + kStackSlotsBitCount; | 5858 kStackSlotsFirstBit + kStackSlotsBitCount; |
| 5854 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1; | 5859 static const int kIsTurbofannedBit = kMarkedForDeoptimizationBit + 1; |
| 5855 static const int kCanHaveWeakObjects = kIsTurbofannedBit + 1; | 5860 static const int kCanHaveWeakObjects = kIsTurbofannedBit + 1; |
| 5856 // Could be moved to overlap previous bits when we need more space. | 5861 // Could be moved to overlap previous bits when we need more space. |
| 5857 static const int kIsConstructStub = kCanHaveWeakObjects + 1; | 5862 static const int kIsConstructStub = kCanHaveWeakObjects + 1; |
| 5858 static const int kIsPromiseRejection = kIsConstructStub + 1; | 5863 static const int kIsPromiseRejection = kIsConstructStub + 1; |
| 5864 static const int kIsExceptionCaught = kIsPromiseRejection + 1; |
| 5859 | 5865 |
| 5860 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); | 5866 STATIC_ASSERT(kStackSlotsFirstBit + kStackSlotsBitCount <= 32); |
| 5861 STATIC_ASSERT(kIsPromiseRejection + 1 <= 32); | 5867 STATIC_ASSERT(kIsExceptionCaught + 1 <= 32); |
| 5862 | 5868 |
| 5863 class StackSlotsField: public BitField<int, | 5869 class StackSlotsField: public BitField<int, |
| 5864 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT | 5870 kStackSlotsFirstBit, kStackSlotsBitCount> {}; // NOLINT |
| 5865 class MarkedForDeoptimizationField | 5871 class MarkedForDeoptimizationField |
| 5866 : public BitField<bool, kMarkedForDeoptimizationBit, 1> {}; // NOLINT | 5872 : public BitField<bool, kMarkedForDeoptimizationBit, 1> {}; // NOLINT |
| 5867 class IsTurbofannedField : public BitField<bool, kIsTurbofannedBit, 1> { | 5873 class IsTurbofannedField : public BitField<bool, kIsTurbofannedBit, 1> { |
| 5868 }; // NOLINT | 5874 }; // NOLINT |
| 5869 class CanHaveWeakObjectsField | 5875 class CanHaveWeakObjectsField |
| 5870 : public BitField<bool, kCanHaveWeakObjects, 1> {}; // NOLINT | 5876 : public BitField<bool, kCanHaveWeakObjects, 1> {}; // NOLINT |
| 5871 class IsConstructStubField : public BitField<bool, kIsConstructStub, 1> { | 5877 class IsConstructStubField : public BitField<bool, kIsConstructStub, 1> { |
| 5872 }; // NOLINT | 5878 }; // NOLINT |
| 5873 class IsPromiseRejectionField | 5879 class IsPromiseRejectionField |
| 5874 : public BitField<bool, kIsPromiseRejection, 1> {}; // NOLINT | 5880 : public BitField<bool, kIsPromiseRejection, 1> {}; // NOLINT |
| 5881 class IsExceptionCaughtField : public BitField<bool, kIsExceptionCaught, 1> { |
| 5882 }; // NOLINT |
| 5875 | 5883 |
| 5876 // KindSpecificFlags2 layout (ALL) | 5884 // KindSpecificFlags2 layout (ALL) |
| 5877 static const int kIsCrankshaftedBit = 0; | 5885 static const int kIsCrankshaftedBit = 0; |
| 5878 class IsCrankshaftedField: public BitField<bool, | 5886 class IsCrankshaftedField: public BitField<bool, |
| 5879 kIsCrankshaftedBit, 1> {}; // NOLINT | 5887 kIsCrankshaftedBit, 1> {}; // NOLINT |
| 5880 | 5888 |
| 5881 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) | 5889 // KindSpecificFlags2 layout (STUB and OPTIMIZED_FUNCTION) |
| 5882 static const int kSafepointTableOffsetFirstBit = kIsCrankshaftedBit + 1; | 5890 static const int kSafepointTableOffsetFirstBit = kIsCrankshaftedBit + 1; |
| 5883 static const int kSafepointTableOffsetBitCount = 30; | 5891 static const int kSafepointTableOffsetBitCount = 30; |
| 5884 | 5892 |
| (...skipping 6124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12009 } | 12017 } |
| 12010 return value; | 12018 return value; |
| 12011 } | 12019 } |
| 12012 }; | 12020 }; |
| 12013 | 12021 |
| 12014 | 12022 |
| 12015 } // NOLINT, false-positive due to second-order macros. | 12023 } // NOLINT, false-positive due to second-order macros. |
| 12016 } // NOLINT, false-positive due to second-order macros. | 12024 } // NOLINT, false-positive due to second-order macros. |
| 12017 | 12025 |
| 12018 #endif // V8_OBJECTS_H_ | 12026 #endif // V8_OBJECTS_H_ |
| OLD | NEW |