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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 bool PrepareForIteration(); | 98 bool PrepareForIteration(); |
99 | 99 |
100 #ifdef DEBUG | 100 #ifdef DEBUG |
101 void Clean(); | 101 void Clean(); |
102 // Slow, for asserts only. | 102 // Slow, for asserts only. |
103 bool CellIsInStoreBuffer(Address cell); | 103 bool CellIsInStoreBuffer(Address cell); |
104 #endif | 104 #endif |
105 | 105 |
106 void Filter(int flag); | 106 void Filter(int flag); |
107 | 107 |
| 108 // Eliminates all stale store buffer entries from the store buffer, i.e., |
| 109 // slots that are not part of live objects anymore. This method must be |
| 110 // called after marking, when the whole transitive closure is known and |
| 111 // must be called before sweeping when mark bits are still intact. |
| 112 void ClearInvalidStoreBufferEntries(); |
| 113 void VerifyValidStoreBufferEntries(); |
| 114 |
108 private: | 115 private: |
109 Heap* heap_; | 116 Heap* heap_; |
110 | 117 |
111 // The store buffer is divided up into a new buffer that is constantly being | 118 // The store buffer is divided up into a new buffer that is constantly being |
112 // filled by mutator activity and an old buffer that is filled with the data | 119 // filled by mutator activity and an old buffer that is filled with the data |
113 // from the new buffer after compression. | 120 // from the new buffer after compression. |
114 Address* start_; | 121 Address* start_; |
115 Address* limit_; | 122 Address* limit_; |
116 | 123 |
117 Address* old_start_; | 124 Address* old_start_; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 } | 222 } |
216 | 223 |
217 private: | 224 private: |
218 StoreBuffer* store_buffer_; | 225 StoreBuffer* store_buffer_; |
219 bool stored_state_; | 226 bool stored_state_; |
220 }; | 227 }; |
221 } | 228 } |
222 } // namespace v8::internal | 229 } // namespace v8::internal |
223 | 230 |
224 #endif // V8_STORE_BUFFER_H_ | 231 #endif // V8_STORE_BUFFER_H_ |
OLD | NEW |