Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: src/heap/store-buffer.h

Issue 1317553002: [heap] Prevent direct access to StoreBuffer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/store-buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 12 matching lines...) Expand all
23 ObjectSlotCallback slot_callback); 23 ObjectSlotCallback slot_callback);
24 24
25 // Used to implement the write barrier by collecting addresses of pointers 25 // Used to implement the write barrier by collecting addresses of pointers
26 // between spaces. 26 // between spaces.
27 class StoreBuffer { 27 class StoreBuffer {
28 public: 28 public:
29 explicit StoreBuffer(Heap* heap); 29 explicit StoreBuffer(Heap* heap);
30 30
31 static void StoreBufferOverflow(Isolate* isolate); 31 static void StoreBufferOverflow(Isolate* isolate);
32 32
33 inline Address TopAddress();
34
35 void SetUp(); 33 void SetUp();
36 void TearDown(); 34 void TearDown();
37 35
38 // This is used by the mutator to enter addresses into the store buffer. 36 // This is used by the mutator to enter addresses into the store buffer.
39 inline void Mark(Address addr); 37 inline void Mark(Address addr);
40 38
41 // This is used by the heap traversal to enter the addresses into the store 39 // This is used by the heap traversal to enter the addresses into the store
42 // buffer that should still be in the store buffer after GC. It enters 40 // buffer that should still be in the store buffer after GC. It enters
43 // addresses directly into the old buffer because the GC starts by wiping the 41 // addresses directly into the old buffer because the GC starts by wiping the
44 // old buffer and thereafter only visits each cell once so there is no need 42 // old buffer and thereafter only visits each cell once so there is no need
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 217 }
220 218
221 private: 219 private:
222 StoreBuffer* store_buffer_; 220 StoreBuffer* store_buffer_;
223 bool stored_state_; 221 bool stored_state_;
224 }; 222 };
225 } 223 }
226 } // namespace v8::internal 224 } // namespace v8::internal
227 225
228 #endif // V8_STORE_BUFFER_H_ 226 #endif // V8_STORE_BUFFER_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/store-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698