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

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

Issue 1725073003: Revert of Replace slots buffer with remembered set. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/store-buffer.h ('k') | test/cctest/cctest.gyp » ('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_INL_H_ 5 #ifndef V8_STORE_BUFFER_INL_H_
6 #define V8_STORE_BUFFER_INL_H_ 6 #define V8_STORE_BUFFER_INL_H_
7 7
8 #include "src/heap/heap.h" 8 #include "src/heap/heap.h"
9 #include "src/heap/remembered-set.h" 9 #include "src/heap/remembered-set.h"
10 #include "src/heap/spaces-inl.h" 10 #include "src/heap/spaces-inl.h"
11 #include "src/heap/store-buffer.h" 11 #include "src/heap/store-buffer.h"
12 12
13 namespace v8 { 13 namespace v8 {
14 namespace internal { 14 namespace internal {
15 15
16 void LocalStoreBuffer::Record(Address addr) {
17 if (top_->is_full()) top_ = new Node(top_);
18 top_->buffer[top_->count++] = addr;
19 }
20
21 void LocalStoreBuffer::Process(StoreBuffer* store_buffer) {
22 Node* current = top_;
23 while (current != nullptr) {
24 for (int i = 0; i < current->count; i++) {
25 Address slot = current->buffer[i];
26 Page* page = Page::FromAnyPointerAddress(heap_, slot);
27 RememberedSet<OLD_TO_NEW>::Insert(page, slot);
28 }
29 current = current->next;
30 }
31 }
16 32
17 } // namespace internal 33 } // namespace internal
18 } // namespace v8 34 } // namespace v8
19 35
20 #endif // V8_STORE_BUFFER_INL_H_ 36 #endif // V8_STORE_BUFFER_INL_H_
OLDNEW
« no previous file with comments | « src/heap/store-buffer.h ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698