OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_STORE_BUFFER_H_ | 5 #ifndef V8_STORE_BUFFER_H_ |
6 #define V8_STORE_BUFFER_H_ | 6 #define V8_STORE_BUFFER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/base/logging.h" | 9 #include "src/base/logging.h" |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 void SetUp(); | 29 void SetUp(); |
30 void TearDown(); | 30 void TearDown(); |
31 | 31 |
32 static const int kStoreBufferOverflowBit = 1 << (14 + kPointerSizeLog2); | 32 static const int kStoreBufferOverflowBit = 1 << (14 + kPointerSizeLog2); |
33 static const int kStoreBufferSize = kStoreBufferOverflowBit; | 33 static const int kStoreBufferSize = kStoreBufferOverflowBit; |
34 static const int kStoreBufferLength = kStoreBufferSize / sizeof(Address); | 34 static const int kStoreBufferLength = kStoreBufferSize / sizeof(Address); |
35 | 35 |
36 // This is used to add addresses to the store buffer non-concurrently. | 36 // This is used to add addresses to the store buffer non-concurrently. |
37 inline void Mark(Address addr); | 37 inline void Mark(Address addr); |
38 | 38 |
| 39 // Removes the given slot from the store buffer non-concurrently. If the |
| 40 // slot was never added to the store buffer, then the function does nothing. |
| 41 void Remove(Address addr); |
| 42 |
39 // Slots that do not point to the ToSpace after callback invocation will be | 43 // Slots that do not point to the ToSpace after callback invocation will be |
40 // removed from the set. | 44 // removed from the set. |
41 void IteratePointersToNewSpace(ObjectSlotCallback callback); | 45 void IteratePointersToNewSpace(ObjectSlotCallback callback); |
42 | 46 |
43 void Verify(); | 47 void Verify(); |
44 | 48 |
45 // Eliminates all stale store buffer entries from the store buffer, i.e., | 49 // Eliminates all stale store buffer entries from the store buffer, i.e., |
46 // slots that are not part of live objects anymore. This method must be | 50 // slots that are not part of live objects anymore. This method must be |
47 // called after marking, when the whole transitive closure is known and | 51 // called after marking, when the whole transitive closure is known and |
48 // must be called before sweeping when mark bits are still intact. | 52 // must be called before sweeping when mark bits are still intact. |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 int count; | 109 int count; |
106 }; | 110 }; |
107 | 111 |
108 Node* top_; | 112 Node* top_; |
109 }; | 113 }; |
110 | 114 |
111 } // namespace internal | 115 } // namespace internal |
112 } // namespace v8 | 116 } // namespace v8 |
113 | 117 |
114 #endif // V8_STORE_BUFFER_H_ | 118 #endif // V8_STORE_BUFFER_H_ |
OLD | NEW |