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

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

Issue 1023443004: Version 4.3.48.1 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.3.48
Patch Set: Created 5 years, 9 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.cc ('k') | src/hydrogen-instructions.h » ('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/store-buffer.h" 8 #include "src/heap/store-buffer.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 12
13 Address StoreBuffer::TopAddress() { 13 Address StoreBuffer::TopAddress() {
14 return reinterpret_cast<Address>(heap_->store_buffer_top_address()); 14 return reinterpret_cast<Address>(heap_->store_buffer_top_address());
15 } 15 }
16 16
17 17
18 void StoreBuffer::Mark(Address addr) { 18 void StoreBuffer::Mark(Address addr) {
19 DCHECK(!heap_->cell_space()->Contains(addr)); 19 DCHECK(!heap_->cell_space()->Contains(addr));
20 DCHECK(!heap_->code_space()->Contains(addr)); 20 DCHECK(!heap_->code_space()->Contains(addr));
21 DCHECK(!heap_->old_data_space()->Contains(addr));
21 Address* top = reinterpret_cast<Address*>(heap_->store_buffer_top()); 22 Address* top = reinterpret_cast<Address*>(heap_->store_buffer_top());
22 *top++ = addr; 23 *top++ = addr;
23 heap_->public_set_store_buffer_top(top); 24 heap_->public_set_store_buffer_top(top);
24 if ((reinterpret_cast<uintptr_t>(top) & kStoreBufferOverflowBit) != 0) { 25 if ((reinterpret_cast<uintptr_t>(top) & kStoreBufferOverflowBit) != 0) {
25 DCHECK(top == limit_); 26 DCHECK(top == limit_);
26 Compact(); 27 Compact();
27 } else { 28 } else {
28 DCHECK(top < limit_); 29 DCHECK(top < limit_);
29 } 30 }
30 } 31 }
31 32
32 33
33 void StoreBuffer::EnterDirectlyIntoStoreBuffer(Address addr) { 34 void StoreBuffer::EnterDirectlyIntoStoreBuffer(Address addr) {
34 if (store_buffer_rebuilding_enabled_) { 35 if (store_buffer_rebuilding_enabled_) {
35 SLOW_DCHECK(!heap_->cell_space()->Contains(addr) && 36 SLOW_DCHECK(!heap_->cell_space()->Contains(addr) &&
36 !heap_->code_space()->Contains(addr) && 37 !heap_->code_space()->Contains(addr) &&
38 !heap_->old_data_space()->Contains(addr) &&
37 !heap_->new_space()->Contains(addr)); 39 !heap_->new_space()->Contains(addr));
38 Address* top = old_top_; 40 Address* top = old_top_;
39 *top++ = addr; 41 *top++ = addr;
40 old_top_ = top; 42 old_top_ = top;
41 old_buffer_is_sorted_ = false; 43 old_buffer_is_sorted_ = false;
42 old_buffer_is_filtered_ = false; 44 old_buffer_is_filtered_ = false;
43 if (top >= old_limit_) { 45 if (top >= old_limit_) {
44 DCHECK(callback_ != NULL); 46 DCHECK(callback_ != NULL);
45 (*callback_)(heap_, MemoryChunk::FromAnyPointerAddress(heap_, addr), 47 (*callback_)(heap_, MemoryChunk::FromAnyPointerAddress(heap_, addr),
46 kStoreBufferFullEvent); 48 kStoreBufferFullEvent);
47 } 49 }
48 } 50 }
49 } 51 }
50 } 52 }
51 } // namespace v8::internal 53 } // namespace v8::internal
52 54
53 #endif // V8_STORE_BUFFER_INL_H_ 55 #endif // V8_STORE_BUFFER_INL_H_
OLDNEW
« no previous file with comments | « src/heap/store-buffer.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698