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

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

Issue 463523002: Move store-buffer to heap and remove some unnecessary includes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/heap/store-buffer.cc ('k') | src/objects-inl.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/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) {
(...skipping 18 matching lines...) Expand all
37 !heap_->code_space()->Contains(addr) && 37 !heap_->code_space()->Contains(addr) &&
38 !heap_->old_data_space()->Contains(addr) && 38 !heap_->old_data_space()->Contains(addr) &&
39 !heap_->new_space()->Contains(addr)); 39 !heap_->new_space()->Contains(addr));
40 Address* top = old_top_; 40 Address* top = old_top_;
41 *top++ = addr; 41 *top++ = addr;
42 old_top_ = top; 42 old_top_ = top;
43 old_buffer_is_sorted_ = false; 43 old_buffer_is_sorted_ = false;
44 old_buffer_is_filtered_ = false; 44 old_buffer_is_filtered_ = false;
45 if (top >= old_limit_) { 45 if (top >= old_limit_) {
46 DCHECK(callback_ != NULL); 46 DCHECK(callback_ != NULL);
47 (*callback_)(heap_, 47 (*callback_)(heap_, MemoryChunk::FromAnyPointerAddress(heap_, addr),
48 MemoryChunk::FromAnyPointerAddress(heap_, addr),
49 kStoreBufferFullEvent); 48 kStoreBufferFullEvent);
50 } 49 }
51 } 50 }
52 } 51 }
53 52
54 53
55 void StoreBuffer::ClearDeadObject(HeapObject* object) { 54 void StoreBuffer::ClearDeadObject(HeapObject* object) {
56 Address& map_field = Memory::Address_at(object->address()); 55 Address& map_field = Memory::Address_at(object->address());
57 if (heap_->map_space()->Contains(map_field)) { 56 if (heap_->map_space()->Contains(map_field)) {
58 map_field = NULL; 57 map_field = NULL;
59 } 58 }
60 } 59 }
61 60 }
62 61 } // namespace v8::internal
63 } } // namespace v8::internal
64 62
65 #endif // V8_STORE_BUFFER_INL_H_ 63 #endif // V8_STORE_BUFFER_INL_H_
OLDNEW
« no previous file with comments | « src/heap/store-buffer.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698