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 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 5564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5575 class IsUnstable : public BitField<bool, 24, 1> {}; | 5575 class IsUnstable : public BitField<bool, 24, 1> {}; |
5576 class IsMigrationTarget : public BitField<bool, 25, 1> {}; | 5576 class IsMigrationTarget : public BitField<bool, 25, 1> {}; |
5577 class IsStrong : public BitField<bool, 26, 1> {}; | 5577 class IsStrong : public BitField<bool, 26, 1> {}; |
5578 class NewTargetIsBase : public BitField<bool, 27, 1> {}; | 5578 class NewTargetIsBase : public BitField<bool, 27, 1> {}; |
5579 // Bit 28 is free. | 5579 // Bit 28 is free. |
5580 | 5580 |
5581 // Keep this bit field at the very end for better code in | 5581 // Keep this bit field at the very end for better code in |
5582 // Builtins::kJSConstructStubGeneric stub. | 5582 // Builtins::kJSConstructStubGeneric stub. |
5583 // This counter is used for in-object slack tracking. | 5583 // This counter is used for in-object slack tracking. |
5584 // The in-object slack tracking is considered enabled when the counter is | 5584 // The in-object slack tracking is considered enabled when the counter is |
5585 // non zero. | 5585 // non zero. The counter only has a valid count for initial maps. For |
| 5586 // transitioned maps only kNoSlackTracking has a meaning, namely that inobject |
| 5587 // slack tracking already finished for the transition tree. Any other value |
| 5588 // indicates that either inobject slack tracking is still in progress, or that |
| 5589 // the map isn't part of the transition tree anymore. |
5586 class ConstructionCounter : public BitField<int, 29, 3> {}; | 5590 class ConstructionCounter : public BitField<int, 29, 3> {}; |
5587 static const int kSlackTrackingCounterStart = 7; | 5591 static const int kSlackTrackingCounterStart = 7; |
5588 static const int kSlackTrackingCounterEnd = 1; | 5592 static const int kSlackTrackingCounterEnd = 1; |
5589 static const int kNoSlackTracking = 0; | 5593 static const int kNoSlackTracking = 0; |
5590 STATIC_ASSERT(kSlackTrackingCounterStart <= ConstructionCounter::kMax); | 5594 STATIC_ASSERT(kSlackTrackingCounterStart <= ConstructionCounter::kMax); |
5591 | 5595 |
5592 | 5596 |
5593 // Inobject slack tracking is the way to reclaim unused inobject space. | 5597 // Inobject slack tracking is the way to reclaim unused inobject space. |
5594 // | 5598 // |
5595 // The instance size is initially determined by adding some slack to | 5599 // The instance size is initially determined by adding some slack to |
(...skipping 5206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10802 } | 10806 } |
10803 return value; | 10807 return value; |
10804 } | 10808 } |
10805 }; | 10809 }; |
10806 | 10810 |
10807 | 10811 |
10808 } // NOLINT, false-positive due to second-order macros. | 10812 } // NOLINT, false-positive due to second-order macros. |
10809 } // NOLINT, false-positive due to second-order macros. | 10813 } // NOLINT, false-positive due to second-order macros. |
10810 | 10814 |
10811 #endif // V8_OBJECTS_H_ | 10815 #endif // V8_OBJECTS_H_ |
OLD | NEW |